lean4-htt/tests/lean/run/reservedNameResolution.lean
Leonardo de Moura 7a93a7b877
fix: reserved name resolution (#3803)
This PR includes the following fixes:

- Reserved name resolution inside namespaces
- Equation theorems for `match`er declarations are not private anymore
- Equation theorems for `match`er declarations are realizable
- `foo.match_<idx>.splitter` is now a reserved name
2024-03-29 02:56:48 +00:00

15 lines
392 B
Text

namespace Nat
def dist (n m : Nat) :=
n - m + (m - n)
example (n m : Nat) : dist n m = dist m n := by
simp [dist.eq_def, Nat.add_comm]
example (n m : Nat) : dist n m = dist m n := by
simp [Nat.dist.eq_def, Nat.add_comm]
theorem dist_comm (n m : Nat) : dist n m = dist m n := by
simp [dist.eq_def, Nat.add_comm]
theorem dist_self (n : Nat) : dist n n = 0 := by simp [dist.eq_def]