/-- Auxiliary construction for the flip of a bilinear form, obtained by exchanging the left and
right arguments. This version is a `LinearMap`; it is later upgraded to a `LinearEquiv`
in `flipHom`. -/
def flipHomAux [Algebra R₂ R] : BilinForm R M →ₗ[R₂] BilinForm R M where
  toFun A :=
    { bilin := fun i j => A j i
      bilin_add_left := fun x y z => A.bilin_add_right z x y
      bilin_smul_left := fun a x y => A.bilin_smul_right a y x
      bilin_add_right := fun x y z => A.bilin_add_left y z x
      bilin_smul_right := fun a x y => A.bilin_smul_left a y x }
  map_add' A₁ A₂ := by
    ext
    simp
  map_smul' c A := by
    

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
c : R₂
A : BilinForm R M
⊢ AddHom.toFun
      {
        toFun := fun A =>
          { bilin := fun i j => bilin A j i,
            bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
            bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
            bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
            bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) },
        map_add' :=
          (_ :
            ∀ (A₁ A₂ : BilinForm R M),
              (fun A =>
                    { bilin := fun i j => bilin A j i,
                      bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
                      bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
                      bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
                      bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
                  (A₁ + A₂) =
                (fun A =>
                      { bilin := fun i j => bilin A j i,
                        bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
                        bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
                        bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
                        bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
                    A₁ +
                  (fun A =>
                      { bilin := fun i j => bilin A j i,
                        bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
                        bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
                        bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
                        bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
                    A₂) }
      (c • A) =
    (RingHom.id R₂) c •
      AddHom.toFun
        {
          toFun := fun A =>
            { bilin := fun i j => bilin A j i,
              bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
              bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
              bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
              bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) },
          map_add' :=
            (_ :
              ∀ (A₁ A₂ : BilinForm R M),
                (fun A =>
                      { bilin := fun i j => bilin A j i,
                        bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
                        bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
                        bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
                        bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
                    (A₁ + A₂) =
                  (fun A =>
                        { bilin := fun i j => bilin A j i,
                          bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
                          bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
                          bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
                          bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
                      A₁ +
                    (fun A =>
                        { bilin := fun i j => bilin A j i,
                          bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
                          bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
                          bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
                          bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
                      A₂) }
        A

Next tactic:
ext