Commit 4a19cacf authored by Adam Chlipala's avatar Adam Chlipala

Closure conversion defined

parent 533e2737
...@@ -146,10 +146,13 @@ Module Concrete. ...@@ -146,10 +146,13 @@ Module Concrete.
induction G1 as [ | [x'' t'] tl ]; crush; eauto; induction G1 as [ | [x'' t'] tl ]; crush; eauto;
match goal with match goal with
| [ H : _ |-v _ : _ |- _ ] => inversion H | [ H : _ |-v _ : _ |- _ ] => inversion H
end; crush; elimtype False; eauto; end; crush; (elimtype False; eauto;
match goal with match goal with
| [ H : nil |-v _ : _ |- _ ] => inversion H | [ H : nil |-v _ : _ |- _ ] => inversion H
end. end)
|| match goal with
| [ H : _ |- _ ] => apply H; crush; eauto
end.
Qed. Qed.
Implicit Arguments subst_lookup [x' t G1]. Implicit Arguments subst_lookup [x' t G1].
......
This diff is collapsed.
...@@ -72,7 +72,7 @@ Ltac simplHyp invOne := ...@@ -72,7 +72,7 @@ Ltac simplHyp invOne :=
Ltac rewriteHyp := Ltac rewriteHyp :=
match goal with match goal with
| [ H : _ |- _ ] => rewrite H | [ H : _ |- _ ] => rewrite H; auto; [idtac]
end. end.
Ltac rewriterP := repeat (rewriteHyp; autorewrite with cpdt in *). Ltac rewriterP := repeat (rewriteHyp; autorewrite with cpdt in *).
...@@ -122,12 +122,17 @@ Ltac un_done := ...@@ -122,12 +122,17 @@ Ltac un_done :=
Ltac crush' lemmas invOne := Ltac crush' lemmas invOne :=
let sintuition := simpl in *; intuition; try subst; repeat (simplHyp invOne; intuition; try subst); try congruence let sintuition := simpl in *; intuition; try subst; repeat (simplHyp invOne; intuition; try subst); try congruence
in (sintuition; rewriter; in (sintuition;
match lemmas with autorewrite with cpdt in *;
| false => idtac repeat (match goal with
| _ => repeat ((app ltac:(fun L => inster L L) lemmas || appHyps ltac:(fun L => inster L L)); | [ H : _ |- _ ] => (rewrite H; [])
repeat (simplHyp invOne; intuition)); un_done || (rewrite H; [ | solve [ crush' lemmas invOne ] ])
end; sintuition; try omega; try (elimtype False; omega)). end; autorewrite with cpdt in *);
match lemmas with
| false => idtac
| _ => repeat ((app ltac:(fun L => inster L L) lemmas || appHyps ltac:(fun L => inster L L));
repeat (simplHyp invOne; intuition)); un_done
end; sintuition; try omega; try (elimtype False; omega)).
Ltac crush := crush' false fail. Ltac crush := crush' false fail.
......
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