The integers form a linear ordered group #
This file contains the linear ordered group instance on the integers.
See note [foundational algebra order theory].
Recursors #
Int.rec
: Sign disjunction. Something is true/defined onℤ
if it's true/defined for nonnegative and for negative values. (Defined in core Lean 3)Int.inductionOn
: Simple growing induction on positive numbers, plus simple decreasing induction on negative numbers. Note that this recursor is currently onlyProp
-valued.Int.inductionOn'
: Simple growing induction for numbers greater thanb
, plus simple decreasing induction on numbers less thanb
.
Equations
- One or more equations did not get rendered due to their size.
Miscellaneous lemmas #
Alias of Int.natAbs_le_self_sq
.
succ and pred #
def
Int.inductionOn'
{C : ℤ → Sort u_1}
(z : ℤ)
(b : ℤ)
(H0 : C b)
(Hs : (k : ℤ) → b ≤ k → C k → C (k + 1))
(Hp : (k : ℤ) → k ≤ b → C k → C (k - 1))
:
C z
Inductively define a function on ℤ
by defining it at b
, for the succ
of a number greater
than b
, and the pred
of a number less than b
.
Equations
- Int.inductionOn' z b H0 Hs Hp = Eq.mpr ⋯ (Eq.mpr ⋯ (match z - b with | Int.ofNat n => Int.inductionOn'.pos b H0 Hs n | Int.negSucc n => Int.inductionOn'.neg b H0 Hp n))
Instances For
def
Int.inductionOn'.pos
{C : ℤ → Sort u_1}
(b : ℤ)
(H0 : C b)
(Hs : (k : ℤ) → b ≤ k → C k → C (k + 1))
(n : ℕ)
:
C (b + ↑n)
The positive case of Int.inductionOn'
.
Equations
- Int.inductionOn'.pos b H0 Hs 0 = cast ⋯ H0
- Int.inductionOn'.pos b H0 Hs (Nat.succ n) = cast ⋯ (Hs (b + ↑n) ⋯ (Int.inductionOn'.pos b H0 Hs n))
Instances For
def
Int.inductionOn'.neg
{C : ℤ → Sort u_1}
(b : ℤ)
(H0 : C b)
(Hp : (k : ℤ) → k ≤ b → C k → C (k - 1))
(n : ℕ)
:
C (b + Int.negSucc n)
The negative case of Int.inductionOn'
.
Equations
- Int.inductionOn'.neg b H0 Hp 0 = Hp b ⋯ H0
- Int.inductionOn'.neg b H0 Hp (Nat.succ n) = cast ⋯ (Hp (b + Int.negSucc n) ⋯ (Int.inductionOn'.neg b H0 Hp n))
Instances For
nat abs #
/
#
mod #
properties of /
and %
#
dvd #
/
and ordering #
theorem
Int.natAbs_eq_of_dvd_dvd
{s : ℤ}
{t : ℤ}
(hst : s ∣ t)
(hts : t ∣ s)
:
Int.natAbs s = Int.natAbs t