The integers form a group #
This file contains the additive group and multiplicative monoid instances on the integers.
See note [foundational algebra order theory].
Instances #
Equations
Equations
Extra instances to short-circuit type class resolution #
These also prevent non-computable instances like Int.normedCommRing
being used to construct
these instances non-computably.
Equations
- Int.instAddCommSemigroup = inferInstance
Miscellaneous lemmas #
Units #
Alias of the forward direction of Int.isUnit_iff_natAbs_eq
.
Parity #
Equations
- x.instDecidablePredEven = decidable_of_iff (x % 2 = 0) ⋯
IsSquare
can be decided on ℤ
by checking against the square root.