File: Mathlib/Algebra/GroupWithZero/Hom.lean

full_name: NeZero.of_map
code: lemma of_map (f : F) [neZero : NeZero (f a)] : NeZero a 
goal: NeZero a

full_name: NeZero.of_injective
code: lemma of_injective {f : F} (hf : Injective f) [NeZero a] : NeZero (f a) 
goal: NeZero (f a)

full_name: MonoidWithZeroHomClass
code: /-- `MonoidWithZeroHomClass F α β` states that `F` is a type of
`MonoidWithZero`-preserving homomorphisms.

You should also extend this typeclass when you extend `MonoidWithZeroHom`. -/
class MonoidWithZeroHomClass (F : Type*) (α β : outParam Type*) [MulZeroOneClass α]
  [MulZeroOneClass β] [FunLike F α β] extends MonoidHomClass F α β, ZeroHomClass F α β : Prop
goal: Prop

full_name: MonoidWithZeroHom
code: /-- `α →*₀ β` 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`. -/
structure MonoidWithZeroHom (α β : Type*) [MulZeroOneClass α] [MulZeroOneClass β]
  extends ZeroHom α β, MonoidHom α β
goal: Type (max u_7 u_8)

full_name: «_aux_Mathlib_Algebra_GroupWithZero_Hom___macroRules_term_→*₀__1»
code: /-- `α →*₀ β` denotes the type of zero-preserving monoid homomorphisms from `α` to `β`. -/
infixr:25 " →*₀ " => MonoidWithZeroHom
goal: Lean.Macro

full_name: _aux_Mathlib_Algebra_GroupWithZero_Hom___unexpand_MonoidWithZeroHom_1
code: /-- `α →*₀ β` denotes the type of zero-preserving monoid homomorphisms from `α` to `β`. -/
infixr:25 " →*₀ " => MonoidWithZeroHom
goal: Lean.PrettyPrinter.Unexpander

full_name: MonoidWithZeroHomClass.toMonoidWithZeroHom
code: /-- Turn an element of a type `F` satisfying `MonoidWithZeroHomClass F α β` into an actual
`MonoidWithZeroHom`. This is declared as the default coercion from `F` to `α →*₀ β`. -/
@[coe]
def MonoidWithZeroHomClass.toMonoidWithZeroHom [FunLike F α β] [MonoidWithZeroHomClass F α β]
    (f : F) : α →*₀ β 
goal: α →*₀ β

full_name: instCoeTCMonoidWithZeroHomOfMonoidWithZeroHomClass
code: /-- Any type satisfying `MonoidWithZeroHomClass` can be cast into `MonoidWithZeroHom` via
`MonoidWithZeroHomClass.toMonoidWithZeroHom`. -/
instance [FunLike F α β] [MonoidWithZeroHomClass F α β] : CoeTC F (α →*₀ β) 
goal: CoeTC F (α →*₀ β)

full_name: MonoidWithZeroHom.funLike
code: instance funLike : FunLike (α →*₀ β) α β 
goal: FunLike (α →*₀ β) α β

full_name: MonoidWithZeroHom.monoidWithZeroHomClass
code: instance monoidWithZeroHomClass : MonoidWithZeroHomClass (α →*₀ β) α β 
goal: MonoidWithZeroHomClass (α →*₀ β) α β

full_name: MonoidWithZeroHom.instSubsingleton
code: instance [Subsingleton α] : Subsingleton (α →*₀ β) 
goal: Subsingleton (α →*₀ β)

full_name: MonoidWithZeroHom.coe_coe
code: @[simp] lemma coe_coe [MonoidWithZeroHomClass F α β] (f : F) : ((f : α →*₀ β) : α → β) = f 
goal: ⇑↑f = ⇑f

full_name: MonoidWithZeroHom.coeToMonoidHom
code: /-- `MonoidWithZeroHom` down-cast to a `MonoidHom`, forgetting the 0-preserving property. -/
instance coeToMonoidHom : Coe (α →*₀ β) (α →* β) 
goal: Coe (α →*₀ β) (α →* β)

full_name: MonoidWithZeroHom.coeToZeroHom
code: /-- `MonoidWithZeroHom` down-cast to a `ZeroHom`, forgetting the monoidal property. -/
instance coeToZeroHom :
  Coe (α →*₀ β) (ZeroHom α β) 
goal: Coe (α →*₀ β) (ZeroHom α β)

full_name: MonoidWithZeroHom.coe_mk
code: @[simp] lemma coe_mk (f h1 hmul) : (mk f h1 hmul : α → β) = (f : α → β) 
goal: ⇑{ toZeroHom := f, map_one' := h1, map_mul' := hmul } = ⇑f

full_name: MonoidWithZeroHom.toZeroHom_coe
code: @[simp] lemma toZeroHom_coe (f : α →*₀ β) : (f.toZeroHom : α → β) = f 
goal: ⇑↑f = ⇑f

full_name: MonoidWithZeroHom.toMonoidHom_coe
code: lemma toMonoidHom_coe (f : α →*₀ β) : f.toMonoidHom.toFun = f 
goal: (↑↑f).toFun = ⇑f

full_name: MonoidWithZeroHom.ext
code: @[ext] lemma ext ⦃f g : α →*₀ β⦄ (h : ∀ x, f x = g x) : f = g 
goal: f = g

full_name: MonoidWithZeroHom.mk_coe
code: @[simp] lemma mk_coe (f : α →*₀ β) (h1 hmul) : mk f h1 hmul = f 
goal: { toZeroHom := ↑f, map_one' := h1, map_mul' := hmul } = f

full_name: MonoidWithZeroHom.copy
code: /-- Copy of a `MonoidHom` with a new `toFun` equal to the old one. Useful to fix
definitional equalities. -/
protected def copy (f : α →*₀ β) (f' : α → β) (h : f' = f) : α →* β 
goal: α →* β

full_name: MonoidWithZeroHom.coe_copy
code: @[simp]
lemma coe_copy {_ : MulZeroOneClass α} {_ : MulZeroOneClass β} (f : α →*₀ β) (f' : α → β) (h) :
    (f.copy f' h) = f' 
goal: ∀ {x : MulZeroOneClass α} {x_1 : MulZeroOneClass β} (f : α →*₀ β) (f' : α → β) (h : f' = ⇑f), ⇑(f.copy f' h) = f'

full_name: MonoidWithZeroHom.copy_eq
code: lemma copy_eq {_ : MulZeroOneClass α} {_ : MulZeroOneClass β} (f : α →*₀ β) (f' : α → β) (h) :
    f.copy f' h = f 
goal: ∀ {x : MulZeroOneClass α} {x_1 : MulZeroOneClass β} (f : α →*₀ β) (f' : α → β) (h : f' = ⇑f), f.copy f' h = ↑f

full_name: MonoidWithZeroHom.map_one
code: protected lemma map_one (f : α →*₀ β) : f 1 = 1 
goal: f 1 = 1

full_name: MonoidWithZeroHom.map_zero
code: protected lemma map_zero (f : α →*₀ β) : f 0 = 0 
goal: f 0 = 0

full_name: MonoidWithZeroHom.map_mul
code: protected lemma map_mul (f : α →*₀ β) (a b : α) : f (a * b) = f a * f b 
goal: f (a * b) = f a * f b

full_name: MonoidWithZeroHom.id_apply
code: /-- The identity map from a `MonoidWithZero` to itself. -/
@[simps]
def id (α : Type*) [MulZeroOneClass α] : α →*₀ α 
goal: (MonoidWithZeroHom.id α) x = x

full_name: MonoidWithZeroHom.id
code: /-- The identity map from a `MonoidWithZero` to itself. -/
@[simps]
def id (α : Type*) [MulZeroOneClass α] : α →*₀ α 
goal: α →*₀ α

full_name: MonoidWithZeroHom.comp
code: /-- Composition of `MonoidWithZeroHom`s as a `MonoidWithZeroHom`. -/
def comp (hnp : β →*₀ γ) (hmn : α →*₀ β) : α →*₀ γ 
goal: α →*₀ γ

full_name: MonoidWithZeroHom.coe_comp
code: @[simp] lemma coe_comp (g : β →*₀ γ) (f : α →*₀ β) : ↑(g.comp f) = g ∘ f 
goal: ⇑(g.comp f) = ⇑g ∘ ⇑f

full_name: MonoidWithZeroHom.comp_apply
code: lemma comp_apply (g : β →*₀ γ) (f : α →*₀ β) (x : α) : g.comp f x = g (f x) 
goal: (g.comp f) x = g (f x)

full_name: MonoidWithZeroHom.comp_assoc
code: lemma comp_assoc (f : α →*₀ β) (g : β →*₀ γ) (h : γ →*₀ δ) :
    (h.comp g).comp f = h.comp (g.comp f) 
goal: (h.comp g).comp f = h.comp (g.comp f)

full_name: MonoidWithZeroHom.cancel_right
code: lemma cancel_right {g₁ g₂ : β →*₀ γ} {f : α →*₀ β} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂ 
goal: g₁.comp f = g₂.comp f ↔ g₁ = g₂

full_name: MonoidWithZeroHom.cancel_left
code: lemma cancel_left {g : β →*₀ γ} {f₁ f₂ : α →*₀ β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ 
goal: g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

full_name: MonoidWithZeroHom.toMonoidHom_injective
code: lemma toMonoidHom_injective : Injective (toMonoidHom : (α →*₀ β) → α →* β) 
goal: Function.Injective MonoidWithZeroHom.toMonoidHom

full_name: MonoidWithZeroHom.toZeroHom_injective
code: lemma toZeroHom_injective : Injective (toZeroHom : (α →*₀ β) → ZeroHom α β) 
goal: Function.Injective MonoidWithZeroHom.toZeroHom

full_name: MonoidWithZeroHom.comp_id
code: @[simp] lemma comp_id (f : α →*₀ β) : f.comp (id α) = f 
goal: f.comp (MonoidWithZeroHom.id α) = f

full_name: MonoidWithZeroHom.id_comp
code: @[simp] lemma id_comp (f : α →*₀ β) : (id β).comp f = f 
goal: (MonoidWithZeroHom.id β).comp f = f

full_name: MonoidWithZeroHom.instInhabited
code: instance : Inhabited (α →*₀ α) 
goal: Inhabited (α →*₀ α)

full_name: MonoidWithZeroHom.instMul
code: /-- 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 {β} [CommMonoidWithZero β] : Mul (α →*₀ β) 
goal: Mul (α →*₀ β)

full_name: powMonoidWithZeroHom
code: /-- We define `x ↦ x^n` (for positive `n : ℕ`) as a `MonoidWithZeroHom` -/
def powMonoidWithZeroHom : M₀ →*₀ M₀ 
goal: M₀ →*₀ M₀

full_name: coe_powMonoidWithZeroHom
code: @[simp] lemma coe_powMonoidWithZeroHom : (powMonoidWithZeroHom hn : M₀ → M₀) = fun x ↦ x ^ n 
goal: ⇑(powMonoidWithZeroHom hn) = fun x => x ^ n

full_name: powMonoidWithZeroHom_apply
code: @[simp] lemma powMonoidWithZeroHom_apply (a : M₀) : powMonoidWithZeroHom hn a = a ^ n 
goal: (powMonoidWithZeroHom hn) a = a ^ n

full_name: MulEquivClass.toZeroHomClass
code: instance (priority := 100) toZeroHomClass [MulZeroClass α] [MulZeroClass β] [MulEquivClass F α β] :
    ZeroHomClass F α β 
goal: ZeroHomClass F α β

full_name: MulEquivClass.toMonoidWithZeroHomClass
code: instance (priority := 100) toMonoidWithZeroHomClass
    [MulZeroOneClass α] [MulZeroOneClass β] [MulEquivClass F α β] :
    MonoidWithZeroHomClass F α β 
goal: MonoidWithZeroHomClass F α β