/-- 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
      

Proof state:
case 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
A₁ A₂ : BilinForm R M
x : M
⊢ ∀ (x_1 : M),
    ({
            toAddHom :=
              { toFun := toLinHomAux₁ (A₁ + A₂),
                map_add' :=
                  (_ :
                    ∀ (x₁ x₂ : M),
                      toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) = toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) },
            map_smul' :=
              (_ :
                ∀ (c : R₂) (x : M),
                  AddHom.toFun
                      { toFun := toLinHomAux₁ (A₁ + A₂),
                        map_add' :=
                          (_ :
                            ∀ (x₁ x₂ : M),
                              toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =
                                toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }
                      (c • x) =
                    (RingHom.id R₂) c •
                      AddHom.toFun
                        { toFun := toLinHomAux₁ (A₁ + A₂),
                          map_add' :=
                            (_ :
                              ∀ (x₁ x₂ : M),
                                toLinHomAux₁ (A₁ + A₂) (x₁ + x₂) =
                                  toLinHomAux₁ (A₁ + A₂) x₁ + toLinHomAux₁ (A₁ + A₂) x₂) }
                        x) }
          x)
        x_1 =
      (({
              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) } +
            {
              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)
        x_1

Next tactic:
intro y