l3lab/ntp-mathlib huggingface dataset:
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
this : P ⊤
e : ↥↑⊤ ≃ₗ⁅R,L⁆ M := LieModuleEquiv.ofTop R L M
⊢ IsCompl (weightSpace M 0) (posFittingComp R L M)

Next tactic:
rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
this : P ⊤
e : ↥↑⊤ ≃ₗ⁅R,L⁆ M := LieModuleEquiv.ofTop R L M
⊢ IsCompl (LieSubmodule.map e.toLieModuleHom (weightSpace (↥↑⊤) 0))
    (LieSubmodule.map e.toLieModuleHom (posFittingComp R L ↥↑⊤))

Next tactic:
exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
⊢ P ⊤

Next tactic:
refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
  

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
N : LieSubmodule R L M
hN : ∀ y < N, P y
⊢ P N

Next tactic:
refine isCompl_weightSpace_zero_posFittingComp_aux R L N fun N' hN' ↦ ?_
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
  refine isCompl_weightSpace_zero_posFittingComp_aux R L N fun N' hN' ↦ ?_
  

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
N : LieSubmodule R L M
hN : ∀ y < N, P y
N' : LieSubmodule R L ↥↑N
hN' : N' < ⊤
⊢ IsCompl (weightSpace (↥↑N') 0) (posFittingComp R L ↥↑N')

Next tactic:
suffices : IsCompl (weightSpace (N'.map N.incl) 0) (posFittingComp R L (N'.map N.incl))
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
  refine isCompl_weightSpace_zero_posFittingComp_aux R L N fun N' hN' ↦ ?_
  suffices : IsCompl (weightSpace (N'.map N.incl) 0) (posFittingComp R L (N'.map N.incl))
  · 

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
N : LieSubmodule R L M
hN : ∀ y < N, P y
N' : LieSubmodule R L ↥↑N
hN' : N' < ⊤
this :
  IsCompl (weightSpace (↥↑(LieSubmodule.map (LieSubmodule.incl N) N')) 0)
    (posFittingComp R L ↥↑(LieSubmodule.map (LieSubmodule.incl N) N'))
⊢ IsCompl (weightSpace (↥↑N') 0) (posFittingComp R L ↥↑N')

Next tactic:
let e := LieSubmodule.equivMapOfInjective N' N.injective_incl
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
  refine isCompl_weightSpace_zero_posFittingComp_aux R L N fun N' hN' ↦ ?_
  suffices : IsCompl (weightSpace (N'.map N.incl) 0) (posFittingComp R L (N'.map N.incl))
  · let e := LieSubmodule.equivMapOfInjective N' N.injective_incl
    

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
N : LieSubmodule R L M
hN : ∀ y < N, P y
N' : LieSubmodule R L ↥↑N
hN' : N' < ⊤
this :
  IsCompl (weightSpace (↥↑(LieSubmodule.map (LieSubmodule.incl N) N')) 0)
    (posFittingComp R L ↥↑(LieSubmodule.map (LieSubmodule.incl N) N'))
e : ↥↑N' ≃ₗ⁅R,L⁆ ↥↑(LieSubmodule.map (LieSubmodule.incl N) N') :=
  LieSubmodule.equivMapOfInjective N' (_ : Injective ⇑(LieSubmodule.incl N))
⊢ IsCompl (weightSpace (↥↑N') 0) (posFittingComp R L ↥↑N')

Next tactic:
rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e] at this
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
  refine isCompl_weightSpace_zero_posFittingComp_aux R L N fun N' hN' ↦ ?_
  suffices : IsCompl (weightSpace (N'.map N.incl) 0) (posFittingComp R L (N'.map N.incl))
  · let e := LieSubmodule.equivMapOfInjective N' N.injective_incl
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e] at this
    

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
N : LieSubmodule R L M
hN : ∀ y < N, P y
N' : LieSubmodule R L ↥↑N
hN' : N' < ⊤
e : ↥↑N' ≃ₗ⁅R,L⁆ ↥↑(LieSubmodule.map (LieSubmodule.incl N) N') :=
  LieSubmodule.equivMapOfInjective N' (_ : Injective ⇑(LieSubmodule.incl N))
this :
  IsCompl (LieSubmodule.map e.toLieModuleHom (weightSpace (↥↑N') 0))
    (LieSubmodule.map e.toLieModuleHom (posFittingComp R L ↥↑N'))
⊢ IsCompl (weightSpace (↥↑N') 0) (posFittingComp R L ↥↑N')

Next tactic:
exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mpr this
/-- This is the Fitting decomposition of the Lie module `M`. -/
lemma isCompl_weightSpace_zero_posFittingComp :
    IsCompl (weightSpace M 0) (posFittingComp R L M) := by
  let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (weightSpace N 0) (posFittingComp R L N)
  suffices : P ⊤
  · let e := LieModuleEquiv.ofTop R L M
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e]
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mp this
  refine (LieSubmodule.wellFounded_of_isArtinian R L M).induction (C := P) _ fun N hN ↦ ?_
  refine isCompl_weightSpace_zero_posFittingComp_aux R L N fun N' hN' ↦ ?_
  suffices : IsCompl (weightSpace (N'.map N.incl) 0) (posFittingComp R L (N'.map N.incl))
  · let e := LieSubmodule.equivMapOfInjective N' N.injective_incl
    rw [← map_weightSpace_eq e, ← map_posFittingComp_eq e] at this
    exact (LieSubmodule.orderIsoMapComap e).isCompl_iff.mpr this
  

Proof state:
case this
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : LieRing L
inst✝⁷ : LieAlgebra R L
inst✝⁶ : LieAlgebra.IsNilpotent R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : IsNoetherian R M
inst✝ : IsArtinian R M
P : LieSubmodule R L M → Prop := fun N => IsCompl (weightSpace (↥↑N) 0) (posFittingComp R L ↥↑N)
N : LieSubmodule R L M
hN : ∀ y < N, P y
N' : LieSubmodule R L ↥↑N
hN' : N' < ⊤
⊢ IsCompl (weightSpace (↥↑(LieSubmodule.map (LieSubmodule.incl N) N')) 0)
    (posFittingComp R L ↥↑(LieSubmodule.map (LieSubmodule.incl N) N'))

Next tactic:
exact hN _ (LieSubmodule.map_incl_lt_iff_lt_top.mpr hN')
lemma disjoint_weightSpaceOf [NoZeroSMulDivisors R M] {x : L} {φ₁ φ₂ : R} (h : φ₁ ≠ φ₂) :
    Disjoint (weightSpaceOf M φ₁ x) (weightSpaceOf M φ₂ x) := by
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
x : L
φ₁ φ₂ : R
h : φ₁ ≠ φ₂
⊢ Disjoint (weightSpaceOf M φ₁ x) (weightSpaceOf M φ₂ x)

Next tactic:
rw [LieSubmodule.disjoint_iff_coe_toSubmodule]
lemma disjoint_weightSpaceOf [NoZeroSMulDivisors R M] {x : L} {φ₁ φ₂ : R} (h : φ₁ ≠ φ₂) :
    Disjoint (weightSpaceOf M φ₁ x) (weightSpaceOf M φ₂ x) := by
  rw [LieSubmodule.disjoint_iff_coe_toSubmodule]
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
x : L
φ₁ φ₂ : R
h : φ₁ ≠ φ₂
⊢ Disjoint ↑(weightSpaceOf M φ₁ x) ↑(weightSpaceOf M φ₂ x)

Next tactic:
exact Module.End.disjoint_iSup_generalizedEigenspace _ h
lemma disjoint_weightSpace [NoZeroSMulDivisors R M] {χ₁ χ₂ : L → R} (h : χ₁ ≠ χ₂) :
    Disjoint (weightSpace M χ₁) (weightSpace M χ₂) := by
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ χ₂ : L → R
h : χ₁ ≠ χ₂
⊢ Disjoint (weightSpace M χ₁) (weightSpace M χ₂)

Next tactic:
obtain ⟨x, hx⟩ : ∃ x, χ₁ x ≠ χ₂ x := Function.ne_iff.mp h
lemma disjoint_weightSpace [NoZeroSMulDivisors R M] {χ₁ χ₂ : L → R} (h : χ₁ ≠ χ₂) :
    Disjoint (weightSpace M χ₁) (weightSpace M χ₂) := by
  obtain ⟨x, hx⟩ : ∃ x, χ₁ x ≠ χ₂ x := Function.ne_iff.mp h
  

Proof state:
case intro
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ χ₂ : L → R
h : χ₁ ≠ χ₂
x : L
hx : χ₁ x ≠ χ₂ x
⊢ Disjoint (weightSpace M χ₁) (weightSpace M χ₂)

Next tactic:
exact (disjoint_weightSpaceOf R L M hx).mono
    (weightSpace_le_weightSpaceOf M x χ₁) (weightSpace_le_weightSpaceOf M x χ₂)
lemma injOn_weightSpace [NoZeroSMulDivisors R M] :
    InjOn (fun (χ : L → R) ↦ weightSpace M χ) {χ | weightSpace M χ ≠ ⊥} := by
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
⊢ InjOn (fun χ => weightSpace M χ) {χ | weightSpace M χ ≠ ⊥}

Next tactic:
rintro χ₁ _ χ₂ hχ₂ (hχ₁₂ : weightSpace M χ₁ = weightSpace M χ₂)
lemma injOn_weightSpace [NoZeroSMulDivisors R M] :
    InjOn (fun (χ : L → R) ↦ weightSpace M χ) {χ | weightSpace M χ ≠ ⊥} := by
  rintro χ₁ _ χ₂ hχ₂ (hχ₁₂ : weightSpace M χ₁ = weightSpace M χ₂)
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ : L → R
a✝ : χ₁ ∈ {χ | weightSpace M χ ≠ ⊥}
χ₂ : L → R
hχ₂ : χ₂ ∈ {χ | weightSpace M χ ≠ ⊥}
hχ₁₂ : weightSpace M χ₁ = weightSpace M χ₂
⊢ χ₁ = χ₂

Next tactic:
contrapose! hχ₂
lemma injOn_weightSpace [NoZeroSMulDivisors R M] :
    InjOn (fun (χ : L → R) ↦ weightSpace M χ) {χ | weightSpace M χ ≠ ⊥} := by
  rintro χ₁ _ χ₂ hχ₂ (hχ₁₂ : weightSpace M χ₁ = weightSpace M χ₂)
  contrapose! hχ₂
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ : L → R
a✝ : χ₁ ∈ {χ | weightSpace M χ ≠ ⊥}
χ₂ : L → R
hχ₁₂ : weightSpace M χ₁ = weightSpace M χ₂
hχ₂ : χ₁ ≠ χ₂
⊢ χ₂ ∉ {χ | weightSpace M χ ≠ ⊥}

Next tactic:
simpa [hχ₁₂] using disjoint_weightSpace R L M hχ₂
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ := by
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
⊢ CompleteLattice.Independent fun χ => weightSpace M χ

Next tactic:
classical
  suffices ∀ χ (s : Finset (L → R)) (_ : χ ∉ s),
      Disjoint (weightSpace M χ) (s.sup fun (χ : L → R) ↦ weightSpace M χ) by
    simpa only [CompleteLattice.independent_iff_supIndep_of_injOn (injOn_weightSpace R L M),
      Finset.supIndep_iff_disjoint_erase] using fun s χ _ ↦ this _ _ (s.not_mem_erase χ)
  intro χ₁ s
  induction' s using Finset.induction_on with χ₂ s _ ih; simp
  intro hχ₁₂
  obtain ⟨hχ₁₂ : χ₁ ≠ χ₂, hχ₁ : χ₁ ∉ s⟩ := by rwa [Finset.mem_insert, not_or] at hχ₁₂
  specialize ih hχ₁
  rw [Finset.sup_insert, disjoint_iff, LieSubmodule.eq_bot_iff]
  rintro x ⟨hx, hx'⟩
  simp only [SetLike.mem_coe, LieSubmodule.mem_coeSubmodule] at hx hx'
  suffices x ∈ weightSpace M χ₂ by
    rw [← LieSubmodule.mem_bot (R := R) (L := L), ← (disjoint_weightSpace R L M hχ₁₂).eq_bot]
    exact ⟨hx, this⟩
  obtain ⟨y, hy, z, hz, rfl⟩ := (LieSubmodule.mem_sup _ _ _).mp hx'; clear hx'
  suffices ∀ l, ∃ (k : ℕ),
      ((toEndomorphism R L M l - algebraMap R (Module.End R M) (χ₂ l)) ^ k) (y + z) ∈
      weightSpace M χ₁ ⊓ Finset.sup s fun χ ↦ weightSpace M χ by
    simpa only [ih.eq_bot, LieSubmodule.mem_bot, mem_weightSpace] using this
  intro l
  let g : Module.End R M := toEndomorphism R L M l - algebraMap R (Module.End R M) (χ₂ l)
  obtain ⟨k, hk : (g ^ k) y = 0⟩ := (mem_weightSpace _ _ _).mp hy l
  refine ⟨k, (LieSubmodule.mem_inf _ _ _).mp ⟨?_, ?_⟩⟩
  · exact LieSubmodule.mapsTo_pow_toEndomorphism_sub_algebraMap _ hx
  · rw [map_add, hk, zero_add]
    suffices (s.sup fun χ ↦ weightSpace M χ : Submodule R M).map (g ^ k) ≤
        s.sup fun χ ↦ weightSpace M χ by
      refine this (Submodule.mem_map_of_mem ?_)
      simp_rw [← LieSubmodule.mem_coeSubmodule, Finset.sup_eq_iSup,
        LieSubmodule.iSup_coe_toSubmodule, ← Finset.sup_eq_iSup] at hz
      exact hz
    simp_rw [Finset.sup_eq_iSup, Submodule.map_iSup (ι := L → R), Submodule.map_iSup (ι := _ ∈ s),
      LieSubmodule.iSup_coe_toSubmodule]
    refine iSup₂_mono fun χ _ ↦ ?_
    rintro - ⟨u, hu, rfl⟩
    exact LieSubmodule.mapsTo_pow_toEndomorphism_sub_algebraMap _ hu
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ := by
  classical
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
⊢ CompleteLattice.Independent fun χ => weightSpace M χ

Next tactic:
suffices ∀ χ (s : Finset (L → R)) (_ : χ ∉ s),
      Disjoint (weightSpace M χ) (s.sup fun (χ : L → R) ↦ weightSpace M χ) by
    simpa only [CompleteLattice.independent_iff_supIndep_of_injOn (injOn_weightSpace R L M),
      Finset.supIndep_iff_disjoint_erase] using fun s χ _ ↦ this _ _ (s.not_mem_erase χ)
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ := by
  classical
  suffices ∀ χ (s : Finset (L → R)) (_ : χ ∉ s),
      Disjoint (weightSpace M χ) (s.sup fun (χ : L → R) ↦ weightSpace M χ) by
    

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
this : ∀ (χ : L → R) (s : Finset (L → R)), χ ∉ s → Disjoint (weightSpace M χ) (Finset.sup s fun χ => weightSpace M χ)
⊢ CompleteLattice.Independent fun χ => weightSpace M χ

Next tactic:
simpa only [CompleteLattice.independent_iff_supIndep_of_injOn (injOn_weightSpace R L M),
      Finset.supIndep_iff_disjoint_erase] using fun s χ _ ↦ this _ _ (s.not_mem_erase χ)
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ := by
  classical
  suffices ∀ χ (s : Finset (L → R)) (_ : χ ∉ s),
      Disjoint (weightSpace M χ) (s.sup fun (χ : L → R) ↦ weightSpace M χ) by
    simpa only [CompleteLattice.independent_iff_supIndep_of_injOn (injOn_weightSpace R L M),
      Finset.supIndep_iff_disjoint_erase] using fun s χ _ ↦ this _ _ (s.not_mem_erase χ)
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
⊢ ∀ (χ : L → R) (s : Finset (L → R)), χ ∉ s → Disjoint (weightSpace M χ) (Finset.sup s fun χ => weightSpace M χ)

Next tactic:
intro χ₁ s
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ := by
  classical
  suffices ∀ χ (s : Finset (L → R)) (_ : χ ∉ s),
      Disjoint (weightSpace M χ) (s.sup fun (χ : L → R) ↦ weightSpace M χ) by
    simpa only [CompleteLattice.independent_iff_supIndep_of_injOn (injOn_weightSpace R L M),
      Finset.supIndep_iff_disjoint_erase] using fun s χ _ ↦ this _ _ (s.not_mem_erase χ)
  intro χ₁ s
  

Proof state:
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ : L → R
s : Finset (L → R)
⊢ χ₁ ∉ s → Disjoint (weightSpace M χ₁) (Finset.sup s fun χ => weightSpace M χ)

Next tactic:
induction' s using Finset.induction_on with χ₂ s _ ih
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ := by
  classical
  suffices ∀ χ (s : Finset (L → R)) (_ : χ ∉ s),
      Disjoint (weightSpace M χ) (s.sup fun (χ : L → R) ↦ weightSpace M χ) by
    simpa only [CompleteLattice.independent_iff_supIndep_of_injOn (injOn_weightSpace R L M),
      Finset.supIndep_iff_disjoint_erase] using fun s χ _ ↦ this _ _ (s.not_mem_erase χ)
  intro χ₁ s
  induction' s using Finset.induction_on with χ₂ s _ ih; 

Proof state:
case empty
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ : L → R
⊢ χ₁ ∉ ∅ → Disjoint (weightSpace M χ₁) (Finset.sup ∅ fun χ => weightSpace M χ)
case insert
K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : LieAlgebra.IsNilpotent R L
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : LieRingModule L M
inst✝¹ : LieModule R L M
inst✝ : NoZeroSMulDivisors R M
χ₁ χ₂ : L → R
s : Finset (L → R)
a✝ : χ₂ ∉ s
ih : χ₁ ∉ s → Disjoint (weightSpace M χ₁) (Finset.sup s fun χ => weightSpace M χ)
⊢ χ₁ ∉ insert χ₂ s → Disjoint (weightSpace M χ₁) (Finset.sup (insert χ₂ s) fun χ => weightSpace M χ)

Next tactic:
simp