The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V02. Numbers

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