Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
acmepjz committed Oct 16, 2024
1 parent ef201dd commit 5eb3441
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Mathlib/RingTheory/LinearDisjoint.lean
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,19 @@ variable [CommRing R] [Ring S] [Algebra R S]

variable (A B : Subalgebra R S)

set_option maxSynthPendingDepth 2 in
lemma mulLeftMap_ker_eq_bot_iff_linearIndependent_op {ι : Type*} (a : ι → A) :
LinearMap.ker (Submodule.mulLeftMap (M := toSubmodule A) (toSubmodule B) a) = ⊥ ↔
LinearIndependent B.op (MulOpposite.op ∘ A.val ∘ a) := by
-- need this instance otherwise `LinearMap.ker_eq_bot` does not work
letI : AddCommGroup (ι →₀ toSubmodule B) := Finsupp.instAddCommGroup
letI : AddCommGroup (ι →₀ B.op) := Finsupp.instAddCommGroup
simp_rw [LinearIndependent, LinearMap.ker_eq_bot]
let i : (ι →₀ B) →ₗ[R] S := Submodule.mulLeftMap (M := toSubmodule A) (toSubmodule B) a
let j : (ι →₀ B) →ₗ[R] S := (MulOpposite.opLinearEquiv _).symm.toLinearMap ∘ₗ
(Finsupp.linearCombination B.op (MulOpposite.op ∘ A.val ∘ a)).restrictScalars R ∘ₗ
(Finsupp.mapRange.linearEquiv (linearEquivOp B)).toLinearMap
suffices i = j by
change Function.Injective i ↔ _
simp_rw [this, j, LinearMap.coe_comp,
LinearEquiv.coe_coe, EquivLike.comp_injective, EquivLike.injective_comp]
rfl
simp_rw [this, j, LinearMap.coe_comp, LinearEquiv.coe_coe, EquivLike.comp_injective,
EquivLike.injective_comp, LinearMap.coe_restrictScalars]
ext
simp only [LinearMap.coe_comp, Function.comp_apply, Finsupp.lsingle_apply, coe_val,
Finsupp.mapRange.linearEquiv_toLinearMap, LinearEquiv.coe_coe,
Expand All @@ -224,11 +221,10 @@ theorem of_basis_left_op {ι : Type*} (a : Basis ι R A)
rw [← mulLeftMap_ker_eq_bot_iff_linearIndependent_op] at H
exact Submodule.LinearDisjoint.of_basis_left _ _ a H

set_option maxSynthPendingDepth 2 in
lemma mulRightMap_ker_eq_bot_iff_linearIndependent {ι : Type*} (b : ι → B) :
LinearMap.ker (Submodule.mulRightMap (toSubmodule A) (N := toSubmodule B) b) = ⊥ ↔
LinearIndependent A (B.val ∘ b) := by
-- need this instance otherwise `LinearMap.ker_eq_bot` does not work
letI : AddCommGroup (ι →₀ toSubmodule A) := Finsupp.instAddCommGroup
simp_rw [LinearIndependent, LinearMap.ker_eq_bot]
let i : (ι →₀ A) →ₗ[R] S := Submodule.mulRightMap (toSubmodule A) (N := toSubmodule B) b
let j : (ι →₀ A) →ₗ[R] S := (Finsupp.linearCombination A (B.val ∘ b)).restrictScalars R
Expand Down

0 comments on commit 5eb3441

Please sign in to comment.