Mathlib.Algebra.GroupWithZero.Hom
60 declarations. Mathlib docs · Source
Monoid with zero and group with zero homomorphisms
This file defines homomorphisms of monoids with zero.
We also define coercion to a function, and usual operations: composition, identity homomorphism, pointwise multiplication and pointwise inversion.
Notation
→*₀:MonoidWithZeroHom, the type of bundledMonoidWithZerohoms. Also use forGroupWithZerohoms.
Implementation notes
Implicit {} brackets are often used instead of type class [] brackets. This is done when the
instances can be inferred because they are implicit arguments to the type MonoidHom. When they
can be inferred from the type it is faster to use this method than to use type class inference.
Tags
monoid homomorphism
Bundled morphisms can be down-cast to weaker bundlings
theorem MonoidWithZeroHom.mk.injEq E0 #
∀ {α : Type u_7} {β : Type u_8} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (toZeroHom : ZeroHom α β)
(map_one' : toZeroHom.toFun 1 = 1)
(map_mul' : ∀ (x y : α), toZeroHom.toFun (x * y) = toZeroHom.toFun x * toZeroHom.toFun y) (toZeroHom_1 : ZeroHom α β)
(map_one'_1 : toZeroHom_1.toFun 1 = 1)
(map_mul'_1 : ∀ (x y : α), toZeroHom_1.toFun (x * y) = toZeroHom_1.toFun x * toZeroHom_1.toFun y),
({ toZeroHom := toZeroHom, map_one' := map_one', map_mul' := map_mul' } =
{ toZeroHom := toZeroHom_1, map_one' := map_one'_1, map_mul' := map_mul'_1 }) =
(toZeroHom = toZeroHom_1)
def MonoidWithZeroHom.ctorIdx E1 #
{α : Type u_7} → {β : Type u_8} → {inst : MulZeroOneClass α} → {inst_1 : MulZeroOneClass β} → (α →*₀ β) → ℕ
theorem MonoidWithZeroHom.mk.inj E1 #
∀ {α : Type u_7} {β : Type u_8} {inst : MulZeroOneClass α} {inst_1 : MulZeroOneClass β} {toZeroHom : ZeroHom α β}
{map_one' : toZeroHom.toFun 1 = 1}
{map_mul' : ∀ (x y : α), toZeroHom.toFun (x * y) = toZeroHom.toFun x * toZeroHom.toFun y} {toZeroHom_1 : ZeroHom α β}
{map_one'_1 : toZeroHom_1.toFun 1 = 1}
{map_mul'_1 : ∀ (x y : α), toZeroHom_1.toFun (x * y) = toZeroHom_1.toFun x * toZeroHom_1.toFun y},
{ toZeroHom := toZeroHom, map_one' := map_one', map_mul' := map_mul' } =
{ toZeroHom := toZeroHom_1, map_one' := map_one'_1, map_mul' := map_mul'_1 } →
toZeroHom = toZeroHom_1
theorem NeZero.of_map E1 #
∀ {F : Type u_1} {α : Type u_2} {β : Type u_3} [inst : Zero α] [inst_1 : Zero β] [inst_2 : FunLike F α β]
[ZeroHomClass F α β] {a : α} (f : F) [neZero : NeZero (f a)], NeZero a
theorem NeZero.of_injective E1 #
∀ {F : Type u_1} {α : Type u_2} {β : Type u_3} [inst : Zero α] [inst_1 : Zero β] [inst_2 : FunLike F α β]
[ZeroHomClass F α β] {a : α} {f : F}, Function.Injective ⇑f → ∀ [NeZero a], NeZero (f a)
class MonoidWithZeroHomClass E1 #
(F : Type u_7) →
(α : outParam (Type u_8)) →
(β : outParam (Type u_9)) → [MulZeroOneClass α] → [MulZeroOneClass β] → [FunLike F α β] → Prop
MonoidWithZeroHomClass F α β states that F is a type of
MonoidWithZero-preserving homomorphisms.
You should also extend this typeclass when you extend MonoidWithZeroHom.
instance MonoidWithZeroHomClass.toMonoidHomClass E0 #
∀ {F : Type u_7} {α : outParam (Type u_8)} {β : outParam (Type u_9)} {inst : MulZeroOneClass α}
{inst_1 : MulZeroOneClass β} {inst_2 : FunLike F α β} [self : MonoidWithZeroHomClass F α β], MonoidHomClass F α β
ctor MonoidWithZeroHomClass.mk E0 #
∀ {F : Type u_7} {α : outParam (Type u_8)} {β : outParam (Type u_9)} [inst : MulZeroOneClass α]
[inst_1 : MulZeroOneClass β] [inst_2 : FunLike F α β] [toMonoidHomClass : MonoidHomClass F α β]
[toZeroHomClass : ZeroHomClass F α β], MonoidWithZeroHomClass F α β
instance MonoidWithZeroHomClass.toZeroHomClass E0 #
∀ {F : Type u_7} {α : outParam (Type u_8)} {β : outParam (Type u_9)} {inst : MulZeroOneClass α}
{inst_1 : MulZeroOneClass β} {inst_2 : FunLike F α β} [self : MonoidWithZeroHomClass F α β], ZeroHomClass F α β
structure MonoidWithZeroHom E1 #
(α : Type u_7) → (β : Type u_8) → [MulZeroOneClass α] → [MulZeroOneClass β] → Type (max u_7 u_8)
α →*₀ β is the type of functions α → β that preserve
the MonoidWithZero structure.
MonoidWithZeroHom is also used for group homomorphisms.
When possible, instead of parametrizing results over (f : α →*₀ β),
you should parametrize over (F : Type*) [MonoidWithZeroHomClass F α β] (f : F).
When you extend this structure, make sure to extend MonoidWithZeroHomClass.
abbrev MonoidWithZeroHom.toZeroHom E1 #
{α : Type u_7} → {β : Type u_8} → [inst : MulZeroOneClass α] → [inst_1 : MulZeroOneClass β] → (α →*₀ β) → ZeroHom α β
abbrev MonoidWithZeroHom.toMonoidHom E1 #
{α : Type u_7} → {β : Type u_8} → [inst : MulZeroOneClass α] → [inst_1 : MulZeroOneClass β] → (α →*₀ β) → α →* β
ctor MonoidWithZeroHom.mk E0 #
{α : Type u_7} →
{β : Type u_8} →
[inst : MulZeroOneClass α] →
[inst_1 : MulZeroOneClass β] →
(toZeroHom : ZeroHom α β) →
toZeroHom.toFun 1 = 1 →
(∀ (x y : α), toZeroHom.toFun (x * y) = toZeroHom.toFun x * toZeroHom.toFun y) → α →*₀ β
theorem MonoidWithZeroHom.map_one' E0 #
∀ {α : Type u_7} {β : Type u_8} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (self : α →*₀ β),
(↑self).toFun 1 = 1
The proposition that the function preserves 1
theorem MonoidWithZeroHom.map_mul' E0 #
∀ {α : Type u_7} {β : Type u_8} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (self : α →*₀ β) (x y : α),
(↑self).toFun (x * y) = (↑self).toFun x * (↑self).toFun y
The proposition that the function preserves multiplication
def «term_→*₀_» E1 #
Lean.TrailingParserDescr
α →*₀ β denotes the type of zero-preserving monoid homomorphisms from α to β.
def MonoidWithZeroHom.ofClass E1 #
{F : Type u_1} →
{α : Type u_2} →
{β : Type u_3} →
[inst : MulZeroOneClass α] →
[inst_1 : MulZeroOneClass β] → [inst_2 : FunLike F α β] → [MonoidWithZeroHomClass F α β] → F → α →*₀ β
Turn an element of a type F satisfying MonoidWithZeroHomClass F α β into an actual
MonoidWithZeroHom.
instance MonoidWithZeroHom.funLike E0 #
{α : Type u_2} → {β : Type u_3} → [inst : MulZeroOneClass α] → [inst_1 : MulZeroOneClass β] → FunLike (α →*₀ β) α β
instance MonoidWithZeroHom.monoidWithZeroHomClass E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β],
MonoidWithZeroHomClass (α →*₀ β) α β
instance MonoidWithZeroHom.instSubsingleton E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] [Subsingleton α],
Subsingleton (α →*₀ β)
theorem MonoidWithZeroHom.coe_ofClass E0 #
∀ {F : Type u_1} {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β]
[inst_2 : FunLike F α β] [inst_3 : MonoidWithZeroHomClass F α β] (f : F), ⇑(MonoidWithZeroHom.ofClass f) = ⇑f
instance MonoidWithZeroHom.coeToMonoidHom E0 #
{α : Type u_2} → {β : Type u_3} → [inst : MulZeroOneClass α] → [inst_1 : MulZeroOneClass β] → Coe (α →*₀ β) (α →* β)
MonoidWithZeroHom down-cast to a MonoidHom, forgetting the 0-preserving property.
instance MonoidWithZeroHom.coeToZeroHom E0 #
{α : Type u_2} →
{β : Type u_3} → [inst : MulZeroOneClass α] → [inst_1 : MulZeroOneClass β] → Coe (α →*₀ β) (ZeroHom α β)
MonoidWithZeroHom down-cast to a ZeroHom, forgetting the monoidal property.
theorem MonoidWithZeroHom.coe_mk E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : ZeroHom α β)
(h1 : f.toFun 1 = 1) (hmul : ∀ (x y : α), f.toFun (x * y) = f.toFun x * f.toFun y),
⇑{ toZeroHom := f, map_one' := h1, map_mul' := hmul } = ⇑f
theorem MonoidWithZeroHom.toZeroHom_coe E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β), ⇑↑f = ⇑f
theorem MonoidWithZeroHom.toMonoidHom_coe E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β), (↑↑f).toFun = ⇑f
theorem MonoidWithZeroHom.ext E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] ⦃f g : α →*₀ β⦄,
(∀ (x : α), f x = g x) → f = g
theorem MonoidWithZeroHom.ext_iff E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] {f g : α →*₀ β},
f = g ↔ ∀ (x : α), f x = g x
theorem MonoidWithZeroHom.mk_coe E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β)
(h1 : (↑f).toFun 1 = 1) (hmul : ∀ (x y : α), (↑f).toFun (x * y) = (↑f).toFun x * (↑f).toFun y),
{ toZeroHom := ↑f, map_one' := h1, map_mul' := hmul } = f
def MonoidWithZeroHom.copy E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : MulZeroOneClass α] → [inst_1 : MulZeroOneClass β] → (f : α →*₀ β) → (f' : α → β) → f' = ⇑f → α →* β
Copy of a MonoidHom with a new toFun equal to the old one. Useful to fix
definitional equalities.
theorem MonoidWithZeroHom.coe_copy E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β) (f' : α → β)
(h : f' = ⇑f), ⇑(f.copy f' h) = f'
theorem MonoidWithZeroHom.copy_eq E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β) (f' : α → β)
(h : f' = ⇑f), f.copy f' h = ↑f
theorem MonoidWithZeroHom.map_one E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β), f 1 = 1
theorem MonoidWithZeroHom.map_zero E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β), f 0 = 0
theorem MonoidWithZeroHom.map_mul E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β) (a b : α),
f (a * b) = f a * f b
theorem MonoidWithZeroHom.map_ite_zero_one E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] {F : Type u_7}
[inst_2 : FunLike F α β] [MonoidWithZeroHomClass F α β] (f : F) (p : Prop) [inst_4 : Decidable p],
f (if p then 0 else 1) = if p then 0 else 1
theorem MonoidWithZeroHom.map_ite_one_zero E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] {F : Type u_7}
[inst_2 : FunLike F α β] [MonoidWithZeroHomClass F α β] (f : F) (p : Prop) [inst_4 : Decidable p],
f (if p then 1 else 0) = if p then 1 else 0
def MonoidWithZeroHom.id E1 #
(α : Type u_7) → [inst : MulZeroOneClass α] → α →*₀ α
The identity map from a MonoidWithZero to itself.
theorem MonoidWithZeroHom.id_apply E0 #
∀ (α : Type u_7) [inst : MulZeroOneClass α] (x : α), (MonoidWithZeroHom.id α) x = x
def MonoidWithZeroHom.comp E1 #
{α : Type u_2} →
{β : Type u_3} →
{γ : Type u_4} →
[inst : MulZeroOneClass α] →
[inst_1 : MulZeroOneClass β] → [inst_2 : MulZeroOneClass γ] → (β →*₀ γ) → (α →*₀ β) → α →*₀ γ
Composition of MonoidWithZeroHoms as a MonoidWithZeroHom.
theorem MonoidWithZeroHom.coe_comp E0 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β]
[inst_2 : MulZeroOneClass γ] (g : β →*₀ γ) (f : α →*₀ β), ⇑(g.comp f) = ⇑g ∘ ⇑f
theorem MonoidWithZeroHom.comp_apply E0 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β]
[inst_2 : MulZeroOneClass γ] (g : β →*₀ γ) (f : α →*₀ β) (x : α), (g.comp f) x = g (f x)
theorem MonoidWithZeroHom.comp_assoc E1 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} {δ : Type u_5} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β]
[inst_2 : MulZeroOneClass γ] [inst_3 : MulZeroOneClass δ] (f : α →*₀ β) (g : β →*₀ γ) (h : γ →*₀ δ),
(h.comp g).comp f = h.comp (g.comp f)
theorem MonoidWithZeroHom.cancel_right E1 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β]
[inst_2 : MulZeroOneClass γ] {g₁ g₂ : β →*₀ γ} {f : α →*₀ β},
Function.Surjective ⇑f → (g₁.comp f = g₂.comp f ↔ g₁ = g₂)
theorem MonoidWithZeroHom.cancel_left E1 #
∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β]
[inst_2 : MulZeroOneClass γ] {g : β →*₀ γ} {f₁ f₂ : α →*₀ β},
Function.Injective ⇑g → (g.comp f₁ = g.comp f₂ ↔ f₁ = f₂)
theorem MonoidWithZeroHom.toMonoidHom_injective E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β],
Function.Injective MonoidWithZeroHom.toMonoidHom
theorem MonoidWithZeroHom.toZeroHom_injective E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β],
Function.Injective MonoidWithZeroHom.toZeroHom
theorem MonoidWithZeroHom.comp_id E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β),
f.comp (MonoidWithZeroHom.id α) = f
theorem MonoidWithZeroHom.id_comp E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : MulZeroOneClass α] [inst_1 : MulZeroOneClass β] (f : α →*₀ β),
(MonoidWithZeroHom.id β).comp f = f
instance MonoidWithZeroHom.instInhabited E0 #
{α : Type u_2} → [inst : MulZeroOneClass α] → Inhabited (α →*₀ α)
instance MonoidWithZeroHom.instMul E0 #
{α : Type u_2} → [inst : MulZeroOneClass α] → {β : Type u_7} → [inst_1 : CommMonoidWithZero β] → Mul (α →*₀ β)
Given two monoid with zero morphisms f, g to a commutative monoid with zero, f * g is the
monoid with zero morphism sending x to f x * g x.
instance MonoidWithZeroHom.one E0 #
(M₀ : Type u_7) →
(N₀ : Type u_8) →
[inst : MulZeroOneClass M₀] →
[inst_1 : MulZeroOneClass N₀] →
[DecidablePred fun x ↦ x = 0] → [Nontrivial M₀] → [NoZeroDivisors M₀] → One (M₀ →*₀ N₀)
The trivial homomorphism between monoids with zero, sending 0 to 0 and all other elements to 1.
theorem MonoidWithZeroHom.one_apply_def E0 #
∀ {M₀ : Type u_7} {N₀ : Type u_8} [inst : MulZeroOneClass M₀] [inst_1 : MulZeroOneClass N₀]
[inst_2 : DecidablePred fun x ↦ x = 0] [inst_3 : Nontrivial M₀] [inst_4 : NoZeroDivisors M₀] (x : M₀),
1 x = if x = 0 then 0 else 1
theorem MonoidWithZeroHom.one_apply_zero E0 #
∀ {M₀ : Type u_7} {N₀ : Type u_8} [inst : MulZeroOneClass M₀] [inst_1 : MulZeroOneClass N₀]
[inst_2 : DecidablePred fun x ↦ x = 0] [inst_3 : Nontrivial M₀] [inst_4 : NoZeroDivisors M₀], 1 0 = 0
theorem MonoidWithZeroHom.one_apply_of_ne_zero E1 #
∀ {M₀ : Type u_7} {N₀ : Type u_8} [inst : MulZeroOneClass M₀] [inst_1 : MulZeroOneClass N₀]
[inst_2 : DecidablePred fun x ↦ x = 0] [inst_3 : Nontrivial M₀] [inst_4 : NoZeroDivisors M₀] {x : M₀}, x ≠ 0 → 1 x = 1
theorem MonoidWithZeroHom.one_apply_eq_zero_iff E0 #
∀ {M₀ : Type u_7} {N₀ : Type u_8} [inst : MulZeroOneClass M₀] [inst_1 : MulZeroOneClass N₀]
[inst_2 : DecidablePred fun x ↦ x = 0] [inst_3 : Nontrivial M₀] [inst_4 : NoZeroDivisors M₀] [Nontrivial N₀] {x : M₀},
1 x = 0 ↔ x = 0
theorem MonoidWithZeroHom.one_apply_eq_one_iff E0 #
∀ {M₀ : Type u_7} {N₀ : Type u_8} [inst : MulZeroOneClass M₀] [inst_1 : MulZeroOneClass N₀]
[inst_2 : DecidablePred fun x ↦ x = 0] [inst_3 : Nontrivial M₀] [inst_4 : NoZeroDivisors M₀] [Nontrivial N₀] {x : M₀},
1 x = 1 ↔ x ≠ 0
def powMonoidWithZeroHom E1 #
{M₀ : Type u_6} → [inst : CommMonoidWithZero M₀] → {n : ℕ} → n ≠ 0 → M₀ →*₀ M₀
We define x ↦ x^n (for positive n : ℕ) as a MonoidWithZeroHom
theorem coe_powMonoidWithZeroHom E0 #
∀ {M₀ : Type u_6} [inst : CommMonoidWithZero M₀] {n : ℕ} (hn : n ≠ 0), ⇑(powMonoidWithZeroHom hn) = fun x ↦ x ^ n
theorem powMonoidWithZeroHom_apply E0 #
∀ {M₀ : Type u_6} [inst : CommMonoidWithZero M₀] {n : ℕ} (hn : n ≠ 0) (a : M₀), (powMonoidWithZeroHom hn) a = a ^ n