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

31 lines
1,023 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
def Xor' (a b : Prop) := (a ∧ ¬b) (b ∧ ¬a)
@[grind =] theorem xor_def {a b : Prop} : Xor' a b ↔ (a ∧ ¬b) (b ∧ ¬a) := Iff.rfl
class Nat.AtLeastTwo' (n : Nat) : Prop where
prop : 2 ≤ n
instance instNatAtLeastTwo' {n : Nat} : Nat.AtLeastTwo' (n + 2) where
prop := Nat.succ_le_succ <| Nat.succ_le_succ <| Nat.zero_le _
instance (priority := 100) instOfNatAtLeastTwo'
{R : Type _} {n : Nat} [NatCast R] [Nat.AtLeastTwo' n] :
OfNat R n where
ofNat := n.cast
class Distrib' (R : Type _) extends Add R where
instance Nat.instDistrib' : Distrib' Nat where
theorem Nat.even_xor_odd'.extracted_1_2 (k : Nat) :
Xor'
(@Eq.{1} Nat
(@HAdd.hAdd.{0, 0, 0} Nat Nat Nat
(@instHAdd.{0} Nat (@Distrib'.toAdd.{0} Nat Nat.instDistrib'))
(@HMul.hMul.{0, 0, 0} Nat Nat Nat
inferInstance
(@OfNat.ofNat.{0} Nat (nat_lit 2)
(@instOfNatAtLeastTwo'.{0} Nat (nat_lit 2) inferInstance inferInstance)) k) 1)
(2 * k))
True := by grind