Skip to content

Commit

Permalink
Add a let-unfolding preprocessing step to solveUnsafeAssert.
Browse files Browse the repository at this point in the history
This recursively unfolds lets appearing in the goal, as otherwise
the proof automation falls completely over.
  • Loading branch information
robdockins committed Dec 21, 2021
1 parent 17b2e26 commit 3558a5f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,16 @@ Ltac solveUnsafeAssertStep :=
| [ |- min (S ?n) ?n = _ ] => rewrite (min_Snn n)
end.

Ltac solveUnsafeAssert := repeat (repeat solveUnsafeAssertStep; simpl; try reflexivity; try lia); trivial.
Ltac unfoldLets :=
repeat
match goal with
[ X := _ |- _ ] => progress (cbv delta [X])
end.

Ltac solveUnsafeAssert :=
try (unfoldLets;
repeat (repeat solveUnsafeAssertStep; simpl; try reflexivity; try lia);
trivial).

Fixpoint iterNat {a : Type} (n : nat) (f : a -> a) : a -> a :=
match n with
Expand Down

0 comments on commit 3558a5f

Please sign in to comment.