/-
Copyright (c) 2019 Amelia Livingston. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Amelia Livingston
-/
module
public import Mathlib.Algebra.BigOperators.Finsupp.Basic
public import Mathlib.Data.DFinsupp.BigOperators
public import Mathlib.GroupTheory.Congruence.Hom
/-!
# Interactions between `∑, ∏` and `(Add)Con`
-/
public section
namespace Con
/-- Multiplicative congruence relations preserve product indexed by a list. -/
@[to_additive /-- Additive congruence relations preserve sum indexed by a list. -/]
protected theorem list_prod {ι M : Type*} [MulOneClass M] (c : Con M) {l : List ι} {f g : ι → M}
(h : ∀ x ∈ l, c (f x) (g x)) :
c (l.map f).prod (l.map g).prod := by
induction l with
| nil =>
simpa only [List.map_nil, List.prod_nil] using c.refl 1
| cons x xs ih =>
rw [List.map_cons, List.map_cons, List.prod_cons, List.prod_cons]
exact c.mul (h _ <| .head _) <| ih fun k hk ↦ h _ (.tail _ hk)
@[to_additive (attr := simp, norm_cast)]
protected theorem coe_listProd {ι M : Type*} [MulOneClass M] (c : Con M)
(l : List ι) (f : ι → M) :
(↑(l.map f).prod : c.Quotient) = (l.map fun i => (f i : c.Quotient)).prod := by
induction l with simp [*]
/-- Multiplicative congruence relations preserve product indexed by a multiset. -/
@[to_additive /-- Additive congruence relations preserve sum indexed by a multiset. -/]
protected theorem multiset_prod {ι M : Type*} [CommMonoid M] (c : Con M) {s : Multiset ι}
{f g : ι → M} (h : ∀ x ∈ s, c (f x) (g x)) :
c (s.map f).prod (s.map g).prod := by
rcases s; simpa using c.list_prod h
@[to_additive (attr := simp, norm_cast)]
protected theorem coe_multisetProd {ι M : Type*} [CommMonoid M] (c : Con M)
(s : Multiset ι) (f : ι → M) :
(↑(s.map f).prod : c.Quotient) = (s.map fun i => (f i : c.Quotient)).prod := by
simpa using map_multiset_prod c.mk' (s.map f)
/-- Multiplicative congruence relations preserve finite product. -/
@[to_additive /-- Additive congruence relations preserve finite sum. -/]
protected theorem finsetProd {ι M : Type*} [CommMonoid M] (c : Con M) (s : Finset ι)
{f g : ι → M} (h : ∀ i ∈ s, c (f i) (g i)) :
c (s.prod f) (s.prod g) :=
c.multiset_prod h
@[to_additive (attr := simp, norm_cast)]
protected theorem coe_finsetProd {ι M : Type*} [CommMonoid M] (c : Con M) (s : Finset ι)
(f : ι → M) :
(↑(s.prod f) : c.Quotient) = s.prod fun i => (f i : c.Quotient) :=
map_prod c.mk' f s
@[to_additive]
protected theorem finsuppProd {ι : Type*} {β : Type*} {M : Type*}
[CommMonoid M] [Zero β]
(c : Con M) (h : ι → β → M) (h' : ι → β → M)
{f g : ι →₀ β} (hf : ∀ i, c (h i 0) 1) (hf' : ∀ i, c (h' i 0) 1)
(H : ∀ i, c (h i (f i)) (h' i (g i))) :
c (f.prod h) (g.prod h') := by
refine Quotient.exact (show c.mk' _ = c.mk' _ from ?_)
rw [map_finsuppProd, map_finsuppProd]
classical
exact Finsupp.prod_congr_of_eq_on_union
(fun _ _ => Quotient.sound <| H _)
(fun _ _ => Quotient.sound <| hf _) (fun _ _ => Quotient.sound <| hf' _)
@[to_additive (attr := simp, norm_cast)]
protected theorem coe_finsuppProd {ι : Type*} {β : Type*} {M : Type*}
[CommMonoid M] [Zero β] (c : Con M) (h : ι → β → M) (f : ι →₀ β) :
(↑(f.prod h) : c.Quotient) = f.prod fun i b => (h i b : c.Quotient) :=
map_finsuppProd c.mk' f h
@[to_additive]
protected theorem dfinsuppProd {ι : Type*} {β : ι → Type*} {M : Type*}
[DecidableEq ι] [CommMonoid M] [∀ i, Zero (β i)] [∀ i (y : β i), Decidable (y ≠ 0)]
(c : Con M) (h : (i : ι) → β i → M) (h' : (i : ι) → β i → M)
{f g : Π₀ i, β i} (hf : ∀ i, c (h i 0) 1) (hf' : ∀ i, c (h' i 0) 1)
(H : ∀ i, c (h i (f i)) (h' i (g i))) :
c (f.prod h) (g.prod h') := by
refine Quotient.exact (show c.mk' _ = c.mk' _ from ?_)
rw [map_dfinsuppProd, map_dfinsuppProd]
exact DFinsupp.prod_congr_of_eq_on_union
(fun _ _ => Quotient.sound <| H _)
(fun _ _ => Quotient.sound <| hf _) (fun _ _ => Quotient.sound <| hf' _)
@[to_additive (attr := simp, norm_cast)]
protected theorem coe_dfinsuppProd {ι : Type*} {β : ι → Type*} {M : Type*}
[DecidableEq ι] [CommMonoid M] [∀ i, Zero (β i)] [∀ i (y : β i), Decidable (y ≠ 0)]
(c : Con M) (h : (i : ι) → β i → M) (f : Π₀ i, β i) :
(↑(f.prod h) : c.Quotient) = f.prod fun i b => (h i b : c.Quotient) :=
map_dfinsuppProd c.mk' f h
protected theorem _root_.AddCon.dfinsuppSumAddHom {ι : Type*} {β : ι → Type*} {M : Type*}
[DecidableEq ι] [AddCommMonoid M] [∀ i, AddCommMonoid (β i)]
(c : AddCon M) (h : (i : ι) → β i →+ M) (h' : (i : ι) → β i →+ M) {f g : Π₀ i, β i}
(H : ∀ i, c (h i (f i)) (h' i (g i))) :
c (f.sumAddHom h) (g.sumAddHom h') := by
classical
simp_rw [DFinsupp.sumAddHom_apply]
exact c.dfinsuppSum _ _
(bot_le (a := c) <| map_zero <| h ·) (bot_le (a := c) <| map_zero <| h' ·) H
@[simp, norm_cast]
protected theorem _root_.AddCon.coe_dfinsuppSumAddHom {ι : Type*} {β : ι → Type*} {M : Type*}
[DecidableEq ι] [AddCommMonoid M] [∀ i, AddCommMonoid (β i)]
(c : AddCon M) (h : (i : ι) → β i →+ M) (f : Π₀ i, β i) :
(↑(f.sumAddHom h) : c.Quotient) = f.sumAddHom fun i => (AddCon.mk' c).comp (h i) := by
classical
simp_rw [← AddCon.coe_mk', DFinsupp.sumAddHom_apply, map_dfinsuppSum]
rfl
end Con
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland