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.
21 lines
364 B
Text
21 lines
364 B
Text
def is_space : char → Prop
|
|
| ' ' := true
|
|
| '\x09' := true -- \t
|
|
| '\n' := true
|
|
| '\x0d' := true -- \r
|
|
| _ := false
|
|
|
|
instance is_space.decidable_pred : decidable_pred is_space :=
|
|
begin delta is_space, apply_instance end
|
|
|
|
def f (a : nat) : nat :=
|
|
a + 2
|
|
|
|
open tactic
|
|
|
|
lemma flemma : f 0 = 2 :=
|
|
begin
|
|
delta f,
|
|
guard_target 0 + 2 = 2,
|
|
reflexivity
|
|
end
|