l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem tmul_comp_tensorMap
    {Q₁ : QuadraticForm R M₁} {Q₂ : QuadraticForm R M₂}
    {Q₃ : QuadraticForm R M₃} {Q₄ : QuadraticForm R M₄}
    (f : Q₁ →qᵢ Q₂) (g : Q₃ →qᵢ Q₄) :
    (Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Q₁.tmul Q₃ := by
  have h₁ : Q₁ = Q₂.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
  have h₃ : Q₃ = Q₄.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
  refine (QuadraticForm.associated_rightInverse R).injective <| BilinForm.toLin.injective ?_
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
Q₄ : QuadraticForm R M₄
f : Q₁ →qᵢ Q₂
g : Q₃ →qᵢ Q₄
h₁ : Q₁ = comp Q₂ f.toLinearMap
h₃ : Q₃ = comp Q₄ g.toLinearMap
⊢ BilinForm.toLin
      ((associatedHom R) (comp (QuadraticForm.tmul Q₂ Q₄) (TensorProduct.map f.toLinearMap g.toLinearMap))) =
    BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul Q₁ Q₃))

Next tactic:
ext m₁ m₃ m₁' m₃'
@[simp]
theorem tmul_comp_tensorMap
    {Q₁ : QuadraticForm R M₁} {Q₂ : QuadraticForm R M₂}
    {Q₃ : QuadraticForm R M₃} {Q₄ : QuadraticForm R M₄}
    (f : Q₁ →qᵢ Q₂) (g : Q₃ →qᵢ Q₄) :
    (Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Q₁.tmul Q₃ := by
  have h₁ : Q₁ = Q₂.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
  have h₃ : Q₃ = Q₄.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
  refine (QuadraticForm.associated_rightInverse R).injective <| BilinForm.toLin.injective ?_
  ext m₁ m₃ m₁' m₃'
  

Proof state:
case a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
Q₄ : QuadraticForm R M₄
f : Q₁ →qᵢ Q₂
g : Q₃ →qᵢ Q₄
h₁ : Q₁ = comp Q₂ f.toLinearMap
h₃ : Q₃ = comp Q₄ g.toLinearMap
m₁ : M₁
m₃ : M₃
m₁' : M₁
m₃' : M₃
⊢ ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry
                (BilinForm.toLin
                  ((associatedHom R)
                    (comp (QuadraticForm.tmul Q₂ Q₄) (TensorProduct.map f.toLinearMap g.toLinearMap)))))
              m₁)
            m₃))
        m₁')
      m₃' =
    ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry (BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul Q₁ Q₃))))
              m₁)
            m₃))
        m₁')
      m₃'

Next tactic:
simp [-associated_apply, h₁, h₃, associated_tmul]
@[simp]
theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
⊢ comp (QuadraticForm.tmul Q₂ Q₁) ↑(TensorProduct.comm R M₁ M₂) = QuadraticForm.tmul Q₁ Q₂

Next tactic:
refine (QuadraticForm.associated_rightInverse R).injective ?_
@[simp]
theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
⊢ (associatedHom R) (comp (QuadraticForm.tmul Q₂ Q₁) ↑(TensorProduct.comm R M₁ M₂)) =
    (associatedHom R) (QuadraticForm.tmul Q₁ Q₂)

Next tactic:
apply BilinForm.toLin.injective
@[simp]
theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  

Proof state:
case a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
⊢ BilinForm.toLin ((associatedHom R) (comp (QuadraticForm.tmul Q₂ Q₁) ↑(TensorProduct.comm R M₁ M₂))) =
    BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul Q₁ Q₂))

Next tactic:
ext m₁ m₂ m₁' m₂'
@[simp]
theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₂ m₁' m₂'
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
m₁ : M₁
m₂ : M₂
m₁' : M₁
m₂' : M₂
⊢ ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry
                (BilinForm.toLin ((associatedHom R) (comp (QuadraticForm.tmul Q₂ Q₁) ↑(TensorProduct.comm R M₁ M₂)))))
              m₁)
            m₂))
        m₁')
      m₂' =
    ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry (BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul Q₁ Q₂))))
              m₁)
            m₂))
        m₁')
      m₂'

Next tactic:
dsimp [-associated_apply]
@[simp]
theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₂ m₁' m₂'
  dsimp [-associated_apply]
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
m₁ : M₁
m₂ : M₂
m₁' : M₁
m₂' : M₂
⊢ BilinForm.bilin ((associatedHom R) (comp (QuadraticForm.tmul Q₂ Q₁) ↑(TensorProduct.comm R M₁ M₂))) (m₁ ⊗ₜ[R] m₂)
      (m₁' ⊗ₜ[R] m₂') =
    BilinForm.bilin ((associatedHom R) (QuadraticForm.tmul Q₁ Q₂)) (m₁ ⊗ₜ[R] m₂) (m₁' ⊗ₜ[R] m₂')

Next tactic:
simp only [associated_tmul, QuadraticForm.associated_comp]
@[simp]
theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₂ m₁' m₂'
  dsimp [-associated_apply]
  simp only [associated_tmul, QuadraticForm.associated_comp]
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
m₁ : M₁
m₂ : M₂
m₁' : M₁
m₂' : M₂
⊢ BilinForm.bilin
      (BilinForm.comp (BilinForm.tmul (associated Q₂) (associated Q₁)) ↑(TensorProduct.comm R M₁ M₂)
        ↑(TensorProduct.comm R M₁ M₂))
      (m₁ ⊗ₜ[R] m₂) (m₁' ⊗ₜ[R] m₂') =
    BilinForm.bilin (BilinForm.tmul (associated Q₁) (associated Q₂)) (m₁ ⊗ₜ[R] m₂) (m₁' ⊗ₜ[R] m₂')

Next tactic:
exact mul_comm _ _
@[simp]
theorem tmul_comp_tensorAssoc
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃) :
    (Q₁.tmul (Q₂.tmul Q₃)).comp (TensorProduct.assoc R M₁ M₂ M₃) = (Q₁.tmul Q₂).tmul Q₃ := by
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
⊢ comp (QuadraticForm.tmul Q₁ (QuadraticForm.tmul Q₂ Q₃)) ↑(TensorProduct.assoc R M₁ M₂ M₃) =
    QuadraticForm.tmul (QuadraticForm.tmul Q₁ Q₂) Q₃

Next tactic:
refine (QuadraticForm.associated_rightInverse R).injective ?_
@[simp]
theorem tmul_comp_tensorAssoc
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃) :
    (Q₁.tmul (Q₂.tmul Q₃)).comp (TensorProduct.assoc R M₁ M₂ M₃) = (Q₁.tmul Q₂).tmul Q₃ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
⊢ (associatedHom R) (comp (QuadraticForm.tmul Q₁ (QuadraticForm.tmul Q₂ Q₃)) ↑(TensorProduct.assoc R M₁ M₂ M₃)) =
    (associatedHom R) (QuadraticForm.tmul (QuadraticForm.tmul Q₁ Q₂) Q₃)

Next tactic:
apply BilinForm.toLin.injective
@[simp]
theorem tmul_comp_tensorAssoc
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃) :
    (Q₁.tmul (Q₂.tmul Q₃)).comp (TensorProduct.assoc R M₁ M₂ M₃) = (Q₁.tmul Q₂).tmul Q₃ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  

Proof state:
case a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
⊢ BilinForm.toLin
      ((associatedHom R) (comp (QuadraticForm.tmul Q₁ (QuadraticForm.tmul Q₂ Q₃)) ↑(TensorProduct.assoc R M₁ M₂ M₃))) =
    BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul (QuadraticForm.tmul Q₁ Q₂) Q₃))

Next tactic:
ext m₁ m₂ m₁' m₂' m₁'' m₂''
@[simp]
theorem tmul_comp_tensorAssoc
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃) :
    (Q₁.tmul (Q₂.tmul Q₃)).comp (TensorProduct.assoc R M₁ M₂ M₃) = (Q₁.tmul Q₂).tmul Q₃ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₂ m₁' m₂' m₁'' m₂''
  

Proof state:
case a.a.a.h.h.h.a.a.h.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
m₁ : M₁
m₂ : M₂
m₁' : M₃
m₂' : M₁
m₁'' : M₂
m₂'' : M₃
⊢ (((TensorProduct.AlgebraTensorModule.curry
            (TensorProduct.AlgebraTensorModule.curry
              ((((TensorProduct.AlgebraTensorModule.curry
                      (TensorProduct.AlgebraTensorModule.curry
                        (BilinForm.toLin
                          ((associatedHom R)
                            (comp (QuadraticForm.tmul Q₁ (QuadraticForm.tmul Q₂ Q₃))
                              ↑(TensorProduct.assoc R M₁ M₂ M₃))))))
                    m₁)
                  m₂)
                m₁')))
          m₂')
        m₁'')
      m₂'' =
    (((TensorProduct.AlgebraTensorModule.curry
            (TensorProduct.AlgebraTensorModule.curry
              ((((TensorProduct.AlgebraTensorModule.curry
                      (TensorProduct.AlgebraTensorModule.curry
                        (BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul (QuadraticForm.tmul Q₁ Q₂) Q₃)))))
                    m₁)
                  m₂)
                m₁')))
          m₂')
        m₁'')
      m₂''

Next tactic:
dsimp [-associated_apply]
@[simp]
theorem tmul_comp_tensorAssoc
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃) :
    (Q₁.tmul (Q₂.tmul Q₃)).comp (TensorProduct.assoc R M₁ M₂ M₃) = (Q₁.tmul Q₂).tmul Q₃ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₂ m₁' m₂' m₁'' m₂''
  dsimp [-associated_apply]
  

Proof state:
case a.a.a.h.h.h.a.a.h.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
m₁ : M₁
m₂ : M₂
m₁' : M₃
m₂' : M₁
m₁'' : M₂
m₂'' : M₃
⊢ BilinForm.bilin
      ((associatedHom R) (comp (QuadraticForm.tmul Q₁ (QuadraticForm.tmul Q₂ Q₃)) ↑(TensorProduct.assoc R M₁ M₂ M₃)))
      ((m₁ ⊗ₜ[R] m₂) ⊗ₜ[R] m₁') ((m₂' ⊗ₜ[R] m₁'') ⊗ₜ[R] m₂'') =
    BilinForm.bilin ((associatedHom R) (QuadraticForm.tmul (QuadraticForm.tmul Q₁ Q₂) Q₃)) ((m₁ ⊗ₜ[R] m₂) ⊗ₜ[R] m₁')
      ((m₂' ⊗ₜ[R] m₁'') ⊗ₜ[R] m₂'')

Next tactic:
simp only [associated_tmul, QuadraticForm.associated_comp]
@[simp]
theorem tmul_comp_tensorAssoc
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃) :
    (Q₁.tmul (Q₂.tmul Q₃)).comp (TensorProduct.assoc R M₁ M₂ M₃) = (Q₁.tmul Q₂).tmul Q₃ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₂ m₁' m₂' m₁'' m₂''
  dsimp [-associated_apply]
  simp only [associated_tmul, QuadraticForm.associated_comp]
  

Proof state:
case a.a.a.h.h.h.a.a.h.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
Q₂ : QuadraticForm R M₂
Q₃ : QuadraticForm R M₃
m₁ : M₁
m₂ : M₂
m₁' : M₃
m₂' : M₁
m₁'' : M₂
m₂'' : M₃
⊢ BilinForm.bilin
      (BilinForm.comp (BilinForm.tmul (associated Q₁) (BilinForm.tmul (associated Q₂) (associated Q₃)))
        ↑(TensorProduct.assoc R M₁ M₂ M₃) ↑(TensorProduct.assoc R M₁ M₂ M₃))
      ((m₁ ⊗ₜ[R] m₂) ⊗ₜ[R] m₁') ((m₂' ⊗ₜ[R] m₁'') ⊗ₜ[R] m₂'') =
    BilinForm.bilin (BilinForm.tmul (BilinForm.tmul (associated Q₁) (associated Q₂)) (associated Q₃))
      ((m₁ ⊗ₜ[R] m₂) ⊗ₜ[R] m₁') ((m₂' ⊗ₜ[R] m₁'') ⊗ₜ[R] m₂'')

Next tactic:
exact mul_assoc _ _ _
theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
    Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
⊢ comp Q₁ ↑(TensorProduct.rid R M₁) = QuadraticForm.tmul Q₁ sq

Next tactic:
refine (QuadraticForm.associated_rightInverse R).injective ?_
theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
    Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
⊢ (associatedHom R) (comp Q₁ ↑(TensorProduct.rid R M₁)) = (associatedHom R) (QuadraticForm.tmul Q₁ sq)

Next tactic:
apply BilinForm.toLin.injective
theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
    Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  

Proof state:
case a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
⊢ BilinForm.toLin ((associatedHom R) (comp Q₁ ↑(TensorProduct.rid R M₁))) =
    BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul Q₁ sq))

Next tactic:
ext m₁ m₁'
theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
    Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₁'
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
m₁ m₁' : M₁
⊢ ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry
                (BilinForm.toLin ((associatedHom R) (comp Q₁ ↑(TensorProduct.rid R M₁)))))
              m₁)
            1))
        m₁')
      1 =
    ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry (BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul Q₁ sq))))
              m₁)
            1))
        m₁')
      1

Next tactic:
dsimp [-associated_apply]
theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
    Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₁'
  dsimp [-associated_apply]
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
m₁ m₁' : M₁
⊢ BilinForm.bilin ((associatedHom R) (comp Q₁ ↑(TensorProduct.rid R M₁))) (m₁ ⊗ₜ[R] 1) (m₁' ⊗ₜ[R] 1) =
    BilinForm.bilin ((associatedHom R) (QuadraticForm.tmul Q₁ sq)) (m₁ ⊗ₜ[R] 1) (m₁' ⊗ₜ[R] 1)

Next tactic:
simp only [associated_tmul, QuadraticForm.associated_comp]
theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
    Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₁ m₁'
  dsimp [-associated_apply]
  simp only [associated_tmul, QuadraticForm.associated_comp]
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₁ : QuadraticForm R M₁
m₁ m₁' : M₁
⊢ BilinForm.bilin (BilinForm.comp ((associatedHom R) Q₁) ↑(TensorProduct.rid R M₁) ↑(TensorProduct.rid R M₁))
      (m₁ ⊗ₜ[R] 1) (m₁' ⊗ₜ[R] 1) =
    BilinForm.bilin (BilinForm.tmul (associated Q₁) (associated sq)) (m₁ ⊗ₜ[R] 1) (m₁' ⊗ₜ[R] 1)

Next tactic:
simp [-associated_apply, one_mul]
theorem comp_tensorLId_eq (Q₂ : QuadraticForm R M₂) :
    Q₂.comp (TensorProduct.lid R M₂) = (sq (R := R)).tmul Q₂ := by
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₂ : QuadraticForm R M₂
⊢ comp Q₂ ↑(TensorProduct.lid R M₂) = QuadraticForm.tmul sq Q₂

Next tactic:
refine (QuadraticForm.associated_rightInverse R).injective ?_
theorem comp_tensorLId_eq (Q₂ : QuadraticForm R M₂) :
    Q₂.comp (TensorProduct.lid R M₂) = (sq (R := R)).tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₂ : QuadraticForm R M₂
⊢ (associatedHom R) (comp Q₂ ↑(TensorProduct.lid R M₂)) = (associatedHom R) (QuadraticForm.tmul sq Q₂)

Next tactic:
apply BilinForm.toLin.injective
theorem comp_tensorLId_eq (Q₂ : QuadraticForm R M₂) :
    Q₂.comp (TensorProduct.lid R M₂) = (sq (R := R)).tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  

Proof state:
case a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₂ : QuadraticForm R M₂
⊢ BilinForm.toLin ((associatedHom R) (comp Q₂ ↑(TensorProduct.lid R M₂))) =
    BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul sq Q₂))

Next tactic:
ext m₂ m₂'
theorem comp_tensorLId_eq (Q₂ : QuadraticForm R M₂) :
    Q₂.comp (TensorProduct.lid R M₂) = (sq (R := R)).tmul Q₂ := by
  refine (QuadraticForm.associated_rightInverse R).injective ?_
  apply BilinForm.toLin.injective
  ext m₂ m₂'
  

Proof state:
case a.a.h.h.a.h.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
M₄ : Type uM₄
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Invertible 2
Q₂ : QuadraticForm R M₂
m₂ m₂' : M₂
⊢ ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry
                (BilinForm.toLin ((associatedHom R) (comp Q₂ ↑(TensorProduct.lid R M₂)))))
              1)
            m₂))
        1)
      m₂' =
    ((TensorProduct.AlgebraTensorModule.curry
          (((TensorProduct.AlgebraTensorModule.curry (BilinForm.toLin ((associatedHom R) (QuadraticForm.tmul sq Q₂))))
              1)
            m₂))
        1)
      m₂'

Next tactic:
dsimp [-associated_apply]