/-
Copyright (c) 2019 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-/
module
public import Mathlib.Data.Finsupp.Encodable
public import Mathlib.RingTheory.Finiteness.Defs
import Mathlib.Data.Set.Countable
import Mathlib.LinearAlgebra.Finsupp.LinearCombination
/-!
# Countable modules
-/
public section
noncomputable section
variable {M : Type*} {R : Type*} [Semiring R] [AddCommMonoid M] [Module R M]
/-- If `R` is countable, then any `R`-submodule spanned by a countable family of vectors is
countable. -/
instance {ι : Type*} [Countable R] [Countable ι] (v : ι → M) :
Countable (Submodule.span R (Set.range v)) := by
refine Set.countable_coe_iff.mpr (Set.Countable.mono ?_ (Set.countable_range
(fun c : (ι →₀ R) => c.sum fun i _ => (c i) • v i)))
exact fun _ h => Finsupp.mem_span_range_iff_exists_finsupp.mp (SetLike.mem_coe.mp h)
theorem Countable.of_moduleFinite [Countable R] [Module.Finite R M] : Countable M := by
obtain ⟨n, s, h⟩ := Module.Finite.exists_fin (R := R) (M := M)
rw [← Set.countable_univ_iff]
have : Countable (Submodule.span R (Set.range s)) := inferInstance
rwa [h] at this
theorem Uncountable.of_moduleFinite [hM : Uncountable M] [Module.Finite R M] : Uncountable R := by
by_contra!
exact (uncountable_iff_not_countable _).mp hM <| Countable.of_moduleFinite (R := R)
@[deprecated (since := "2026-10-24")]
alias Finsupp.Countable.of_moduleFinite := Countable.of_moduleFinite
@[deprecated (since := "2026-10-24")]
alias Finsupp.Uncountable.of_moduleFinite := Uncountable.of_moduleFinite
¤ Dauer der Verarbeitung: 0.2 Sekunden
¤
*© Formatika GbR, Deutschland