Commit 9df78c50 authored by ='s avatar =

trying something else

parent 3fa5e0ce
......@@ -180,6 +180,50 @@ Proof.
+ apply IHe.
Qed.
Lemma expEqBool_trans e f g:
expEqBool e f = true ->
expEqBool f g = true ->
expEqBool e g = true.
Proof.
revert e f g; induction e; destruct f; intros; simpl in H; inversion H; rewrite H; clear H; destruct g; simpl in H0; inversion H0; rewrite H0; clear H0; apply andb_true_iff in H1; destruct H1; apply andb_true_iff in H2; destruct H2; simpl.
- apply EquivEqBoolEq in H1.
apply EquivEqBoolEq in H.
apply beq_nat_true in H2.
apply beq_nat_true in H0.
subst.
rewrite <- beq_nat_refl,mTypeEqBool_refl.
auto.
- apply EquivEqBoolEq in H1.
apply EquivEqBoolEq in H.
subst.
rewrite mTypeEqBool_refl; simpl.
apply Qeq_bool_iff in H2.
apply Qeq_bool_iff in H0.
apply Qeq_bool_iff.
lra.
- assert (u = u0) by (destruct u; destruct u0; inversion H1; auto).
assert (u0 = u1) by (destruct u0; destruct u1; inversion H; auto).
subst.
assert (unopEqBool u1 u1 = true) by (destruct u1; auto).
apply andb_true_iff; split; try auto.
eapply IHe; eauto.
- apply andb_true_iff; split.
+ destruct b; destruct b0; destruct b1; auto.
+ apply andb_true_iff in H2; destruct H2.
apply andb_true_iff in H0; destruct H0.
apply andb_true_iff; split.
eapply IHe1; eauto.
eapply IHe2; eauto.
- apply EquivEqBoolEq in H1.
apply EquivEqBoolEq in H.
subst.
rewrite mTypeEqBool_refl; simpl.
eapply IHe; eauto.
Qed.
Fixpoint toRExp (e:exp Q) :=
match e with
|Var _ m v => Var R m v
......
This diff is collapsed.
This diff is collapsed.
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