Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit c43c709

Browse files
committed
fix(data/dfinsupp): fix overly strict type-class arguments (#5935)
1 parent 82481e3 commit c43c709

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/data/dfinsupp.lean

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -962,19 +962,22 @@ section
962962
variables [decidable_eq ι]
963963

964964
namespace monoid_hom
965-
variables {R S : Type*} [comm_monoid R] [comm_monoid S]
966-
variables [Π i, add_comm_monoid (β i)] [Π i (x : β i), decidable (x ≠ 0)]
965+
variables {R S : Type*}
966+
variables [Π i, has_zero (β i)] [Π i (x : β i), decidable (x ≠ 0)]
967967

968968
@[simp, to_additive]
969-
lemma map_dfinsupp_prod (h : R →* S) (f : Π₀ i, β i) (g : Π i, β i → R) :
969+
lemma map_dfinsupp_prod [comm_monoid R] [comm_monoid S]
970+
(h : R →* S) (f : Π₀ i, β i) (g : Π i, β i → R) :
970971
h (f.prod g) = f.prod (λ a b, h (g a b)) := h.map_prod _ _
971972

972973
@[to_additive]
973-
lemma coe_dfinsupp_prod (f : Π₀ i, β i) (g : Π i, β i → R →* S) :
974+
lemma coe_dfinsupp_prod [monoid R] [comm_monoid S]
975+
(f : Π₀ i, β i) (g : Π i, β i → R →* S) :
974976
⇑(f.prod g) = f.prod (λ a b, (g a b)) := coe_prod _ _
975977

976978
@[simp, to_additive]
977-
lemma dfinsupp_prod_apply (f : Π₀ i, β i) (g : Π i, β i → R →* S) (r : R) :
979+
lemma dfinsupp_prod_apply [monoid R] [comm_monoid S]
980+
(f : Π₀ i, β i) (g : Π i, β i → R →* S) (r : R) :
978981
(f.prod g) r = f.prod (λ a b, (g a b) r) := finset_prod_apply _ _ _
979982

980983
end monoid_hom

0 commit comments

Comments
 (0)