Mathlib.Data.Int.NatAbs
4 declarations. Mathlib docs · Source
def Int.natAbsHom E1 #
ℤ →*₀ ℕ
Int.natAbs as a bundled MonoidWithZeroHom.
theorem Int.natAbsHom_apply E0 #
∀ (m : ℤ), Int.natAbsHom m = m.natAbs
theorem Int.natAbs_natCast_sub_natCast_of_ge E1 #
∀ {a b : ℕ}, b ≤ a → (↑a - ↑b).natAbs = a - b
theorem Int.natAbs_natCast_sub_natCast_of_le E1 #
∀ {a b : ℕ}, a ≤ b → (↑a - ↑b).natAbs = b - a