lean4-htt/tests/lean/run/resolveLVal.lean
2020-09-07 12:25:43 -07:00

23 lines
281 B
Text

new_frontend
namespace Foo
structure A :=
(x : Nat)
def A.doubleX (a : A) :=
2 * a.x
structure B extends A :=
(y : Nat)
def f (b : B) : Nat :=
b.x + b.doubleX
theorem ex1 : { x := 10, y := 0 : B }.doubleX = 20 :=
rfl
theorem ex2 : f { x := 10, y := 0 } = 30 :=
rfl
end Foo