lean4-htt/tests/lean/curly_notation.lean
Leonardo de Moura dfd2a23cd4 feat(frontends/lean): use #"c" instead of 'c' for character literals
The new notation is the same one used in Standard ML.
It will also allow us to use ' in the beginning of identifiers like Standard ML.
2016-11-17 11:35:54 -08:00

26 lines
467 B
Text

check ({1, 2, 3} : set nat)
check ({1} : set nat)
check ({} : set nat)
definition s1 : set nat := {1, 2+3, 3, 4}
print s1
definition s2 : set char := {#"a", #"b", #"c"}
print s2
definition s3 : set string := {"hello", "world"}
print s3
check { a ∈ s1 | a > 1 }
check { a in s1 | a > 1 }
set_option pp.unicode false
check { a ∈ s1 | a > 2 }
definition a := 10
check ({a, a} : set nat)
check ({a, 1, a} : set nat)
check ({a} : set nat)
check { a // a > 0 }