l3lab/ntp-mathlib huggingface dataset:
private theorem bracket_leibniz_lie (x y : A ⊗[R] L) (z : A ⊗[R] M) :
    ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆ := by
  -- Porting note: replaced some `simp`s by `rw`s to avoid raising heartbeats
  simp only [bracket_def]
  refine' x.induction_on _ _ _
  · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
  · intro a₁ l₁
    refine' y.induction_on _ _ _
    · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
    · intro a₂ l₂
      refine' z.induction_on _ _ _
      · rw [LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero,
          add_zero]
      · intro a₃ l₃; simp only [bracket'_tmul]
        rw [mul_left_comm a₂ a₁ a₃, mul_assoc, leibniz_lie, TensorProduct.tmul_add]
      · intro u₁ u₂ h₁ h₂
        rw [map_add, map_add, map_add, map_add, map_add, h₁, h₂, add_add_add_comm]
    · 

Proof state:
case refine'_2.refine'_3
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y : A ⊗[R] L
z : A ⊗[R] M
a₁ : A
l₁ : L
⊢ ∀ (x y : A ⊗[R] L),
    ((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) (((LieAlgebra.ExtendScalars.bracket' R A L M) x) z) =
        ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) (a₁ ⊗ₜ[R] l₁)) x))
            z +
          ((LieAlgebra.ExtendScalars.bracket' R A L M) x)
            (((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) z) →
      ((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
          ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) (a₁ ⊗ₜ[R] l₁)) y))
              z +
            ((LieAlgebra.ExtendScalars.bracket' R A L M) y)
              (((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) z) →
        ((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁))
            (((LieAlgebra.ExtendScalars.bracket' R A L M) (x + y)) z) =
          ((LieAlgebra.ExtendScalars.bracket' R A L M)
                (((LieAlgebra.ExtendScalars.bracket' R A L L) (a₁ ⊗ₜ[R] l₁)) (x + y)))
              z +
            ((LieAlgebra.ExtendScalars.bracket' R A L M) (x + y))
              (((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) z)

Next tactic:
intro u₁ u₂ h₁ h₂
private theorem bracket_leibniz_lie (x y : A ⊗[R] L) (z : A ⊗[R] M) :
    ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆ := by
  -- Porting note: replaced some `simp`s by `rw`s to avoid raising heartbeats
  simp only [bracket_def]
  refine' x.induction_on _ _ _
  · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
  · intro a₁ l₁
    refine' y.induction_on _ _ _
    · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
    · intro a₂ l₂
      refine' z.induction_on _ _ _
      · rw [LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero,
          add_zero]
      · intro a₃ l₃; simp only [bracket'_tmul]
        rw [mul_left_comm a₂ a₁ a₃, mul_assoc, leibniz_lie, TensorProduct.tmul_add]
      · intro u₁ u₂ h₁ h₂
        rw [map_add, map_add, map_add, map_add, map_add, h₁, h₂, add_add_add_comm]
    · intro u₁ u₂ h₁ h₂
      

Proof state:
case refine'_2.refine'_3
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y : A ⊗[R] L
z : A ⊗[R] M
a₁ : A
l₁ : L
u₁ u₂ : A ⊗[R] L
h₁ :
  ((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) (((LieAlgebra.ExtendScalars.bracket' R A L M) u₁) z) =
    ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) (a₁ ⊗ₜ[R] l₁)) u₁)) z +
      ((LieAlgebra.ExtendScalars.bracket' R A L M) u₁) (((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) z)
h₂ :
  ((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) (((LieAlgebra.ExtendScalars.bracket' R A L M) u₂) z) =
    ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) (a₁ ⊗ₜ[R] l₁)) u₂)) z +
      ((LieAlgebra.ExtendScalars.bracket' R A L M) u₂) (((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) z)
⊢ ((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁))
      (((LieAlgebra.ExtendScalars.bracket' R A L M) (u₁ + u₂)) z) =
    ((LieAlgebra.ExtendScalars.bracket' R A L M)
          (((LieAlgebra.ExtendScalars.bracket' R A L L) (a₁ ⊗ₜ[R] l₁)) (u₁ + u₂)))
        z +
      ((LieAlgebra.ExtendScalars.bracket' R A L M) (u₁ + u₂))
        (((LieAlgebra.ExtendScalars.bracket' R A L M) (a₁ ⊗ₜ[R] l₁)) z)

Next tactic:
rw [map_add, LinearMap.add_apply, LinearMap.add_apply, map_add, map_add, map_add,
        LinearMap.add_apply, h₁, h₂, add_add_add_comm]
private theorem bracket_leibniz_lie (x y : A ⊗[R] L) (z : A ⊗[R] M) :
    ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆ := by
  -- Porting note: replaced some `simp`s by `rw`s to avoid raising heartbeats
  simp only [bracket_def]
  refine' x.induction_on _ _ _
  · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
  · intro a₁ l₁
    refine' y.induction_on _ _ _
    · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
    · intro a₂ l₂
      refine' z.induction_on _ _ _
      · rw [LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero,
          add_zero]
      · intro a₃ l₃; simp only [bracket'_tmul]
        rw [mul_left_comm a₂ a₁ a₃, mul_assoc, leibniz_lie, TensorProduct.tmul_add]
      · intro u₁ u₂ h₁ h₂
        rw [map_add, map_add, map_add, map_add, map_add, h₁, h₂, add_add_add_comm]
    · intro u₁ u₂ h₁ h₂
      rw [map_add, LinearMap.add_apply, LinearMap.add_apply, map_add, map_add, map_add,
        LinearMap.add_apply, h₁, h₂, add_add_add_comm]
  · 

Proof state:
case refine'_3
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y : A ⊗[R] L
z : A ⊗[R] M
⊢ ∀ (x y_1 : A ⊗[R] L),
    ((LieAlgebra.ExtendScalars.bracket' R A L M) x) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
        ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) x) y)) z +
          ((LieAlgebra.ExtendScalars.bracket' R A L M) y) (((LieAlgebra.ExtendScalars.bracket' R A L M) x) z) →
      ((LieAlgebra.ExtendScalars.bracket' R A L M) y_1) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
          ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) y_1) y)) z +
            ((LieAlgebra.ExtendScalars.bracket' R A L M) y) (((LieAlgebra.ExtendScalars.bracket' R A L M) y_1) z) →
        ((LieAlgebra.ExtendScalars.bracket' R A L M) (x + y_1)) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
          ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) (x + y_1)) y)) z +
            ((LieAlgebra.ExtendScalars.bracket' R A L M) y) (((LieAlgebra.ExtendScalars.bracket' R A L M) (x + y_1)) z)

Next tactic:
intro u₁ u₂ h₁ h₂
private theorem bracket_leibniz_lie (x y : A ⊗[R] L) (z : A ⊗[R] M) :
    ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆ := by
  -- Porting note: replaced some `simp`s by `rw`s to avoid raising heartbeats
  simp only [bracket_def]
  refine' x.induction_on _ _ _
  · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
  · intro a₁ l₁
    refine' y.induction_on _ _ _
    · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]
    · intro a₂ l₂
      refine' z.induction_on _ _ _
      · rw [LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero,
          add_zero]
      · intro a₃ l₃; simp only [bracket'_tmul]
        rw [mul_left_comm a₂ a₁ a₃, mul_assoc, leibniz_lie, TensorProduct.tmul_add]
      · intro u₁ u₂ h₁ h₂
        rw [map_add, map_add, map_add, map_add, map_add, h₁, h₂, add_add_add_comm]
    · intro u₁ u₂ h₁ h₂
      rw [map_add, LinearMap.add_apply, LinearMap.add_apply, map_add, map_add, map_add,
        LinearMap.add_apply, h₁, h₂, add_add_add_comm]
  · intro u₁ u₂ h₁ h₂
    

Proof state:
case refine'_3
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y : A ⊗[R] L
z : A ⊗[R] M
u₁ u₂ : A ⊗[R] L
h₁ :
  ((LieAlgebra.ExtendScalars.bracket' R A L M) u₁) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
    ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) u₁) y)) z +
      ((LieAlgebra.ExtendScalars.bracket' R A L M) y) (((LieAlgebra.ExtendScalars.bracket' R A L M) u₁) z)
h₂ :
  ((LieAlgebra.ExtendScalars.bracket' R A L M) u₂) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
    ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) u₂) y)) z +
      ((LieAlgebra.ExtendScalars.bracket' R A L M) y) (((LieAlgebra.ExtendScalars.bracket' R A L M) u₂) z)
⊢ ((LieAlgebra.ExtendScalars.bracket' R A L M) (u₁ + u₂)) (((LieAlgebra.ExtendScalars.bracket' R A L M) y) z) =
    ((LieAlgebra.ExtendScalars.bracket' R A L M) (((LieAlgebra.ExtendScalars.bracket' R A L L) (u₁ + u₂)) y)) z +
      ((LieAlgebra.ExtendScalars.bracket' R A L M) y) (((LieAlgebra.ExtendScalars.bracket' R A L M) (u₁ + u₂)) z)

Next tactic:
rw [map_add, LinearMap.add_apply, LinearMap.add_apply, map_add, map_add, LinearMap.add_apply,
      map_add, LinearMap.add_apply, h₁, h₂, add_add_add_comm]
instance instLieRing : LieRing (A ⊗[R] L) where
  add_lie x y z := by 

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y z : A ⊗[R] L
⊢ ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆

Next tactic:
simp only [bracket_def, LinearMap.add_apply, LinearMap.map_add]
instance instLieRing : LieRing (A ⊗[R] L) where
  add_lie x y z := by simp only [bracket_def, LinearMap.add_apply, LinearMap.map_add]
  lie_add x y z := by 

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y z : A ⊗[R] L
⊢ ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆

Next tactic:
simp only [bracket_def, LinearMap.map_add]
instance instLieRingModule : LieRingModule (A ⊗[R] L) (A ⊗[R] M) where
  add_lie x y z := by 

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x y : A ⊗[R] L
z : A ⊗[R] M
⊢ ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆

Next tactic:
simp only [bracket_def, LinearMap.add_apply, LinearMap.map_add]
instance instLieRingModule : LieRingModule (A ⊗[R] L) (A ⊗[R] M) where
  add_lie x y z := by simp only [bracket_def, LinearMap.add_apply, LinearMap.map_add]
  lie_add x y z := by 

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
x : A ⊗[R] L
y z : A ⊗[R] M
⊢ ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆

Next tactic:
simp only [bracket_def, LinearMap.map_add]
instance instLieModule : LieModule A (A ⊗[R] L) (A ⊗[R] M) where
  smul_lie t x m := by 

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
t : A
x : A ⊗[R] L
m : A ⊗[R] M
⊢ ⁅t • x, m⁆ = t • ⁅x, m⁆

Next tactic:
simp only [bracket_def, map_smul, LinearMap.smul_apply]
@[simp]
lemma LieModule.toEndomorphism_baseChange (x : L) :
    toEndomorphism A (A ⊗[R] L) (A ⊗[R] M) (1 ⊗ₜ x) = (toEndomorphism R L M x).baseChange A := by
  

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
x : L
⊢ (toEndomorphism A (A ⊗[R] L) (A ⊗[R] M)) (1 ⊗ₜ[R] x) = LinearMap.baseChange A ((toEndomorphism R L M) x)

Next tactic:
ext
@[simp]
lemma LieModule.toEndomorphism_baseChange (x : L) :
    toEndomorphism A (A ⊗[R] L) (A ⊗[R] M) (1 ⊗ₜ x) = (toEndomorphism R L M x).baseChange A := by
  ext; 

Proof state:
case a.h.h
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
x : L
x✝ : M
⊢ ((TensorProduct.AlgebraTensorModule.curry ((toEndomorphism A (A ⊗[R] L) (A ⊗[R] M)) (1 ⊗ₜ[R] x))) 1) x✝ =
    ((TensorProduct.AlgebraTensorModule.curry (LinearMap.baseChange A ((toEndomorphism R L M) x))) 1) x✝

Next tactic:
simp
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
⊢ ∀ {x : A ⊗[R] L} {m : A ⊗[R] M},
    m ∈
        { toAddSubmonoid := src✝.toAddSubmonoid,
                smul_mem' :=
                  (_ :
                    ∀ (c : A) {x : A ⊗[R] M},
                      x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier →
      ⁅x, m⁆ ∈
        { toAddSubmonoid := src✝.toAddSubmonoid,
                smul_mem' :=
                  (_ :
                    ∀ (c : A) {x : A ⊗[R] M},
                      x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier

Next tactic:
intro x m hm
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      intro x m hm
      

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
x : A ⊗[R] L
m : A ⊗[R] M
hm :
  m ∈
    { toAddSubmonoid := src✝.toAddSubmonoid,
            smul_mem' :=
              (_ :
                ∀ (c : A) {x : A ⊗[R] M},
                  x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier
⊢ ⁅x, m⁆ ∈
    { toAddSubmonoid := src✝.toAddSubmonoid,
            smul_mem' :=
              (_ :
                ∀ (c : A) {x : A ⊗[R] M},
                  x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier

Next tactic:
simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
        Submodule.mem_toAddSubmonoid] at hm ⊢
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      intro x m hm
      simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
        Submodule.mem_toAddSubmonoid] at hm ⊢
      

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
x : A ⊗[R] L
m : A ⊗[R] M
hm : m ∈ Submodule.baseChange A ↑N
⊢ ⁅x, m⁆ ∈ Submodule.baseChange A ↑N

Next tactic:
obtain ⟨c, rfl⟩ := (Finsupp.mem_span_iff_total _ _ _).mp hm
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      intro x m hm
      simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
        Submodule.mem_toAddSubmonoid] at hm ⊢
      obtain ⟨c, rfl⟩ := (Finsupp.mem_span_iff_total _ _ _).mp hm
      

Proof state:
case intro
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
x : A ⊗[R] L
c : ↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N) →₀ A
hm :
  (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c ∈
    Submodule.baseChange A ↑N
⊢ ⁅x, (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c⁆ ∈
    Submodule.baseChange A ↑N

Next tactic:
refine x.induction_on (by simp) (fun a y ↦ ?_) (fun y z hy hz ↦ ?_)
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      intro x m hm
      simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
        Submodule.mem_toAddSubmonoid] at hm ⊢
      obtain ⟨c, rfl⟩ := (Finsupp.mem_span_iff_total _ _ _).mp hm
      refine x.induction_on (by 

Proof state:
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
x : A ⊗[R] L
c : ↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N) →₀ A
hm :
  (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c ∈
    Submodule.baseChange A ↑N
⊢ ⁅0, (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c⁆ ∈
    Submodule.baseChange A ↑N

Next tactic:
simp
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      intro x m hm
      simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
        Submodule.mem_toAddSubmonoid] at hm ⊢
      obtain ⟨c, rfl⟩ := (Finsupp.mem_span_iff_total _ _ _).mp hm
      refine x.induction_on (by simp) (fun a y ↦ ?_) (fun y z hy hz ↦ ?_)
      · 

Proof state:
case intro.refine_1
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
x : A ⊗[R] L
c : ↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N) →₀ A
hm :
  (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c ∈
    Submodule.baseChange A ↑N
a : A
y : L
⊢ ⁅a ⊗ₜ[R] y, (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c⁆ ∈
    Submodule.baseChange A ↑N

Next tactic:
change toEndomorphism A (A ⊗[R] L) (A ⊗[R] M) _ _ ∈ _
variable {R L M} in
/-- If `A` is an `R`-algebra, any Lie submodule of a Lie module `M` with coefficients in `R` may be
pushed forward to a Lie submodule of `A ⊗ M` with coefficients in `A`.

This "base change" operation is also known as "extension of scalars". -/
def baseChange : LieSubmodule A (A ⊗[R] L) (A ⊗[R] M) :=
  { (N : Submodule R M).baseChange A with
    lie_mem := by
      intro x m hm
      simp only [AddSubsemigroup.mem_carrier, AddSubmonoid.mem_toSubsemigroup,
        Submodule.mem_toAddSubmonoid] at hm ⊢
      obtain ⟨c, rfl⟩ := (Finsupp.mem_span_iff_total _ _ _).mp hm
      refine x.induction_on (by simp) (fun a y ↦ ?_) (fun y z hy hz ↦ ?_)
      · change toEndomorphism A (A ⊗[R] L) (A ⊗[R] M) _ _ ∈ _
        

Proof state:
case intro.refine_1
R : Type u_1
A : Type u_2
L : Type u_3
M : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : LieRing L
inst✝⁶ : LieAlgebra R L
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : LieRingModule L M
inst✝² : LieModule R L M
inst✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
src✝ : Submodule A (A ⊗[R] M) := Submodule.baseChange A ↑N
x : A ⊗[R] L
c : ↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N) →₀ A
hm :
  (Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c ∈
    Submodule.baseChange A ↑N
a : A
y : L
⊢ ((toEndomorphism A (A ⊗[R] L) (A ⊗[R] M)) (a ⊗ₜ[R] y))
      ((Finsupp.total (↑↑(Submodule.map ((TensorProduct.mk R A M) 1) ↑N)) (A ⊗[R] M) A Subtype.val) c) ∈
    Submodule.baseChange A ↑N

Next tactic:
simp_rw [Finsupp.total_apply, Finsupp.sum, map_sum, map_smul, toEndomorphism_apply_apply]