lean4-htt/tests/lean/field_access.lean
Leonardo de Moura 8e2dcb8ad8 chore(frontends/lean): remove ^. variants (~> and )
This modification was motivated by a discussion at slack.
2017-03-28 12:23:33 -07:00

25 lines
536 B
Text

#check list.map
variable l : list nat
#check l^.1 -- Error l is not a structure
#check (1, 2)^.5 -- Error insufficient fields
example (l : list nat) : list nat :=
l^.forr (λ x, x + 1) -- Error there is no list.forr
example (A : Type) (a : A) : A :=
a^.symm -- Error type of 'a' is not a constant application
example (l : list nat) : list nat :=
l^.for (λ x, x + 1)
example (l : list nat) : list nat :=
l^.for (λ x, x + 1)
example (a b : nat) (h : a = b) : b = a :=
h^.symm
example (a b : nat) (h : a = b) : b = a :=
h^.symm