Skip to content

Commit 1b968c6

Browse files
committed
feat(Algebra/Polynomial/Roots): Action of group on rootSet (#33919)
This PR adds an instance for `MulAction G (f.rootSet R)` whenever a `MulSemiringAction G R` satisfies `SMulCommClass G S R`. Co-authored-by: tb65536 <[email protected]>
1 parent cdb6f72 commit 1b968c6

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

Mathlib/Algebra/Polynomial/AlgebraMap.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ theorem aeval_algHom_apply {F : Type*} [FunLike F A B] [AlgHomClass F R A B]
400400
(by simp [AlgHomClass.commutes])
401401
rw [map_add, hp, hq, ← map_add, ← map_add]
402402

403-
theorem aeval_smul (f : R[X]) {G : Type*} [Group G] [MulSemiringAction G A] [SMulCommClass G R A]
403+
theorem aeval_smul (f : R[X]) {G : Type*} [Monoid G] [MulSemiringAction G A] [SMulCommClass G R A]
404404
(g : G) (x : A) : f.aeval (g • x) = g • (f.aeval x) := by
405405
rw [← MulSemiringAction.toAlgHom_apply R, aeval_algHom_apply, MulSemiringAction.toAlgHom_apply]
406406

Mathlib/Algebra/Polynomial/Roots.lean

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,48 @@ theorem nthRootsFinset_toSet {n : ℕ} (h : 0 < n) (a : R) :
637637
ext x
638638
simp_all
639639

640+
theorem smul_mem_rootSet [CommRing S] [Algebra S R] {G : Type*}
641+
[Monoid G] [MulSemiringAction G R] [SMulCommClass G S R] {f : S[X]}
642+
(g : G) {x : R} (hx : x ∈ f.rootSet R) : g • x ∈ f.rootSet R := by
643+
simp [mem_rootSet', aeval_smul, aeval_eq_zero_of_mem_rootSet hx, (mem_rootSet'.mp hx).1]
644+
645+
theorem smul_mem_rootSet_iff_of_isUnit [CommRing S] [Algebra S R] {G : Type*}
646+
[Monoid G] [MulSemiringAction G R] [SMulCommClass G S R] {f : S[X]}
647+
{g : G} (hg : IsUnit g) {x : R} : g • x ∈ f.rootSet R ↔ x ∈ f.rootSet R := by
648+
refine ⟨?_, smul_mem_rootSet g⟩
649+
obtain ⟨g, rfl⟩ := hg
650+
exact fun hx ↦ inv_smul_smul g x ▸ smul_mem_rootSet _ hx
651+
652+
theorem smul_mem_rootSet_iff [CommRing S] [Algebra S R] {G : Type*}
653+
[Group G] [MulSemiringAction G R] [SMulCommClass G S R] {f : S[X]}
654+
{g : G} {x : R} : g • x ∈ f.rootSet R ↔ x ∈ f.rootSet R :=
655+
smul_mem_rootSet_iff_of_isUnit (Group.isUnit g)
656+
657+
instance [CommRing S] [Algebra S R] (G : Type*)
658+
[Monoid G] [MulSemiringAction G R] [SMulCommClass G S R] (f : S[X]) :
659+
MulAction G (f.rootSet R) where
660+
smul g x := ⟨g • x.1, smul_mem_rootSet g x.2
661+
one_smul x := Subtype.ext (one_smul G x.1)
662+
mul_smul g h x := Subtype.ext (mul_smul g h x.1)
663+
664+
@[simp]
665+
theorem rootSet.coe_smul [CommRing S] [Algebra S R] {G : Type*}
666+
[Monoid G] [MulSemiringAction G R] [SMulCommClass G S R] {f : S[X]}
667+
(g : G) (x : f.rootSet R) : (g • x : f.rootSet R) = g • (x : R) :=
668+
rfl
669+
670+
instance [CommRing S] [Algebra S R] (G H : Type*)
671+
[Monoid G] [MulSemiringAction G R] [SMulCommClass G S R]
672+
[Monoid H] [MulSemiringAction H R] [SMulCommClass H S R]
673+
[SMulCommClass G H R] (f : S[X]) : SMulCommClass G H (f.rootSet R) where
674+
smul_comm _ _ _ := Subtype.ext <| smul_comm _ _ _
675+
676+
instance [CommRing S] [Algebra S R] (G H : Type*)
677+
[Monoid G] [MulSemiringAction G R] [SMulCommClass G S R]
678+
[Monoid H] [MulSemiringAction H R] [SMulCommClass H S R]
679+
[SMul G H] [IsScalarTower G H R] (f : S[X]) : IsScalarTower G H (f.rootSet R) where
680+
smul_assoc _ _ _ := Subtype.ext <| smul_assoc _ _ _
681+
640682
end Roots
641683

642684
lemma eq_zero_of_natDegree_lt_card_of_eval_eq_zero {R} [CommRing R] [IsDomain R]

0 commit comments

Comments
 (0)