-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
theorem associated_prod [Invertible (2 : R)]
    (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P) :
    associated (Q₁.prod Q₂) =
      (associated Q₁).compl₁₂ (.fst R M₁ M₂) (.fst R M₁ M₂) +
      (associated Q₂).compl₁₂ (.snd R M₁ M₂) (.snd R M₁ M₂)

Proof state:
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
P : Type u_7
inst✝⁷ : CommRing R
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : AddCommGroup P
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R P
inst✝ : Invertible 2
Q₁ : QuadraticMap R M₁ P
Q₂ : QuadraticMap R M₂ P
⊢ associated (Q₁.prod Q₂) =
    LinearMap.compl₁₂ (associated Q₁) (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      LinearMap.compl₁₂ (associated Q₂) (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)

Tactic:
dsimp [associated, associatedHom]

Result:
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
P : Type u_7
inst✝⁷ : CommRing R
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : AddCommGroup P
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R P
inst✝ : Invertible 2
Q₁ : QuadraticMap R M₁ P
Q₂ : QuadraticMap R M₂ P
⊢ ⅟2 • (Q₁.prod Q₂).polarBilin =
    LinearMap.compl₁₂ (⅟2 • Q₁.polarBilin) (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      LinearMap.compl₁₂ (⅟2 • Q₂.polarBilin) (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)

Proof state:
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
P : Type u_7
inst✝⁷ : CommRing R
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : AddCommGroup P
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R P
inst✝ : Invertible 2
Q₁ : QuadraticMap R M₁ P
Q₂ : QuadraticMap R M₂ P
⊢ ⅟2 • LinearMap.compl₁₂ Q₁.polarBilin (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      ⅟2 • LinearMap.compl₁₂ Q₂.polarBilin (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂) =
    LinearMap.compl₁₂ (⅟2 • Q₁.polarBilin) (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      LinearMap.compl₁₂ (⅟2 • Q₂.polarBilin) (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)

Tactic:
rfl

Result:
no goals

Proof state:
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
P : Type u_7
inst✝⁷ : CommRing R
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : AddCommGroup P
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R P
inst✝ : Invertible 2
Q₁ : QuadraticMap R M₁ P
Q₂ : QuadraticMap R M₂ P
⊢ ⅟2 • (Q₁.prod Q₂).polarBilin =
    LinearMap.compl₁₂ (⅟2 • Q₁.polarBilin) (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      LinearMap.compl₁₂ (⅟2 • Q₂.polarBilin) (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)

Tactic:
rw [polarBilin_prod, smul_add]

Result:
R : Type u_2
M₁ : Type u_3
M₂ : Type u_4
P : Type u_7
inst✝⁷ : CommRing R
inst✝⁶ : AddCommGroup M₁
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : AddCommGroup P
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R P
inst✝ : Invertible 2
Q₁ : QuadraticMap R M₁ P
Q₂ : QuadraticMap R M₂ P
⊢ ⅟2 • LinearMap.compl₁₂ Q₁.polarBilin (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      ⅟2 • LinearMap.compl₁₂ Q₂.polarBilin (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂) =
    LinearMap.compl₁₂ (⅟2 • Q₁.polarBilin) (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
      LinearMap.compl₁₂ (⅟2 • Q₂.polarBilin) (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)