lean4-htt/tests/elab/grind_panic_invariant.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

33 lines
1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module
-- grind fails, but also produces a panic.
@[grind] inductive star (R : αα → Prop) : αα → Prop where
| star_refl : ∀ x : α, star R x x
| star_step : ∀ x y z, R x y → star R y z → star R x z
set_option grind.debug true
inductive com: Type where
| SKIP
| ASSIGN
inductive cexec : com → Prop where
@[grind] inductive red : com × Nat → com × Nat → Prop where
| red_assign: ∀ s, red (.ASSIGN, s) (.SKIP, 0)
theorem issue3 (s s' : Nat) (c : com) :
star red (c, s) (.SKIP, s') → cexec c := by
intro h
generalize heq1 : (c, s) = h1
generalize heq2 : (com.SKIP, s') = h2
rw [heq1, heq2] at h
induction h
case star_refl =>
sorry
case star_step r _ a_ih =>
/-
The following `grind` used to trigger an assertion violation:
_private.Lean.Meta.Tactic.Grind.Inv.0.Lean.Meta.Grind.checkEqc Lean.Meta.Tactic.Grind.Inv:29:10: assertion violation: isSameExpr e ( __do_lift._@.Lean.Meta.Tactic.Grind.Inv._hyg.31.0 )
-/
fail_if_success grind
sorry