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

Commit e95e4f9

Browse files
committed
feat(linear_algebra/finite_dimensional): generalize results to module.finite (#18811)
This generalize the following from `finite_dimensional` over division rings to `module.finite` over free modules: * `finite_dimensional.nonempty_linear_equiv_of_finrank_eq` (moved from `nonempty_linear_equiv_of_finrank_eq`) * `finite_dimensional.nonempty_linear_equiv_iff_finrank_eq` (moved from `nonempty_linear_equiv_iff_finrank_eq`) * `linear_equiv.of_finrank_eq` * `module.finite.map` (moved from `finite_dimensional.submodule.map.finite_dimensional`). This is the only lemma moved across the porting tide. * `submodule.finrank_map_le` (moved from `finite_dimensional.finrank_map_le`) * `submodule.finrank_map_subtype_eq` (moved from `finite_dimensional.finrank_map_subtype_eq`, needs no finite or free assumptions at all) * `submodule.finrank_le_finrank_of_le`
1 parent de29c32 commit e95e4f9

4 files changed

Lines changed: 51 additions & 52 deletions

File tree

src/linear_algebra/bilinear_form.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ lemma finrank_add_finrank_orthogonal
11811181
begin
11821182
rw [← to_lin_restrict_ker_eq_inf_orthogonal _ _ b₁,
11831183
← to_lin_restrict_range_dual_coannihilator_eq_orthogonal _ _,
1184-
finrank_map_subtype_eq],
1184+
submodule.finrank_map_subtype_eq],
11851185
conv_rhs { rw [← @subspace.finrank_add_finrank_dual_coannihilator_eq K V _ _ _ _
11861186
(B.to_lin.dom_restrict W).range,
11871187
add_comm, ← add_assoc, add_comm (finrank K ↥((B.to_lin.dom_restrict W).ker)),

src/linear_algebra/finite_dimensional.lean

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -358,18 +358,7 @@ span_of_finite K $ s.finite_to_set
358358
/-- Pushforwards of finite-dimensional submodules are finite-dimensional. -/
359359
instance (f : V →ₗ[K] V₂) (p : submodule K V) [h : finite_dimensional K p] :
360360
finite_dimensional K (p.map f) :=
361-
begin
362-
unfreezingI { rw [finite_dimensional, ← iff_fg, is_noetherian.iff_rank_lt_aleph_0] at h ⊢ },
363-
rw [← cardinal.lift_lt.{v' v}],
364-
rw [← cardinal.lift_lt.{v v'}] at h,
365-
rw [cardinal.lift_aleph_0] at h ⊢,
366-
exact (lift_rank_map_le f p).trans_lt h
367-
end
368-
369-
/-- Pushforwards of finite-dimensional submodules have a smaller finrank. -/
370-
lemma finrank_map_le (f : V →ₗ[K] V₂) (p : submodule K V) [finite_dimensional K p] :
371-
finrank K (p.map f) ≤ finrank K p :=
372-
by simpa [← finrank_eq_rank', -finrank_eq_rank] using lift_rank_map_le f p
361+
module.finite.map _ _
373362

374363
variable {K}
375364

@@ -781,32 +770,6 @@ section division_ring
781770
variables [division_ring K] [add_comm_group V] [module K V]
782771
{V₂ : Type v'} [add_comm_group V₂] [module K V₂]
783772

784-
/--
785-
Two finite-dimensional vector spaces are isomorphic if they have the same (finite) dimension.
786-
-/
787-
theorem nonempty_linear_equiv_of_finrank_eq [finite_dimensional K V] [finite_dimensional K V₂]
788-
(cond : finrank K V = finrank K V₂) : nonempty (V ≃ₗ[K] V₂) :=
789-
nonempty_linear_equiv_of_lift_rank_eq $ by simp only [← finrank_eq_rank, cond, lift_nat_cast]
790-
791-
/--
792-
Two finite-dimensional vector spaces are isomorphic if and only if they have the same (finite)
793-
dimension.
794-
-/
795-
theorem nonempty_linear_equiv_iff_finrank_eq [finite_dimensional K V] [finite_dimensional K V₂] :
796-
nonempty (V ≃ₗ[K] V₂) ↔ finrank K V = finrank K V₂ :=
797-
⟨λ ⟨h⟩, h.finrank_eq, λ h, nonempty_linear_equiv_of_finrank_eq h⟩
798-
799-
variables (V V₂)
800-
801-
/--
802-
Two finite-dimensional vector spaces are isomorphic if they have the same (finite) dimension.
803-
-/
804-
noncomputable def linear_equiv.of_finrank_eq [finite_dimensional K V] [finite_dimensional K V₂]
805-
(cond : finrank K V = finrank K V₂) : V ≃ₗ[K] V₂ :=
806-
classical.choice $ nonempty_linear_equiv_of_finrank_eq cond
807-
808-
variables {V}
809-
810773
lemma eq_of_le_of_finrank_le {S₁ S₂ : submodule K V} [finite_dimensional K S₂] (hle : S₁ ≤ S₂)
811774
(hd : finrank K S₂ ≤ finrank K S₁) : S₁ = S₂ :=
812775
begin
@@ -821,12 +784,7 @@ lemma eq_of_le_of_finrank_eq {S₁ S₂ : submodule K V} [finite_dimensional K S
821784
(hd : finrank K S₁ = finrank K S₂) : S₁ = S₂ :=
822785
eq_of_le_of_finrank_le hle hd.ge
823786

824-
@[simp]
825-
lemma finrank_map_subtype_eq (p : submodule K V) (q : submodule K p) :
826-
finite_dimensional.finrank K (q.map p.subtype) = finite_dimensional.finrank K q :=
827-
(submodule.equiv_subtype_map p q).symm.finrank_eq
828-
829-
variables {V₂} [finite_dimensional K V] [finite_dimensional K V₂]
787+
variables [finite_dimensional K V] [finite_dimensional K V₂]
830788

831789
/-- Given isomorphic subspaces `p q` of vector spaces `V` and `V₁` respectively,
832790
`p.quotient` is isomorphic to `q.quotient`. -/
@@ -1054,11 +1012,6 @@ lemma eq_top_of_finrank_eq [finite_dimensional K V] {S : submodule K V}
10541012
(h : finrank K S = finrank K V) :
10551013
S = ⊤ := finite_dimensional.eq_of_le_of_finrank_eq le_top (by simp [h, finrank_top])
10561014

1057-
lemma finrank_le_finrank_of_le {s t : submodule K V} [finite_dimensional K t]
1058-
(hst : s ≤ t) : finrank K s ≤ finrank K t :=
1059-
calc finrank K s = finrank K (comap t.subtype s) : (comap_subtype_equiv_of_le hst).finrank_eq.symm
1060-
... ≤ finrank K t : finrank_le _
1061-
10621015
lemma finrank_mono [finite_dimensional K V] :
10631016
monotone (λ (s : submodule K V), finrank K s) :=
10641017
λ s t, finrank_le_finrank_of_le

src/linear_algebra/free_module/finite/rank.lean

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ namespace finite_dimensional
3030
open module.free
3131

3232
section ring
33+
variables [ring R]
34+
variables [add_comm_group M] [module R M]
35+
variables [add_comm_group N] [module R N]
36+
37+
@[simp]
38+
lemma submodule.finrank_map_subtype_eq (p : submodule R M) (q : submodule R p) :
39+
finrank R (q.map p.subtype) = finrank R q :=
40+
(submodule.equiv_subtype_map p q).symm.finrank_eq
41+
42+
end ring
43+
44+
section ring_finite
3345

3446
variables [ring R] [strong_rank_condition R]
3547
variables [add_comm_group M] [module R M] [module.finite R M]
@@ -49,7 +61,7 @@ end
4961
@[simp] lemma finrank_eq_rank : ↑(finrank R M) = module.rank R M :=
5062
by { rw [finrank, cast_to_nat_of_lt_aleph_0 (rank_lt_aleph_0 R M)] }
5163

52-
end ring
64+
end ring_finite
5365

5466
section ring_free
5567

@@ -104,6 +116,25 @@ lemma finrank_matrix (m n : Type*) [fintype m] [fintype n] :
104116
finrank R (matrix m n R) = (card m) * (card n) :=
105117
by { simp [finrank] }
106118

119+
variables {R M N}
120+
121+
/-- Two finite and free modules are isomorphic if they have the same (finite) rank. -/
122+
theorem nonempty_linear_equiv_of_finrank_eq
123+
(cond : finrank R M = finrank R N) : nonempty (M ≃ₗ[R] N) :=
124+
nonempty_linear_equiv_of_lift_rank_eq $ by simp only [← finrank_eq_rank, cond, lift_nat_cast]
125+
126+
/-- Two finite and free modules are isomorphic if and only if they have the same (finite) rank. -/
127+
theorem nonempty_linear_equiv_iff_finrank_eq :
128+
nonempty (M ≃ₗ[R] N) ↔ finrank R M = finrank R N :=
129+
⟨λ ⟨h⟩, h.finrank_eq, λ h, nonempty_linear_equiv_of_finrank_eq h⟩
130+
131+
variables (M N)
132+
133+
/-- Two finite and free modules are isomorphic if they have the same (finite) rank. -/
134+
noncomputable def _root_.linear_equiv.of_finrank_eq (cond : finrank R M = finrank R N) :
135+
M ≃ₗ[R] N :=
136+
classical.choice $ nonempty_linear_equiv_of_finrank_eq cond
137+
107138
end ring_free
108139

109140
section comm_ring
@@ -115,7 +146,7 @@ variables [add_comm_group N] [module R N] [module.free R N] [module.finite R N]
115146
/-- The finrank of `M ⊗[R] N` is `(finrank R M) * (finrank R N)`. -/
116147
@[simp] lemma finrank_tensor_product (M : Type v) (N : Type w) [add_comm_group M] [module R M]
117148
[module.free R M] [add_comm_group N] [module R N] [module.free R N] :
118-
finrank R (M ⊗[R] N) = (finrank R M) * (finrank R N) :=
149+
finrank R (M ⊗[R] N) = (finrank R M) * (finrank R N) :=
119150
by { simp [finrank] }
120151

121152
end comm_ring
@@ -151,4 +182,15 @@ lemma submodule.finrank_quotient_le [module.finite R M] (s : submodule R M) :
151182
by simpa only [cardinal.to_nat_lift] using to_nat_le_of_le_of_lt_aleph_0
152183
(rank_lt_aleph_0 _ _) ((submodule.mkq s).rank_le_of_surjective (surjective_quot_mk _))
153184

185+
/-- Pushforwards of finite submodules have a smaller finrank. -/
186+
lemma submodule.finrank_map_le (f : M →ₗ[R] N) (p : submodule R M) [module.finite R p] :
187+
finrank R (p.map f) ≤ finrank R p :=
188+
finrank_le_finrank_of_rank_le_rank (lift_rank_map_le _ _) (rank_lt_aleph_0 _ _)
189+
190+
lemma submodule.finrank_le_finrank_of_le {s t : submodule R M} [module.finite R t]
191+
(hst : s ≤ t) : finrank R s ≤ finrank R t :=
192+
calc finrank R s = finrank R (s.comap t.subtype)
193+
: (submodule.comap_subtype_equiv_of_le hst).finrank_eq.symm
194+
... ≤ finrank R t : submodule.finrank_le _
195+
154196
end

src/ring_theory/finiteness.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,10 @@ end⟩
479479
instance range [finite R M] (f : M →ₗ[R] N) : finite R f.range :=
480480
of_surjective f.range_restrict $ λ ⟨x, y, hy⟩, ⟨y, subtype.ext hy⟩
481481

482+
/-- Pushforwards of finite submodules are finite. -/
483+
instance map (p : submodule R M) [finite R p] (f : M →ₗ[R] N) : finite R (p.map f) :=
484+
of_surjective (f.restrict $ λ _, mem_map_of_mem) $ λ ⟨x, y, hy, hy'⟩, ⟨⟨_, hy⟩, subtype.ext hy'⟩
485+
482486
variables (R)
483487

484488
instance self : finite R R :=

0 commit comments

Comments
 (0)