lean4-htt/tests/lean/curly_notation.lean
Leonardo de Moura a0a8103804 chore(frontends/lean): go back to 'c' as notation for characters
This suggestion has been discussed at Slack.
We have decided to use #"c" as notation because we wanted to allow `'`
in the beginning of identifiers like in SML and F*. In particular,
we wanted to allow users to use 'a 'b 'c for naming type parameters
like in SML. However, nobody used this notation. In the Lean standard
library, we are using greek letters for naming type parameters.
So, there is no real motivation for the ugly #"c" syntax.
2017-05-02 13:00:51 -07:00

26 lines
477 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 }