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

34 lines
913 B
Text

namespace MWE
inductive Id {A : Type u} : A → A → Type u
| refl {a : A} : Id a a
attribute [induction_eliminator] Id.casesOn
infix:50 (priority := high) " = " => Id
def symm {A : Type u} {a b : A} (p : a = b) : b = a :=
by { induction p; exact Id.refl }
def map {A : Type u} {B : Type v} {a b : A} (f : A → B) (p : a = b) : f a = f b :=
by { induction p; apply Id.refl }
def transport {A : Type u} (B : A → Type v) {a b : A} (p : a = b) : B a → B b :=
by { induction p; exact id }
def boolToUniverse : Bool → Type
| true => Unit
| false => Empty
def ffNeqTt : false = true → Empty :=
λ p => transport boolToUniverse (symm p) ()
def isZero : Nat → Bool
| Nat.zero => true
| Nat.succ _ => false
set_option pp.funBinderTypes true
set_option pp.letVarTypes true
set_option trace.Compiler.result true
def succNeqZero (n : Nat) : Nat.succ n = 0 → Empty :=
λ h => ffNeqTt (map isZero h)