Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 1016a14

Browse files
committed
refactor(linear_algebra/finite_dimensional): generalize finite_dimensional.iff_fg to division rings (#7644)
Replace `finite_dimensional.iff_fg` (working over a field) with `is_noetherian.iff_fg` (working over a division ring). Also, use the `module.finite` predicate. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent 641cece commit 1016a14

File tree

13 files changed

+179
-131
lines changed

13 files changed

+179
-131
lines changed

src/analysis/normed_space/inner_product.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,7 @@ lemma orthonormal_basis_orthonormal [finite_dimensional 𝕜 E] :
28172817
(exists_subset_is_orthonormal_basis (orthonormal_empty 𝕜 E)).some_spec.some_spec.some_spec.2
28182818

28192819
instance [finite_dimensional 𝕜 E] : fintype (orthonormal_basis_index 𝕜 E) :=
2820-
finite_dimensional.fintype_basis_index (orthonormal_basis 𝕜 E)
2820+
is_noetherian.fintype_basis_index (orthonormal_basis 𝕜 E)
28212821

28222822
variables {𝕜 E}
28232823

src/data/complex/is_R_or_C.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ library_note "is_R_or_C instance"
626626

627627
/-- An `is_R_or_C` field is finite-dimensional over `ℝ`, since it is spanned by `{1, I}`. -/
628628
@[nolint dangerous_instance] instance is_R_or_C_to_real : finite_dimensional ℝ K :=
629-
finite_dimensional.iff_fg.mpr ⟨{1, I},
629+
is_noetherian.iff_fg.mpr ⟨{1, I},
630630
begin
631631
rw eq_top_iff,
632632
intros a _,
@@ -635,7 +635,7 @@ finite_dimensional.iff_fg.mpr ⟨{1, I},
635635
{ rw submodule.mem_span_singleton,
636636
use im a },
637637
simp [re_add_im a, algebra.smul_def, algebra_map_eq_of_real]
638-
end
638+
end
639639

640640
/-- Over an `is_R_or_C` field, we can register the properness of finite-dimensional normed spaces as
641641
an instance. -/

src/field_theory/finite/polynomial.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ calc module.rank K (R σ K) =
176176
... = fintype.card (σ → K) : cardinal.fintype_card _
177177

178178
instance : finite_dimensional K (R σ K) :=
179-
finite_dimensional.finite_dimensional_iff_dim_lt_omega.mpr
179+
is_noetherian.iff_dim_lt_omega.mpr
180180
(by simpa only [dim_R] using cardinal.nat_lt_omega (fintype.card (σ → K)))
181181

182182
lemma finrank_R : finite_dimensional.finrank K (R σ K) = fintype.card (σ → K) :=

src/field_theory/finiteness.lean

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
/-
2+
Copyright (c) 2019 Chris Hughes. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Chris Hughes
5+
-/
6+
import ring_theory.finiteness
7+
import linear_algebra.dimension
8+
9+
/-!
10+
# A module over a division ring is noetherian if and only if it is finite.
11+
12+
-/
13+
14+
universes u v
15+
16+
open_locale classical
17+
open cardinal submodule module function
18+
19+
namespace is_noetherian
20+
21+
variables {K : Type u} {V : Type v} [division_ring K] [add_comm_group V] [module K V]
22+
23+
-- PROJECT: Show all division rings are noetherian.
24+
-- This is currently annoying because we only have ideal of commutative rings.
25+
variables [is_noetherian_ring K]
26+
27+
/--
28+
A module over a division ring is noetherian if and only if
29+
its dimension (as a cardinal) is strictly less than the first infinite cardinal `omega`.
30+
-/
31+
lemma iff_dim_lt_omega : is_noetherian K V ↔ module.rank K V < omega.{v} :=
32+
begin
33+
let b := basis.of_vector_space K V,
34+
have := b.mk_eq_dim,
35+
simp only [lift_id] at this,
36+
rw [← this, lt_omega_iff_fintype, ← @set.set_of_mem_eq _ (basis.of_vector_space_index K V),
37+
← subtype.range_coe_subtype],
38+
split,
39+
{ intro,
40+
resetI,
41+
simpa using finite_of_linear_independent (basis.of_vector_space_index.linear_independent K V) },
42+
{ assume hbfinite,
43+
refine @is_noetherian_of_linear_equiv K (⊤ : submodule K V) V _
44+
_ _ _ _ (linear_equiv.of_top _ rfl) (id _),
45+
refine is_noetherian_of_fg_of_noetherian _ ⟨set.finite.to_finset hbfinite, _⟩,
46+
rw [set.finite.coe_to_finset, ← b.span_eq, basis.coe_of_vector_space] }
47+
end
48+
49+
variables (K V)
50+
51+
/-- The dimension of a noetherian module over a division ring, as a cardinal,
52+
is strictly less than the first infinite cardinal `omega`. -/
53+
lemma dim_lt_omega : ∀ [is_noetherian K V], module.rank K V < omega.{v} :=
54+
is_noetherian.iff_dim_lt_omega.1
55+
56+
variables {K V}
57+
58+
/-- In a noetherian module over a division ring, all bases are indexed by a finite type. -/
59+
noncomputable def fintype_basis_index {ι : Type*} [is_noetherian K V] (b : basis ι K V) :
60+
fintype ι :=
61+
b.fintype_index_of_dim_lt_omega (dim_lt_omega K V)
62+
63+
/-- In a noetherian module over a division ring,
64+
`basis.of_vector_space` is indexed by a finite type. -/
65+
noncomputable instance [is_noetherian K V] : fintype (basis.of_vector_space_index K V) :=
66+
fintype_basis_index (basis.of_vector_space K V)
67+
68+
/-- In a noetherian module over a division ring,
69+
if a basis is indexed by a set, that set is finite. -/
70+
lemma finite_basis_index {ι : Type*} {s : set ι} [is_noetherian K V] (b : basis s K V) :
71+
s.finite :=
72+
b.finite_index_of_dim_lt_omega (dim_lt_omega K V)
73+
74+
variables (K V)
75+
76+
/-- In a noetherian module over a division ring,
77+
there exists a finite basis. This is the indexing `finset`. -/
78+
noncomputable def finset_basis_index [is_noetherian K V] :
79+
finset V :=
80+
(finite_basis_index (basis.of_vector_space K V)).to_finset
81+
82+
@[simp] lemma coe_finset_basis_index [is_noetherian K V] :
83+
(↑(finset_basis_index K V) : set V) = basis.of_vector_space_index K V :=
84+
set.finite.coe_to_finset _
85+
86+
/--
87+
In a noetherian module over a division ring, there exists a finite basis.
88+
This is indexed by the `finset` `finite_dimensional.finset_basis_index`.
89+
This is in contrast to the result `finite_basis_index (basis.of_vector_space K V)`,
90+
which provides a set and a `set.finite`.
91+
-/
92+
noncomputable def finset_basis [is_noetherian K V] :
93+
basis (↑(finset_basis_index K V) : set V) K V :=
94+
(basis.of_vector_space K V).reindex (by simp)
95+
96+
@[simp] lemma range_finset_basis [is_noetherian K V] :
97+
set.range (finset_basis K V) = basis.of_vector_space_index K V :=
98+
by rw [finset_basis, basis.range_reindex, basis.range_of_vector_space]
99+
100+
variables {K V}
101+
102+
/-- A module over a division ring is noetherian if and only if it is finitely generated. -/
103+
lemma iff_fg :
104+
is_noetherian K V ↔ module.finite K V :=
105+
begin
106+
split,
107+
{ introI h,
108+
exact ⟨⟨finset_basis_index K V, by { convert (finset_basis K V).span_eq, simp }⟩⟩ },
109+
{ rintros ⟨s, hs⟩,
110+
rw [is_noetherian.iff_dim_lt_omega, ← dim_top, ← hs],
111+
exact lt_of_le_of_lt (dim_span_le _) (lt_omega_iff_finite.2 (set.finite_mem_finset s)) }
112+
end
113+
114+
end is_noetherian

src/field_theory/fixed.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ begin
204204
end
205205

206206
instance : finite_dimensional (fixed_points G F) F :=
207-
finite_dimensional.finite_dimensional_iff_dim_lt_omega.2 $
207+
is_noetherian.iff_dim_lt_omega.2 $
208208
lt_of_le_of_lt (dim_le_card G F) (cardinal.nat_lt_omega _)
209209

210210
lemma finrank_le_card : finrank (fixed_points G F) F ≤ fintype.card G :=

src/field_theory/splitting_field.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,12 +759,12 @@ alg_hom.comp (by { rw ← adjoin_roots L f, exact classical.choice (lift_of_spli
759759
algebra.to_top
760760

761761
theorem finite_dimensional (f : polynomial K) [is_splitting_field K L f] : finite_dimensional K L :=
762-
finite_dimensional.iff_fg.2 $ @algebra.top_to_submodule K L _ _ _ ▸ adjoin_roots L f ▸
762+
is_noetherian.iff_fg.2 @algebra.top_to_submodule K L _ _ _ ▸ adjoin_roots L f ▸
763763
fg_adjoin_of_finite (set.finite_mem_finset _) (λ y hy,
764764
if hf : f = 0
765765
then by { rw [hf, map_zero, roots_zero] at hy, cases hy }
766766
else (is_algebraic_iff_is_integral _).1 ⟨f, hf, (eval₂_eq_eval_map _).trans $
767-
(mem_roots $ by exact map_ne_zero hf).1 (multiset.mem_to_finset.mp hy)⟩)
767+
(mem_roots $ by exact map_ne_zero hf).1 (multiset.mem_to_finset.mp hy)⟩)
768768

769769
instance (f : polynomial K) : _root_.finite_dimensional K f.splitting_field :=
770770
finite_dimensional f.splitting_field f

src/field_theory/tower.lean

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,17 @@ by convert dim_mul_dim' F K A; rw lift_id
6262

6363
namespace finite_dimensional
6464

65+
open is_noetherian
66+
6567
theorem trans [finite_dimensional F K] [finite_dimensional K A] : finite_dimensional F A :=
6668
let b := basis.of_vector_space F K, c := basis.of_vector_space K A in
6769
of_fintype_basis $ b.smul c
6870

6971
lemma right [hf : finite_dimensional F A] : finite_dimensional K A :=
70-
let ⟨b, hb⟩ := iff_fg.1 hf in
71-
iff_fg.2 ⟨b, submodule.restrict_scalars_injective F _ _ $
72+
letb, hb⟩ := iff_fg.1 hf in
73+
iff_fg.2b, submodule.restrict_scalars_injective F _ _ $
7274
by { rw [submodule.restrict_scalars_top, eq_top_iff, ← hb, submodule.span_le],
73-
exact submodule.subset_span }⟩
75+
exact submodule.subset_span }⟩
7476

7577
/-- Tower law: if `A` is a `K`-algebra and `K` is a field extension of `F` then
7678
`dim_F(A) = dim_F(K) * dim_K(A)`. -/

src/linear_algebra/dimension.lean

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,32 @@ cardinal.card_le_of (λ s, @finset.card_map _ _ ⟨_, subtype.val_injective⟩ s
168168
H _ (by { refine (of_vector_space_index.linear_independent K V).mono (λ y h, _),
169169
rw [finset.mem_coe, finset.mem_map] at h, rcases h with ⟨x, hx, rfl⟩, exact x.2 }))
170170

171+
/-- If a vector space has a finite dimension, all bases are indexed by a finite type. -/
172+
lemma basis.nonempty_fintype_index_of_dim_lt_omega {ι : Type*}
173+
(b : basis ι K V) (h : module.rank K V < cardinal.omega) :
174+
nonempty (fintype ι) :=
175+
by rwa [← cardinal.lift_lt, ← b.mk_eq_dim,
176+
-- ensure `omega` has the correct universe
177+
cardinal.lift_omega, ← cardinal.lift_omega.{u_1 v},
178+
cardinal.lift_lt, cardinal.lt_omega_iff_fintype] at h
179+
180+
/-- If a vector space has a finite dimension, all bases are indexed by a finite type. -/
181+
noncomputable def basis.fintype_index_of_dim_lt_omega {ι : Type*}
182+
(b : basis ι K V) (h : module.rank K V < cardinal.omega) :
183+
fintype ι :=
184+
classical.choice (b.nonempty_fintype_index_of_dim_lt_omega h)
185+
186+
/-- If a vector space has a finite dimension, all bases are indexed by a finite set. -/
187+
lemma basis.finite_index_of_dim_lt_omega {ι : Type*} {s : set ι}
188+
(b : basis s K V) (h : module.rank K V < cardinal.omega) :
189+
s.finite :=
190+
b.nonempty_fintype_index_of_dim_lt_omega h
191+
192+
/-- If a vector space has a finite dimension, the index set of `basis.of_vector_space` is finite. -/
193+
lemma basis.finite_of_vector_space_index_of_dim_lt_omega (h : module.rank K V < cardinal.omega) :
194+
(basis.of_vector_space_index K V).finite :=
195+
(basis.of_vector_space K V).nonempty_fintype_index_of_dim_lt_omega h
196+
171197
variables [add_comm_group V'] [module K V']
172198

173199
/-- Two linearly equivalent vector spaces have the same dimension, a version with different
@@ -485,32 +511,6 @@ lemma exists_mem_ne_zero_of_dim_pos {s : submodule K V} (h : 0 < module.rank K s
485511
∃ b : V, b ∈ s ∧ b ≠ 0 :=
486512
exists_mem_ne_zero_of_ne_bot $ assume eq, by rw [eq, dim_bot] at h; exact lt_irrefl _ h
487513

488-
/-- If a vector space has a finite dimension, all bases are indexed by a finite type. -/
489-
lemma basis.nonempty_fintype_index_of_dim_lt_omega {ι : Type*}
490-
(b : basis ι K V) (h : module.rank K V < cardinal.omega) :
491-
nonempty (fintype ι) :=
492-
by rwa [← cardinal.lift_lt, ← b.mk_eq_dim,
493-
-- ensure `omega` has the correct universe
494-
cardinal.lift_omega, ← cardinal.lift_omega.{u_1 v},
495-
cardinal.lift_lt, cardinal.lt_omega_iff_fintype] at h
496-
497-
/-- If a vector space has a finite dimension, all bases are indexed by a finite type. -/
498-
noncomputable def basis.fintype_index_of_dim_lt_omega {ι : Type*}
499-
(b : basis ι K V) (h : module.rank K V < cardinal.omega) :
500-
fintype ι :=
501-
classical.choice (b.nonempty_fintype_index_of_dim_lt_omega h)
502-
503-
/-- If a vector space has a finite dimension, all bases are indexed by a finite set. -/
504-
lemma basis.finite_index_of_dim_lt_omega {ι : Type*} {s : set ι}
505-
(b : basis s K V) (h : module.rank K V < cardinal.omega) :
506-
s.finite :=
507-
b.nonempty_fintype_index_of_dim_lt_omega h
508-
509-
/-- If a vector space has a finite dimension, the index set of `basis.of_vector_space` is finite. -/
510-
lemma basis.finite_of_vector_space_index_of_dim_lt_omega (h : module.rank K V < cardinal.omega) :
511-
(basis.of_vector_space_index K V).finite :=
512-
(basis.of_vector_space K V).nonempty_fintype_index_of_dim_lt_omega h
513-
514514
section rank
515515

516516
/-- `rank f` is the rank of a `linear_map f`, defined as the dimension of `f.range`. -/

src/linear_algebra/dual.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ lemma total_dual_basis [fintype ι] (f : ι →₀ R) (i : ι) :
198198
finsupp.total ι (dual R M) R b.dual_basis f (b i) = f i :=
199199
begin
200200
rw [finsupp.total_apply, finsupp.sum_fintype, linear_map.sum_apply],
201-
{ simp_rw [smul_apply, smul_eq_mul, dual_basis_apply_self, mul_boole,
202-
finset.sum_ite_eq, if_pos (finset.mem_univ i)] },
201+
{ simp_rw [linear_map.smul_apply, smul_eq_mul, dual_basis_apply_self, mul_boole,
202+
finset.sum_ite_eq, if_pos (finset.mem_univ i)] },
203203
{ intro, rw zero_smul },
204204
end
205205

0 commit comments

Comments
 (0)