l3lab/ntp-mathlib huggingface dataset:
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; 

Proof state:
case pos
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i j : ι
a : π j
ha : IsAtom a
hle : Function.update ⊥ j a ≤ s
hij : i = j
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ j a,
        property :=
          (_ : (∃ i a_1, IsAtom a_1 ∧ Function.update ⊥ j a = Function.update ⊥ i a_1) ∧ Function.update ⊥ j a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}
case neg
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i j : ι
a : π j
ha : IsAtom a
hle : Function.update ⊥ j a ≤ s
hij : ¬i = j
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ j a,
        property :=
          (_ : (∃ i a_1, IsAtom a_1 ∧ Function.update ⊥ j a = Function.update ⊥ i a_1) ∧ Function.update ⊥ j a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
case neg => simp [Function.update_noteq hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i j : ι
a : π j
ha : IsAtom a
hle : Function.update ⊥ j a ≤ s
hij : ¬i = j
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ j a,
        property :=
          (_ : (∃ i a_1, IsAtom a_1 ∧ Function.update ⊥ j a = Function.update ⊥ i a_1) ∧ Function.update ⊥ j a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
case neg => simp [Function.update_noteq hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i j : ι
a : π j
ha : IsAtom a
hle : Function.update ⊥ j a ≤ s
hij : ¬i = j
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ j a,
        property :=
          (_ : (∃ i a_1, IsAtom a_1 ∧ Function.update ⊥ j a = Function.update ⊥ i a_1) ∧ Function.update ⊥ j a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
simp [Function.update_noteq hij]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      

Proof state:
case pos
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i j : ι
a : π j
ha : IsAtom a
hle : Function.update ⊥ j a ≤ s
hij : i = j
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ j a,
        property :=
          (_ : (∃ i a_1, IsAtom a_1 ∧ Function.update ⊥ j a = Function.update ⊥ i a_1) ∧ Function.update ⊥ j a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
subst hij
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      subst hij; 

Proof state:
case pos
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
ha : IsAtom a
hle : Function.update ⊥ i a ≤ s
⊢ (fun f => ↑f i)
      { val := Function.update ⊥ i a,
        property :=
          (_ :
            (∃ i_1 a_1, IsAtom a_1 ∧ Function.update ⊥ i a = Function.update ⊥ i_1 a_1) ∧ Function.update ⊥ i a ≤ s) } ≤
    sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
simp only [Function.update_same]
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      subst hij; simp only [Function.update_same]
      

Proof state:
case pos
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
ha : IsAtom a
hle : Function.update ⊥ i a ≤ s
⊢ a ≤ sSup {a | IsAtom a ∧ a ≤ s i}

Next tactic:
exact le_sSup ⟨ha, by simpa using hle i⟩
instance isAtomistic [∀ i, CompleteLattice (π i)] [∀ i, IsAtomistic (π i)] :
    IsAtomistic (∀ i, π i) where
  eq_sSup_atoms s := by
    classical
    refine ⟨{ f | IsAtom f ∧ f ≤ s }, ?_, by simp; tauto⟩
    ext i
    rw [← sSup_atoms_le_eq (s i)]
    simp_rw [isAtom_iff_eq_single]
    refine le_antisymm ?le ?ge
    case le =>
      refine sSup_le fun a ⟨ha, hle⟩ => ?_
      refine le_sSup ⟨⟨_, ⟨_, _, ha, rfl⟩, ?_⟩, by simp⟩
      intro j; by_cases hij : j = i
      case pos => subst hij; simpa
      case neg => simp [hij]
    case ge =>
      refine sSup_le ?_
      rintro _ ⟨⟨_, ⟨j, a, ha, rfl⟩, hle⟩, rfl⟩
      by_cases hij : i = j; case neg => simp [Function.update_noteq hij]
      subst hij; simp only [Function.update_same]
      exact le_sSup ⟨ha, by 

Proof state:
ι : Type ?u.127065
α : Type u_1
β : Type u_2
π : ι → Type u
inst✝¹ : (i : ι) → CompleteLattice (π i)
inst✝ : ∀ (i : ι), IsAtomistic (π i)
s : (i : ι) → π i
i : ι
a : π i
ha : IsAtom a
hle : Function.update ⊥ i a ≤ s
⊢ a ≤ s i

Next tactic:
simpa using hle i
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x} := by
  

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ IsAtom s ↔ ∃ x, s = {x}

Next tactic:
refine'
    ⟨_, by
      rintro ⟨x, rfl⟩
      exact isAtom_singleton x⟩
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x} := by
  refine'
    ⟨_, by
      

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ (∃ x, s = {x}) → IsAtom s

Next tactic:
rintro ⟨x, rfl⟩
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x} := by
  refine'
    ⟨_, by
      rintro ⟨x, rfl⟩
      

Proof state:
case intro
α : Type u_1
β : Type u_2
x : α
⊢ IsAtom {x}

Next tactic:
exact isAtom_singleton x
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x} := by
  refine'
    ⟨_, by
      rintro ⟨x, rfl⟩
      exact isAtom_singleton x⟩
  

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ IsAtom s → ∃ x, s = {x}

Next tactic:
rw [isAtom_iff_le_of_ge, bot_eq_empty, ← nonempty_iff_ne_empty]
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x} := by
  refine'
    ⟨_, by
      rintro ⟨x, rfl⟩
      exact isAtom_singleton x⟩
  rw [isAtom_iff_le_of_ge, bot_eq_empty, ← nonempty_iff_ne_empty]
  

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ (Set.Nonempty s ∧ ∀ (b : Set α), b ≠ ∅ → b ≤ s → s ≤ b) → ∃ x, s = {x}

Next tactic:
rintro ⟨⟨x, hx⟩, hs⟩
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x} := by
  refine'
    ⟨_, by
      rintro ⟨x, rfl⟩
      exact isAtom_singleton x⟩
  rw [isAtom_iff_le_of_ge, bot_eq_empty, ← nonempty_iff_ne_empty]
  rintro ⟨⟨x, hx⟩, hs⟩
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
s : Set α
hs : ∀ (b : Set α), b ≠ ∅ → b ≤ s → s ≤ b
x : α
hx : x ∈ s
⊢ ∃ x, s = {x}

Next tactic:
exact
    ⟨x, eq_singleton_iff_unique_mem.2
        ⟨hx, fun y hy => (hs {y} (singleton_ne_empty _) (singleton_subset_iff.2 hy) hx).symm⟩⟩
theorem isCoatom_iff (s : Set α) : IsCoatom s ↔ ∃ x, s = {x}ᶜ := by
  

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ IsCoatom s ↔ ∃ x, s = {x}ᶜ

Next tactic:
rw [isCompl_compl.isCoatom_iff_isAtom, isAtom_iff]
theorem isCoatom_iff (s : Set α) : IsCoatom s ↔ ∃ x, s = {x}ᶜ := by
  rw [isCompl_compl.isCoatom_iff_isAtom, isAtom_iff]
  

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ (∃ x, sᶜ = {x}) ↔ ∃ x, s = {x}ᶜ

Next tactic:
simp_rw [@eq_comm _ s, compl_eq_comm]
instance : IsAtomistic (Set α) where
  eq_sSup_atoms s :=
    ⟨(fun x => {x}) '' s, by 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ s = sSup ((fun x => {x}) '' s)

Next tactic:
rw [sSup_eq_sUnion, sUnion_image, biUnion_of_singleton]
instance : IsAtomistic (Set α) where
  eq_sSup_atoms s :=
    ⟨(fun x => {x}) '' s, by rw [sSup_eq_sUnion, sUnion_image, biUnion_of_singleton],
      by 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ ∀ a ∈ (fun x => {x}) '' s, IsAtom a

Next tactic:
{ rintro _ ⟨x, _, rfl⟩
           exact isAtom_singleton x }
instance : IsAtomistic (Set α) where
  eq_sSup_atoms s :=
    ⟨(fun x => {x}) '' s, by rw [sSup_eq_sUnion, sUnion_image, biUnion_of_singleton],
      by { 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ ∀ a ∈ (fun x => {x}) '' s, IsAtom a

Next tactic:
rintro _ ⟨x, _, rfl⟩
instance : IsAtomistic (Set α) where
  eq_sSup_atoms s :=
    ⟨(fun x => {x}) '' s, by rw [sSup_eq_sUnion, sUnion_image, biUnion_of_singleton],
      by { rintro _ ⟨x, _, rfl⟩
           

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
s : Set α
x : α
left✝ : x ∈ s
⊢ IsAtom ((fun x => {x}) x)

Next tactic:
exact isAtom_singleton x
instance : IsCoatomistic (Set α) where
  eq_sInf_coatoms s :=
    ⟨(fun x => {x}ᶜ) '' sᶜ,
      by 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ s = sInf ((fun x => {x}ᶜ) '' sᶜ)

Next tactic:
{ rw [sInf_eq_sInter, sInter_image, ← compl_iUnion₂, biUnion_of_singleton, compl_compl] }
instance : IsCoatomistic (Set α) where
  eq_sInf_coatoms s :=
    ⟨(fun x => {x}ᶜ) '' sᶜ,
      by { 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ s = sInf ((fun x => {x}ᶜ) '' sᶜ)

Next tactic:
rw [sInf_eq_sInter, sInter_image, ← compl_iUnion₂, biUnion_of_singleton, compl_compl]
instance : IsCoatomistic (Set α) where
  eq_sInf_coatoms s :=
    ⟨(fun x => {x}ᶜ) '' sᶜ,
      by { rw [sInf_eq_sInter, sInter_image, ← compl_iUnion₂, biUnion_of_singleton, compl_compl] },
      by 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ ∀ a ∈ (fun x => {x}ᶜ) '' sᶜ, IsCoatom a

Next tactic:
{ rintro _ ⟨x, _, rfl⟩
           exact isCoatom_singleton_compl x }
instance : IsCoatomistic (Set α) where
  eq_sInf_coatoms s :=
    ⟨(fun x => {x}ᶜ) '' sᶜ,
      by { rw [sInf_eq_sInter, sInter_image, ← compl_iUnion₂, biUnion_of_singleton, compl_compl] },
      by { 

Proof state:
α : Type u_1
β : Type u_2
s : Set α
⊢ ∀ a ∈ (fun x => {x}ᶜ) '' sᶜ, IsCoatom a

Next tactic:
rintro _ ⟨x, _, rfl⟩
instance : IsCoatomistic (Set α) where
  eq_sInf_coatoms s :=
    ⟨(fun x => {x}ᶜ) '' sᶜ,
      by { rw [sInf_eq_sInter, sInter_image, ← compl_iUnion₂, biUnion_of_singleton, compl_compl] },
      by { rintro _ ⟨x, _, rfl⟩
           

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
s : Set α
x : α
left✝ : x ∈ sᶜ
⊢ IsCoatom ((fun x => {x}ᶜ) x)

Next tactic:
exact isCoatom_singleton_compl x
instance LieModule.instIsTrivialOfSubsingleton {L M : Type*}
    [LieRing L] [AddCommGroup M] [LieRingModule L M] [Subsingleton L] : LieModule.IsTrivial L M :=
  ⟨fun x m ↦ by 

Proof state:
L : Type u_1
M : Type u_2
inst✝³ : LieRing L
inst✝² : AddCommGroup M
inst✝¹ : LieRingModule L M
inst✝ : Subsingleton L
x : L
m : M
⊢ ⁅x, m⁆ = 0

Next tactic:
rw [Subsingleton.eq_zero x, zero_lie]
instance LieModule.instIsTrivialOfSubsingleton' {L M : Type*}
    [LieRing L] [AddCommGroup M] [LieRingModule L M] [Subsingleton M] : LieModule.IsTrivial L M :=
  ⟨fun x m ↦ by 

Proof state:
L : Type u_1
M : Type u_2
inst✝³ : LieRing L
inst✝² : AddCommGroup M
inst✝¹ : LieRingModule L M
inst✝ : Subsingleton M
x : L
m : M
⊢ ⁅x, m⁆ = 0

Next tactic:
simp_rw [Subsingleton.eq_zero m, lie_zero]
instance LieIdeal.isLieAbelian_of_trivial (R : Type u) (L : Type v) [CommRing R] [LieRing L]
    [LieAlgebra R L] (I : LieIdeal R L) [h : LieModule.IsTrivial L I] : IsLieAbelian I where
  trivial x y := by 

Proof state:
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
I : LieIdeal R L
h : LieModule.IsTrivial L ↥↑I
x y : ↥↑I
⊢ ⁅x, y⁆ = 0

Next tactic:
apply h.trivial
theorem Function.Surjective.isLieAbelian {R : Type u} {L₁ : Type v} {L₂ : Type w} [CommRing R]
    [LieRing L₁] [LieRing L₂] [LieAlgebra R L₁] [LieAlgebra R L₂] {f : L₁ →ₗ⁅R⁆ L₂}
    (h₁ : Function.Surjective f) (h₂ : IsLieAbelian L₁) : IsLieAbelian L₂ :=
  { trivial := fun x y => by
      

Proof state:
R : Type u
L₁ : Type v
L₂ : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L₁
inst✝² : LieRing L₂
inst✝¹ : LieAlgebra R L₁
inst✝ : LieAlgebra R L₂
f : L₁ →ₗ⁅R⁆ L₂
h₁ : Surjective ⇑f
h₂ : IsLieAbelian L₁
x y : L₂
⊢ ⁅x, y⁆ = 0

Next tactic:
obtain ⟨u, rfl⟩ := h₁ x
theorem Function.Surjective.isLieAbelian {R : Type u} {L₁ : Type v} {L₂ : Type w} [CommRing R]
    [LieRing L₁] [LieRing L₂] [LieAlgebra R L₁] [LieAlgebra R L₂] {f : L₁ →ₗ⁅R⁆ L₂}
    (h₁ : Function.Surjective f) (h₂ : IsLieAbelian L₁) : IsLieAbelian L₂ :=
  { trivial := fun x y => by
      obtain ⟨u, rfl⟩ := h₁ x
      

Proof state:
case intro
R : Type u
L₁ : Type v
L₂ : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L₁
inst✝² : LieRing L₂
inst✝¹ : LieAlgebra R L₁
inst✝ : LieAlgebra R L₂
f : L₁ →ₗ⁅R⁆ L₂
h₁ : Surjective ⇑f
h₂ : IsLieAbelian L₁
y : L₂
u : L₁
⊢ ⁅f u, y⁆ = 0

Next tactic:
obtain ⟨v, rfl⟩ := h₁ y
theorem Function.Surjective.isLieAbelian {R : Type u} {L₁ : Type v} {L₂ : Type w} [CommRing R]
    [LieRing L₁] [LieRing L₂] [LieAlgebra R L₁] [LieAlgebra R L₂] {f : L₁ →ₗ⁅R⁆ L₂}
    (h₁ : Function.Surjective f) (h₂ : IsLieAbelian L₁) : IsLieAbelian L₂ :=
  { trivial := fun x y => by
      obtain ⟨u, rfl⟩ := h₁ x
      obtain ⟨v, rfl⟩ := h₁ y
      

Proof state:
case intro.intro
R : Type u
L₁ : Type v
L₂ : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L₁
inst✝² : LieRing L₂
inst✝¹ : LieAlgebra R L₁
inst✝ : LieAlgebra R L₂
f : L₁ →ₗ⁅R⁆ L₂
h₁ : Surjective ⇑f
h₂ : IsLieAbelian L₁
u v : L₁
⊢ ⁅f u, f v⁆ = 0

Next tactic:
rw [← LieHom.map_lie, trivial_lie_zero, LieHom.map_zero]
theorem commutative_ring_iff_abelian_lie_ring {A : Type v} [Ring A] :
    IsCommutative A (· * ·) ↔ IsLieAbelian A := by
  

Proof state:
A : Type v
inst✝ : Ring A
⊢ (IsCommutative A fun x x_1 => x * x_1) ↔ IsLieAbelian A

Next tactic:
have h₁ : IsCommutative A (· * ·) ↔ ∀ a b : A, a * b = b * a := ⟨fun h => h.1, fun h => ⟨h⟩⟩
theorem commutative_ring_iff_abelian_lie_ring {A : Type v} [Ring A] :
    IsCommutative A (· * ·) ↔ IsLieAbelian A := by
  have h₁ : IsCommutative A (· * ·) ↔ ∀ a b : A, a * b = b * a := ⟨fun h => h.1, fun h => ⟨h⟩⟩
  

Proof state:
A : Type v
inst✝ : Ring A
h₁ : (IsCommutative A fun x x_1 => x * x_1) ↔ ∀ (a b : A), a * b = b * a
⊢ (IsCommutative A fun x x_1 => x * x_1) ↔ IsLieAbelian A

Next tactic:
have h₂ : IsLieAbelian A ↔ ∀ a b : A, ⁅a, b⁆ = 0 := ⟨fun h => h.1, fun h => ⟨h⟩⟩
theorem commutative_ring_iff_abelian_lie_ring {A : Type v} [Ring A] :
    IsCommutative A (· * ·) ↔ IsLieAbelian A := by
  have h₁ : IsCommutative A (· * ·) ↔ ∀ a b : A, a * b = b * a := ⟨fun h => h.1, fun h => ⟨h⟩⟩
  have h₂ : IsLieAbelian A ↔ ∀ a b : A, ⁅a, b⁆ = 0 := ⟨fun h => h.1, fun h => ⟨h⟩⟩
  

Proof state:
A : Type v
inst✝ : Ring A
h₁ : (IsCommutative A fun x x_1 => x * x_1) ↔ ∀ (a b : A), a * b = b * a
h₂ : IsLieAbelian A ↔ ∀ (a b : A), ⁅a, b⁆ = 0
⊢ (IsCommutative A fun x x_1 => x * x_1) ↔ IsLieAbelian A

Next tactic:
simp only [h₁, h₂, LieRing.of_associative_ring_bracket, sub_eq_zero]
@[simp]
protected theorem mem_ker (x : L) : x ∈ LieModule.ker R L M ↔ ∀ m : M, ⁅x, m⁆ = 0 := by
  

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
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✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
x : L
⊢ x ∈ LieModule.ker R L M ↔ ∀ (m : M), ⁅x, m⁆ = 0

Next tactic:
simp only [LieModule.ker, LieHom.mem_ker, LinearMap.ext_iff, LinearMap.zero_apply,
    toEndomorphism_apply_apply]
/-- The largest submodule of a Lie module `M` on which the Lie algebra `L` acts trivially. -/
def maxTrivSubmodule : LieSubmodule R L M where
  carrier := { m | ∀ x : L, ⁅x, m⁆ = 0 }
  zero_mem' x := lie_zero x
  add_mem' {x y} hx hy z := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
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✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
x y : M
hx : x ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0}
hy : y ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0}
z : L
⊢ ⁅z, x + y⁆ = 0

Next tactic:
rw [lie_add, hx, hy, add_zero]
/-- The largest submodule of a Lie module `M` on which the Lie algebra `L` acts trivially. -/
def maxTrivSubmodule : LieSubmodule R L M where
  carrier := { m | ∀ x : L, ⁅x, m⁆ = 0 }
  zero_mem' x := lie_zero x
  add_mem' {x y} hx hy z := by rw [lie_add, hx, hy, add_zero]
  smul_mem' c x hx y := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
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✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
c : R
x : M
hx :
  x ∈
    {
          toAddSubsemigroup :=
            { carrier := {m | ∀ (x : L), ⁅x, m⁆ = 0},
              add_mem' :=
                (_ :
                  ∀ {x y : M},
                    x ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0} → y ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0} → ∀ (z : L), ⁅z, x + y⁆ = 0) },
          zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ = 0) }.toAddSubsemigroup.carrier
y : L
⊢ ⁅y, c • x⁆ = 0

Next tactic:
rw [lie_smul, hx, smul_zero]
/-- The largest submodule of a Lie module `M` on which the Lie algebra `L` acts trivially. -/
def maxTrivSubmodule : LieSubmodule R L M where
  carrier := { m | ∀ x : L, ⁅x, m⁆ = 0 }
  zero_mem' x := lie_zero x
  add_mem' {x y} hx hy z := by rw [lie_add, hx, hy, add_zero]
  smul_mem' c x hx y := by rw [lie_smul, hx, smul_zero]
  lie_mem {x m} hm y := by 

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
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✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
x : L
m : M
hm :
  m ∈
    {
            toAddSubmonoid :=
              {
                toAddSubsemigroup :=
                  { carrier := {m | ∀ (x : L), ⁅x, m⁆ = 0},
                    add_mem' :=
                      (_ :
                        ∀ {x y : M},
                          x ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0} →
                            y ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0} → ∀ (z : L), ⁅z, x + y⁆ = 0) },
                zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ = 0) },
            smul_mem' :=
              (_ :
                ∀ (c : R),
                  ∀
                    x ∈
                      {
                            toAddSubsemigroup :=
                              { carrier := {m | ∀ (x : L), ⁅x, m⁆ = 0},
                                add_mem' :=
                                  (_ :
                                    ∀ {x y : M},
                                      x ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0} →
                                        y ∈ {m | ∀ (x : L), ⁅x, m⁆ = 0} → ∀ (z : L), ⁅z, x + y⁆ = 0) },
                            zero_mem' := (_ : ∀ (x : L), ⁅x, 0⁆ = 0) }.toAddSubsemigroup.carrier,
                    ∀ (y : L), ⁅y, c • x⁆ = 0) }.toAddSubmonoid.toAddSubsemigroup.carrier
y : L
⊢ ⁅y, ⁅x, m⁆⁆ = 0

Next tactic:
rw [hm, lie_zero]
@[simp]
theorem ideal_oper_maxTrivSubmodule_eq_bot (I : LieIdeal R L) :
    ⁅I, maxTrivSubmodule R L M⁆ = ⊥ := by
  

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
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✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
I : LieIdeal R L
⊢ ⁅I, maxTrivSubmodule R L M⁆ = ⊥

Next tactic:
rw [← LieSubmodule.coe_toSubmodule_eq_iff, LieSubmodule.lieIdeal_oper_eq_linear_span,
    LieSubmodule.bot_coeSubmodule, Submodule.span_eq_bot]
@[simp]
theorem ideal_oper_maxTrivSubmodule_eq_bot (I : LieIdeal R L) :
    ⁅I, maxTrivSubmodule R L M⁆ = ⊥ := by
  rw [← LieSubmodule.coe_toSubmodule_eq_iff, LieSubmodule.lieIdeal_oper_eq_linear_span,
    LieSubmodule.bot_coeSubmodule, Submodule.span_eq_bot]
  

Proof state:
R : Type u
L : Type v
M : Type w
N : Type w₁
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✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
I : LieIdeal R L
⊢ ∀ x ∈ {m | ∃ x n, ⁅↑x, ↑n⁆ = m}, x = 0

Next tactic:
rintro m ⟨⟨x, hx⟩, ⟨⟨m, hm⟩, rfl⟩⟩