Order instances on the integers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file contains:
- instances on
ℤ
. The stronger one isint.linear_ordered_comm_ring
. - basic lemmas about integers that involve order properties.
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.induction_on
: Simple growing induction on positive numbers, plus simple decreasing induction on negative numbers. Note that this recursor is currently onlyProp
-valued.int.induction_on'
: Simple growing induction for numbers greater thanb
, plus simple decreasing induction on numbers less thanb
.
@[protected, instance]
Equations
- int.linear_ordered_comm_ring = {add := comm_ring.add int.comm_ring, add_assoc := _, zero := comm_ring.zero int.comm_ring, zero_add := _, add_zero := _, nsmul := comm_ring.nsmul int.comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := comm_ring.neg int.comm_ring, sub := comm_ring.sub int.comm_ring, sub_eq_add_neg := _, zsmul := comm_ring.zsmul int.comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := comm_ring.int_cast int.comm_ring, nat_cast := comm_ring.nat_cast int.comm_ring, one := comm_ring.one int.comm_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := comm_ring.mul int.comm_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := comm_ring.npow int.comm_ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, le := linear_order.le int.linear_order, lt := linear_order.lt int.linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := int.add_le_add_left, exists_pair_ne := _, zero_le_one := int.linear_ordered_comm_ring._proof_1, mul_pos := int.mul_pos, le_total := _, decidable_le := linear_order.decidable_le int.linear_order, decidable_eq := linear_order.decidable_eq int.linear_order, decidable_lt := linear_order.decidable_lt int.linear_order, max := linear_order.max int.linear_order, max_def := _, min := linear_order.min int.linear_order, min_def := _, mul_comm := _}
Extra instances to short-circuit type class resolution #
@[protected, instance]
@[protected, instance]
@[protected, instance]
succ and pred #
nat abs #
/
#
mod #
properties of /
and %
#
dvd #
@[protected, instance]
Equations
- int.decidable_dvd = λ (a n : ℤ), decidable_of_decidable_of_iff (int.decidable_eq (n % a) 0) _