Basic operations on the integers #
This file contains some basic lemmas about integers.
See note [foundational algebra order theory].
This file should not depend on anything defined in Mathlib (except for notation), so that it can be upstreamed to Batteries easily.
succ and pred #
Immediate successor of an integer: succ n = n + 1
Instances For
Immediate predecessor of an integer: pred n = n - 1
Instances For
Induction on integers: prove a proposition p i by proving the base case p 0,
the upwards induction step p i → p (i + 1) and the downwards induction step p (-i) → p (-i - 1).
It is used as the default induction principle for the induction tactic.
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.
Instances For
The positive case of Int.inductionOn'.
Instances For
The negative case of Int.inductionOn'.
Instances For
Inductively define a function on ℤ by defining it on ℕ and extending it from n to -n.
Instances For
See Int.inductionOn' for an induction in both directions.
See Int.inductionOn' for an induction in both directions.
A strong recursor for Int that specifies explicit values for integers below a threshold,
and is analogous to Nat.strongRec for integers on or above the threshold.
Instances For
mul #
natAbs #
/ #
mod #
properties of / and % #
dvd #
If n > 0 then m is not divisible by n iff it is between n * k and n * (k + 1)
for some k.
/ and ordering #
sign #
toNat #
The modulus of an integer by another as a natural. Uses the E-rounding convention.
Instances For
For use in Mathlib/Tactic/NormNum/Pow.lean