Skip to content

Commit

Permalink
chore: remove duplicate lemma FiniteDimensional.eq_top_of_finrank_eq (#…
Browse files Browse the repository at this point in the history
…6304)

The lemma is a perfect duplicate of `Submodule.eq_top_of_finrank_eq`.
  • Loading branch information
sgouezel committed Aug 3, 2023
1 parent 1bc5bc2 commit 421f759
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Mathlib/FieldTheory/Tower.lean
Expand Up @@ -35,7 +35,7 @@ tower law

universe u v w u₁ v₁ w₁

open Classical BigOperators FiniteDimensional Cardinal
open BigOperators Cardinal Submodule

variable (F : Type u) (K : Type v) (A : Type w)

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
Expand Up @@ -131,7 +131,7 @@ cardinality is one more than that of the finite-dimensional space is
theorem AffineIndependent.vectorSpan_eq_top_of_card_eq_finrank_add_one [FiniteDimensional k V]
[Fintype ι] {p : ι → P} (hi : AffineIndependent k p) (hc : Fintype.card ι = finrank k V + 1) :
vectorSpan k (Set.range p) = ⊤ :=
eq_top_of_finrank_eq <| hi.finrank_vectorSpan hc
Submodule.eq_top_of_finrank_eq <| hi.finrank_vectorSpan hc
#align affine_independent.vector_span_eq_top_of_card_eq_finrank_add_one AffineIndependent.vectorSpan_eq_top_of_card_eq_finrank_add_one

variable (k)
Expand Down
12 changes: 6 additions & 6 deletions Mathlib/LinearAlgebra/BilinearForm.lean
Expand Up @@ -1426,13 +1426,13 @@ theorem toLin_restrict_range_dualCoannihilator_eq_orthogonal (B : BilinForm K V)

variable [FiniteDimensional K V]

open FiniteDimensional
open FiniteDimensional Submodule

theorem finrank_add_finrank_orthogonal {B : BilinForm K V} {W : Subspace K V} (b₁ : B.IsRefl) :
finrank K W + finrank K (B.orthogonal W) =
finrank K V + finrank K (W ⊓ B.orthogonal ⊤ : Subspace K V) := by
rw [← toLin_restrict_ker_eq_inf_orthogonal _ _ b₁, ←
toLin_restrict_range_dualCoannihilator_eq_orthogonal _ _, Submodule.finrank_map_subtype_eq]
toLin_restrict_range_dualCoannihilator_eq_orthogonal _ _, finrank_map_subtype_eq]
conv_rhs =>
rw [← @Subspace.finrank_add_finrank_dualCoannihilator_eq K V _ _ _ _
(LinearMap.range (B.toLin.domRestrict W)),
Expand All @@ -1447,14 +1447,14 @@ theorem restrict_nondegenerate_of_isCompl_orthogonal {B : BilinForm K V} {W : Su
have : W ⊓ B.orthogonal W = ⊥ := by
rw [eq_bot_iff]
intro x hx
obtain ⟨hx₁, hx₂⟩ := Submodule.mem_inf.1 hx
obtain ⟨hx₁, hx₂⟩ := mem_inf.1 hx
refine' Subtype.mk_eq_mk.1 (b₂ ⟨x, hx₁⟩ _)
rintro ⟨n, hn⟩
rw [restrict_apply, Submodule.coe_mk, Submodule.coe_mk, b₁]
rw [restrict_apply, coe_mk, coe_mk, b₁]
exact hx₂ n hn
refine' IsCompl.of_eq this (eq_top_of_finrank_eq <| (Submodule.finrank_le _).antisymm _)
refine' IsCompl.of_eq this (eq_top_of_finrank_eq <| (finrank_le _).antisymm _)
conv_rhs => rw [← add_zero (finrank K _)]
rw [← finrank_bot K V, ← this, Submodule.finrank_sup_add_finrank_inf_eq,
rw [← finrank_bot K V, ← this, finrank_sup_add_finrank_inf_eq,
finrank_add_finrank_orthogonal b₁]
exact le_self_add
#align bilin_form.restrict_nondegenerate_of_is_compl_orthogonal BilinForm.restrict_nondegenerate_of_isCompl_orthogonal
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/LinearAlgebra/Dual.lean
Expand Up @@ -1547,7 +1547,7 @@ theorem dualMap_injective_iff {f : V₁ →ₗ[K] V₂} :
refine' ⟨_, fun h => dualMap_injective_of_surjective h⟩
rw [← range_eq_top, ← ker_eq_bot]
intro h
apply FiniteDimensional.eq_top_of_finrank_eq
apply Submodule.eq_top_of_finrank_eq
rw [← finrank_eq_zero] at h
rw [← add_zero (FiniteDimensional.finrank K <| LinearMap.range f), ← h, ←
LinearMap.finrank_range_dualMap_eq_finrank_range, LinearMap.finrank_range_add_finrank_ker,
Expand Down
14 changes: 5 additions & 9 deletions Mathlib/LinearAlgebra/FiniteDimensional.lean
Expand Up @@ -347,7 +347,7 @@ theorem finrank_zero_iff [FiniteDimensional K V] : finrank K V = 0 ↔ Subsingle

/-- If a submodule has maximal dimension in a finite dimensional space, then it is equal to the
whole space. -/
theorem eq_top_of_finrank_eq [FiniteDimensional K V] {S : Submodule K V}
theorem _root_.Submodule.eq_top_of_finrank_eq [FiniteDimensional K V] {S : Submodule K V}
(h : finrank K S = finrank K V) : S = ⊤ := by
haveI : IsNoetherian K V := iff_fg.2 inferInstance
set bS := Basis.ofVectorSpace K S with bS_eq
Expand All @@ -372,7 +372,8 @@ theorem eq_top_of_finrank_eq [FiniteDimensional K V] {S : Submodule K V}
have := bS.span_eq
rw [bS_eq, Basis.coe_ofVectorSpace, Subtype.range_coe] at this
rw [this, map_top (Submodule.subtype S), range_subtype]
#align finite_dimensional.eq_top_of_finrank_eq FiniteDimensional.eq_top_of_finrank_eq
#align finite_dimensional.eq_top_of_finrank_eq Submodule.eq_top_of_finrank_eq
#align submodule.eq_top_of_finrank_eq Submodule.eq_top_of_finrank_eq

variable (K)

Expand Down Expand Up @@ -1115,11 +1116,6 @@ section DivisionRing
variable [DivisionRing K] [AddCommGroup V] [Module K V] {V₂ : Type v'} [AddCommGroup V₂]
[Module K V₂]

theorem eq_top_of_finrank_eq [FiniteDimensional K V] {S : Submodule K V}
(h : finrank K S = finrank K V) : S = ⊤ :=
FiniteDimensional.eq_of_le_of_finrank_eq le_top (by simp [h, finrank_top])
#align submodule.eq_top_of_finrank_eq Submodule.eq_top_of_finrank_eq

theorem finrank_mono [FiniteDimensional K V] : Monotone fun s : Submodule K V => finrank K s :=
fun _ _ => finrank_le_finrank_of_le
#align submodule.finrank_mono Submodule.finrank_mono
Expand Down Expand Up @@ -1342,7 +1338,7 @@ theorem is_simple_module_of_finrank_eq_one {A} [Semiring A] [Module A V] [SMul K
refine' ⟨fun S => or_iff_not_imp_left.2 fun hn => _⟩
rw [← restrictScalars_inj K] at hn ⊢
haveI : FiniteDimensional _ _ := finiteDimensional_of_finrank_eq_succ h
refine' Submodule.eq_top_of_finrank_eq ((Submodule.finrank_le _).antisymm _)
refine' eq_top_of_finrank_eq ((Submodule.finrank_le _).antisymm _)
simpa only [h, finrank_bot] using Submodule.finrank_strictMono (Ne.bot_lt hn)
#align is_simple_module_of_finrank_eq_one is_simple_module_of_finrank_eq_one

Expand Down Expand Up @@ -1460,7 +1456,7 @@ theorem Subalgebra.isSimpleOrder_of_finrank (hr : finrank F E = 2) :
· right
rw [← hr] at h
rw [← Algebra.toSubmodule_eq_top]
exact Submodule.eq_top_of_finrank_eq h }
exact eq_top_of_finrank_eq h }
#align subalgebra.is_simple_order_of_finrank Subalgebra.isSimpleOrder_of_finrank

end SubalgebraRank
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Topology/Algebra/Module/FiniteDimension.lean
Expand Up @@ -145,7 +145,7 @@ theorem LinearMap.continuous_of_isClosed_ker (l : E →ₗ[𝕜] 𝕜)
exact Submodule.ker_liftQ_eq_bot _ _ _ (le_refl _)
have hs : Function.Surjective ((LinearMap.ker l).liftQ l (le_refl _)) := by
rw [← LinearMap.range_eq_top, Submodule.range_liftQ]
exact eq_top_of_finrank_eq ((finrank_self 𝕜).symm ▸ this)
exact Submodule.eq_top_of_finrank_eq ((finrank_self 𝕜).symm ▸ this)
let φ : (E ⧸ LinearMap.ker l) ≃ₗ[𝕜] 𝕜 :=
LinearEquiv.ofBijective ((LinearMap.ker l).liftQ l (le_refl _)) ⟨hi, hs⟩
have hlφ : (l : E → 𝕜) = φ ∘ (LinearMap.ker l).mkQ := by ext; rfl
Expand Down

0 comments on commit 421f759

Please sign in to comment.