mathlib4 icon indicating copy to clipboard operation
mathlib4 copied to clipboard

Natural abs syntax clashes with pattern matching

Open abentkamp opened this issue 3 years ago • 2 comments
trafficstars

The notation for abs clashes with some variants of the match notation:

import Mathbin.Algebra.Abs -- works if this is not imported

def test : Nat → Nat
| 0 => 0  -- expected '|'
| n + 1 => 0

abentkamp avatar Dec 14 '21 16:12 abentkamp

Discussion on zulip: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathport.20abs.20syntax.20clash

gebner avatar Dec 15 '21 11:12 gebner

Transferred to mathlib4 because we've solved the issue in mathport (by just ignoring the notation).

We still need to figure out a notation for the absolute value in Lean 4 though.

gebner avatar Jul 18 '22 16:07 gebner

#477 added the |abs| notation.

gebner avatar Oct 31 '22 21:10 gebner