l3lab/ntp-mathlib huggingface dataset:
lemma lowerCentralSeries_one_inf_center_le_ker_traceForm :
    lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L ≤ LinearMap.ker (traceForm R L M) := by
  /- Sketch of proof (due to Zassenhaus):

  Let `z ∈ lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L` and `x : L`. We must show that
  `trace (φ x ∘ φ z) = 0` where `φ z : End R M` indicates the action of `z` on `M` (and likewise
  for `φ x`).

  Because `z` belongs to the indicated intersection, it has two key properties:
  (a) the trace of the action of `z` vanishes on any Lie module of `L`
      (see `LieModule.trace_toEndomorphism_eq_zero_of_mem_lcs`),
  (b) `z` commutes with all elements of `L`.

  If `φ x` were triangularizable, we could write `M` as a direct sum of generalized eigenspaces of
  `φ x`. Because `L` is nilpotent these are all Lie submodules, thus Lie modules in their own right,
  and thus by (a) above we learn that `trace (φ z) = 0` restricted to each generalized eigenspace.
  Because `z` commutes with `x`, this forces `trace (φ x ∘ φ z) = 0` on each generalized eigenspace,
  and so by summing the traces on each generalized eigenspace we learn the total trace is zero, as
  required (see `LinearMap.trace_comp_eq_zero_of_commute_of_trace_restrict_eq_zero`).

  To cater for the fact that `φ x` may not be triangularizable, we first extend the scalars from `R`
  to `AlgebraicClosure (FractionRing R)` and argue using the action of `A ⊗ L` on `A ⊗ M`. -/
  rintro z ⟨hz : z ∈ lowerCentralSeries R L L 1, hzc : z ∈ LieAlgebra.center R L⟩
  ext x
  rw [traceForm_apply_apply, LinearMap.zero_apply]
  let A := AlgebraicClosure (FractionRing R)
  suffices algebraMap R A (trace R _ ((φ z).comp (φ x))) = 0 by
    have _i : NoZeroSMulDivisors R A := NoZeroSMulDivisors.trans R (FractionRing R) A
    rw [← map_zero (algebraMap R A)] at this
    exact NoZeroSMulDivisors.algebraMap_injective R A this
  rw [← LinearMap.trace_baseChange, LinearMap.baseChange_comp, ← toEndomorphism_baseChange,
    ← toEndomorphism_baseChange]
  replace hz : 1 ⊗ₜ z ∈ lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] L) 1 := by
    simp only [lowerCentralSeries_succ, lowerCentralSeries_zero] at hz ⊢
    rw [← LieSubmodule.baseChange_top, ← LieSubmodule.lie_baseChange]
    

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
z : L
hzc : z ∈ LieAlgebra.center R L
x : L
A : Type u_1 := AlgebraicClosure (FractionRing R)
hz : z ∈ ⁅⊤, ⊤⁆
⊢ 1 ⊗ₜ[R] z ∈ LieSubmodule.baseChange (AlgebraicClosure (FractionRing R)) ⁅⊤, ⊤⁆

Next tactic:
exact Submodule.tmul_mem_baseChange_of_mem 1 hz
lemma lowerCentralSeries_one_inf_center_le_ker_traceForm :
    lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L ≤ LinearMap.ker (traceForm R L M) := by
  /- Sketch of proof (due to Zassenhaus):

  Let `z ∈ lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L` and `x : L`. We must show that
  `trace (φ x ∘ φ z) = 0` where `φ z : End R M` indicates the action of `z` on `M` (and likewise
  for `φ x`).

  Because `z` belongs to the indicated intersection, it has two key properties:
  (a) the trace of the action of `z` vanishes on any Lie module of `L`
      (see `LieModule.trace_toEndomorphism_eq_zero_of_mem_lcs`),
  (b) `z` commutes with all elements of `L`.

  If `φ x` were triangularizable, we could write `M` as a direct sum of generalized eigenspaces of
  `φ x`. Because `L` is nilpotent these are all Lie submodules, thus Lie modules in their own right,
  and thus by (a) above we learn that `trace (φ z) = 0` restricted to each generalized eigenspace.
  Because `z` commutes with `x`, this forces `trace (φ x ∘ φ z) = 0` on each generalized eigenspace,
  and so by summing the traces on each generalized eigenspace we learn the total trace is zero, as
  required (see `LinearMap.trace_comp_eq_zero_of_commute_of_trace_restrict_eq_zero`).

  To cater for the fact that `φ x` may not be triangularizable, we first extend the scalars from `R`
  to `AlgebraicClosure (FractionRing R)` and argue using the action of `A ⊗ L` on `A ⊗ M`. -/
  rintro z ⟨hz : z ∈ lowerCentralSeries R L L 1, hzc : z ∈ LieAlgebra.center R L⟩
  ext x
  rw [traceForm_apply_apply, LinearMap.zero_apply]
  let A := AlgebraicClosure (FractionRing R)
  suffices algebraMap R A (trace R _ ((φ z).comp (φ x))) = 0 by
    have _i : NoZeroSMulDivisors R A := NoZeroSMulDivisors.trans R (FractionRing R) A
    rw [← map_zero (algebraMap R A)] at this
    exact NoZeroSMulDivisors.algebraMap_injective R A this
  rw [← LinearMap.trace_baseChange, LinearMap.baseChange_comp, ← toEndomorphism_baseChange,
    ← toEndomorphism_baseChange]
  replace hz : 1 ⊗ₜ z ∈ lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] L) 1 := by
    simp only [lowerCentralSeries_succ, lowerCentralSeries_zero] at hz ⊢
    rw [← LieSubmodule.baseChange_top, ← LieSubmodule.lie_baseChange]
    exact Submodule.tmul_mem_baseChange_of_mem 1 hz
  replace hzc : 1 ⊗ₜ[R] z ∈ LieAlgebra.center A (A ⊗[R] L) := by
    

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
z : L
hzc : z ∈ LieAlgebra.center R L
x : L
A : Type u_1 := AlgebraicClosure (FractionRing R)
hz : 1 ⊗ₜ[R] z ∈ lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] L) 1
⊢ 1 ⊗ₜ[R] z ∈ LieAlgebra.center A (A ⊗[R] L)

Next tactic:
simp only [mem_maxTrivSubmodule] at hzc ⊢
lemma lowerCentralSeries_one_inf_center_le_ker_traceForm :
    lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L ≤ LinearMap.ker (traceForm R L M) := by
  /- Sketch of proof (due to Zassenhaus):

  Let `z ∈ lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L` and `x : L`. We must show that
  `trace (φ x ∘ φ z) = 0` where `φ z : End R M` indicates the action of `z` on `M` (and likewise
  for `φ x`).

  Because `z` belongs to the indicated intersection, it has two key properties:
  (a) the trace of the action of `z` vanishes on any Lie module of `L`
      (see `LieModule.trace_toEndomorphism_eq_zero_of_mem_lcs`),
  (b) `z` commutes with all elements of `L`.

  If `φ x` were triangularizable, we could write `M` as a direct sum of generalized eigenspaces of
  `φ x`. Because `L` is nilpotent these are all Lie submodules, thus Lie modules in their own right,
  and thus by (a) above we learn that `trace (φ z) = 0` restricted to each generalized eigenspace.
  Because `z` commutes with `x`, this forces `trace (φ x ∘ φ z) = 0` on each generalized eigenspace,
  and so by summing the traces on each generalized eigenspace we learn the total trace is zero, as
  required (see `LinearMap.trace_comp_eq_zero_of_commute_of_trace_restrict_eq_zero`).

  To cater for the fact that `φ x` may not be triangularizable, we first extend the scalars from `R`
  to `AlgebraicClosure (FractionRing R)` and argue using the action of `A ⊗ L` on `A ⊗ M`. -/
  rintro z ⟨hz : z ∈ lowerCentralSeries R L L 1, hzc : z ∈ LieAlgebra.center R L⟩
  ext x
  rw [traceForm_apply_apply, LinearMap.zero_apply]
  let A := AlgebraicClosure (FractionRing R)
  suffices algebraMap R A (trace R _ ((φ z).comp (φ x))) = 0 by
    have _i : NoZeroSMulDivisors R A := NoZeroSMulDivisors.trans R (FractionRing R) A
    rw [← map_zero (algebraMap R A)] at this
    exact NoZeroSMulDivisors.algebraMap_injective R A this
  rw [← LinearMap.trace_baseChange, LinearMap.baseChange_comp, ← toEndomorphism_baseChange,
    ← toEndomorphism_baseChange]
  replace hz : 1 ⊗ₜ z ∈ lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] L) 1 := by
    simp only [lowerCentralSeries_succ, lowerCentralSeries_zero] at hz ⊢
    rw [← LieSubmodule.baseChange_top, ← LieSubmodule.lie_baseChange]
    exact Submodule.tmul_mem_baseChange_of_mem 1 hz
  replace hzc : 1 ⊗ₜ[R] z ∈ LieAlgebra.center A (A ⊗[R] L) := by
    simp only [mem_maxTrivSubmodule] at hzc ⊢
    

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
z x : L
A : Type u_1 := AlgebraicClosure (FractionRing R)
hz : 1 ⊗ₜ[R] z ∈ lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] L) 1
hzc : ∀ (x : L), ⁅x, z⁆ = 0
⊢ ∀ (x : AlgebraicClosure (FractionRing R) ⊗[R] L), ⁅x, 1 ⊗ₜ[R] z⁆ = 0

Next tactic:
intro y
/-- A nilpotent Lie algebra with a representation whose trace form is non-singular is Abelian. -/
lemma isLieAbelian_of_ker_traceForm_eq_bot (h : LinearMap.ker (traceForm R L M) = ⊥) :
    IsLieAbelian L := by
  

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
h : LinearMap.ker (traceForm R L M) = ⊥
⊢ IsLieAbelian L

Next tactic:
simpa only [← disjoint_lowerCentralSeries_maxTrivSubmodule_iff R L L, disjoint_iff_inf_le,
    LieIdeal.coe_to_lieSubalgebra_to_submodule, LieSubmodule.coeSubmodule_eq_bot_iff, h]
    using lowerCentralSeries_one_inf_center_le_ker_traceForm R L M
lemma trace_eq_trace_restrict_of_le_idealizer
    (hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)) :
    trace R M (φ x ∘ₗ φ y) = trace R N ((φ x ∘ₗ φ y).restrict hy') := by
  

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
hy' : optParam (∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N) (_ : ∀ m ∈ N, ⁅x, (φ y) m⁆ ∈ N.carrier)
⊢ (trace R M) (φ x ∘ₗ φ y) = (trace R ↥↑N) (LinearMap.restrict (φ x ∘ₗ φ y) hy')

Next tactic:
suffices ∀ m, ⁅x, ⁅y, m⁆⁆ ∈ N by simp [(φ x ∘ₗ φ y).trace_restrict_eq_of_forall_mem _ this]
lemma trace_eq_trace_restrict_of_le_idealizer
    (hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)) :
    trace R M (φ x ∘ₗ φ y) = trace R N ((φ x ∘ₗ φ y).restrict hy') := by
  suffices ∀ m, ⁅x, ⁅y, m⁆⁆ ∈ N by 

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
hy' : optParam (∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N) (_ : ∀ m ∈ N, ⁅x, (φ y) m⁆ ∈ N.carrier)
this : ∀ (m : M), ⁅x, ⁅y, m⁆⁆ ∈ N
⊢ (trace R M) (φ x ∘ₗ φ y) = (trace R ↥↑N) (LinearMap.restrict (φ x ∘ₗ φ y) hy')

Next tactic:
simp [(φ x ∘ₗ φ y).trace_restrict_eq_of_forall_mem _ this]
lemma trace_eq_trace_restrict_of_le_idealizer
    (hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)) :
    trace R M (φ x ∘ₗ φ y) = trace R N ((φ x ∘ₗ φ y).restrict hy') := by
  suffices ∀ m, ⁅x, ⁅y, m⁆⁆ ∈ N by simp [(φ x ∘ₗ φ y).trace_restrict_eq_of_forall_mem _ this]
  

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
hy' : optParam (∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N) (_ : ∀ m ∈ N, ⁅x, (φ y) m⁆ ∈ N.carrier)
⊢ ∀ (m : M), ⁅x, ⁅y, m⁆⁆ ∈ N

Next tactic:
exact fun m ↦ N.lie_mem (h hy m)
lemma traceForm_eq_of_le_idealizer :
    traceForm R I N = I.restrictBilinear (traceForm R L M) := by
  

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
⊢ traceForm R ↥↑I ↥↑N = Submodule.restrictBilinear (↑I) (traceForm R L M)

Next tactic:
ext ⟨x, hx⟩ ⟨y, hy⟩
lemma traceForm_eq_of_le_idealizer :
    traceForm R I N = I.restrictBilinear (traceForm R L M) := by
  ext ⟨x, hx⟩ ⟨y, hy⟩
  

Proof state:
case h.mk.h.mk
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x✝ y✝ : L
hy✝ : y✝ ∈ I
x : L
hx : x ∈ ↑I
y : L
hy : y ∈ ↑I
⊢ ((traceForm R ↥↑I ↥↑N) { val := x, property := hx }) { val := y, property := hy } =
    ((Submodule.restrictBilinear (↑I) (traceForm R L M)) { val := x, property := hx }) { val := y, property := hy }

Next tactic:
change _ = trace R M (φ x ∘ₗ φ y)
lemma traceForm_eq_of_le_idealizer :
    traceForm R I N = I.restrictBilinear (traceForm R L M) := by
  ext ⟨x, hx⟩ ⟨y, hy⟩
  change _ = trace R M (φ x ∘ₗ φ y)
  

Proof state:
case h.mk.h.mk
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x✝ y✝ : L
hy✝ : y✝ ∈ I
x : L
hx : x ∈ ↑I
y : L
hy : y ∈ ↑I
⊢ ((traceForm R ↥↑I ↥↑N) { val := x, property := hx }) { val := y, property := hy } = (trace R M) (φ x ∘ₗ φ y)

Next tactic:
rw [N.trace_eq_trace_restrict_of_le_idealizer I h x hy]
lemma traceForm_eq_of_le_idealizer :
    traceForm R I N = I.restrictBilinear (traceForm R L M) := by
  ext ⟨x, hx⟩ ⟨y, hy⟩
  change _ = trace R M (φ x ∘ₗ φ y)
  rw [N.trace_eq_trace_restrict_of_le_idealizer I h x hy]
  

Proof state:
case h.mk.h.mk
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁵ : CommRing R
inst✝¹⁴ : LieRing L
inst✝¹³ : LieAlgebra R L
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : LieRingModule L M
inst✝⁹ : LieModule R L M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : Field K
inst✝⁵ : LieAlgebra K L
inst✝⁴ : Module K M
inst✝³ : LieModule K L M
inst✝² : FiniteDimensional K M
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x✝ y✝ : L
hy✝ : y✝ ∈ I
x : L
hx : x ∈ ↑I
y : L
hy : y ∈ ↑I
⊢ ((traceForm R ↥↑I ↥↑N) { val := x, property := hx }) { val := y, property := hy } =
    (trace R ↥↑N) (LinearMap.restrict (φ x ∘ₗ φ y) (_ : ∀ m ∈ N, ⁅x, (φ y) m⁆ ∈ N.carrier))

Next tactic:
rfl
/-- Note that this result is slightly stronger than it might look at first glance: we only assume
that `N` is trivial over `I` rather than all of `L`. This means that it applies in the important
case of an Abelian ideal (which has `M = L` and `N = I`). -/
lemma traceForm_eq_zero_of_isTrivial [LieModule.IsTrivial I N] :
    trace R M (φ x ∘ₗ φ y) = 0 := by
  

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
inst✝ : LieModule.IsTrivial ↥↑I ↥↑N
⊢ (trace R M) (φ x ∘ₗ φ y) = 0

Next tactic:
let hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)
/-- Note that this result is slightly stronger than it might look at first glance: we only assume
that `N` is trivial over `I` rather than all of `L`. This means that it applies in the important
case of an Abelian ideal (which has `M = L` and `N = I`). -/
lemma traceForm_eq_zero_of_isTrivial [LieModule.IsTrivial I N] :
    trace R M (φ x ∘ₗ φ y) = 0 := by
  let hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)
  

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
inst✝ : LieModule.IsTrivial ↥↑I ↥↑N
hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m x_1 => lie_mem N ((mem_idealizer N).mp (h hy) m)
⊢ (trace R M) (φ x ∘ₗ φ y) = 0

Next tactic:
suffices : (φ x ∘ₗ φ y).restrict hy' = 0
/-- Note that this result is slightly stronger than it might look at first glance: we only assume
that `N` is trivial over `I` rather than all of `L`. This means that it applies in the important
case of an Abelian ideal (which has `M = L` and `N = I`). -/
lemma traceForm_eq_zero_of_isTrivial [LieModule.IsTrivial I N] :
    trace R M (φ x ∘ₗ φ y) = 0 := by
  let hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)
  suffices : (φ x ∘ₗ φ y).restrict hy' = 0
  · 

Proof state:
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
inst✝ : LieModule.IsTrivial ↥↑I ↥↑N
hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m x_1 => lie_mem N ((mem_idealizer N).mp (h hy) m)
this : LinearMap.restrict (φ x ∘ₗ φ y) hy' = 0
⊢ (trace R M) (φ x ∘ₗ φ y) = 0

Next tactic:
simp [this, N.trace_eq_trace_restrict_of_le_idealizer I h x hy]
/-- Note that this result is slightly stronger than it might look at first glance: we only assume
that `N` is trivial over `I` rather than all of `L`. This means that it applies in the important
case of an Abelian ideal (which has `M = L` and `N = I`). -/
lemma traceForm_eq_zero_of_isTrivial [LieModule.IsTrivial I N] :
    trace R M (φ x ∘ₗ φ y) = 0 := by
  let hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)
  suffices : (φ x ∘ₗ φ y).restrict hy' = 0
  · simp [this, N.trace_eq_trace_restrict_of_le_idealizer I h x hy]
  

Proof state:
case this
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
inst✝ : LieModule.IsTrivial ↥↑I ↥↑N
hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m x_1 => lie_mem N ((mem_idealizer N).mp (h hy) m)
⊢ LinearMap.restrict (φ x ∘ₗ φ y) hy' = 0

Next tactic:
ext n
/-- Note that this result is slightly stronger than it might look at first glance: we only assume
that `N` is trivial over `I` rather than all of `L`. This means that it applies in the important
case of an Abelian ideal (which has `M = L` and `N = I`). -/
lemma traceForm_eq_zero_of_isTrivial [LieModule.IsTrivial I N] :
    trace R M (φ x ∘ₗ φ y) = 0 := by
  let hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m _ ↦ N.lie_mem (N.mem_idealizer.mp (h hy) m)
  suffices : (φ x ∘ₗ φ y).restrict hy' = 0
  · simp [this, N.trace_eq_trace_restrict_of_le_idealizer I h x hy]
  ext n
  

Proof state:
case this.h.a
R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁶ : CommRing R
inst✝¹⁵ : LieRing L
inst✝¹⁴ : LieAlgebra R L
inst✝¹³ : AddCommGroup M
inst✝¹² : Module R M
inst✝¹¹ : LieRingModule L M
inst✝¹⁰ : LieModule R L M
inst✝⁹ : Module.Free R M
inst✝⁸ : Module.Finite R M
inst✝⁷ : Field K
inst✝⁶ : LieAlgebra K L
inst✝⁵ : Module K M
inst✝⁴ : LieModule K L M
inst✝³ : FiniteDimensional K M
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
N : LieSubmodule R L M
I : LieIdeal R L
h : I ≤ idealizer N
x y : L
hy : y ∈ I
inst✝ : LieModule.IsTrivial ↥↑I ↥↑N
hy' : ∀ m ∈ N, (φ x ∘ₗ φ y) m ∈ N := fun m x_1 => lie_mem N ((mem_idealizer N).mp (h hy) m)
n : ↥↑N
⊢ ↑((LinearMap.restrict (φ x ∘ₗ φ y) hy') n) = ↑(0 n)

Next tactic:
suffices ⁅y, (n : M)⁆ = 0 by simp [this]