l3lab/ntp-mathlib huggingface dataset:
/-- The trace form of a Lie module is compatible with the action of the Lie algebra.

See also `LieModule.traceForm_apply_lie_apply'`. -/
lemma traceForm_apply_lie_apply (x y z : L) :
    traceForm R L M ⁅x, y⁆ z = traceForm R L M x ⁅y, z⁆ := by
  calc traceForm R L M ⁅x, y⁆ z
      = trace R _ (φ ⁅x, y⁆ ∘ₗ φ z) := by simp only [traceForm_apply_apply]
    _ = trace R _ ((φ x * φ y - φ y * φ x) * φ z) := ?_
    _ = trace R _ (φ x * (φ y * φ z)) - trace R _ (φ y * (φ x * φ z)) := ?_
    _ = trace R _ (φ x * (φ y * φ z)) - trace R _ (φ x * (φ z * φ y)) := ?_
    _ = traceForm R L M x ⁅y, z⁆ := ?_
  · simp only [LieHom.map_lie, Ring.lie_def, ← LinearMap.mul_eq_comp]
  · simp only [sub_mul, mul_sub, map_sub, mul_assoc]
  · 

Proof state:
case calc_3
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
x y z : L
⊢ (trace R M) (φ x * (φ y * φ z)) - (trace R M) (φ y * (φ x * φ z)) =
    (trace R M) (φ x * (φ y * φ z)) - (trace R M) (φ x * (φ z * φ y))

Next tactic:
simp only [LinearMap.trace_mul_cycle' R (φ x) (φ z) (φ y)]
/-- The trace form of a Lie module is compatible with the action of the Lie algebra.

See also `LieModule.traceForm_apply_lie_apply'`. -/
lemma traceForm_apply_lie_apply (x y z : L) :
    traceForm R L M ⁅x, y⁆ z = traceForm R L M x ⁅y, z⁆ := by
  calc traceForm R L M ⁅x, y⁆ z
      = trace R _ (φ ⁅x, y⁆ ∘ₗ φ z) := by simp only [traceForm_apply_apply]
    _ = trace R _ ((φ x * φ y - φ y * φ x) * φ z) := ?_
    _ = trace R _ (φ x * (φ y * φ z)) - trace R _ (φ y * (φ x * φ z)) := ?_
    _ = trace R _ (φ x * (φ y * φ z)) - trace R _ (φ x * (φ z * φ y)) := ?_
    _ = traceForm R L M x ⁅y, z⁆ := ?_
  · simp only [LieHom.map_lie, Ring.lie_def, ← LinearMap.mul_eq_comp]
  · simp only [sub_mul, mul_sub, map_sub, mul_assoc]
  · simp only [LinearMap.trace_mul_cycle' R (φ x) (φ z) (φ y)]
  · 

Proof state:
case calc_4
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
x y z : L
⊢ (trace R M) (φ x * (φ y * φ z)) - (trace R M) (φ x * (φ z * φ y)) = ((traceForm R L M) x) ⁅y, z⁆

Next tactic:
simp only [traceForm_apply_apply, LieHom.map_lie, Ring.lie_def, mul_sub, map_sub,
      ← LinearMap.mul_eq_comp]
/-- Given a representation `M` of a Lie algebra `L`, the action of any `x : L` is skew-adjoint wrt
the trace form. -/
lemma traceForm_apply_lie_apply' (x y z : L) :
    traceForm R L M ⁅x, y⁆ z = - traceForm R L M y ⁅x, z⁆ :=
  calc traceForm R L M ⁅x, y⁆ z
      = - traceForm R L M ⁅y, x⁆ z := 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
x y z : L
⊢ ((traceForm R L M) ⁅x, y⁆) z = -((traceForm R L M) ⁅y, x⁆) z

Next tactic:
rw [← lie_skew x y, map_neg, LinearMap.neg_apply]
/-- Given a representation `M` of a Lie algebra `L`, the action of any `x : L` is skew-adjoint wrt
the trace form. -/
lemma traceForm_apply_lie_apply' (x y z : L) :
    traceForm R L M ⁅x, y⁆ z = - traceForm R L M y ⁅x, z⁆ :=
  calc traceForm R L M ⁅x, y⁆ z
      = - traceForm R L M ⁅y, x⁆ z := by rw [← lie_skew x y, map_neg, LinearMap.neg_apply]
    _ = - traceForm R L M y ⁅x, z⁆ := 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
x y z : L
⊢ -((traceForm R L M) ⁅y, x⁆) z = -((traceForm R L M) y) ⁅x, z⁆

Next tactic:
rw [traceForm_apply_lie_apply]
/-- This lemma justifies the terminology "invariant" for trace forms. -/
@[simp] lemma lie_traceForm_eq_zero (x : L) : ⁅x, traceForm R L M⁆ = 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
x : L
⊢ ⁅x, traceForm R L M⁆ = 0

Next tactic:
ext y z
/-- This lemma justifies the terminology "invariant" for trace forms. -/
@[simp] lemma lie_traceForm_eq_zero (x : L) : ⁅x, traceForm R L M⁆ = 0 := by
  ext y z
  

Proof state:
case h.h
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
x y z : L
⊢ (⁅x, traceForm R L M⁆ y) z = (0 y) z

Next tactic:
rw [LieHom.lie_apply, LinearMap.sub_apply, Module.Dual.lie_apply, LinearMap.zero_apply,
    LinearMap.zero_apply, traceForm_apply_lie_apply', sub_self]
@[simp] lemma traceForm_eq_zero_of_isNilpotent [IsReduced R] [IsNilpotent R L M] :
    traceForm R L M = 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✝¹ : IsReduced R
inst✝ : IsNilpotent R L M
⊢ traceForm R L M = 0

Next tactic:
ext x y
@[simp] lemma traceForm_eq_zero_of_isNilpotent [IsReduced R] [IsNilpotent R L M] :
    traceForm R L M = 0 := by
  ext x y
  

Proof state:
case h.h
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✝¹ : IsReduced R
inst✝ : IsNilpotent R L M
x y : L
⊢ ((traceForm R L M) x) y = (0 x) y

Next tactic:
simp only [traceForm_apply_apply, LinearMap.zero_apply, ← isNilpotent_iff_eq_zero]
@[simp] lemma traceForm_eq_zero_of_isNilpotent [IsReduced R] [IsNilpotent R L M] :
    traceForm R L M = 0 := by
  ext x y
  simp only [traceForm_apply_apply, LinearMap.zero_apply, ← isNilpotent_iff_eq_zero]
  

Proof state:
case h.h
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✝¹ : IsReduced R
inst✝ : IsNilpotent R L M
x y : L
⊢ _root_.IsNilpotent ((trace R M) (φ x ∘ₗ φ y))

Next tactic:
apply LinearMap.isNilpotent_trace_of_isNilpotent
@[simp] lemma traceForm_eq_zero_of_isNilpotent [IsReduced R] [IsNilpotent R L M] :
    traceForm R L M = 0 := by
  ext x y
  simp only [traceForm_apply_apply, LinearMap.zero_apply, ← isNilpotent_iff_eq_zero]
  apply LinearMap.isNilpotent_trace_of_isNilpotent
  

Proof state:
case h.h.hf
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✝¹ : IsReduced R
inst✝ : IsNilpotent R L M
x y : L
⊢ _root_.IsNilpotent (φ x ∘ₗ φ y)

Next tactic:
exact isNilpotent_toEndomorphism_of_isNilpotent₂ R L M x y
@[simp]
lemma trace_toEndomorphism_weightSpace [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] (χ : L → R) (x : L) :
    trace R _ (toEndomorphism R L (weightSpace M χ) x) = finrank R (weightSpace M χ) • χ x := 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
inst✝ : LieAlgebra.IsNilpotent R L
χ : L → R
x : L
⊢ (trace R ↥↑(weightSpace M χ)) ((toEndomorphism R L ↥↑(weightSpace M χ)) x) = finrank R ↥↑(weightSpace M χ) • χ x

Next tactic:
suffices _root_.IsNilpotent ((toEndomorphism R L (weightSpace M χ) x) - χ x • LinearMap.id) by
    replace this := (LinearMap.isNilpotent_trace_of_isNilpotent this).eq_zero
    rwa [map_sub, map_smul, LinearMap.trace_id, sub_eq_zero, smul_eq_mul, mul_comm,
      ← nsmul_eq_mul] at this
@[simp]
lemma trace_toEndomorphism_weightSpace [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] (χ : L → R) (x : L) :
    trace R _ (toEndomorphism R L (weightSpace M χ) x) = finrank R (weightSpace M χ) • χ x := by
  suffices _root_.IsNilpotent ((toEndomorphism R L (weightSpace M χ) x) - χ x • LinearMap.id) 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
inst✝ : LieAlgebra.IsNilpotent R L
χ : L → R
x : L
this : _root_.IsNilpotent ((toEndomorphism R L ↥↑(weightSpace M χ)) x - χ x • LinearMap.id)
⊢ (trace R ↥↑(weightSpace M χ)) ((toEndomorphism R L ↥↑(weightSpace M χ)) x) = finrank R ↥↑(weightSpace M χ) • χ x

Next tactic:
replace this := (LinearMap.isNilpotent_trace_of_isNilpotent this).eq_zero
@[simp]
lemma trace_toEndomorphism_weightSpace [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] (χ : L → R) (x : L) :
    trace R _ (toEndomorphism R L (weightSpace M χ) x) = finrank R (weightSpace M χ) • χ x := by
  suffices _root_.IsNilpotent ((toEndomorphism R L (weightSpace M χ) x) - χ x • LinearMap.id) by
    replace this := (LinearMap.isNilpotent_trace_of_isNilpotent this).eq_zero
    

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
inst✝ : LieAlgebra.IsNilpotent R L
χ : L → R
x : L
this : (trace R ↥↑(weightSpace M χ)) ((toEndomorphism R L ↥↑(weightSpace M χ)) x - χ x • LinearMap.id) = 0
⊢ (trace R ↥↑(weightSpace M χ)) ((toEndomorphism R L ↥↑(weightSpace M χ)) x) = finrank R ↥↑(weightSpace M χ) • χ x

Next tactic:
rwa [map_sub, map_smul, LinearMap.trace_id, sub_eq_zero, smul_eq_mul, mul_comm,
      ← nsmul_eq_mul] at this
@[simp]
lemma trace_toEndomorphism_weightSpace [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] (χ : L → R) (x : L) :
    trace R _ (toEndomorphism R L (weightSpace M χ) x) = finrank R (weightSpace M χ) • χ x := by
  suffices _root_.IsNilpotent ((toEndomorphism R L (weightSpace M χ) x) - χ x • LinearMap.id) by
    replace this := (LinearMap.isNilpotent_trace_of_isNilpotent this).eq_zero
    rwa [map_sub, map_smul, LinearMap.trace_id, sub_eq_zero, smul_eq_mul, mul_comm,
      ← nsmul_eq_mul] at 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
inst✝ : LieAlgebra.IsNilpotent R L
χ : L → R
x : L
⊢ _root_.IsNilpotent ((toEndomorphism R L ↥↑(weightSpace M χ)) x - χ x • LinearMap.id)

Next tactic:
rw [← Module.algebraMap_end_eq_smul_id]
@[simp]
lemma trace_toEndomorphism_weightSpace [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] (χ : L → R) (x : L) :
    trace R _ (toEndomorphism R L (weightSpace M χ) x) = finrank R (weightSpace M χ) • χ x := by
  suffices _root_.IsNilpotent ((toEndomorphism R L (weightSpace M χ) x) - χ x • LinearMap.id) by
    replace this := (LinearMap.isNilpotent_trace_of_isNilpotent this).eq_zero
    rwa [map_sub, map_smul, LinearMap.trace_id, sub_eq_zero, smul_eq_mul, mul_comm,
      ← nsmul_eq_mul] at this
  rw [← Module.algebraMap_end_eq_smul_id]
  

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
inst✝ : LieAlgebra.IsNilpotent R L
χ : L → R
x : L
⊢ _root_.IsNilpotent
    ((toEndomorphism R L ↥↑(weightSpace M χ)) x - (algebraMap R (Module.End R ↥↑(weightSpace M χ))) (χ x))

Next tactic:
exact isNilpotent_toEndomorphism_sub_algebraMap M χ x
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := 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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
⊢ ((traceForm R L ↥↑(weightSpace M χ)) x) y = finrank R ↥↑(weightSpace M χ) • (χ x * χ y)

Next tactic:
set d := finrank R (weightSpace M χ)
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := by
  set d := finrank R (weightSpace 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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
d : ℕ := finrank R ↥↑(weightSpace M χ)
⊢ ((traceForm R L ↥↑(weightSpace M χ)) x) y = d • (χ x * χ y)

Next tactic:
have h₁ : χ y • d • χ x - χ y • χ x • (d : R) = 0 := by simp [mul_comm (χ x)]
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := by
  set d := finrank R (weightSpace M χ)
  have h₁ : χ y • d • χ x - χ y • χ x • (d : R) = 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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
d : ℕ := finrank R ↥↑(weightSpace M χ)
⊢ χ y • d • χ x - χ y • χ x • ↑d = 0

Next tactic:
simp [mul_comm (χ x)]
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := by
  set d := finrank R (weightSpace M χ)
  have h₁ : χ y • d • χ x - χ y • χ x • (d : R) = 0 := by simp [mul_comm (χ x)]
  

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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
d : ℕ := finrank R ↥↑(weightSpace M χ)
h₁ : χ y • d • χ x - χ y • χ x • ↑d = 0
⊢ ((traceForm R L ↥↑(weightSpace M χ)) x) y = d • (χ x * χ y)

Next tactic:
have h₂ : χ x • d • χ y = d • (χ x * χ y) := by
    simpa [nsmul_eq_mul, smul_eq_mul] using mul_left_comm (χ x) d (χ y)
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := by
  set d := finrank R (weightSpace M χ)
  have h₁ : χ y • d • χ x - χ y • χ x • (d : R) = 0 := by simp [mul_comm (χ x)]
  have h₂ : χ x • d • χ y = d • (χ x * χ y) := 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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
d : ℕ := finrank R ↥↑(weightSpace M χ)
h₁ : χ y • d • χ x - χ y • χ x • ↑d = 0
⊢ χ x • d • χ y = d • (χ x * χ y)

Next tactic:
simpa [nsmul_eq_mul, smul_eq_mul] using mul_left_comm (χ x) d (χ y)
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := by
  set d := finrank R (weightSpace M χ)
  have h₁ : χ y • d • χ x - χ y • χ x • (d : R) = 0 := by simp [mul_comm (χ x)]
  have h₂ : χ x • d • χ y = d • (χ x * χ y) := by
    simpa [nsmul_eq_mul, smul_eq_mul] using mul_left_comm (χ x) d (χ y)
  

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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
d : ℕ := finrank R ↥↑(weightSpace M χ)
h₁ : χ y • d • χ x - χ y • χ x • ↑d = 0
h₂ : χ x • d • χ y = d • (χ x * χ y)
⊢ ((traceForm R L ↥↑(weightSpace M χ)) x) y = d • (χ x * χ y)

Next tactic:
have := traceForm_eq_zero_of_isNilpotent R L (shiftedWeightSpace R L M χ)
@[simp]
lemma traceForm_weightSpace_eq [IsDomain R] [IsPrincipalIdealRing R]
    [LieAlgebra.IsNilpotent R L] [IsNoetherian R M] [LinearWeights R L M] (χ : L → R) (x y : L) :
    traceForm R L (weightSpace M χ) x y = finrank R (weightSpace M χ) • (χ x * χ y) := by
  set d := finrank R (weightSpace M χ)
  have h₁ : χ y • d • χ x - χ y • χ x • (d : R) = 0 := by simp [mul_comm (χ x)]
  have h₂ : χ x • d • χ y = d • (χ x * χ y) := by
    simpa [nsmul_eq_mul, smul_eq_mul] using mul_left_comm (χ x) d (χ y)
  have := traceForm_eq_zero_of_isNilpotent R L (shiftedWeightSpace R L 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
inst✝² : LieAlgebra.IsNilpotent R L
inst✝¹ : IsNoetherian R M
inst✝ : LinearWeights R L M
χ : L → R
x y : L
d : ℕ := finrank R ↥↑(weightSpace M χ)
h₁ : χ y • d • χ x - χ y • χ x • ↑d = 0
h₂ : χ x • d • χ y = d • (χ x * χ y)
this : traceForm R L ↥↑(shiftedWeightSpace R L M χ) = 0
⊢ ((traceForm R L ↥↑(weightSpace M χ)) x) y = d • (χ x * χ y)

Next tactic:
replace this := LinearMap.congr_fun (LinearMap.congr_fun this x) y