Skip to content

Commit 614a290

Browse files
committed
chore(Algebra/SkewMonoidAlgebra/Basic): generalize lemmas from Monoid to Mul (#36737)
Co-authored-by: mariainesdff <mariaines.dff@gmail.com>
1 parent b459ce1 commit 614a290

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

Mathlib/Algebra/SkewMonoidAlgebra/Basic.lean

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,9 @@ section coeff_mul
851851

852852
variable [Semiring k]
853853

854-
section Monoid
854+
section Mul
855855

856-
variable [Monoid G] [MulSemiringAction G k]
856+
variable [Mul G] [SMulZeroClass G k]
857857

858858
theorem coeff_mul [DecidableEq G] (f g : SkewMonoidAlgebra k G)
859859
(x : G) : (f * g).coeff x = f.sum fun a₁ b₁ ↦ g.sum fun a₂ b₂ ↦
@@ -919,10 +919,6 @@ theorem coeff_mul_single_aux (f : SkewMonoidAlgebra k G) {r : k} {x y z : G}
919919
_ = f.coeff y * y • r := by
920920
split_ifs with h <;> simp [support] at h <;> simp [h]
921921

922-
theorem coeff_mul_single_one (f : SkewMonoidAlgebra k G) (r : k) (x : G) :
923-
(f * single 1 r).coeff x = f.coeff x * x • r :=
924-
f.coeff_mul_single_aux fun a ↦ by rw [mul_one]
925-
926922
theorem coeff_mul_single_of_not_exists_mul (r : k) {g g' : G} (x : SkewMonoidAlgebra k G)
927923
(h : ∀ x, ¬g' = x * g) : (x * single g r).coeff g' = 0 := by
928924
classical
@@ -944,10 +940,6 @@ theorem coeff_single_mul_aux (f : SkewMonoidAlgebra k G) {r : k} {x y z : G}
944940
_ = if z ∈ f.support then r * x • f.coeff z else 0 := (f.support.sum_ite_eq' _ _)
945941
_ = _ := by split_ifs with h <;> simp [support] at h <;> simp [h]
946942

947-
theorem coeff_single_one_mul (f : SkewMonoidAlgebra k G) (r : k) (x : G) :
948-
(single (1 : G) r * f).coeff x = r * f.coeff x := by
949-
simp [coeff_single_mul_aux, one_smul]
950-
951943
theorem coeff_single_mul_of_not_exists_mul (r : k) {g g' : G} (x : SkewMonoidAlgebra k G)
952944
(h : ¬∃ d, g' = g * d) : (single g r * x).coeff g' = 0 := by
953945
classical
@@ -958,6 +950,20 @@ theorem coeff_single_mul_of_not_exists_mul (r : k) {g g' : G} (x : SkewMonoidAlg
958950
exact absurd ⟨_, rfl⟩ h
959951
· simp
960952

953+
end Mul
954+
955+
section Monoid
956+
957+
variable [Monoid G] [MulSemiringAction G k]
958+
959+
theorem coeff_mul_single_one (f : SkewMonoidAlgebra k G) (r : k) (x : G) :
960+
(f * single 1 r).coeff x = f.coeff x * x • r :=
961+
f.coeff_mul_single_aux fun a ↦ by rw [mul_one]
962+
963+
theorem coeff_single_one_mul (f : SkewMonoidAlgebra k G) (r : k) (x : G) :
964+
(single (1 : G) r * f).coeff x = r * f.coeff x := by
965+
simp [coeff_single_mul_aux, one_smul]
966+
961967
end Monoid
962968

963969
section Group

0 commit comments

Comments
 (0)