Commit da65fbab authored by Adam Chlipala's avatar Adam Chlipala

Automated ccExp_correct

parent 87acdbf5
...@@ -995,49 +995,41 @@ Theorem ccExp_correct : forall t G ...@@ -995,49 +995,41 @@ Theorem ccExp_correct : forall t G
Hint Rewrite spliceFuncs_correct unpackExp_correct : cpdt. Hint Rewrite spliceFuncs_correct unpackExp_correct : cpdt.
Hint Resolve packExp_correct lookup_type_inner. Hint Resolve packExp_correct lookup_type_inner.
induction 1; crush. induction 1; crush;
match goal with match goal with
| [ IH : _, Hlr : lr ?T ?X1 ?X2, ENV : list Source.type, F2 : natvar _ -> _ |- _ ] => | [ IH : _, Hlr : lr ?T ?X1 ?X2, ENV : list Source.type, F2 : natvar _ -> _ |- _ ] =>
apply (IH X1 (length ENV) (T :: ENV) (true, snd (fvsExp (F2 (length ENV)) (T :: ENV)))) apply (IH X1 (length ENV) (T :: ENV) (true, snd (fvsExp (F2 (length ENV)) (T :: ENV))))
end. end; crush;
crush.
match goal with match goal with
| [ Hlt : forall t v1 v2, _ -> _ < _, Hin : In _ _ |- _ ] => | [ Hlt : forall t v1 v2, _ -> _ < _, Hin : In _ _ |- _ ] =>
generalize (Hlt _ _ _ Hin); crush solve [ generalize (Hlt _ _ _ Hin); crush ]
end.
crush;
match goal with
| [ |- context[match ?pf with refl_equal => _ end] ] => generalize pf | [ |- context[match ?pf with refl_equal => _ end] ] => generalize pf
end; simpl; end; simpl;
match goal with match goal with
| [ |- context[if ?E then _ else _] ] => destruct E | [ |- context[if ?E then _ else _] ] => destruct E
end; intuition; subst; end; intuition; subst;
try match goal with match goal with
| [ |- context[match ?pf with refl_equal => _ end] ] => rewrite (UIP_refl _ _ pf); assumption | [ |- context[match ?pf with refl_equal => _ end] ] => rewrite (UIP_refl _ _ pf); assumption
| [ Hlt : forall t v1 v2, _ -> _ < _, Hin : In (existT _ _ (_, length _)) _ |- _ ] => | [ Hlt : forall t v1 v2, _ -> _ < _, Hin : In (existT _ _ (_, length _)) _ |- _ ] =>
generalize (Hlt _ _ _ Hin); crush generalize (Hlt _ _ _ Hin); crush
end. | [ HG : _, Hin : In _ _, wf : wfExp _ _, pf : _ = Some _,
fvs : isfree _, env : envOf _ _ |- _ ] =>
generalize (H2 _ _ _ H5 (lookup_type_inner wf pf)); clear_all. generalize (HG _ _ _ Hin (lookup_type_inner wf pf)); clear_all;
repeat match goal with repeat match goal with
| [ |- context[match ?pf with refl_equal => _ end] ] => generalize pf | [ |- context[match ?pf with refl_equal => _ end] ] => generalize pf
end; simpl. end; simpl;
generalize (packExp_correct _ fvs (inclusion wf) env pf); simpl. generalize (packExp_correct _ fvs (inclusion wf) env pf); simpl;
match goal with match goal with
| [ |- ?X == ?Y -> _ ] => | [ |- ?X == ?Y -> _ ] =>
generalize X Y generalize X Y
end. end;
rewrite pf. rewrite pf; rewrite (lookup_type_inner wf pf);
rewrite (lookup_type_inner wf pf). intros lhs rhs Heq; intros;
crush.
repeat match goal with repeat match goal with
| [ H : _ = _ |- _ ] => rewrite (UIP_refl _ _ H) in * | [ H : _ = _ |- _ ] => rewrite (UIP_refl _ _ H) in *
end;
rewrite <- Heq; assumption
end. end.
rewrite <- H.
assumption.
Qed. Qed.
......
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