Skip to content

Commit b446ba6

Browse files
feat: Countable.of_module_finite (leanprover-community#34994)
Co-authored-by: bwangpj <70694994+bwangpj@users.noreply.github.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
1 parent 389a421 commit b446ba6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Mathlib/LinearAlgebra/Countable.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module
88
public import Mathlib.Data.Finsupp.Encodable
99
public import Mathlib.Data.Set.Countable
1010
public import Mathlib.LinearAlgebra.Finsupp.LinearCombination
11+
public import Mathlib.RingTheory.Finiteness.Defs
1112

1213
/-!
1314
# Countable modules
@@ -29,4 +30,14 @@ instance {ι : Type*} [Countable R] [Countable ι] (v : ι → M) :
2930
(fun c : (ι →₀ R) => c.sum fun i _ => (c i) • v i)))
3031
exact fun _ h => Finsupp.mem_span_range_iff_exists_finsupp.mp (SetLike.mem_coe.mp h)
3132

33+
theorem Countable.of_moduleFinite [Countable R] [Module.Finite R M] : Countable M := by
34+
obtain ⟨n, s, h⟩ := Module.Finite.exists_fin (R := R) (M := M)
35+
rw [← Set.countable_univ_iff]
36+
have : Countable (Submodule.span R (Set.range s)) := inferInstance
37+
rwa [h] at this
38+
39+
theorem Uncountable.of_moduleFinite [hM : Uncountable M] [Module.Finite R M] : Uncountable R := by
40+
by_contra!
41+
exact (uncountable_iff_not_countable _).mp hM <| Countable.of_moduleFinite (R := R)
42+
3243
end Finsupp

0 commit comments

Comments
 (0)