The integers, with addition, multiplication, and subtraction. #
the type, coercions, and notation
Instances for int
- algebra_int
- rat_module.no_zero_smul_divisors
- no_zero_smul_divisors.char_zero.no_zero_smul_divisors_int
- divisible_by_int_of_char_zero
- int.cast_coe
- int.has_sizeof_inst
- int.has_coe
- int.has_repr
- int.has_to_string
- int.has_zero
- int.has_one
- int.has_neg
- int.has_add
- int.has_mul
- int.has_sub
- int.has_div
- int.has_mod
- int.has_le
- int.has_lt
- int.linear_order
- native.float.of_int_coe
- json.int_coe
- has_le.le.can_lift
- div_inv_monoid.has_pow
- sub_neg_monoid.has_smul_int
- add_group.int_smul_comm_class
- add_group.int_smul_comm_class'
- with_zero.int.has_pow
- int.inhabited
- int.nontrivial
- int.comm_ring
- int.add_comm_monoid
- int.add_monoid
- int.monoid
- int.comm_monoid
- int.comm_semigroup
- int.semigroup
- int.add_comm_group
- int.add_group
- int.add_comm_semigroup
- int.add_semigroup
- int.comm_semiring
- int.semiring
- int.ring
- int.distrib
- int.has_to_format
- int.reflect
- int.linear_ordered_comm_ring
- int.ordered_comm_ring
- int.ordered_ring
- int.linear_ordered_add_comm_group
- non_unital_non_assoc_ring.int_smul_comm_class
- non_unital_non_assoc_ring.int_is_scalar_tower
- int.can_lift_pnat
- rat.can_lift
- int.infinite
- add_group.int_smul_with_zero
- add_comm_group.int_module
- add_comm_group.int_is_scalar_tower
- linear_map.compatible_smul.int_module
- int.countable
- int.encodable
- add_subgroup_class.has_zsmul
- subgroup_class.has_zpow
- add_subgroup.has_zsmul
- subgroup.has_zpow
- dfinsupp.has_int_scalar
- finsupp.has_int_scalar
- denumerable.int
- add_con.quotient.has_zsmul
- con.has_zpow
- tensor_product.compatible_smul.int
- int.euclidean_domain
- int.modeq.is_refl
- ring_con.has_zsmul
- self_adjoint.int.has_pow
- int.locally_finite_order
- int.normalization_monoid
- int.gcd_monoid
- int.normalized_gcd_monoid
- subfield.int.has_pow
- module.finite.add_monoid_hom
- module.free.add_monoid_hom
- int.floor_ring
- int.archimedean
- int.ordered_smul
- int.topological_space
- int.discrete_topology
- int.noncompact_space
- int.uniform_space
- add_group.has_continuous_const_smul_int
- add_group.has_continuous_smul_int
- nonneg.has_zpow
- add_group.has_uniform_continuous_const_smul_int
- int.has_dist
- int.metric_space
- int.proper_space
- int.normed_add_comm_group
- normed_add_group_hom.has_int_scalar
- int.normed_comm_ring
- int.norm_one_class
- int.measurable_space
- int.measurable_singleton_class
- div_inv_monoid.has_measurable_zpow
- sub_neg_monoid.has_measurable_smul_int₂
- int.borel_space
- measure_theory.simple_func.has_int_pow
- int.succ_order
- int.pred_order
- int.is_succ_archimedean
- int.is_pred_archimedean
- add_circle.int.divisible_by
- continuous_map.has_zsmul
- continuous_map.has_zpow
- bounded_continuous_function.has_int_scalar
- measure_theory.ae_eq_fun.has_int_pow
- int.has_pow
- int_bounded_random
- slim_check.int.sampleable
- int.non_null_json_serializable
- int.has_variable_names
- int.snum_coe
- category_theory.equivalence.int.has_pow
- category_theory.linear.preadditive_int_linear
- category_theory.functor.int_linear
- category_theory.graded_object.has_shift
- homological_complex.has_int_scalar
- zero_at_infty_continuous_map.has_int_scalar
- category_theory.Sheaf_hom_has_zsmul
- category_theory.differential_object.int.category_theory.has_shift
- schwartz_map.has_zsmul
- number_field.ring_of_integers.is_integral_closure
- number_field.ring_of_integers.is_noetherian
- number_field.ring_of_integers.module.free
- witt_vector.has_int_scalar
- truncated_witt_vector.has_int_scalar
- lie_ring.int_lie_algebra
- lie_module_hom.has_zsmul
- grade_order.nat_to_int
- poly.fun_like
- is_cyclotomic_extension.ring_of_integers
- is_cyclotomic_extension.ring_of_integers'
- modular_form.complex.slash_action
- modular_form.subgroup_action
- modular_form.SL_action
- cont_mdiff_section.has_zsmul
- left_invariant_derivation.has_int_scalar
- positive.int.has_pow
- centroid_hom.has_zsmul
- int.conditionally_complete_linear_order
@[protected, instance]
Equations
- int.has_coe = {coe := int.of_nat}
@[protected, instance]
Equations
- int.has_repr = {repr := int.repr}
@[protected, instance]
Equations
@[protected, instance]
Equations
- int.has_zero = {zero := int.zero}
definitions of basic functions
Equations
- int.sub_nat_nat m n = int.sub_nat_nat._match_1 m n (n - m)
- int.sub_nat_nat._match_1 m n k.succ = -[1+ k]
- int.sub_nat_nat._match_1 m n 0 = int.of_nat (m - n)
theorem
int.sub_nat_nat_of_sub_eq_zero
{m n : ℕ}
(h : n - m = 0) :
int.sub_nat_nat m n = int.of_nat (m - n)
theorem
int.sub_nat_nat_of_sub_eq_succ
{m n k : ℕ}
(h : n - m = k.succ) :
int.sub_nat_nat m n = -[1+ k]
@[protected]
Equations
- -[1+ m].mul -[1+ n] = int.of_nat (m.succ * n.succ)
- -[1+ m].mul (int.of_nat n) = int.neg_of_nat (m.succ * n)
- (int.of_nat m).mul -[1+ n] = int.neg_of_nat (m * n.succ)
- (int.of_nat m).mul (int.of_nat n) = int.of_nat (m * n)
these are only for internal use
theorem
int.of_nat_add_neg_succ_of_nat
(m n : ℕ) :
int.of_nat m + -[1+ n] = int.sub_nat_nat m n.succ
theorem
int.neg_succ_of_nat_add_of_nat
(m n : ℕ) :
-[1+ m] + int.of_nat n = int.sub_nat_nat n m.succ
theorem
int.of_nat_mul_neg_succ_of_nat
(m n : ℕ) :
int.of_nat m * -[1+ n] = int.neg_of_nat (m * n.succ)
some basic functions and properties
neg
basic properties of sub_nat_nat
nat_abs
sign
Quotient and remainder
gcd
addition
theorem
int.sub_nat_nat_sub
{m n : ℕ}
(h : n ≤ m)
(k : ℕ) :
int.sub_nat_nat (m - n) k = int.sub_nat_nat m (k + n)
theorem
int.sub_nat_nat_add
(m n k : ℕ) :
int.sub_nat_nat (m + n) k = int.of_nat m + int.sub_nat_nat n k
theorem
int.sub_nat_nat_add_neg_succ_of_nat
(m n k : ℕ) :
int.sub_nat_nat m n + -[1+ k] = int.sub_nat_nat m (n + k.succ)
theorem
int.add_assoc_aux1
(m n : ℕ)
(c : ℤ) :
int.of_nat m + int.of_nat n + c = int.of_nat m + (int.of_nat n + c)
negation
multiplication
theorem
int.of_nat_mul_neg_of_nat
(m n : ℕ) :
int.of_nat m * int.neg_of_nat n = int.neg_of_nat (m * n)
theorem
int.neg_of_nat_mul_of_nat
(m n : ℕ) :
int.neg_of_nat m * int.of_nat n = int.neg_of_nat (m * n)
theorem
int.neg_succ_of_nat_mul_neg_of_nat
(m n : ℕ) :
-[1+ m] * int.neg_of_nat n = int.of_nat (m.succ * n)
theorem
int.neg_of_nat_mul_neg_succ_of_nat
(m n : ℕ) :
int.neg_of_nat n * -[1+ m] = int.of_nat (n * m.succ)
theorem
int.of_nat_mul_sub_nat_nat
(m n k : ℕ) :
int.of_nat m * int.sub_nat_nat n k = int.sub_nat_nat (m * n) (m * k)
theorem
int.neg_succ_of_nat_mul_sub_nat_nat
(m n k : ℕ) :
-[1+ m] * int.sub_nat_nat n k = int.sub_nat_nat (m.succ * k) (m.succ * n)