lean4-htt/tests/lean/run/proj_delta_issue.lean
Leonardo de Moura 3dd398a8a4
perf: improve isDefEq for contraints of the form t.i =?= s.i (#3965)
We now use lazy delta reduction at `t` and `s`.
See new test for motivation.
2024-04-22 00:41:34 +00:00

17 lines
283 B
Text

def ack : Nat → Nat → Nat
| 0, y => y+1
| x+1, 0 => ack x 1
| x+1, y+1 => ack x (ack (x+1) y)
structure S where
x : Nat
y : Nat
def f (x : Nat) : S :=
{ x, y := ack 10 20 }
def g (x : Nat) : S :=
{ x, y := ack 20 20 }
example : (f x).1 = (g x).1 :=
rfl