lean4-htt/tests/lean/run/newfrontend2.lean

26 lines
489 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.

def foo {α} (a : Option α) (b : α) : α :=
match a with
| some a => a
| none => b
structure S :=
(x : Nat)
#check if 0 == 1 then true else false
def f (x : Nat) : Nat :=
if x < 5 then x+1 else x-1
def x := 1
#check foo x x
#check match 1 with | x => x + 1
#check match (motive := Int → _) 1 with | x => x + 1
#check match 1 with | x => x + 1
#check match (motive := Int → _) 1 with | x => x + 1
def g (x : Nat × Nat) (y : Nat) :=
x.1 + x.2 + y
#check (g ⟨·, 1⟩ ·)