Documentation

Mathlib.Data.Int.Basic

Basic algebraic instances on the integers #

This file contains instances on ℤ. The stronger one is Int.linearOrderedCommRing.

@[simp]
theorem Int.cast_id {n : ℤ} :
↑n = n
@[simp]
theorem Int.cast_mul {α : Type u_1} [NonAssocRing α] (m : ℤ) (n : ℤ) :
↑(m * n) = ↑m * ↑n
theorem Int.cast_Nat_cast {R : Type u_1} {n : ℕ} [AddGroupWithOne R] :
↑↑n = ↑n
@[simp]
theorem Int.cast_pow {R : Type u_1} [Ring R] (n : ℤ) (m : ℕ) :
↑(n ^ m) = ↑n ^ m

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
Equations
Equations
theorem Int.natAbs_pow (n : ℤ) (k : ℕ) :
theorem Int.coe_nat_strictMono :
StrictMono fun (x : ℕ) => ↑x
theorem Int.toAdd_pow (a : Multiplicative ℤ) (b : ℕ) :
Multiplicative.toAdd (a ^ b) = Multiplicative.toAdd a * ↑b
theorem Int.toAdd_zpow (a : Multiplicative ℤ) (b : ℤ) :
Multiplicative.toAdd (a ^ b) = Multiplicative.toAdd a * b
@[simp]
theorem Int.ofAdd_mul (a : ℤ) (b : ℤ) :
Multiplicative.ofAdd (a * b) = Multiplicative.ofAdd a ^ b
theorem zsmul_int_int (a : ℤ) (b : ℤ) :
a • b = a * b
theorem zsmul_int_one (n : ℤ) :
n • 1 = n