@@ -68,7 +68,7 @@ quadratic form, homogeneous polynomial, quadratic polynomial
68
68
69
69
universe u v w
70
70
71
- variable {S : Type _}
71
+ variable {S T : Type _}
72
72
73
73
variable {R R₁ : Type _} {M : Type _}
74
74
@@ -365,7 +365,8 @@ variable [Semiring R] [AddCommMonoid M] [Module R M]
365
365
366
366
section SMul
367
367
368
- variable [Monoid S] [DistribMulAction S R] [SMulCommClass S R R]
368
+ variable [Monoid S] [Monoid T] [DistribMulAction S R] [DistribMulAction T R]
369
+ variable [SMulCommClass S R R] [SMulCommClass T R R]
369
370
370
371
/-- `QuadraticForm R M` inherits the scalar action from any algebra over `R`.
371
372
@@ -388,6 +389,12 @@ theorem smul_apply (a : S) (Q : QuadraticForm R M) (x : M) : (a • Q) x = a •
388
389
rfl
389
390
#align quadratic_form.smul_apply QuadraticForm.smul_apply
390
391
392
+ instance [SMulCommClass S T R] : SMulCommClass S T (QuadraticForm R M) where
393
+ smul_comm _s _t _q := ext <| fun _ => smul_comm _ _ _
394
+
395
+ instance [SMul S T] [IsScalarTower S T R] : IsScalarTower S T (QuadraticForm R M) where
396
+ smul_assoc _s _t _q := ext <| fun _ => smul_assoc _ _ _
397
+
391
398
end SMul
392
399
393
400
instance : Zero (QuadraticForm R M) :=
@@ -675,7 +682,7 @@ theorem toQuadraticForm_smul [Monoid S] [DistribMulAction S R] [SMulCommClass S
675
682
676
683
section
677
684
678
- variable (R M)
685
+ variable (S R M)
679
686
680
687
/-- `BilinForm.toQuadraticForm` as an additive homomorphism -/
681
688
@[simps]
@@ -685,6 +692,14 @@ def toQuadraticFormAddMonoidHom : BilinForm R M →+ QuadraticForm R M where
685
692
map_add' := toQuadraticForm_add
686
693
#align bilin_form.to_quadratic_form_add_monoid_hom BilinForm.toQuadraticFormAddMonoidHom
687
694
695
+ /-- `BilinForm.toQuadraticForm` as a linear map -/
696
+ @[simps!]
697
+ def toQuadraticFormLinearMap [Semiring S] [Module S R] [SMulCommClass S R R] :
698
+ BilinForm R M →ₗ[S] QuadraticForm R M where
699
+ toFun := toQuadraticForm
700
+ map_smul' := toQuadraticForm_smul
701
+ map_add' := toQuadraticForm_add
702
+
688
703
end
689
704
690
705
@[simp]
@@ -754,9 +769,9 @@ variable [Invertible (2 : R)] {B₁ : BilinForm R M}
754
769
associated symmetric bilinear form. As provided here, this has the structure of an `S`-linear map
755
770
where `S` is a commutative subring of `R`.
756
771
757
- Over a commutative ring, use `Associated `, which gives an `R`-linear map. Over a general ring with
758
- no nontrivial distinguished commutative subring, use `Associated '`, which gives an additive
759
- homomorphism (or more precisely a `ℤ`-linear map.) -/
772
+ Over a commutative ring, use `QuadraticForm.associated `, which gives an `R`-linear map. Over a
773
+ general ring with no nontrivial distinguished commutative subring, use `QuadraticForm.associated '`,
774
+ which gives an additive homomorphism (or more precisely a `ℤ`-linear map.) -/
760
775
def associatedHom : QuadraticForm R M →ₗ[S] BilinForm R M where
761
776
toFun Q :=
762
777
((· • ·) : Submonoid.center R → BilinForm R M → BilinForm R M)
@@ -850,7 +865,7 @@ variable [CommRing R₁] [AddCommGroup M] [Module R₁ M]
850
865
variable [Invertible (2 : R₁)]
851
866
852
867
-- Note: When possible, rather than writing lemmas about `associated`, write a lemma applying to
853
- -- the more general `AssociatedHom ` and place it in the previous section.
868
+ -- the more general `associatedHom ` and place it in the previous section.
854
869
/-- `associated` is the linear map that sends a quadratic form over a commutative ring to its
855
870
associated symmetric bilinear form. -/
856
871
abbrev associated : QuadraticForm R₁ M →ₗ[R₁] BilinForm R₁ M :=
0 commit comments