lean4-htt/tests/elab/grind_9856.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

44 lines
858 B
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
inductive T (a:Type) where
| constuctor1: T a
| constuctor2: T a
instance : LE (T a) where
le := sorry
axiom L: Type
axiom L.pred (l1: L) (t: T α): Prop
axiom L.pred_le (l1: L) (t1 t2: T α):
t1 ≤ t2 → l1.pred t1 → l1.pred t2
grind_pattern L.pred_le => t1 ≤ t2, l1.pred t1
abbrev T' := T Unit
axiom l (t: T'): L
-- l keeps the same value when t gets bigger
axiom l_le (t1 t2: T'):
t1 ≤ t2 → l t1 = l t2
grind_pattern l_le => t1 ≤ t2, l t1
-- construction using l and L.pred
abbrev pred (t: T'): Prop :=
(l t).pred t
example: pred t1 → t1 ≤ t2 → pred t2 := by
grind
example: t1 ≤ t2 → pred t1 → pred t2 := by
grind
def is_mono (p: T' → Prop): Prop :=
∀ t1 t2,
p t1 → t1 ≤ t2 → p t2
example: is_mono pred := by
grind [is_mono]
example: is_mono pred := by
unfold is_mono
grind