aboutsummaryrefslogtreecommitdiff
path: root/src/Reflection/WfInversion.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-01-31 20:08:08 -0500
committerGravatar Jason Gross <jgross@mit.edu>2017-01-31 20:08:08 -0500
commitd16174cecc15f74f91644098729f2aed99e97cd3 (patch)
tree566b457338d6cdb1fba60ed35010424f6b219ddc /src/Reflection/WfInversion.v
parent72efe58cb53c46b9ca8e7b133e9786f0ca8d0c43 (diff)
Nicer inversion_wff
Diffstat (limited to 'src/Reflection/WfInversion.v')
-rw-r--r--src/Reflection/WfInversion.v9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Reflection/WfInversion.v b/src/Reflection/WfInversion.v
index f4c0d14e1..e6c88a1ae 100644
--- a/src/Reflection/WfInversion.v
+++ b/src/Reflection/WfInversion.v
@@ -136,10 +136,17 @@ Section language.
End language.
Ltac inversion_wff_step :=
+ let postprocess H :=
+ (cbv [wff_code] in H;
+ simpl in H;
+ try match type of H with
+ | True => clear H
+ | False => exfalso; exact H
+ end) in
match goal with
| [ H : wff _ ?x ?y |- _ ]
=> first [ is_var x; is_var y; fail 1
| idtac ];
- apply wff_encode in H; unfold wff_code in H; simpl in H
+ apply wff_encode in H; postprocess H
end.
Ltac inversion_wff := repeat inversion_wff_step.