l3lab/ntp-mathlib huggingface dataset:
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · 

Proof state:
case h.inr.intro
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
ih :
  ∀ m < n,
    ∀ (M : Type u_4) [inst : AddCommGroup M] [inst_1 : LieRingModule L M] [inst_2 : Module K M]
      [inst_3 : LieModule K L M] [inst_4 : FiniteDimensional K M] [inst_5 : IsTriangularizable K L M],
      finrank K M = m → ⨆ χ, weightSpace M χ = ⊤
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ¬∃ φ, weightSpaceOf M φ y = ⊤
⊢ ⨆ χ, weightSpace M χ = ⊤

Next tactic:
replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
ih :
  ∀ m < n,
    ∀ (M : Type u_4) [inst : AddCommGroup M] [inst_1 : LieRingModule L M] [inst_2 : Module K M]
      [inst_3 : LieModule K L M] [inst_4 : FiniteDimensional K M] [inst_5 : IsTriangularizable K L M],
      finrank K M = m → ⨆ χ, weightSpace M χ = ⊤
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ¬∃ φ, weightSpaceOf M φ y = ⊤
φ : ?m.1237397
⊢ finrank K ↥↑(weightSpaceOf M φ y) < n

Next tactic:
simp_rw [not_exists, ← lt_top_iff_ne_top] at hy
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; 

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
ih :
  ∀ m < n,
    ∀ (M : Type u_4) [inst : AddCommGroup M] [inst_1 : LieRingModule L M] [inst_2 : Module K M]
      [inst_3 : LieModule K L M] [inst_4 : FiniteDimensional K M] [inst_5 : IsTriangularizable K L M],
      finrank K M = m → ⨆ χ, weightSpace M χ = ⊤
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy✝ : ¬∃ φ, weightSpaceOf M φ y = ⊤
φ : ?m.1237397
hy : ∀ (x : K), weightSpaceOf M x y < ⊤
⊢ finrank K ↥↑(weightSpaceOf M φ y) < n

Next tactic:
exact h_dim ▸ Submodule.finrank_lt (hy φ)
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    

Proof state:
case h.inr.intro
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
ih :
  ∀ m < n,
    ∀ (M : Type u_4) [inst : AddCommGroup M] [inst_1 : LieRingModule L M] [inst_2 : Module K M]
      [inst_3 : LieModule K L M] [inst_4 : FiniteDimensional K M] [inst_5 : IsTriangularizable K L M],
      finrank K M = m → ⨆ χ, weightSpace M χ = ⊤
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
⊢ ⨆ χ, weightSpace M χ = ⊤

Next tactic:
replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    

Proof state:
case h.inr.intro
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
⊢ ⨆ χ, weightSpace M χ = ⊤

Next tactic:
replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; rw [iSup_split, biSup_congr this] at ih; simpa using ih
      intro χ hχ
      rw [eq_bot_iff, ← (weightSpaceOf M φ y).ker_incl, LieModuleHom.ker,
        ← LieSubmodule.map_le_iff_le_comap, map_weightSpace_eq_of_injective
        (weightSpaceOf M φ y).injective_incl, LieSubmodule.range_incl, ← disjoint_iff_inf_le]
      exact (disjoint_weightSpaceOf K L M hχ).mono_left (weightSpace_le_weightSpaceOf M y χ)
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
⊢ ∀ (φ : K), ⨆ χ, ⨆ (_ : χ y = φ), weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤

Next tactic:
intro φ
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
φ : K
⊢ ⨆ χ, ⨆ (_ : χ y = φ), weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤

Next tactic:
suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; rw [iSup_split, biSup_congr this] at ih; simpa using ih
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
φ : K
this : ∀ (χ : L → K), χ y ≠ φ → weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊥
⊢ ⨆ χ, ⨆ (_ : χ y = φ), weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤

Next tactic:
specialize ih φ
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; 

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
φ : K
this : ∀ (χ : L → K), χ y ≠ φ → weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊥
ih : ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
⊢ ⨆ χ, ⨆ (_ : χ y = φ), weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤

Next tactic:
rw [iSup_split, biSup_congr this] at ih
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; rw [iSup_split, biSup_congr this] at ih; 

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
φ : K
this : ∀ (χ : L → K), χ y ≠ φ → weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊥
ih✝ : ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
ih : (⨆ i, ⨆ (_ : i y ≠ φ), ⊥) ⊔ ⨆ i, ⨆ (_ : ¬i y ≠ φ), weightSpace (↥↑(weightSpaceOf M φ y)) i = ⊤
⊢ ⨆ χ, ⨆ (_ : χ y = φ), weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤

Next tactic:
simpa using ih
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; rw [iSup_split, biSup_congr this] at ih; simpa using ih
      

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
φ : K
⊢ ∀ (χ : L → K), χ y ≠ φ → weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊥

Next tactic:
intro χ hχ
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; rw [iSup_split, biSup_congr this] at ih; simpa using ih
      intro χ hχ
      

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
φ : K
χ : L → K
hχ : χ y ≠ φ
⊢ weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊥

Next tactic:
rw [eq_bot_iff, ← (weightSpaceOf M φ y).ker_incl, LieModuleHom.ker,
        ← LieSubmodule.map_le_iff_le_comap, map_weightSpace_eq_of_injective
        (weightSpaceOf M φ y).injective_incl, LieSubmodule.range_incl, ← disjoint_iff_inf_le]
lemma iSup_weightSpace_eq_top [IsTriangularizable K L M] :
    ⨆ χ : L → K, weightSpace M χ = ⊤ := by
  clear! R -- cf https://github.com/leanprover/lean4/issues/2452
  induction' h_dim : finrank K M using Nat.strong_induction_on with n ih generalizing M
  obtain h' | ⟨y : L, hy : ¬ ∃ φ, weightSpaceOf M φ y = ⊤⟩ :=
    forall_or_exists_not (fun (x : L) ↦ ∃ (φ : K), weightSpaceOf M φ x = ⊤)
  · choose χ hχ using h'
    replace hχ : weightSpace M χ = ⊤ := by simpa only [weightSpace, hχ] using iInf_top
    exact eq_top_iff.mpr <| hχ ▸ le_iSup (weightSpace M) χ
  · replace hy : ∀ φ, finrank K (weightSpaceOf M φ y) < n := fun φ ↦ by
      simp_rw [not_exists, ← lt_top_iff_ne_top] at hy; exact h_dim ▸ Submodule.finrank_lt (hy φ)
    replace ih : ∀ φ, ⨆ χ : L → K, weightSpace (weightSpaceOf M φ y) χ = ⊤ :=
      fun φ ↦ ih _ (hy φ) (weightSpaceOf M φ y) rfl
    replace ih : ∀ φ, ⨆ (χ : L → K) (_ : χ y = φ), weightSpace (weightSpaceOf M φ y) χ = ⊤ := by
      intro φ
      suffices ∀ χ : L → K, χ y ≠ φ → weightSpace (weightSpaceOf M φ y) χ = ⊥ by
        specialize ih φ; rw [iSup_split, biSup_congr this] at ih; simpa using ih
      intro χ hχ
      rw [eq_bot_iff, ← (weightSpaceOf M φ y).ker_incl, LieModuleHom.ker,
        ← LieSubmodule.map_le_iff_le_comap, map_weightSpace_eq_of_injective
        (weightSpaceOf M φ y).injective_incl, LieSubmodule.range_incl, ← disjoint_iff_inf_le]
      

Proof state:
K : Type u_1
L : Type u_3
inst✝⁹ : LieRing L
inst✝⁸ : Field K
inst✝⁷ : LieAlgebra K L
inst✝⁶ : LieAlgebra.IsNilpotent K L
n : ℕ
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : LieRingModule L M
inst✝³ : Module K M
inst✝² : LieModule K L M
inst✝¹ : FiniteDimensional K M
inst✝ : IsTriangularizable K L M
h_dim : finrank K M = n
y : L
hy : ∀ (φ : K), finrank K ↥↑(weightSpaceOf M φ y) < n
ih : ∀ (φ : K), ⨆ χ, weightSpace (↥↑(weightSpaceOf M φ y)) χ = ⊤
φ : K
χ : L → K
hχ : χ y ≠ φ
⊢ Disjoint (weightSpace M χ) (weightSpaceOf M φ y)

Next tactic:
exact (disjoint_weightSpaceOf K L M hχ).mono_left (weightSpace_le_weightSpaceOf M y χ)