The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.Algebra.Module.NatInt

26 declarations and 1 deprecated aliases. Mathlib docs · Source

Modules over ℕ and ℤ

This file concerns modules where the scalars are the natural numbers or the integers.

Main definitions

  • AddCommMonoid.toNatModule: any AddCommMonoid is (uniquely) a module over the naturals.
  • AddCommGroup.toIntModule: any AddCommGroup is a module over the integers.

Main results

  • AddCommMonoid.uniqueNatModule: there is a unique AddCommMonoid ℕ M structure for any M

Tags

semimodule, module, vector space

instance instMulActionNatOfAddMonoid E0 #

{M : Type u_3} → [AddMonoid M] → MulAction ℕ M

instance instSMulWithZeroNat E0 #

{M : Type u_3} → [inst : AddMonoid M] → SMulWithZero ℕ M

instance instMulActionIntOfSubtractionMonoid E0 #

{M : Type u_3} → [SubtractionMonoid M] → MulAction ℤ M

instance instSMulWithZeroInt E0 #

{M : Type u_3} → [inst : SubtractionMonoid M] → SMulWithZero ℤ M

instance AddCommMonoid.toNatModule E3 #

{M : Type u_3} → [inst : AddCommMonoid M] → Module ℕ M

theorem DistribSMul.toAddMonoidHom_eq_nsmulAddMonoidHom E1 #

∀ {M : Type u_3} [inst : AddCommMonoid M], DistribSMul.toAddMonoidHom M = nsmulAddMonoidHom

instance AddCommGroup.toIntModule E3 #

(M : Type u_3) → [inst : AddCommGroup M] → Module ℤ M

theorem DistribSMul.toAddMonoidHom_eq_zsmulAddGroupHom E1 #

∀ (M : Type u_3) [inst : AddCommGroup M], DistribSMul.toAddMonoidHom M = zsmulAddGroupHom

abbrev Module.addCommMonoidToAddCommGroup E1 #

(R : Type u_1) → {M : Type u_3} → [inst : Ring R] → [inst_1 : AddCommMonoid M] → [Module R M] → AddCommGroup M

An AddCommMonoid that is a Module over a Ring carries a natural AddCommGroup structure. See note [reducible non-instances].

theorem Nat.cast_smul_eq_nsmul E1 #

∀ (R : Type u_1) {M : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (n : ℕ) (b : M),
  ↑n • b = n • b

nsmul is equal to any other module structure via a cast.

theorem ofNat_smul_eq_nsmul E1 #

∀ (R : Type u_1) {M : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (n : ℕ)
  [inst_3 : n.AtLeastTwo] (b : M), OfNat.ofNat n • b = OfNat.ofNat n • b

nsmul is equal to any other module structure via a cast.

theorem nat_smul_eq_nsmul E1 #

∀ {M : Type u_3} [inst : AddCommMonoid M] (h : Module ℕ M) (n : ℕ) (x : M), SMul.smul n x = n • x

Convert back any exotic ℕ-smul to the canonical instance. This should not be needed since in mathlib all AddCommMonoids should normally have exactly one ℕ-module structure by design.

def AddCommMonoid.uniqueNatModule E3 #

{M : Type u_3} → [inst : AddCommMonoid M] → Unique (Module ℕ M)

All ℕ-module structures are equal. Not an instance since in mathlib all AddCommMonoid should normally have exactly one ℕ-module structure by design.

instance AddCommMonoid.subsingletonNatModule E0 #

∀ {M : Type u_3} [inst : AddCommMonoid M], Subsingleton (Module ℕ M)

All ℕ-module structures are equal. See also AddCommMonoid.uniqueNatModule.

instance AddCommMonoid.nat_isScalarTower E0 #

∀ {R : Type u_1} {M : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  IsScalarTower ℕ R M

theorem map_natCast_smul E0 #

∀ {M : Type u_3} {M₂ : Type u_4} [inst : AddCommMonoid M] [inst_1 : AddCommMonoid M₂] {F : Type u_5}
  [inst_2 : FunLike F M M₂] [AddMonoidHomClass F M M₂] (f : F) (R : Type u_6) (S : Type u_7) [inst_4 : Semiring R]
  [inst_5 : Semiring S] [inst_6 : Module R M] [inst_7 : Module S M₂] (x : ℕ) (a : M), f (↑x • a) = ↑x • f a

theorem Nat.smul_one_eq_cast E1 #

∀ {R : Type u_5} [inst : NonAssocSemiring R] (m : ℕ), m • 1 = ↑m

theorem Int.smul_one_eq_cast E1 #

∀ {R : Type u_5} [inst : NonAssocRing R] (m : ℤ), m • 1 = ↑m

theorem Int.cast_smul_eq_zsmul E1 #

∀ (R : Type u_1) {M : Type u_3} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] (n : ℤ) (b : M),
  ↑n • b = n • b

zsmul is equal to any other module structure via a cast.

theorem int_smul_eq_zsmul E1 #

∀ {M : Type u_3} [inst : AddCommGroup M] (h : Module ℤ M) (n : ℤ) (x : M), SMul.smul n x = n • x

Convert back any exotic ℤ-smul to the canonical instance. This should not be needed since in mathlib all AddCommGroups should normally have exactly one ℤ-module structure by design.

def AddCommGroup.uniqueIntModule E1 #

{M : Type u_3} → [inst : AddCommGroup M] → Unique (Module ℤ M)

All ℤ-module structures are equal. Not an instance since in mathlib all AddCommGroup should normally have exactly one ℤ-module structure by design.

instance AddCommMonoid.subsingletonIntModule E0 #

∀ {M : Type u_3} [inst : AddCommMonoid M], Subsingleton (Module ℤ M)

All ℤ-module structures are equal. See also AddCommGroup.uniqueIntModule.

theorem map_intCast_smul E0 #

∀ {M : Type u_3} {M₂ : Type u_4} [inst : AddCommGroup M] [inst_1 : AddCommGroup M₂] {F : Type u_5}
  [inst_2 : FunLike F M M₂] [AddMonoidHomClass F M M₂] (f : F) (R : Type u_6) (S : Type u_7) [inst_4 : Ring R]
  [inst_5 : Ring S] [inst_6 : Module R M] [inst_7 : Module S M₂] (x : ℤ) (a : M), f (↑x • a) = ↑x • f a

instance AddCommGroup.intIsScalarTower E0 #

∀ {R : Type u} {M : Type v} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M], IsScalarTower ℤ R M

theorem CharZero.of_hasUniqueDiv E1 #

∀ (R : Type u_1) (M : Type u_3) [inst : Semiring R] [inst_1 : AddCancelCommMonoid M] [Module R M] [Nontrivial M]
  [HasUniqueDiv M], CharZero R

Only a ring of characteristic zero can have a non-trivial module without additive or scalar torsion.

theorem CharZero.of_module E1 #

∀ {R : Type u_1} (M : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoidWithOne M] [CharZero M] [Module R M],
  CharZero R

If M is an R-module with one and M has characteristic zero, then R has characteristic zero as well. Usually M is an R-algebra.

Deprecated aliases

NameNew nameSince
CharZero.of_isAddTorsionFreeCharZero.of_hasUniqueDiv2026-09-29