/-- The linear map obtained from a `BilinForm` by fixing the left co-ordinate and evaluating in
the right.
This is the most general version of the construction; it is `R₂`-linear for some distinguished
commutative subsemiring `R₂` of the scalar ring.  Over a semiring with no particular distinguished
such subsemiring, use `toLin'`, which is `ℕ`-linear.  Over a commutative semiring, use `toLin`,
which is linear. -/
def toLinHom : BilinForm R M →ₗ[R₂] M →ₗ[R₂] M →ₗ[R] R where
  toFun := toLinHomAux₂
  map_add' A₁ A₂ :=
    LinearMap.ext fun x => by
      dsimp only [toLinHomAux₁, toLinHomAux₂]
      apply LinearMap.ext
      intro y
      simp only [toLinHomAux₂, toLinHomAux₁, LinearMap.coe_mk, LinearMap.add_apply, add_apply,
        AddHom.coe_mk]
  map_smul' c A := by
    dsimp [toLinHomAux₁, toLinHomAux₂]
    apply LinearMap.ext
    intro x
    apply LinearMap.ext
    intro y
    

Proof state:
case h.h
R : Type u_1
M : Type u_2
inst✝¹⁷ : Semiring R
inst✝¹⁶ : AddCommMonoid M
inst✝¹⁵ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝¹⁴ : Ring R₁
inst✝¹³ : AddCommGroup M₁
inst✝¹² : Module R₁ M₁
R₂ : Type u_5
M₂ : Type u_6
inst✝¹¹ : CommSemiring R₂
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : Module R₂ M₂
R₃ : Type u_7
M₃ : Type u_8
inst✝⁸ : CommRing R₃
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : Module R₃ M₃
V : Type u_9
K : Type u_10
inst✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
inst✝² : Algebra R₂ R
inst✝¹ : Module R₂ M
inst✝ : IsScalarTower R₂ R M
c : R₂
A : BilinForm R M
x y : M
⊢ ({
          toAddHom :=
            { toFun := toLinHomAux₁ (c • A),
              map_add' :=
                (_ :
                  ∀ (x₁ x₂ : M), toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) },
          map_smul' :=
            (_ :
              ∀ (c_1 : R₂) (x : M),
                AddHom.toFun
                    { toFun := toLinHomAux₁ (c • A),
                      map_add' :=
                        (_ :
                          ∀ (x₁ x₂ : M),
                            toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }
                    (c_1 • x) =
                  (RingHom.id R₂) c_1 •
                    AddHom.toFun
                      { toFun := toLinHomAux₁ (c • A),
                        map_add' :=
                          (_ :
                            ∀ (x₁ x₂ : M),
                              toLinHomAux₁ (c • A) (x₁ + x₂) = toLinHomAux₁ (c • A) x₁ + toLinHomAux₁ (c • A) x₂) }
                      x) }
        x)
      y =
    ((c •
          {
            toAddHom :=
              { toFun := toLinHomAux₁ A,
                map_add' := (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) },
            map_smul' :=
              (_ :
                ∀ (c : R₂) (x : M),
                  AddHom.toFun
                      { toFun := toLinHomAux₁ A,
                        map_add' :=
                          (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }
                      (c • x) =
                    (RingHom.id R₂) c •
                      AddHom.toFun
                        { toFun := toLinHomAux₁ A,
                          map_add' :=
                            (_ : ∀ (x₁ x₂ : M), toLinHomAux₁ A (x₁ + x₂) = toLinHomAux₁ A x₁ + toLinHomAux₁ A x₂) }
                        x) })
        x)
      y

Next tactic:
simp only [toLinHomAux₂, toLinHomAux₁, LinearMap.coe_mk, LinearMap.smul_apply, smul_apply,
      AddHom.coe_mk]