l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem count_bagInter {a : α} :
    ∀ {l₁ l₂ : List α}, count a (l₁.bagInter l₂) = min (count a l₁) (count a l₂)
  | [], l₂ => by simp
  | l₁, [] => by simp
  | b :: l₁, l₂ => by
    by_cases hb : b ∈ l₂
    · rw [cons_bagInter_of_pos _ hb, count_cons, count_cons, count_bagInter, count_erase, ←
        min_add_add_right]
      by_cases ab : a = b
      · rw [if_pos ab, @tsub_add_cancel_of_le]
        rwa [succ_le_iff, count_pos_iff_mem, ab]
      · rw [if_neg ab, tsub_zero, add_zero, add_zero]
    · rw [cons_bagInter_of_neg _ hb, count_bagInter]
      by_cases ab : a = b
      · rw [← ab] at hb
        

Proof state:
case pos
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a✝ : α
inst✝ : DecidableEq α
a b : α
l₁ l₂ : List α
hb : ¬a ∈ l₂
ab : a = b
⊢ min (count a l₁) (count a l₂) = min (count a (b :: l₁)) (count a l₂)

Next tactic:
rw [count_eq_zero.2 hb, min_zero, min_zero]
@[simp]
theorem count_bagInter {a : α} :
    ∀ {l₁ l₂ : List α}, count a (l₁.bagInter l₂) = min (count a l₁) (count a l₂)
  | [], l₂ => by simp
  | l₁, [] => by simp
  | b :: l₁, l₂ => by
    by_cases hb : b ∈ l₂
    · rw [cons_bagInter_of_pos _ hb, count_cons, count_cons, count_bagInter, count_erase, ←
        min_add_add_right]
      by_cases ab : a = b
      · rw [if_pos ab, @tsub_add_cancel_of_le]
        rwa [succ_le_iff, count_pos_iff_mem, ab]
      · rw [if_neg ab, tsub_zero, add_zero, add_zero]
    · rw [cons_bagInter_of_neg _ hb, count_bagInter]
      by_cases ab : a = b
      · rw [← ab] at hb
        rw [count_eq_zero.2 hb, min_zero, min_zero]
      · 

Proof state:
case neg
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a✝ : α
inst✝ : DecidableEq α
a b : α
l₁ l₂ : List α
hb : ¬b ∈ l₂
ab : ¬a = b
⊢ min (count a l₁) (count a l₂) = min (count a (b :: l₁)) (count a l₂)

Next tactic:
rw [count_cons_of_ne ab]
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by 

Proof state:
α : Type u_1
l l₁ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
l₂ : List α
⊢ List.bagInter [] l₂ <+ []

Next tactic:
simp
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    

Proof state:
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
⊢ List.bagInter (b :: l₁) l₂ <+ b :: l₁

Next tactic:
by_cases h : b ∈ l₂
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> 

Proof state:
case pos
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : b ∈ l₂
⊢ List.bagInter (b :: l₁) l₂ <+ b :: l₁

Next tactic:
simp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> 

Proof state:
case neg
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : ¬b ∈ l₂
⊢ List.bagInter (b :: l₁) l₂ <+ b :: l₁

Next tactic:
simp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> simp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]
    · 

Proof state:
case pos
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : b ∈ l₂
⊢ b :: List.bagInter l₁ (List.erase l₂ b) <+ b :: l₁

Next tactic:
exact (bagInter_sublist_left _ _).cons_cons _
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> simp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]
    · exact (bagInter_sublist_left _ _).cons_cons _
    · 

Proof state:
case neg
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : ¬b ∈ l₂
⊢ List.bagInter l₁ l₂ <+ b :: l₁

Next tactic:
apply sublist_cons_of_sublist
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> simp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]
    · exact (bagInter_sublist_left _ _).cons_cons _
    · apply sublist_cons_of_sublist
      

Proof state:
case neg.a
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : ¬b ∈ l₂
⊢ List.bagInter l₁ l₂ <+ l₁

Next tactic:
apply bagInter_sublist_left
theorem bagInter_nil_iff_inter_nil : ∀ l₁ l₂ : List α, l₁.bagInter l₂ = [] ↔ l₁ ∩ l₂ = []
  | [], l₂ => by 

Proof state:
α : Type u_1
l l₁ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
l₂ : List α
⊢ List.bagInter [] l₂ = [] ↔ [] ∩ l₂ = []

Next tactic:
simp
theorem bagInter_nil_iff_inter_nil : ∀ l₁ l₂ : List α, l₁.bagInter l₂ = [] ↔ l₁ ∩ l₂ = []
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    

Proof state:
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
⊢ List.bagInter (b :: l₁) l₂ = [] ↔ (b :: l₁) ∩ l₂ = []

Next tactic:
by_cases h : b ∈ l₂
theorem bagInter_nil_iff_inter_nil : ∀ l₁ l₂ : List α, l₁.bagInter l₂ = [] ↔ l₁ ∩ l₂ = []
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> 

Proof state:
case pos
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : b ∈ l₂
⊢ List.bagInter (b :: l₁) l₂ = [] ↔ (b :: l₁) ∩ l₂ = []

Next tactic:
simp [h]
theorem bagInter_nil_iff_inter_nil : ∀ l₁ l₂ : List α, l₁.bagInter l₂ = [] ↔ l₁ ∩ l₂ = []
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> 

Proof state:
case neg
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : ¬b ∈ l₂
⊢ List.bagInter (b :: l₁) l₂ = [] ↔ (b :: l₁) ∩ l₂ = []

Next tactic:
simp [h]
theorem bagInter_nil_iff_inter_nil : ∀ l₁ l₂ : List α, l₁.bagInter l₂ = [] ↔ l₁ ∩ l₂ = []
  | [], l₂ => by simp
  | b :: l₁, l₂ => by
    by_cases h : b ∈ l₂ <;> simp [h]
    

Proof state:
case neg
α : Type u_1
l l₁✝ l₂✝ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
b : α
l₁ l₂ : List α
h : ¬b ∈ l₂
⊢ List.bagInter l₁ l₂ = [] ↔ l₁ ∩ l₂ = []

Next tactic:
exact bagInter_nil_iff_inter_nil l₁ l₂
theorem all_iff_forall {p : α → Bool} : all l p ↔ ∀ a ∈ l, p a := by
  

Proof state:
α : Type u_1
p✝ : α → Prop
inst✝ : DecidablePred p✝
l : List α
a : α
p : α → Bool
⊢ all l p = true ↔ ∀ (a : α), a ∈ l → p a = true

Next tactic:
induction' l with a l ih
theorem all_iff_forall {p : α → Bool} : all l p ↔ ∀ a ∈ l, p a := by
  induction' l with a l ih
  · 

Proof state:
case nil
α : Type u_1
p✝ : α → Prop
inst✝ : DecidablePred p✝
l : List α
a : α
p : α → Bool
⊢ all [] p = true ↔ ∀ (a : α), a ∈ [] → p a = true

Next tactic:
exact iff_of_true rfl (forall_mem_nil _)
theorem all_iff_forall {p : α → Bool} : all l p ↔ ∀ a ∈ l, p a := by
  induction' l with a l ih
  · exact iff_of_true rfl (forall_mem_nil _)
  

Proof state:
case cons
α : Type u_1
p✝ : α → Prop
inst✝ : DecidablePred p✝
l✝ : List α
a✝ : α
p : α → Bool
a : α
l : List α
ih : all l p = true ↔ ∀ (a : α), a ∈ l → p a = true
⊢ all (a :: l) p = true ↔ ∀ (a_1 : α), a_1 ∈ a :: l → p a_1 = true

Next tactic:
simp only [all_cons, Bool.coe_and_iff, ih, forall_mem_cons]
theorem all_iff_forall_prop : (all l fun a => p a) ↔ ∀ a ∈ l, p a := by
  

Proof state:
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
l : List α
a : α
⊢ (all l fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a

Next tactic:
simp only [all_iff_forall, Bool.of_decide_iff]
theorem any_iff_exists {p : α → Bool} : any l p ↔ ∃ a ∈ l, p a := by
  

Proof state:
α : Type u_1
p✝ : α → Prop
inst✝ : DecidablePred p✝
l : List α
a : α
p : α → Bool
⊢ any l p = true ↔ ∃ a, a ∈ l ∧ p a = true

Next tactic:
induction' l with a l ih
theorem any_iff_exists {p : α → Bool} : any l p ↔ ∃ a ∈ l, p a := by
  induction' l with a l ih
  · 

Proof state:
case nil
α : Type u_1
p✝ : α → Prop
inst✝ : DecidablePred p✝
l : List α
a : α
p : α → Bool
⊢ any [] p = true ↔ ∃ a, a ∈ [] ∧ p a = true

Next tactic:
exact iff_of_false Bool.not_false' (not_exists_mem_nil _)
theorem any_iff_exists {p : α → Bool} : any l p ↔ ∃ a ∈ l, p a := by
  induction' l with a l ih
  · exact iff_of_false Bool.not_false' (not_exists_mem_nil _)
  

Proof state:
case cons
α : Type u_1
p✝ : α → Prop
inst✝ : DecidablePred p✝
l✝ : List α
a✝ : α
p : α → Bool
a : α
l : List α
ih : any l p = true ↔ ∃ a, a ∈ l ∧ p a = true
⊢ any (a :: l) p = true ↔ ∃ a_1, a_1 ∈ a :: l ∧ p a_1 = true

Next tactic:
simp only [any_cons, Bool.coe_or_iff, ih, exists_mem_cons_iff]
theorem any_iff_exists_prop : (any l fun a => p a) ↔ ∃ a ∈ l, p a := by 

Proof state:
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
l : List α
a : α
⊢ (any l fun a => decide (p a)) = true ↔ ∃ a, a ∈ l ∧ p a

Next tactic:
simp [any_iff_exists]
@[simp]
theorem lie_skew : -⁅y, x⁆ = ⁅x, 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
t : R
x y z : L
m n : M
⊢ -⁅y, x⁆ = ⁅x, y⁆

Next tactic:
have h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0 := by rw [← lie_add]; apply lie_self
@[simp]
theorem lie_skew : -⁅y, x⁆ = ⁅x, y⁆ := by
  have h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 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
t : R
x y z : L
m n : M
⊢ ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0

Next tactic:
rw [← lie_add]
@[simp]
theorem lie_skew : -⁅y, x⁆ = ⁅x, y⁆ := by
  have h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0 := by rw [← lie_add]; 

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
t : R
x y z : L
m n : M
⊢ ⁅x + y, x + y⁆ = 0

Next tactic:
apply lie_self
@[simp]
theorem lie_skew : -⁅y, x⁆ = ⁅x, y⁆ := by
  have h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0 := by rw [← lie_add]; apply lie_self
  

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
t : R
x y z : L
m n : M
h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0
⊢ -⁅y, x⁆ = ⁅x, y⁆

Next tactic:
simpa [neg_eq_iff_add_eq_zero] using h
/-- Every Lie algebra is a module over itself. -/
instance lieAlgebraSelfModule : LieModule R L L
    where
  smul_lie t x 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
t✝ : R
x✝ y z : L
m✝ n : M
t : R
x m : L
⊢ ⁅t • x, m⁆ = t • ⁅x, m⁆

Next tactic:
rw [← lie_skew, ← lie_skew x m, LieAlgebra.lie_smul, smul_neg]
/-- Every Lie algebra is a module over itself. -/
instance lieAlgebraSelfModule : LieModule R L L
    where
  smul_lie t x m := by rw [← lie_skew, ← lie_skew x m, LieAlgebra.lie_smul, smul_neg]
  lie_smul := 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
t : R
x y z : L
m n : M
⊢ ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆

Next tactic:
apply LieAlgebra.lie_smul
@[simp]
theorem neg_lie : ⁅-x, m⁆ = -⁅x, 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
t : R
x y z : L
m n : M
⊢ ⁅-x, m⁆ = -⁅x, m⁆

Next tactic:
rw [← sub_eq_zero, sub_neg_eq_add, ← add_lie]
@[simp]
theorem neg_lie : ⁅-x, m⁆ = -⁅x, m⁆ := by
  rw [← sub_eq_zero, sub_neg_eq_add, ← add_lie]
  

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
t : R
x y z : L
m n : M
⊢ ⁅-x + x, m⁆ = 0

Next tactic:
simp
@[simp]
theorem lie_neg : ⁅x, -m⁆ = -⁅x, 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
t : R
x y z : L
m n : M
⊢ ⁅x, -m⁆ = -⁅x, m⁆

Next tactic:
rw [← sub_eq_zero, sub_neg_eq_add, ← lie_add]
@[simp]
theorem lie_neg : ⁅x, -m⁆ = -⁅x, m⁆ := by
  rw [← sub_eq_zero, sub_neg_eq_add, ← lie_add]
  

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
t : R
x y z : L
m n : M
⊢ ⁅x, -m + m⁆ = 0

Next tactic:
simp
@[simp]
theorem sub_lie : ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, 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
t : R
x y z : L
m n : M
⊢ ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆

Next tactic:
simp [sub_eq_add_neg]
@[simp]
theorem lie_sub : ⁅x, m - n⁆ = ⁅x, m⁆ - ⁅x, n⁆ := 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
t : R
x y z : L
m n : M
⊢ ⁅x, m - n⁆ = ⁅x, m⁆ - ⁅x, n⁆

Next tactic:
simp [sub_eq_add_neg]
@[simp]
theorem lie_lie : ⁅⁅x, y⁆, m⁆ = ⁅x, ⁅y, m⁆⁆ - ⁅y, ⁅x, 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
t : R
x y z : L
m n : M
⊢ ⁅⁅x, y⁆, m⁆ = ⁅x, ⁅y, m⁆⁆ - ⁅y, ⁅x, m⁆⁆

Next tactic:
rw [leibniz_lie, add_sub_cancel]
theorem lie_jacobi : ⁅x, ⁅y, z⁆⁆ + ⁅y, ⁅z, x⁆⁆ + ⁅z, ⁅x, y⁆⁆ = 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
t : R
x y z : L
m n : M
⊢ ⁅x, ⁅y, z⁆⁆ + ⁅y, ⁅z, x⁆⁆ + ⁅z, ⁅x, y⁆⁆ = 0

Next tactic:
rw [← neg_neg ⁅x, y⁆, lie_neg z, lie_skew y x, ← lie_skew, lie_lie]
theorem lie_jacobi : ⁅x, ⁅y, z⁆⁆ + ⁅y, ⁅z, x⁆⁆ + ⁅z, ⁅x, y⁆⁆ = 0 := by
  rw [← neg_neg ⁅x, y⁆, lie_neg z, lie_skew y x, ← lie_skew, lie_lie]
  

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
t : R
x y z : L
m n : M
⊢ -(⁅y, ⁅z, x⁆⁆ - ⁅z, ⁅y, x⁆⁆) + ⁅y, ⁅z, x⁆⁆ + -⁅z, ⁅y, x⁆⁆ = 0

Next tactic:
abel
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => 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
t : R
x✝ y z : L
m✝ n✝ : M
x : L
f : M →ₗ[R] N
m n : M
⊢ (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) (m + n) = (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) m + (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) n

Next tactic:
simp only [lie_add, LinearMap.map_add]
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        

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
t : R
x✝ y z : L
m✝ n✝ : M
x : L
f : M →ₗ[R] N
m n : M
⊢ ⁅x, f m⁆ + ⁅x, f n⁆ - (f ⁅x, m⁆ + f ⁅x, n⁆) = ⁅x, f m⁆ - f ⁅x, m⁆ + (⁅x, f n⁆ - f ⁅x, n⁆)

Next tactic:
abel
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        abel
      map_smul' := fun t 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
t✝ : R
x✝ y z : L
m✝ n : M
x : L
f : M →ₗ[R] N
t : R
m : M
⊢ AddHom.toFun
      { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆,
        map_add' :=
          (_ :
            ∀ (m n : M),
              (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) (m + n) =
                (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) m + (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) n) }
      (t • m) =
    (RingHom.id R) t •
      AddHom.toFun
        { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆,
          map_add' :=
            (_ :
              ∀ (m n : M),
                (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) (m + n) =
                  (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) m + (fun m => ⁅x, f m⁆ - f ⁅x, m⁆) n) }
        m

Next tactic:
simp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply]
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        abel
      map_smul' := fun t m => by
        simp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply] }
  add_lie x y f := 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
t : R
x✝ y✝ z : L
m n : M
x y : L
f : M →ₗ[R] N
⊢ ⁅x + y, f⁆ = ⁅x, f⁆ + ⁅y, f⁆

Next tactic:
ext n
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        abel
      map_smul' := fun t m => by
        simp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply] }
  add_lie x y f := by
    ext n
    

Proof state:
case h
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
t : R
x✝ y✝ z : L
m n✝ : M
x y : L
f : M →ₗ[R] N
n : M
⊢ ⁅x + y, f⁆ n = (⁅x, f⁆ + ⁅y, f⁆) n

Next tactic:
simp only [add_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply, LinearMap.map_add]
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        abel
      map_smul' := fun t m => by
        simp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply] }
  add_lie x y f := by
    ext n
    simp only [add_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply, LinearMap.map_add]
    

Proof state:
case h
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
t : R
x✝ y✝ z : L
m n✝ : M
x y : L
f : M →ₗ[R] N
n : M
⊢ ⁅x, f n⁆ + ⁅y, f n⁆ - (f ⁅x, n⁆ + f ⁅y, n⁆) = ⁅x, f n⁆ - f ⁅x, n⁆ + (⁅y, f n⁆ - f ⁅y, n⁆)

Next tactic:
abel
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        abel
      map_smul' := fun t m => by
        simp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply] }
  add_lie x y f := by
    ext n
    simp only [add_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply, LinearMap.map_add]
    abel
  lie_add x f g := 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
t : R
x✝ y z : L
m n : M
x : L
f g : M →ₗ[R] N
⊢ ⁅x, f + g⁆ = ⁅x, f⁆ + ⁅x, g⁆

Next tactic:
ext n
instance LinearMap.instLieRingModule : LieRingModule L (M →ₗ[R] N) where
  bracket x f :=
    { toFun := fun m => ⁅x, f m⁆ - f ⁅x, m⁆
      map_add' := fun m n => by
        simp only [lie_add, LinearMap.map_add]
        abel
      map_smul' := fun t m => by
        simp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply] }
  add_lie x y f := by
    ext n
    simp only [add_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply, LinearMap.map_add]
    abel
  lie_add x f g := by
    ext n
    

Proof state:
case h
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
t : R
x✝ y z : L
m n✝ : M
x : L
f g : M →ₗ[R] N
n : M
⊢ ⁅x, f + g⁆ n = (⁅x, f⁆ + ⁅x, g⁆) n

Next tactic:
simp only [LinearMap.coe_mk, AddHom.coe_mk, lie_add, LinearMap.add_apply]