lean4-htt/tests/lean/run/structInst3.lean
Leonardo de Moura a01552d361 chore: fix some tests
Two of them are still broken due to a bug in the new elaborator.
2020-05-21 09:50:20 -07:00

27 lines
463 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.

universes u
namespace Ex1
structure A (α : Type u) :=
(x : α) (f : αα := λ x => x)
structure B (α : Type u) extends A α :=
(y : α := f (f x)) (g : ααα := λ x y => f x)
structure C (α : Type u) extends B α :=
(z : α := g x y) (x := f z)
end Ex1
new_frontend
open Ex1
def c1 : C Nat := { x := 1 }
#check { c1 with z := 2 }
def c2 : C (Nat × Nat) := { z := (1, 1) }
#check { c2 with x.fst := 2 }
#check { c2 with x.1 := 3 }