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 #
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
- z.inductionOn' b H0 Hs Hp = ⋯.mpr (⋯.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 n.succ = 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 n.succ = cast ⋯ (Hp (b + Int.negSucc n) ⋯ (Int.inductionOn'.neg b H0 Hp n))