Documentation

Mathlib.Data.Int.NatAbs

Lemmas about Int.natAbs #

This file contains some results on Int.natAbs, the absolute value of an integer as a natural number.

Main results #

@[simp]
theorem Int.natAbs_natCast_sub_natCast_of_ge {a b : ℕ} (h : b ≤ a) :
(↑a - ↑b).natAbs = a - b
theorem Int.natAbs_natCast_sub_natCast_of_le {a b : ℕ} (h : a ≤ b) :
(↑a - ↑b).natAbs = b - a