lean4-htt/tests/lean/notation3.lean
2017-03-09 18:41:19 -08:00

8 lines
296 B
Text

--
inductive List (T : Type) : Type | nil {} : List | cons : T → List → List open List notation h :: t := cons h t notation `[` l:(foldr `, ` (h t, cons h t) nil) `]` := l
open prod num
constants a b : num
#check [a, b, b]
#check (a, true, a = b, b)
#check (a, b)
#check [(1:num), 2+2, 3]