lean4-htt/tests/lean/run/constFun.lean
Leonardo de Moura 43d98ef7e3 fix: Term/Sort parsers
missing `checkColGt`
2020-11-26 09:34:32 -08:00

17 lines
358 B
Text

structure ConstantFunction where
domain : Type
range : Type
f : domain → range
h : ∀ a b, f a = f b
instance : CoeFun ConstantFunction (fun s => s.domain → s.range) where
coe s := s.f
def zeroNatNat : ConstantFunction where
domain := Nat
range := Nat
f x := 0
h a b := rfl
def tst (x : Nat) : Nat :=
zeroNatNat x