Commit 12993b6d authored by Joachim Bard's avatar Joachim Bard

more work on admits

parent bf5f1fb2
......@@ -380,18 +380,15 @@ Proof.
rewrite Heq, e3, e4; auto.
Qed.
Lemma validRanges_ssa_extension (e: expr Q) (e' : expr Q) A E Gamma
vR' m n c fVars dVars outVars:
ssa (Let m n e' c) (fVars dVars) outVars -> (* maybe not needed *)
NatSet.Subset (freeVars e) (fVars dVars) ->
~ (n fVars dVars) ->
Lemma validRanges_ssa_extension (e: expr Q) A E Gamma
vR' n fVars:
NatSet.Subset (freeVars e) fVars ->
~ (n fVars) ->
validRanges e A E Gamma ->
validRanges e A (updEnv n vR' E) Gamma.
(*(updDefVars (Var R n) REAL Gamma). *)
Proof.
(*
intros Hssa Hsub Hnotin Hranges.
induction e.
induction e in E, fVars |- *;
intros Hsub Hnotin Hranges.
- split; auto.
destruct Hranges as [_ [iv [err [vR Hranges]]]].
exists iv, err, vR; intuition.
......@@ -408,7 +405,7 @@ Proof.
eapply eval_expr_ssa_extension; try eassumption. *)
- simpl in Hsub.
destruct Hranges as [Hunopranges Hranges].
specialize (IHe Hsub Hunopranges).
specialize (IHe _ _ Hsub Hnotin Hunopranges).
split; auto.
destruct Hranges as [iv [err [vR Hranges]]].
exists iv, err, vR; intuition.
......@@ -416,13 +413,13 @@ Proof.
(* eapply swap_Gamma_eval_expr.
eapply Rmap_updVars_comm.
eapply eval_expr_ssa_extension; try eassumption. *)
rewrite usedVars_toREval_toRExp_compat; auto.
rewrite freeVars_toREval_toRExp_compat; auto.
- simpl in Hsub.
assert (NatSet.Subset (usedVars e1) (fVars dVars)) as Hsub1 by set_tac.
assert (NatSet.Subset (usedVars e2) (fVars dVars)) as Hsub2 by (clear Hsub1; set_tac).
assert (NatSet.Subset (freeVars e1) fVars) as Hsub1 by set_tac.
assert (NatSet.Subset (freeVars e2) fVars) as Hsub2 by (clear Hsub1; set_tac).
destruct Hranges as [[Hdiv [Hranges1 Hranges2]] Hranges].
specialize (IHe1 Hsub1 Hranges1).
specialize (IHe2 Hsub2 Hranges2).
specialize (IHe1 _ _ Hsub1 Hnotin Hranges1).
specialize (IHe2 _ _ Hsub2 Hnotin Hranges2).
simpl.
repeat split; auto.
destruct Hranges as [iv [err [vR Hranges]]].
......@@ -432,15 +429,15 @@ Proof.
eapply Rmap_updVars_comm.
eapply eval_expr_ssa_extension; try eassumption. *)
simpl.
repeat rewrite usedVars_toREval_toRExp_compat; auto.
rewrite !freeVars_toREval_toRExp_compat; auto.
- simpl in Hsub.
assert (NatSet.Subset (usedVars e1) (fVars dVars)) as Hsub1 by set_tac.
assert (NatSet.Subset (usedVars e2) (fVars dVars)) as Hsub2 by (clear Hsub1; set_tac).
assert (NatSet.Subset (usedVars e3) (fVars dVars)) as Hsub3 by (clear Hsub1 Hsub2; set_tac).
assert (NatSet.Subset (freeVars e1) fVars) as Hsub1 by set_tac.
assert (NatSet.Subset (freeVars e2) fVars) as Hsub2 by (clear Hsub1; set_tac).
assert (NatSet.Subset (freeVars e3) fVars) as Hsub3 by (clear Hsub1 Hsub2; set_tac).
destruct Hranges as [[Hranges1 [Hranges2 Hranges3]] Hranges].
specialize (IHe1 Hsub1 Hranges1).
specialize (IHe2 Hsub2 Hranges2).
specialize (IHe3 Hsub3 Hranges3).
specialize (IHe1 _ _ Hsub1 Hnotin Hranges1).
specialize (IHe2 _ _ Hsub2 Hnotin Hranges2).
specialize (IHe3 _ _ Hsub3 Hnotin Hranges3).
simpl.
repeat split; auto.
destruct Hranges as [iv [err [vR Hranges]]].
......@@ -450,10 +447,10 @@ Proof.
eapply Rmap_updVars_comm.
eapply eval_expr_ssa_extension; try eassumption. *)
simpl.
repeat rewrite usedVars_toREval_toRExp_compat; auto.
rewrite !freeVars_toREval_toRExp_compat; auto.
- simpl in Hsub.
destruct Hranges as [Hranges' Hranges].
specialize (IHe Hsub Hranges').
specialize (IHe _ _ Hsub Hnotin Hranges').
split; auto.
destruct Hranges as [iv [err [vR Hranges]]].
exists iv, err, vR; intuition.
......@@ -461,7 +458,35 @@ Proof.
(* eapply swap_Gamma_eval_expr.
eapply Rmap_updVars_comm.
eapply eval_expr_ssa_extension; try eassumption. *)
rewrite usedVars_toREval_toRExp_compat; auto.
Qed.
*)
rewrite freeVars_toREval_toRExp_compat; auto.
- simpl in Hsub.
assert (NatSet.Subset (freeVars e1) fVars) as Hsub1 by set_tac.
destruct Hranges as [[Hranges1 Hranges2] Hranges].
specialize (IHe1 _ _ Hsub1 Hnotin Hranges1).
destruct Hranges as [iv [err [vR Hranges]]].
repeat split; auto.
+ intros.
admit.
+ exists iv, err, vR; intuition.
eapply eval_expr_ssa_extension; eauto.
cbn.
rewrite !freeVars_toREval_toRExp_compat; auto.
- simpl in Hsub.
assert (NatSet.Subset (freeVars e1) fVars) as Hsub1 by set_tac.
assert (NatSet.Subset (freeVars e2) fVars) as Hsub2 by (clear Hsub1; set_tac).
assert (NatSet.Subset (freeVars e3) fVars) as Hsub3 by (clear Hsub1 Hsub2; set_tac).
destruct Hranges as [[Hranges1 [Hranges2 Hranges3]] Hranges].
specialize (IHe1 _ _ Hsub1 Hnotin Hranges1).
specialize (IHe2 _ _ Hsub2 Hnotin Hranges2).
specialize (IHe3 _ _ Hsub3 Hnotin Hranges3).
simpl.
repeat split; auto.
destruct Hranges as [iv [err [vR Hranges]]].
exists iv, err, vR; intuition.
eapply eval_expr_ssa_extension; eauto.
(* eapply swap_Gamma_eval_expr.
eapply Rmap_updVars_comm.
eapply eval_expr_ssa_extension; try eassumption. *)
simpl.
rewrite !freeVars_toREval_toRExp_compat; auto.
Admitted.
......@@ -343,17 +343,16 @@ Proof.
eapply ssa_subset_freeVars in x_free; eauto.
Qed.
Lemma eval_expr_ssa_extension (e: expr R) (e' : expr Q) E Gamma DeltaMap
vR vR' m m__e n c fVars dVars outVars:
ssa (Let m n e' c) (fVars dVars) outVars ->
NatSet.Subset (freeVars e) (fVars dVars) ->
~ (n fVars dVars) ->
Lemma eval_expr_ssa_extension (e: expr R) E Gamma DeltaMap
vR vR' m__e n fVars:
NatSet.Subset (freeVars e) fVars ->
~ (n fVars) ->
eval_expr E Gamma DeltaMap e vR m__e ->
eval_expr (updEnv n vR' E) Gamma DeltaMap e vR m__e.
Proof.
intros Hssa Hsub Hnotin Heval.
intros Hsub Hnotin Heval.
eapply eval_expr_ignore_bind; [auto |].
edestruct ssa_inv_let; eauto.
intros ?. apply Hnotin. set_tac.
Qed.
Lemma eval_expr_ssa_extension2 (e: expr R) (e' : expr Q) E Gamma DeltaMap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment