/-- The isometry sending `(Q.prod $ -Q)` to `(QuadraticForm.dualProd R M)`.

This is `σ` from Proposition 4.8, page 84 of
[*Hermitian K-Theory and Geometric Applications*][hyman1973]; though we swap the order of the pairs.
-/
@[simps!]
def toDualProd (Q : QuadraticForm R M) [Invertible (2 : R)] :
    (Q.prod <| -Q) →qᵢ QuadraticForm.dualProd R M where
  toLinearMap := LinearMap.prod
    (Q.associated.toLin.comp (LinearMap.fst _ _ _) + Q.associated.toLin.comp (LinearMap.snd _ _ _))
    (LinearMap.fst _ _ _ - LinearMap.snd _ _ _)
  map_app' x := by
    dsimp only [associated, associatedHom]
    

Proof state:
R : Type u_1
M : Type u_2
N : Type u_3
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
Q : QuadraticForm R M
inst✝ : Invertible 2
x : M × M
⊢ (dualProd R M)
      (AddHom.toFun
        (LinearMap.prod
            (BilinForm.toLin
                  (({ val := ⅟2, property := (_ : ⅟2 ∈ Set.center R) } •
                      {
                        toAddHom :=
                          { toFun := polarBilin,
                            map_add' :=
                              (_ :
                                ∀ (_x _y : QuadraticForm R M), polarBilin (_x + _y) = polarBilin _x + polarBilin _y) },
                        map_smul' :=
                          (_ :
                            ∀ (_c : R) (_x : QuadraticForm R M),
                              AddHom.toFun
                                  { toFun := polarBilin,
                                    map_add' :=
                                      (_ :
                                        ∀ (_x _y : QuadraticForm R M),
                                          polarBilin (_x + _y) = polarBilin _x + polarBilin _y) }
                                  (_c • _x) =
                                (RingHom.id R) _c •
                                  AddHom.toFun
                                    { toFun := polarBilin,
                                      map_add' :=
                                        (_ :
                                          ∀ (_x _y : QuadraticForm R M),
                                            polarBilin (_x + _y) = polarBilin _x + polarBilin _y) }
                                    _x) })
                    Q) ∘ₗ
                LinearMap.fst R M M +
              BilinForm.toLin
                  (({ val := ⅟2, property := (_ : ⅟2 ∈ Set.center R) } •
                      {
                        toAddHom :=
                          { toFun := polarBilin,
                            map_add' :=
                              (_ :
                                ∀ (_x _y : QuadraticForm R M), polarBilin (_x + _y) = polarBilin _x + polarBilin _y) },
                        map_smul' :=
                          (_ :
                            ∀ (_c : R) (_x : QuadraticForm R M),
                              AddHom.toFun
                                  { toFun := polarBilin,
                                    map_add' :=
                                      (_ :
                                        ∀ (_x _y : QuadraticForm R M),
                                          polarBilin (_x + _y) = polarBilin _x + polarBilin _y) }
                                  (_c • _x) =
                                (RingHom.id R) _c •
                                  AddHom.toFun
                                    { toFun := polarBilin,
                                      map_add' :=
                                        (_ :
                                          ∀ (_x _y : QuadraticForm R M),
                                            polarBilin (_x + _y) = polarBilin _x + polarBilin _y) }
                                    _x) })
                    Q) ∘ₗ
                LinearMap.snd R M M)
            (LinearMap.fst R M M - LinearMap.snd R M M)).toAddHom
        x) =
    (prod Q (-Q)) x

Next tactic:
dsimp