File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

full_name: MonoidAlgebra
code: /-- The monoid algebra over a semiring `k` generated by the monoid `G`.
It is the type of finite formal `k`-linear combinations of terms of `G`,
endowed with the convolution product.
-/
def MonoidAlgebra : Type max u₁ u₂ 
goal: Type (max u₁ u₂)

full_name: MonoidAlgebra.inhabited
code: instance MonoidAlgebra.inhabited : Inhabited (MonoidAlgebra k G) 
goal: Inhabited (MonoidAlgebra k G)

full_name: MonoidAlgebra.addCommMonoid
code: instance MonoidAlgebra.addCommMonoid : AddCommMonoid (MonoidAlgebra k G) 
goal: AddCommMonoid (MonoidAlgebra k G)

full_name: MonoidAlgebra.instIsCancelAdd
code: instance MonoidAlgebra.instIsCancelAdd [IsCancelAdd k] : IsCancelAdd (MonoidAlgebra k G) 
goal: IsCancelAdd (MonoidAlgebra k G)

full_name: MonoidAlgebra.coeFun
code: instance MonoidAlgebra.coeFun : CoeFun (MonoidAlgebra k G) fun _ => G → k 
goal: CoeFun (MonoidAlgebra k G) fun x => G → k

full_name: MonoidAlgebra.single
code: abbrev single (a : G) (b : k) : MonoidAlgebra k G 
goal: MonoidAlgebra k G

full_name: MonoidAlgebra.single_zero
code: theorem single_zero (a : G) : (single a 0 : MonoidAlgebra k G) = 0 
goal: MonoidAlgebra.single a 0 = 0

full_name: MonoidAlgebra.single_add
code: theorem single_add (a : G) (b₁ b₂ : k) : single a (b₁ + b₂) = single a b₁ + single a b₂ 
goal: MonoidAlgebra.single a (b₁ + b₂) = MonoidAlgebra.single a b₁ + MonoidAlgebra.single a b₂

full_name: MonoidAlgebra.sum_single_index
code: @[simp]
theorem sum_single_index {N} [AddCommMonoid N] {a : G} {b : k} {h : G → k → N}
    (h_zero : h a 0 = 0) :
    (single a b).sum h = h a b 
goal: Finsupp.sum (MonoidAlgebra.single a b) h = h a b

full_name: MonoidAlgebra.sum_single
code: @[simp]
theorem sum_single (f : MonoidAlgebra k G) : f.sum single = f 
goal: Finsupp.sum f MonoidAlgebra.single = f

full_name: MonoidAlgebra.single_apply
code: theorem single_apply {a a' : G} {b : k} [Decidable (a = a')] :
    single a b a' = if a = a' then b else 0 
goal: (MonoidAlgebra.single a b) a' = if a = a' then b else 0

full_name: MonoidAlgebra.single_eq_zero
code: @[simp]
theorem single_eq_zero {a : G} {b : k} : single a b = 0 ↔ b = 0 
goal: MonoidAlgebra.single a b = 0 ↔ b = 0

full_name: MonoidAlgebra.mapDomain
code: abbrev mapDomain {G' : Type*} (f : G → G') (v : MonoidAlgebra k G) : MonoidAlgebra k G' 
goal: MonoidAlgebra k G'

full_name: MonoidAlgebra.mapDomain_sum
code: theorem mapDomain_sum {k' G' : Type*} [Semiring k'] {f : G → G'} {s : MonoidAlgebra k' G}
    {v : G → k' → MonoidAlgebra k G} :
    mapDomain f (s.sum v) = s.sum fun a b => mapDomain f (v a b) 
goal: MonoidAlgebra.mapDomain f (Finsupp.sum s v) = Finsupp.sum s fun a b => MonoidAlgebra.mapDomain f (v a b)

full_name: MonoidAlgebra.liftNC
code: /-- A non-commutative version of `MonoidAlgebra.lift`: given an additive homomorphism `f : k →+ R`
and a homomorphism `g : G → R`, returns the additive homomorphism from
`MonoidAlgebra k G` such that `liftNC f g (single a b) = f b * g a`. If `f` is a ring homomorphism
and the range of either `f` or `g` is in center of `R`, then the result is a ring homomorphism.  If
`R` is a `k`-algebra and `f = algebraMap k R`, then the result is an algebra homomorphism called
`MonoidAlgebra.lift`. -/
def liftNC (f : k →+ R) (g : G → R) : MonoidAlgebra k G →+ R 
goal: MonoidAlgebra k G →+ R

full_name: MonoidAlgebra.liftNC_single
code: @[simp]
theorem liftNC_single (f : k →+ R) (g : G → R) (a : G) (b : k) :
    liftNC f g (single a b) = f b * g a 
goal: (MonoidAlgebra.liftNC f g) (MonoidAlgebra.single a b) = f b * g a

full_name: MonoidAlgebra.mul'
code: /-- The multiplication in a monoid algebra. We make it irreducible so that Lean doesn't unfold
it trying to unify two things that are different. -/
@[irreducible] def mul' (f g : MonoidAlgebra k G) : MonoidAlgebra k G 
goal: MonoidAlgebra k G

full_name: MonoidAlgebra.instMul
code: /-- The product of `f g : MonoidAlgebra k G` is the finitely supported function
  whose value at `a` is the sum of `f x * g y` over all pairs `x, y`
  such that `x * y = a`. (Think of the group ring of a group.) -/
instance instMul : Mul (MonoidAlgebra k G) 
goal: Mul (MonoidAlgebra k G)

full_name: MonoidAlgebra.mul_def
code: theorem mul_def {f g : MonoidAlgebra k G} :
    f * g = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂) 
goal: f * g = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => MonoidAlgebra.single (a₁ * a₂) (b₁ * b₂)

full_name: MonoidAlgebra.nonUnitalNonAssocSemiring
code: instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring (MonoidAlgebra k G) 
goal: NonUnitalNonAssocSemiring (MonoidAlgebra k G)

full_name: MonoidAlgebra.liftNC_mul
code: theorem liftNC_mul {g_hom : Type*} [FunLike g_hom G R] [MulHomClass g_hom G R]
    (f : k →+* R) (g : g_hom) (a b : MonoidAlgebra k G)
    (h_comm : ∀ {x y}, y ∈ a.support → Commute (f (b x)) (g y)) :
    liftNC (f : k →+ R) g (a * b) = liftNC (f : k →+ R) g a * liftNC (f : k →+ R) g b 
goal: (MonoidAlgebra.liftNC ↑f ⇑g) (a * b) = (MonoidAlgebra.liftNC ↑f ⇑g) a * (MonoidAlgebra.liftNC ↑f ⇑g) b

full_name: MonoidAlgebra.nonUnitalSemiring
code: instance nonUnitalSemiring : NonUnitalSemiring (MonoidAlgebra k G) 
goal: NonUnitalSemiring (MonoidAlgebra k G)

full_name: MonoidAlgebra.one
code: /-- The unit of the multiplication is `single 1 1`, i.e. the function
  that is `1` at `1` and zero elsewhere. -/
instance one : One (MonoidAlgebra k G) 
goal: One (MonoidAlgebra k G)

full_name: MonoidAlgebra.one_def
code: theorem one_def : (1 : MonoidAlgebra k G) = single 1 1 
goal: 1 = MonoidAlgebra.single 1 1

full_name: MonoidAlgebra.liftNC_one
code: @[simp]
theorem liftNC_one {g_hom : Type*} [FunLike g_hom G R] [OneHomClass g_hom G R]
    (f : k →+* R) (g : g_hom) :
    liftNC (f : k →+ R) g 1 = 1 
goal: (MonoidAlgebra.liftNC ↑f ⇑g) 1 = 1

full_name: MonoidAlgebra.nonAssocSemiring
code: instance nonAssocSemiring : NonAssocSemiring (MonoidAlgebra k G) 
goal: NonAssocSemiring (MonoidAlgebra k G)

full_name: MonoidAlgebra.natCast_def
code: theorem natCast_def (n : ℕ) : (n : MonoidAlgebra k G) = single (1 : G) (n : k) 
goal: ↑n = MonoidAlgebra.single 1 ↑n

full_name: MonoidAlgebra.semiring
code: instance semiring : Semiring (MonoidAlgebra k G) 
goal: Semiring (MonoidAlgebra k G)

full_name: MonoidAlgebra.liftNCRingHom
code: /-- `liftNC` as a `RingHom`, for when `f x` and `g y` commute -/
def liftNCRingHom (f : k →+* R) (g : G →* R) (h_comm : ∀ x y, Commute (f x) (g y)) :
    MonoidAlgebra k G →+* R 
goal: MonoidAlgebra k G →+* R

full_name: MonoidAlgebra.nonUnitalCommSemiring
code: instance nonUnitalCommSemiring [CommSemiring k] [CommSemigroup G] :
    NonUnitalCommSemiring (MonoidAlgebra k G) 
goal: NonUnitalCommSemiring (MonoidAlgebra k G)

full_name: MonoidAlgebra.nontrivial
code: instance nontrivial [Semiring k] [Nontrivial k] [Nonempty G] : Nontrivial (MonoidAlgebra k G) 
goal: Nontrivial (MonoidAlgebra k G)

full_name: MonoidAlgebra.commSemiring
code: instance commSemiring [CommSemiring k] [CommMonoid G] : CommSemiring (MonoidAlgebra k G) 
goal: CommSemiring (MonoidAlgebra k G)

full_name: MonoidAlgebra.unique
code: instance unique [Semiring k] [Subsingleton k] : Unique (MonoidAlgebra k G) 
goal: Unique (MonoidAlgebra k G)

full_name: MonoidAlgebra.addCommGroup
code: instance addCommGroup [Ring k] : AddCommGroup (MonoidAlgebra k G) 
goal: AddCommGroup (MonoidAlgebra k G)

full_name: MonoidAlgebra.nonUnitalNonAssocRing
code: instance nonUnitalNonAssocRing [Ring k] [Mul G] : NonUnitalNonAssocRing (MonoidAlgebra k G) 
goal: NonUnitalNonAssocRing (MonoidAlgebra k G)

full_name: MonoidAlgebra.nonUnitalRing
code: instance nonUnitalRing [Ring k] [Semigroup G] : NonUnitalRing (MonoidAlgebra k G) 
goal: NonUnitalRing (MonoidAlgebra k G)

full_name: MonoidAlgebra.nonAssocRing
code: instance nonAssocRing [Ring k] [MulOneClass G] : NonAssocRing (MonoidAlgebra k G) 
goal: NonAssocRing (MonoidAlgebra k G)

full_name: MonoidAlgebra.intCast_def
code: theorem intCast_def [Ring k] [MulOneClass G] (z : ℤ) :
    (z : MonoidAlgebra k G) = single (1 : G) (z : k) 
goal: ↑z = MonoidAlgebra.single 1 ↑z

full_name: MonoidAlgebra.ring
code: instance ring [Ring k] [Monoid G] : Ring (MonoidAlgebra k G) 
goal: Ring (MonoidAlgebra k G)

full_name: MonoidAlgebra.nonUnitalCommRing
code: instance nonUnitalCommRing [CommRing k] [CommSemigroup G] :
    NonUnitalCommRing (MonoidAlgebra k G) 
goal: NonUnitalCommRing (MonoidAlgebra k G)

full_name: MonoidAlgebra.commRing
code: instance commRing [CommRing k] [CommMonoid G] : CommRing (MonoidAlgebra k G) 
goal: CommRing (MonoidAlgebra k G)

full_name: MonoidAlgebra.smulZeroClass
code: instance smulZeroClass [Semiring k] [SMulZeroClass R k] : SMulZeroClass R (MonoidAlgebra k G) 
goal: SMulZeroClass R (MonoidAlgebra k G)

full_name: MonoidAlgebra.distribSMul
code: instance distribSMul [Semiring k] [DistribSMul R k] : DistribSMul R (MonoidAlgebra k G) 
goal: DistribSMul R (MonoidAlgebra k G)

full_name: MonoidAlgebra.distribMulAction
code: instance distribMulAction [Monoid R] [Semiring k] [DistribMulAction R k] :
    DistribMulAction R (MonoidAlgebra k G) 
goal: DistribMulAction R (MonoidAlgebra k G)

full_name: MonoidAlgebra.module
code: instance module [Semiring R] [Semiring k] [Module R k] : Module R (MonoidAlgebra k G) 
goal: Module R (MonoidAlgebra k G)

full_name: MonoidAlgebra.faithfulSMul
code: instance faithfulSMul [Semiring k] [SMulZeroClass R k] [FaithfulSMul R k] [Nonempty G] :
    FaithfulSMul R (MonoidAlgebra k G) 
goal: FaithfulSMul R (MonoidAlgebra k G)

full_name: MonoidAlgebra.isScalarTower
code: instance isScalarTower [Semiring k] [SMulZeroClass R k] [SMulZeroClass S k] [SMul R S]
    [IsScalarTower R S k] : IsScalarTower R S (MonoidAlgebra k G) 
goal: IsScalarTower R S (MonoidAlgebra k G)

full_name: MonoidAlgebra.smulCommClass
code: instance smulCommClass [Semiring k] [SMulZeroClass R k] [SMulZeroClass S k] [SMulCommClass R S k] :
    SMulCommClass R S (MonoidAlgebra k G) 
goal: SMulCommClass R S (MonoidAlgebra k G)

full_name: MonoidAlgebra.isCentralScalar
code: instance isCentralScalar [Semiring k] [SMulZeroClass R k] [SMulZeroClass Rᵐᵒᵖ k]
    [IsCentralScalar R k] : IsCentralScalar R (MonoidAlgebra k G) 
goal: IsCentralScalar R (MonoidAlgebra k G)

full_name: MonoidAlgebra.comapDistribMulActionSelf
code: /-- This is not an instance as it conflicts with `MonoidAlgebra.distribMulAction` when `G = kˣ`.
-/
def comapDistribMulActionSelf [Group G] [Semiring k] : DistribMulAction G (MonoidAlgebra k G) 
goal: DistribMulAction G (MonoidAlgebra k G)

full_name: MonoidAlgebra.mul_apply
code: theorem mul_apply [DecidableEq G] [Mul G] (f g : MonoidAlgebra k G) (x : G) :
    (f * g) x = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0 
goal: (f * g) x = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0

full_name: MonoidAlgebra.mul_apply_antidiagonal
code: theorem mul_apply_antidiagonal [Mul G] (f g : MonoidAlgebra k G) (x : G) (s : Finset (G × G))
    (hs : ∀ {p : G × G}, p ∈ s ↔ p.1 * p.2 = x) : (f * g) x = ∑ p ∈ s, f p.1 * g p.2 
goal: (f * g) x = ∑ p ∈ s, f p.1 * g p.2

full_name: MonoidAlgebra.single_mul_single
code: @[simp]
theorem single_mul_single [Mul G] {a₁ a₂ : G} {b₁ b₂ : k} :
    single a₁ b₁ * single a₂ b₂ = single (a₁ * a₂) (b₁ * b₂) 
goal: MonoidAlgebra.single a₁ b₁ * MonoidAlgebra.single a₂ b₂ = MonoidAlgebra.single (a₁ * a₂) (b₁ * b₂)

full_name: MonoidAlgebra.single_commute_single
code: theorem single_commute_single [Mul G] {a₁ a₂ : G} {b₁ b₂ : k}
    (ha : Commute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (single a₁ b₁) (single a₂ b₂) 
goal: Commute (MonoidAlgebra.single a₁ b₁) (MonoidAlgebra.single a₂ b₂)

full_name: MonoidAlgebra.single_commute
code: theorem single_commute [Mul G] {a : G} {b : k} (ha : ∀ a', Commute a a') (hb : ∀ b', Commute b b') :
    ∀ f : MonoidAlgebra k G, Commute (single a b) f 
goal: Commute (MonoidAlgebra.single a b) f

full_name: MonoidAlgebra.single_pow
code: @[simp]
theorem single_pow [Monoid G] {a : G} {b : k} : ∀ n : ℕ, single a b ^ n = single (a ^ n) (b ^ n)
  
goal: MonoidAlgebra.single a b ^ n = MonoidAlgebra.single (a ^ n) (b ^ n)

full_name: MonoidAlgebra.mapDomain_one
code: /-- Like `Finsupp.mapDomain_zero`, but for the `1` we define in this file -/
@[simp]
theorem mapDomain_one {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [One α] [One α₂]
    {F : Type*} [FunLike F α α₂] [OneHomClass F α α₂] (f : F) :
    (mapDomain f (1 : MonoidAlgebra β α) : MonoidAlgebra β α₂) = (1 : MonoidAlgebra β α₂) 
goal: MonoidAlgebra.mapDomain (⇑f) 1 = 1

full_name: MonoidAlgebra.mapDomain_mul
code: /-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Mul α] [Mul α₂]
    {F : Type*} [FunLike F α α₂] [MulHomClass F α α₂] (f : F) (x y : MonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y 
goal: MonoidAlgebra.mapDomain (⇑f) (x * y) = MonoidAlgebra.mapDomain (⇑f) x * MonoidAlgebra.mapDomain (⇑f) y

full_name: MonoidAlgebra.ofMagma_apply
code: /-- The embedding of a magma into its magma algebra. -/
@[simps]
def ofMagma [Mul G] : G →ₙ* MonoidAlgebra k G 
goal: (MonoidAlgebra.ofMagma k G) a = MonoidAlgebra.single a 1

full_name: MonoidAlgebra.ofMagma
code: /-- The embedding of a magma into its magma algebra. -/
@[simps]
def ofMagma [Mul G] : G →ₙ* MonoidAlgebra k G 
goal: G →ₙ* MonoidAlgebra k G

full_name: MonoidAlgebra.of
code: /-- The embedding of a unital magma into its magma algebra. -/
@[simps]
def of [MulOneClass G] : G →* MonoidAlgebra k G 
goal: G →* MonoidAlgebra k G

full_name: MonoidAlgebra.of_apply
code: /-- The embedding of a unital magma into its magma algebra. -/
@[simps]
def of [MulOneClass G] : G →* MonoidAlgebra k G 
goal: (MonoidAlgebra.of k G) a = MonoidAlgebra.single a 1

full_name: MonoidAlgebra.smul_of
code: theorem smul_of [MulOneClass G] (g : G) (r : k) : r • of k G g = single g r 
goal: r • (MonoidAlgebra.of k G) g = MonoidAlgebra.single g r

full_name: MonoidAlgebra.of_injective
code: theorem of_injective [MulOneClass G] [Nontrivial k] :
    Function.Injective (of k G) 
goal: Function.Injective ⇑(MonoidAlgebra.of k G)

full_name: MonoidAlgebra.of_commute
code: theorem of_commute [MulOneClass G] {a : G} (h : ∀ a', Commute a a') (f : MonoidAlgebra k G) :
    Commute (of k G a) f 
goal: Commute ((MonoidAlgebra.of k G) a) f

full_name: MonoidAlgebra.singleHom
code: /-- `Finsupp.single` as a `MonoidHom` from the product type into the monoid algebra.

Note the order of the elements of the product are reversed compared to the arguments of
`Finsupp.single`.
-/
@[simps]
def singleHom [MulOneClass G] : k × G →* MonoidAlgebra k G 
goal: k × G →* MonoidAlgebra k G

full_name: MonoidAlgebra.singleHom_apply
code: /-- `Finsupp.single` as a `MonoidHom` from the product type into the monoid algebra.

Note the order of the elements of the product are reversed compared to the arguments of
`Finsupp.single`.
-/
@[simps]
def singleHom [MulOneClass G] : k × G →* MonoidAlgebra k G 
goal: MonoidAlgebra.singleHom a = MonoidAlgebra.single a.2 a.1

full_name: MonoidAlgebra.mul_single_apply_aux
code: theorem mul_single_apply_aux [Mul G] (f : MonoidAlgebra k G) {r : k} {x y z : G}
    (H : ∀ a, a * x = z ↔ a = y) : (f * single x r) z = f y * r 
goal: (f * MonoidAlgebra.single x r) z = f y * r

full_name: MonoidAlgebra.mul_single_one_apply
code: theorem mul_single_one_apply [MulOneClass G] (f : MonoidAlgebra k G) (r : k) (x : G) :
    (HMul.hMul (β := MonoidAlgebra k G) f (single 1 r)) x = f x * r 
goal: (f * MonoidAlgebra.single 1 r) x = f x * r

full_name: MonoidAlgebra.mul_single_apply_of_not_exists_mul
code: theorem mul_single_apply_of_not_exists_mul [Mul G] (r : k) {g g' : G} (x : MonoidAlgebra k G)
    (h : ¬∃ d, g' = d * g) : (x * single g r) g' = 0 
goal: (x * MonoidAlgebra.single g r) g' = 0

full_name: MonoidAlgebra.single_mul_apply_aux
code: theorem single_mul_apply_aux [Mul G] (f : MonoidAlgebra k G) {r : k} {x y z : G}
    (H : ∀ a, x * a = y ↔ a = z) : (single x r * f) y = r * f z 
goal: (MonoidAlgebra.single x r * f) y = r * f z

full_name: MonoidAlgebra.single_one_mul_apply
code: theorem single_one_mul_apply [MulOneClass G] (f : MonoidAlgebra k G) (r : k) (x : G) :
    (single (1 : G) r * f) x = r * f x 
goal: (MonoidAlgebra.single 1 r * f) x = r * f x

full_name: MonoidAlgebra.single_mul_apply_of_not_exists_mul
code: theorem single_mul_apply_of_not_exists_mul [Mul G] (r : k) {g g' : G} (x : MonoidAlgebra k G)
    (h : ¬∃ d, g' = g * d) : (single g r * x) g' = 0 
goal: (MonoidAlgebra.single g r * x) g' = 0

full_name: MonoidAlgebra.liftNC_smul
code: theorem liftNC_smul [MulOneClass G] {R : Type*} [Semiring R] (f : k →+* R) (g : G →* R) (c : k)
    (φ : MonoidAlgebra k G) : liftNC (f : k →+ R) g (c • φ) = f c * liftNC (f : k →+ R) g φ 
goal: (MonoidAlgebra.liftNC ↑f ⇑g) (c • φ) = f c * (MonoidAlgebra.liftNC ↑f ⇑g) φ

full_name: MonoidAlgebra.isScalarTower_self
code: instance isScalarTower_self [IsScalarTower R k k] :
    IsScalarTower R (MonoidAlgebra k G) (MonoidAlgebra k G) 
goal: IsScalarTower R (MonoidAlgebra k G) (MonoidAlgebra k G)

full_name: MonoidAlgebra.smulCommClass_self
code: /-- Note that if `k` is a `CommSemiring` then we have `SMulCommClass k k k` and so we can take
`R = k` in the below. In other words, if the coefficients are commutative amongst themselves, they
also commute with the algebra multiplication. -/
instance smulCommClass_self [SMulCommClass R k k] :
    SMulCommClass R (MonoidAlgebra k G) (MonoidAlgebra k G) 
goal: SMulCommClass R (MonoidAlgebra k G) (MonoidAlgebra k G)

full_name: MonoidAlgebra.smulCommClass_symm_self
code: instance smulCommClass_symm_self [SMulCommClass k R k] :
    SMulCommClass (MonoidAlgebra k G) R (MonoidAlgebra k G) 
goal: SMulCommClass (MonoidAlgebra k G) R (MonoidAlgebra k G)

full_name: MonoidAlgebra.nonUnitalAlgHom_ext
code: /-- A non_unital `k`-algebra homomorphism from `MonoidAlgebra k G` is uniquely defined by its
values on the functions `single a 1`. -/
theorem nonUnitalAlgHom_ext [DistribMulAction k A] {φ₁ φ₂ : MonoidAlgebra k G →ₙₐ[k] A}
    (h : ∀ x, φ₁ (single x 1) = φ₂ (single x 1)) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: MonoidAlgebra.nonUnitalAlgHom_ext'
code: /-- See note [partially-applied ext lemmas]. -/
@[ext high]
theorem nonUnitalAlgHom_ext' [DistribMulAction k A] {φ₁ φ₂ : MonoidAlgebra k G →ₙₐ[k] A}
    (h : φ₁.toMulHom.comp (ofMagma k G) = φ₂.toMulHom.comp (ofMagma k G)) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: MonoidAlgebra.liftMagma
code: /-- The functor `G ↦ MonoidAlgebra k G`, from the category of magmas to the category of non-unital,
non-associative algebras over `k` is adjoint to the forgetful functor in the other direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A) 
goal: (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A)

full_name: MonoidAlgebra.liftMagma_symm_apply
code: /-- The functor `G ↦ MonoidAlgebra k G`, from the category of magmas to the category of non-unital,
non-associative algebras over `k` is adjoint to the forgetful functor in the other direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A) 
goal: (MonoidAlgebra.liftMagma k).symm F = F.toMulHom.comp (MonoidAlgebra.ofMagma k G)

full_name: MonoidAlgebra.liftMagma_apply_apply
code: /-- The functor `G ↦ MonoidAlgebra k G`, from the category of magmas to the category of non-unital,
non-associative algebras over `k` is adjoint to the forgetful functor in the other direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A) 
goal: ((MonoidAlgebra.liftMagma k) f) a = Finsupp.sum a fun m t => t • f m

full_name: MonoidAlgebra.single_one_comm
code: theorem single_one_comm [CommSemiring k] [MulOneClass G] (r : k) (f : MonoidAlgebra k G) :
    single (1 : G) r * f = f * single (1 : G) r 
goal: MonoidAlgebra.single 1 r * f = f * MonoidAlgebra.single 1 r

full_name: MonoidAlgebra.singleOneRingHom_apply
code: /-- `Finsupp.single 1` as a `RingHom` -/
@[simps]
def singleOneRingHom [Semiring k] [MulOneClass G] : k →+* MonoidAlgebra k G 
goal: ∀ (a : k), MonoidAlgebra.singleOneRingHom a = (↑(Finsupp.singleAddHom 1)).toFun a

full_name: MonoidAlgebra.singleOneRingHom
code: /-- `Finsupp.single 1` as a `RingHom` -/
@[simps]
def singleOneRingHom [Semiring k] [MulOneClass G] : k →+* MonoidAlgebra k G 
goal: k →+* MonoidAlgebra k G

full_name: MonoidAlgebra.mapDomainRingHom_apply
code: /-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
`Finsupp.mapDomain f` is a ring homomorphism between their monoid algebras. -/
@[simps]
def mapDomainRingHom (k : Type*) {H F : Type*} [Semiring k] [Monoid G] [Monoid H]
    [FunLike F G H] [MonoidHomClass F G H] (f : F) : MonoidAlgebra k G →+* MonoidAlgebra k H 
goal: ∀ (a : G →₀ k), (MonoidAlgebra.mapDomainRingHom k f) a = (↑(Finsupp.mapDomain.addMonoidHom ⇑f)).toFun a

full_name: MonoidAlgebra.mapDomainRingHom
code: /-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
`Finsupp.mapDomain f` is a ring homomorphism between their monoid algebras. -/
@[simps]
def mapDomainRingHom (k : Type*) {H F : Type*} [Semiring k] [Monoid G] [Monoid H]
    [FunLike F G H] [MonoidHomClass F G H] (f : F) : MonoidAlgebra k G →+* MonoidAlgebra k H 
goal: MonoidAlgebra k G →+* MonoidAlgebra k H

full_name: MonoidAlgebra.ringHom_ext
code: /-- If two ring homomorphisms from `MonoidAlgebra k G` are equal on all `single a 1`
and `single 1 b`, then they are equal. -/
theorem ringHom_ext {R} [Semiring k] [MulOneClass G] [Semiring R] {f g : MonoidAlgebra k G →+* R}
    (h₁ : ∀ b, f (single 1 b) = g (single 1 b)) (h_of : ∀ a, f (single a 1) = g (single a 1)) :
    f = g 
goal: f = g

full_name: MonoidAlgebra.ringHom_ext'
code: /-- If two ring homomorphisms from `MonoidAlgebra k G` are equal on all `single a 1`
and `single 1 b`, then they are equal.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem ringHom_ext' {R} [Semiring k] [MulOneClass G] [Semiring R] {f g : MonoidAlgebra k G →+* R}
    (h₁ : f.comp singleOneRingHom = g.comp singleOneRingHom)
    (h_of :
      (f : MonoidAlgebra k G →* R).comp (of k G) = (g : MonoidAlgebra k G →* R).comp (of k G)) :
    f = g 
goal: f = g

full_name: MonoidAlgebra.algebra
code: /-- The instance `Algebra k (MonoidAlgebra A G)` whenever we have `Algebra k A`.

In particular this provides the instance `Algebra k (MonoidAlgebra k G)`.
-/
instance algebra {A : Type*} [CommSemiring k] [Semiring A] [Algebra k A] [Monoid G] :
    Algebra k (MonoidAlgebra A G) 
goal: Algebra k (MonoidAlgebra A G)

full_name: MonoidAlgebra.singleOneAlgHom_apply
code: /-- `Finsupp.single 1` as an `AlgHom` -/
@[simps! apply]
def singleOneAlgHom {A : Type*} [CommSemiring k] [Semiring A] [Algebra k A] [Monoid G] :
    A →ₐ[k] MonoidAlgebra A G 
goal: ∀ (a : A), MonoidAlgebra.singleOneAlgHom a = Finsupp.single 1 a

full_name: MonoidAlgebra.singleOneAlgHom
code: /-- `Finsupp.single 1` as an `AlgHom` -/
@[simps! apply]
def singleOneAlgHom {A : Type*} [CommSemiring k] [Semiring A] [Algebra k A] [Monoid G] :
    A →ₐ[k] MonoidAlgebra A G 
goal: A →ₐ[k] MonoidAlgebra A G

full_name: MonoidAlgebra.coe_algebraMap
code: @[simp]
theorem coe_algebraMap {A : Type*} [CommSemiring k] [Semiring A] [Algebra k A] [Monoid G] :
    ⇑(algebraMap k (MonoidAlgebra A G)) = single 1 ∘ algebraMap k A 
goal: ⇑(algebraMap k (MonoidAlgebra A G)) = MonoidAlgebra.single 1 ∘ ⇑(algebraMap k A)

full_name: MonoidAlgebra.single_eq_algebraMap_mul_of
code: theorem single_eq_algebraMap_mul_of [CommSemiring k] [Monoid G] (a : G) (b : k) :
    single a b = algebraMap k (MonoidAlgebra k G) b * of k G a 
goal: MonoidAlgebra.single a b = (algebraMap k (MonoidAlgebra k G)) b * (MonoidAlgebra.of k G) a

full_name: MonoidAlgebra.single_algebraMap_eq_algebraMap_mul_of
code: theorem single_algebraMap_eq_algebraMap_mul_of {A : Type*} [CommSemiring k] [Semiring A]
    [Algebra k A] [Monoid G] (a : G) (b : k) :
    single a (algebraMap k A b) = algebraMap k (MonoidAlgebra A G) b * of A G a 
goal: MonoidAlgebra.single a ((algebraMap k A) b) = (algebraMap k (MonoidAlgebra A G)) b * (MonoidAlgebra.of A G) a

full_name: MonoidAlgebra.induction_on
code: theorem induction_on [Semiring k] [Monoid G] {p : MonoidAlgebra k G → Prop} (f : MonoidAlgebra k G)
    (hM : ∀ g, p (of k G g)) (hadd : ∀ f g : MonoidAlgebra k G, p f → p g → p (f + g))
    (hsmul : ∀ (r : k) (f), p f → p (r • f)) : p f 
goal: p f

full_name: MonoidAlgebra.liftNCAlgHom
code: /-- `liftNCRingHom` as an `AlgHom`, for when `f` is an `AlgHom` -/
def liftNCAlgHom (f : A →ₐ[k] B) (g : G →* B) (h_comm : ∀ x y, Commute (f x) (g y)) :
    MonoidAlgebra A G →ₐ[k] B 
goal: MonoidAlgebra A G →ₐ[k] B

full_name: MonoidAlgebra.algHom_ext
code: /-- A `k`-algebra homomorphism from `MonoidAlgebra k G` is uniquely defined by its
values on the functions `single a 1`. -/
theorem algHom_ext ⦃φ₁ φ₂ : MonoidAlgebra k G →ₐ[k] A⦄
    (h : ∀ x, φ₁ (single x 1) = φ₂ (single x 1)) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: MonoidAlgebra.algHom_ext'
code: /-- See note [partially-applied ext lemmas]. -/
@[ext high]
theorem algHom_ext' ⦃φ₁ φ₂ : MonoidAlgebra k G →ₐ[k] A⦄
    (h :
      (φ₁ : MonoidAlgebra k G →* A).comp (of k G) = (φ₂ : MonoidAlgebra k G →* A).comp (of k G)) :
    φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: MonoidAlgebra.lift
code: /-- Any monoid homomorphism `G →* A` can be lifted to an algebra homomorphism
`MonoidAlgebra k G →ₐ[k] A`. -/
def lift : (G →* A) ≃ (MonoidAlgebra k G →ₐ[k] A) 
goal: (G →* A) ≃ (MonoidAlgebra k G →ₐ[k] A)

full_name: MonoidAlgebra.lift_apply'
code: theorem lift_apply' (F : G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => algebraMap k A b * F a 
goal: ((MonoidAlgebra.lift k G A) F) f = Finsupp.sum f fun a b => (algebraMap k A) b * F a

full_name: MonoidAlgebra.lift_apply
code: theorem lift_apply (F : G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => b • F a 
goal: ((MonoidAlgebra.lift k G A) F) f = Finsupp.sum f fun a b => b • F a

full_name: MonoidAlgebra.lift_def
code: theorem lift_def (F : G →* A) : ⇑(lift k G A F) = liftNC ((algebraMap k A : k →+* A) : k →+ A) F 
goal: ⇑((MonoidAlgebra.lift k G A) F) = ⇑(MonoidAlgebra.liftNC ↑(algebraMap k A) ⇑F)

full_name: MonoidAlgebra.lift_symm_apply
code: @[simp]
theorem lift_symm_apply (F : MonoidAlgebra k G →ₐ[k] A) (x : G) :
    (lift k G A).symm F x = F (single x 1) 
goal: ((MonoidAlgebra.lift k G A).symm F) x = F (MonoidAlgebra.single x 1)

full_name: MonoidAlgebra.lift_single
code: @[simp]
theorem lift_single (F : G →* A) (a b) : lift k G A F (single a b) = b • F a 
goal: ((MonoidAlgebra.lift k G A) F) (MonoidAlgebra.single a b) = b • F a

full_name: MonoidAlgebra.lift_of
code: theorem lift_of (F : G →* A) (x) : lift k G A F (of k G x) = F x 
goal: ((MonoidAlgebra.lift k G A) F) ((MonoidAlgebra.of k G) x) = F x

full_name: MonoidAlgebra.lift_unique'
code: theorem lift_unique' (F : MonoidAlgebra k G →ₐ[k] A) :
    F = lift k G A ((F : MonoidAlgebra k G →* A).comp (of k G)) 
goal: F = (MonoidAlgebra.lift k G A) ((↑F).comp (MonoidAlgebra.of k G))

full_name: MonoidAlgebra.lift_unique
code: /-- Decomposition of a `k`-algebra homomorphism from `MonoidAlgebra k G` by
its values on `F (single a 1)`. -/
theorem lift_unique (F : MonoidAlgebra k G →ₐ[k] A) (f : MonoidAlgebra k G) :
    F f = f.sum fun a b => b • F (single a 1) 
goal: F f = Finsupp.sum f fun a b => b • F (MonoidAlgebra.single a 1)

full_name: MonoidAlgebra.mapDomainNonUnitalAlgHom
code: /-- If `f : G → H` is a homomorphism between two magmas, then
`Finsupp.mapDomain f` is a non-unital algebra homomorphism between their magma algebras. -/
@[simps apply]
def mapDomainNonUnitalAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A]
    {G H F : Type*} [Mul G] [Mul H] [FunLike F G H] [MulHomClass F G H] (f : F) :
    MonoidAlgebra A G →ₙₐ[k] MonoidAlgebra A H 
goal: MonoidAlgebra A G →ₙₐ[k] MonoidAlgebra A H

full_name: MonoidAlgebra.mapDomainNonUnitalAlgHom_apply
code: /-- If `f : G → H` is a homomorphism between two magmas, then
`Finsupp.mapDomain f` is a non-unital algebra homomorphism between their magma algebras. -/
@[simps apply]
def mapDomainNonUnitalAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A]
    {G H F : Type*} [Mul G] [Mul H] [FunLike F G H] [MulHomClass F G H] (f : F) :
    MonoidAlgebra A G →ₙₐ[k] MonoidAlgebra A H 
goal: ∀ (a : G →₀ A), (MonoidAlgebra.mapDomainNonUnitalAlgHom k A f) a = (↑(Finsupp.mapDomain.addMonoidHom ⇑f)).toFun a

full_name: MonoidAlgebra.mapDomain_algebraMap
code: theorem mapDomain_algebraMap {F : Type*} [FunLike F G H] [MonoidHomClass F G H] (f : F) (r : k) :
    mapDomain f (algebraMap k (MonoidAlgebra A G) r) = algebraMap k (MonoidAlgebra A H) r 
goal: MonoidAlgebra.mapDomain (⇑f) ((algebraMap k (MonoidAlgebra A G)) r) = (algebraMap k (MonoidAlgebra A H)) r

full_name: MonoidAlgebra.mapDomainAlgHom
code: /-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
`Finsupp.mapDomain f` is an algebra homomorphism between their monoid algebras. -/
@[simps!]
def mapDomainAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A] {H F : Type*}
    [Monoid H] [FunLike F G H] [MonoidHomClass F G H] (f : F) :
    MonoidAlgebra A G →ₐ[k] MonoidAlgebra A H 
goal: MonoidAlgebra A G →ₐ[k] MonoidAlgebra A H

full_name: MonoidAlgebra.mapDomainAlgHom_apply
code: /-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
`Finsupp.mapDomain f` is an algebra homomorphism between their monoid algebras. -/
@[simps!]
def mapDomainAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A] {H F : Type*}
    [Monoid H] [FunLike F G H] [MonoidHomClass F G H] (f : F) :
    MonoidAlgebra A G →ₐ[k] MonoidAlgebra A H 
goal: ∀ (a : G →₀ A), (MonoidAlgebra.mapDomainAlgHom k A f) a = Finsupp.mapDomain (⇑f) a

full_name: MonoidAlgebra.mapDomainAlgHom_id
code: @[simp]
lemma mapDomainAlgHom_id (k A) [CommSemiring k] [Semiring A] [Algebra k A] :
    mapDomainAlgHom k A (MonoidHom.id G) = AlgHom.id k (MonoidAlgebra A G) 
goal: MonoidAlgebra.mapDomainAlgHom k A (MonoidHom.id G) = AlgHom.id k (MonoidAlgebra A G)

full_name: MonoidAlgebra.mapDomainAlgHom_comp
code: @[simp]
lemma mapDomainAlgHom_comp (k A) {G₁ G₂ G₃} [CommSemiring k] [Semiring A] [Algebra k A]
    [Monoid G₁] [Monoid G₂] [Monoid G₃] (f : G₁ →* G₂) (g : G₂ →* G₃) :
    mapDomainAlgHom k A (g.comp f) = (mapDomainAlgHom k A g).comp (mapDomainAlgHom k A f) 
goal: MonoidAlgebra.mapDomainAlgHom k A (g.comp f) =
  (MonoidAlgebra.mapDomainAlgHom k A g).comp (MonoidAlgebra.mapDomainAlgHom k A f)

full_name: MonoidAlgebra.domCongr
code: /-- If `e : G ≃* H` is a multiplicative equivalence between two monoids, then
`MonoidAlgebra.domCongr e` is an algebra equivalence between their monoid algebras. -/
def domCongr (e : G ≃* H) : MonoidAlgebra A G ≃ₐ[k] MonoidAlgebra A H 
goal: MonoidAlgebra A G ≃ₐ[k] MonoidAlgebra A H

full_name: MonoidAlgebra.domCongr_toAlgHom
code: theorem domCongr_toAlgHom (e : G ≃* H) : (domCongr k A e).toAlgHom = mapDomainAlgHom k A e 
goal: ↑(MonoidAlgebra.domCongr k A e) = MonoidAlgebra.mapDomainAlgHom k A e

full_name: MonoidAlgebra.domCongr_apply
code: @[simp] theorem domCongr_apply (e : G ≃* H) (f : MonoidAlgebra A G) (h : H) :
    domCongr k A e f h = f (e.symm h) 
goal: ((MonoidAlgebra.domCongr k A e) f) h = f (e.symm h)

full_name: MonoidAlgebra.domCongr_support
code: @[simp] theorem domCongr_support (e : G ≃* H) (f : MonoidAlgebra A G) :
    (domCongr k A e f).support = f.support.map e 
goal: ((MonoidAlgebra.domCongr k A e) f).support = Finset.map (↑e).toEmbedding f.support

full_name: MonoidAlgebra.domCongr_single
code: @[simp] theorem domCongr_single (e : G ≃* H) (g : G) (a : A) :
    domCongr k A e (single g a) = single (e g) a 
goal: (MonoidAlgebra.domCongr k A e) (MonoidAlgebra.single g a) = MonoidAlgebra.single (e g) a

full_name: MonoidAlgebra.domCongr_refl
code: @[simp] theorem domCongr_refl : domCongr k A (MulEquiv.refl G) = AlgEquiv.refl 
goal: MonoidAlgebra.domCongr k A (MulEquiv.refl G) = AlgEquiv.refl

full_name: MonoidAlgebra.domCongr_symm
code: @[simp] theorem domCongr_symm (e : G ≃* H) : (domCongr k A e).symm = domCongr k A e.symm 
goal: (MonoidAlgebra.domCongr k A e).symm = MonoidAlgebra.domCongr k A e.symm

full_name: MonoidAlgebra.GroupSMul.linearMap
code: /-- When `V` is a `k[G]`-module, multiplication by a group element `g` is a `k`-linear map. -/
def GroupSMul.linearMap [Monoid G] [CommSemiring k] (V : Type u₃) [AddCommMonoid V] [Module k V]
    [Module (MonoidAlgebra k G) V] [IsScalarTower k (MonoidAlgebra k G) V] (g : G) : V →ₗ[k] V 
goal: V →ₗ[k] V

full_name: MonoidAlgebra.GroupSMul.linearMap_apply
code: @[simp]
theorem GroupSMul.linearMap_apply [Monoid G] [CommSemiring k] (V : Type u₃) [AddCommMonoid V]
    [Module k V] [Module (MonoidAlgebra k G) V] [IsScalarTower k (MonoidAlgebra k G) V] (g : G)
    (v : V) : (GroupSMul.linearMap k V g) v = single g (1 : k) • v 
goal: (MonoidAlgebra.GroupSMul.linearMap k V g) v = MonoidAlgebra.single g 1 • v

full_name: MonoidAlgebra.equivariantOfLinearOfComm
code: /-- Build a `k[G]`-linear map from a `k`-linear map and evidence that it is `G`-equivariant. -/
def equivariantOfLinearOfComm
    (h : ∀ (g : G) (v : V), f (single g (1 : k) • v) = single g (1 : k) • f v) :
    V →ₗ[MonoidAlgebra k G] W 
goal: V →ₗ[MonoidAlgebra k G] W

full_name: MonoidAlgebra.equivariantOfLinearOfComm_apply
code: @[simp]
theorem equivariantOfLinearOfComm_apply (v : V) : (equivariantOfLinearOfComm f h) v = f v 
goal: (MonoidAlgebra.equivariantOfLinearOfComm f h) v = f v

full_name: MonoidAlgebra.prod_single
code: theorem prod_single [CommSemiring k] [CommMonoid G] {s : Finset ι} {a : ι → G} {b : ι → k} :
    (∏ i ∈ s, single (a i) (b i)) = single (∏ i ∈ s, a i) (∏ i ∈ s, b i) 
goal: ∏ i ∈ s, MonoidAlgebra.single (a i) (b i) = MonoidAlgebra.single (∏ i ∈ s, a i) (∏ i ∈ s, b i)

full_name: MonoidAlgebra.mul_single_apply
code: @[simp]
theorem mul_single_apply (f : MonoidAlgebra k G) (r : k) (x y : G) :
    (f * single x r) y = f (y * x⁻¹) * r 
goal: (f * MonoidAlgebra.single x r) y = f (y * x⁻¹) * r

full_name: MonoidAlgebra.single_mul_apply
code: @[simp]
theorem single_mul_apply (r : k) (x : G) (f : MonoidAlgebra k G) (y : G) :
    (single x r * f) y = r * f (x⁻¹ * y) 
goal: (MonoidAlgebra.single x r * f) y = r * f (x⁻¹ * y)

full_name: MonoidAlgebra.mul_apply_left
code: theorem mul_apply_left (f g : MonoidAlgebra k G) (x : G) :
    (f * g) x = f.sum fun a b => b * g (a⁻¹ * x) 
goal: (f * g) x = Finsupp.sum f fun a b => b * g (a⁻¹ * x)

full_name: MonoidAlgebra.mul_apply_right
code: theorem mul_apply_right (f g : MonoidAlgebra k G) (x : G) :
    (f * g) x = g.sum fun a b => f (x * a⁻¹) * b 
goal: (f * g) x = Finsupp.sum g fun a b => f (x * a⁻¹) * b

full_name: MonoidAlgebra.opRingEquiv
code: /-- The opposite of a `MonoidAlgebra R I` equivalent as a ring to
the `MonoidAlgebra Rᵐᵒᵖ Iᵐᵒᵖ` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [Monoid G] :
    (MonoidAlgebra k G)ᵐᵒᵖ ≃+* MonoidAlgebra kᵐᵒᵖ Gᵐᵒᵖ 
goal: (MonoidAlgebra k G)ᵐᵒᵖ ≃+* MonoidAlgebra kᵐᵒᵖ Gᵐᵒᵖ

full_name: MonoidAlgebra.opRingEquiv_apply
code: /-- The opposite of a `MonoidAlgebra R I` equivalent as a ring to
the `MonoidAlgebra Rᵐᵒᵖ Iᵐᵒᵖ` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [Monoid G] :
    (MonoidAlgebra k G)ᵐᵒᵖ ≃+* MonoidAlgebra kᵐᵒᵖ Gᵐᵒᵖ 
goal: ∀ (a : (G →₀ k)ᵐᵒᵖ),
  MonoidAlgebra.opRingEquiv a =
    Finsupp.equivMapDomain MulOpposite.opEquiv (Finsupp.mapRange MulOpposite.op ⋯ (MulOpposite.unop a))

full_name: MonoidAlgebra.opRingEquiv_symm_apply
code: /-- The opposite of a `MonoidAlgebra R I` equivalent as a ring to
the `MonoidAlgebra Rᵐᵒᵖ Iᵐᵒᵖ` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [Monoid G] :
    (MonoidAlgebra k G)ᵐᵒᵖ ≃+* MonoidAlgebra kᵐᵒᵖ Gᵐᵒᵖ 
goal: ∀ (a : Gᵐᵒᵖ →₀ kᵐᵒᵖ),
  MonoidAlgebra.opRingEquiv.symm a =
    MulOpposite.op (Finsupp.mapRange MulOpposite.unop ⋯ (Finsupp.equivMapDomain MulOpposite.opEquiv.symm a))

full_name: MonoidAlgebra.opRingEquiv_single
code: theorem opRingEquiv_single [Monoid G] (r : k) (x : G) :
    MonoidAlgebra.opRingEquiv (op (single x r)) = single (op x) (op r) 
goal: MonoidAlgebra.opRingEquiv (MulOpposite.op (MonoidAlgebra.single x r)) =
  MonoidAlgebra.single (MulOpposite.op x) (MulOpposite.op r)

full_name: MonoidAlgebra.opRingEquiv_symm_single
code: theorem opRingEquiv_symm_single [Monoid G] (r : kᵐᵒᵖ) (x : Gᵐᵒᵖ) :
    MonoidAlgebra.opRingEquiv.symm (single x r) = op (single x.unop r.unop) 
goal: MonoidAlgebra.opRingEquiv.symm (MonoidAlgebra.single x r) =
  MulOpposite.op (MonoidAlgebra.single (MulOpposite.unop x) (MulOpposite.unop r))

full_name: MonoidAlgebra.submoduleOfSMulMem
code: /-- A submodule over `k` which is stable under scalar multiplication by elements of `G` is a
submodule over `MonoidAlgebra k G`  -/
def submoduleOfSMulMem (W : Submodule k V) (h : ∀ (g : G) (v : V), v ∈ W → of k G g • v ∈ W) :
    Submodule (MonoidAlgebra k G) V 
goal: Submodule (MonoidAlgebra k G) V

full_name: AddMonoidAlgebra
code: /-- The monoid algebra over a semiring `k` generated by the additive monoid `G`.
It is the type of finite formal `k`-linear combinations of terms of `G`,
endowed with the convolution product.
-/
def AddMonoidAlgebra 
goal: Type (max u₂ u₁)

full_name: AddMonoidAlgebra._aux_Mathlib_Algebra_MonoidAlgebra_Basic___unexpand_AddMonoidAlgebra_1
code: @[inherit_doc]
scoped[AddMonoidAlgebra] notation:9000 R:max "[" A "]" => AddMonoidAlgebra R A
goal: Lean.PrettyPrinter.Unexpander

full_name: AddMonoidAlgebra.«_aux_Mathlib_Algebra_MonoidAlgebra_Basic___macroRules_AddMonoidAlgebra_term_[_]_1»
code: @[inherit_doc]
scoped[AddMonoidAlgebra] notation:9000 R:max "[" A "]" => AddMonoidAlgebra R A
goal: Lean.Macro

full_name: AddMonoidAlgebra.inhabited
code: instance inhabited : Inhabited k[G] 
goal: Inhabited (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.addCommMonoid
code: instance addCommMonoid : AddCommMonoid k[G] 
goal: AddCommMonoid (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.instIsCancelAdd
code: instance instIsCancelAdd [IsCancelAdd k] : IsCancelAdd (AddMonoidAlgebra k G) 
goal: IsCancelAdd (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.coeFun
code: instance coeFun : CoeFun k[G] fun _ => G → k 
goal: CoeFun (AddMonoidAlgebra k G) fun x => G → k

full_name: AddMonoidAlgebra.single
code: abbrev single (a : G) (b : k) : k[G] 
goal: AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.single_zero
code: theorem single_zero (a : G) : (single a 0 : k[G]) = 0 
goal: AddMonoidAlgebra.single a 0 = 0

full_name: AddMonoidAlgebra.single_add
code: theorem single_add (a : G) (b₁ b₂ : k) : single a (b₁ + b₂) = single a b₁ + single a b₂ 
goal: AddMonoidAlgebra.single a (b₁ + b₂) = AddMonoidAlgebra.single a b₁ + AddMonoidAlgebra.single a b₂

full_name: AddMonoidAlgebra.sum_single_index
code: @[simp]
theorem sum_single_index {N} [AddCommMonoid N] {a : G} {b : k} {h : G → k → N}
    (h_zero : h a 0 = 0) :
    (single a b).sum h = h a b 
goal: Finsupp.sum (AddMonoidAlgebra.single a b) h = h a b

full_name: AddMonoidAlgebra.sum_single
code: @[simp]
theorem sum_single (f : k[G]) : f.sum single = f 
goal: Finsupp.sum f AddMonoidAlgebra.single = f

full_name: AddMonoidAlgebra.single_apply
code: theorem single_apply {a a' : G} {b : k} [Decidable (a = a')] :
    single a b a' = if a = a' then b else 0 
goal: (AddMonoidAlgebra.single a b) a' = if a = a' then b else 0

full_name: AddMonoidAlgebra.single_eq_zero
code: @[simp]
theorem single_eq_zero {a : G} {b : k} : single a b = 0 ↔ b = 0 
goal: AddMonoidAlgebra.single a b = 0 ↔ b = 0

full_name: AddMonoidAlgebra.mapDomain
code: abbrev mapDomain {G' : Type*} (f : G → G') (v : k[G]) : k[G'] 
goal: AddMonoidAlgebra k G'

full_name: AddMonoidAlgebra.mapDomain_sum
code: theorem mapDomain_sum {k' G' : Type*} [Semiring k'] {f : G → G'} {s : AddMonoidAlgebra k' G}
    {v : G → k' → k[G]} :
    mapDomain f (s.sum v) = s.sum fun a b => mapDomain f (v a b) 
goal: AddMonoidAlgebra.mapDomain f (Finsupp.sum s v) = Finsupp.sum s fun a b => AddMonoidAlgebra.mapDomain f (v a b)

full_name: AddMonoidAlgebra.mapDomain_single
code: theorem mapDomain_single {G' : Type*} {f : G → G'} {a : G} {b : k} :
    mapDomain f (single a b) = single (f a) b 
goal: AddMonoidAlgebra.mapDomain f (AddMonoidAlgebra.single a b) = AddMonoidAlgebra.single (f a) b

full_name: AddMonoidAlgebra.liftNC
code: /-- A non-commutative version of `AddMonoidAlgebra.lift`: given an additive homomorphism
`f : k →+ R` and a map `g : Multiplicative G → R`, returns the additive
homomorphism from `k[G]` such that `liftNC f g (single a b) = f b * g a`. If `f`
is a ring homomorphism and the range of either `f` or `g` is in center of `R`, then the result is a
ring homomorphism.  If `R` is a `k`-algebra and `f = algebraMap k R`, then the result is an algebra
homomorphism called `AddMonoidAlgebra.lift`. -/
def liftNC (f : k →+ R) (g : Multiplicative G → R) : k[G] →+ R 
goal: AddMonoidAlgebra k G →+ R

full_name: AddMonoidAlgebra.liftNC_single
code: @[simp]
theorem liftNC_single (f : k →+ R) (g : Multiplicative G → R) (a : G) (b : k) :
    liftNC f g (single a b) = f b * g (Multiplicative.ofAdd a) 
goal: (AddMonoidAlgebra.liftNC f g) (AddMonoidAlgebra.single a b) = f b * g (Multiplicative.ofAdd a)

full_name: AddMonoidAlgebra.hasMul
code: /-- The product of `f g : k[G]` is the finitely supported function
  whose value at `a` is the sum of `f x * g y` over all pairs `x, y`
  such that `x + y = a`. (Think of the product of multivariate
  polynomials where `α` is the additive monoid of monomial exponents.) -/
instance hasMul : Mul k[G] 
goal: Mul (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.mul_def
code: theorem mul_def {f g : k[G]} :
    f * g = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂) 
goal: f * g = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => AddMonoidAlgebra.single (a₁ + a₂) (b₁ * b₂)

full_name: AddMonoidAlgebra.nonUnitalNonAssocSemiring
code: instance nonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring k[G] 
goal: NonUnitalNonAssocSemiring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.liftNC_mul
code: theorem liftNC_mul {g_hom : Type*}
    [FunLike g_hom (Multiplicative G) R] [MulHomClass g_hom (Multiplicative G) R]
    (f : k →+* R) (g : g_hom) (a b : k[G])
    (h_comm : ∀ {x y}, y ∈ a.support → Commute (f (b x)) (g <| Multiplicative.ofAdd y)) :
    liftNC (f : k →+ R) g (a * b) = liftNC (f : k →+ R) g a * liftNC (f : k →+ R) g b 
goal: (AddMonoidAlgebra.liftNC ↑f ⇑g) (a * b) = (AddMonoidAlgebra.liftNC ↑f ⇑g) a * (AddMonoidAlgebra.liftNC ↑f ⇑g) b

full_name: AddMonoidAlgebra.one
code: /-- The unit of the multiplication is `single 0 1`, i.e. the function
  that is `1` at `0` and zero elsewhere. -/
instance one : One k[G] 
goal: One (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.one_def
code: theorem one_def : (1 : k[G]) = single 0 1 
goal: 1 = AddMonoidAlgebra.single 0 1

full_name: AddMonoidAlgebra.liftNC_one
code: @[simp]
theorem liftNC_one {g_hom : Type*}
    [FunLike g_hom (Multiplicative G) R] [OneHomClass g_hom (Multiplicative G) R]
    (f : k →+* R) (g : g_hom) : liftNC (f : k →+ R) g 1 = 1 
goal: (AddMonoidAlgebra.liftNC ↑f ⇑g) 1 = 1

full_name: AddMonoidAlgebra.nonUnitalSemiring
code: instance nonUnitalSemiring : NonUnitalSemiring k[G] 
goal: NonUnitalSemiring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nonAssocSemiring
code: instance nonAssocSemiring : NonAssocSemiring k[G] 
goal: NonAssocSemiring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.natCast_def
code: theorem natCast_def (n : ℕ) : (n : k[G]) = single (0 : G) (n : k) 
goal: ↑n = AddMonoidAlgebra.single 0 ↑n

full_name: AddMonoidAlgebra.smulZeroClass
code: instance smulZeroClass [Semiring k] [SMulZeroClass R k] : SMulZeroClass R k[G] 
goal: SMulZeroClass R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.semiring
code: instance semiring : Semiring k[G] 
goal: Semiring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.liftNCRingHom
code: /-- `liftNC` as a `RingHom`, for when `f` and `g` commute -/
def liftNCRingHom (f : k →+* R) (g : Multiplicative G →* R) (h_comm : ∀ x y, Commute (f x) (g y)) :
    k[G] →+* R 
goal: AddMonoidAlgebra k G →+* R

full_name: AddMonoidAlgebra.nonUnitalCommSemiring
code: instance nonUnitalCommSemiring [CommSemiring k] [AddCommSemigroup G] :
    NonUnitalCommSemiring k[G] 
goal: NonUnitalCommSemiring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nontrivial
code: instance nontrivial [Semiring k] [Nontrivial k] [Nonempty G] : Nontrivial k[G] 
goal: Nontrivial (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.commSemiring
code: instance commSemiring [CommSemiring k] [AddCommMonoid G] : CommSemiring k[G] 
goal: CommSemiring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.unique
code: instance unique [Semiring k] [Subsingleton k] : Unique k[G] 
goal: Unique (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.addCommGroup
code: instance addCommGroup [Ring k] : AddCommGroup k[G] 
goal: AddCommGroup (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nonUnitalNonAssocRing
code: instance nonUnitalNonAssocRing [Ring k] [Add G] : NonUnitalNonAssocRing k[G] 
goal: NonUnitalNonAssocRing (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nonUnitalRing
code: instance nonUnitalRing [Ring k] [AddSemigroup G] : NonUnitalRing k[G] 
goal: NonUnitalRing (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nonAssocRing
code: instance nonAssocRing [Ring k] [AddZeroClass G] : NonAssocRing k[G] 
goal: NonAssocRing (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.intCast_def
code: theorem intCast_def [Ring k] [AddZeroClass G] (z : ℤ) :
    (z : k[G]) = single (0 : G) (z : k) 
goal: ↑z = AddMonoidAlgebra.single 0 ↑z

full_name: AddMonoidAlgebra.ring
code: instance ring [Ring k] [AddMonoid G] : Ring k[G] 
goal: Ring (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nonUnitalCommRing
code: instance nonUnitalCommRing [CommRing k] [AddCommSemigroup G] :
    NonUnitalCommRing k[G] 
goal: NonUnitalCommRing (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.commRing
code: instance commRing [CommRing k] [AddCommMonoid G] : CommRing k[G] 
goal: CommRing (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.distribSMul
code: instance distribSMul [Semiring k] [DistribSMul R k] : DistribSMul R k[G] 
goal: DistribSMul R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.distribMulAction
code: instance distribMulAction [Monoid R] [Semiring k] [DistribMulAction R k] :
    DistribMulAction R k[G] 
goal: DistribMulAction R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.faithfulSMul
code: instance faithfulSMul [Semiring k] [SMulZeroClass R k] [FaithfulSMul R k] [Nonempty G] :
    FaithfulSMul R k[G] 
goal: FaithfulSMul R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.module
code: instance module [Semiring R] [Semiring k] [Module R k] : Module R k[G] 
goal: Module R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.isScalarTower
code: instance isScalarTower [Semiring k] [SMulZeroClass R k] [SMulZeroClass S k] [SMul R S]
    [IsScalarTower R S k] : IsScalarTower R S k[G] 
goal: IsScalarTower R S (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.smulCommClass
code: instance smulCommClass [Semiring k] [SMulZeroClass R k] [SMulZeroClass S k] [SMulCommClass R S k] :
    SMulCommClass R S k[G] 
goal: SMulCommClass R S (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.isCentralScalar
code: instance isCentralScalar [Semiring k] [SMulZeroClass R k] [SMulZeroClass Rᵐᵒᵖ k]
    [IsCentralScalar R k] : IsCentralScalar R k[G] 
goal: IsCentralScalar R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.mul_apply
code: theorem mul_apply [DecidableEq G] [Add G] (f g : k[G]) (x : G) :
    (f * g) x = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => if a₁ + a₂ = x then b₁ * b₂ else 0 
goal: (f * g) x = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => if a₁ + a₂ = x then b₁ * b₂ else 0

full_name: AddMonoidAlgebra.mul_apply_antidiagonal
code: theorem mul_apply_antidiagonal [Add G] (f g : k[G]) (x : G) (s : Finset (G × G))
    (hs : ∀ {p : G × G}, p ∈ s ↔ p.1 + p.2 = x) : (f * g) x = ∑ p ∈ s, f p.1 * g p.2 
goal: (f * g) x = ∑ p ∈ s, f p.1 * g p.2

full_name: AddMonoidAlgebra.single_mul_single
code: theorem single_mul_single [Add G] {a₁ a₂ : G} {b₁ b₂ : k} :
    single a₁ b₁ * single a₂ b₂ = single (a₁ + a₂) (b₁ * b₂) 
goal: AddMonoidAlgebra.single a₁ b₁ * AddMonoidAlgebra.single a₂ b₂ = AddMonoidAlgebra.single (a₁ + a₂) (b₁ * b₂)

full_name: AddMonoidAlgebra.single_commute_single
code: theorem single_commute_single [Add G] {a₁ a₂ : G} {b₁ b₂ : k}
    (ha : AddCommute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (single a₁ b₁) (single a₂ b₂) 
goal: Commute (AddMonoidAlgebra.single a₁ b₁) (AddMonoidAlgebra.single a₂ b₂)

full_name: AddMonoidAlgebra.single_pow
code: theorem single_pow [AddMonoid G] {a : G} {b : k} : ∀ n : ℕ, single a b ^ n = single (n • a) (b ^ n)
  
goal: AddMonoidAlgebra.single a b ^ n = AddMonoidAlgebra.single (n • a) (b ^ n)

full_name: AddMonoidAlgebra.mapDomain_one
code: /-- Like `Finsupp.mapDomain_zero`, but for the `1` we define in this file -/
@[simp]
theorem mapDomain_one {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Zero α] [Zero α₂]
    {F : Type*} [FunLike F α α₂] [ZeroHomClass F α α₂] (f : F) :
    (mapDomain f (1 : AddMonoidAlgebra β α) : AddMonoidAlgebra β α₂) =
      (1 : AddMonoidAlgebra β α₂) 
goal: AddMonoidAlgebra.mapDomain (⇑f) 1 = 1

full_name: AddMonoidAlgebra.mapDomain_mul
code: /-- Like `Finsupp.mapDomain_add`, but for the convolutive multiplication we define in this file -/
theorem mapDomain_mul {α : Type*} {β : Type*} {α₂ : Type*} [Semiring β] [Add α] [Add α₂]
    {F : Type*} [FunLike F α α₂] [AddHomClass F α α₂] (f : F) (x y : AddMonoidAlgebra β α) :
    mapDomain f (x * y) = mapDomain f x * mapDomain f y 
goal: AddMonoidAlgebra.mapDomain (⇑f) (x * y) = AddMonoidAlgebra.mapDomain (⇑f) x * AddMonoidAlgebra.mapDomain (⇑f) y

full_name: AddMonoidAlgebra.ofMagma_apply
code: /-- The embedding of an additive magma into its additive magma algebra. -/
@[simps]
def ofMagma [Add G] : Multiplicative G →ₙ* k[G] 
goal: (AddMonoidAlgebra.ofMagma k G) a = AddMonoidAlgebra.single a 1

full_name: AddMonoidAlgebra.ofMagma
code: /-- The embedding of an additive magma into its additive magma algebra. -/
@[simps]
def ofMagma [Add G] : Multiplicative G →ₙ* k[G] 
goal: Multiplicative G →ₙ* AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.of
code: /-- Embedding of a magma with zero into its magma algebra. -/
def of [AddZeroClass G] : Multiplicative G →* k[G] 
goal: Multiplicative G →* AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.of'
code: /-- Embedding of a magma with zero `G`, into its magma algebra, having `G` as source. -/
def of' : G → k[G] 
goal: G → AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.of_apply
code: @[simp]
theorem of_apply [AddZeroClass G] (a : Multiplicative G) :
    of k G a = single (Multiplicative.toAdd a) 1 
goal: (AddMonoidAlgebra.of k G) a = AddMonoidAlgebra.single (Multiplicative.toAdd a) 1

full_name: AddMonoidAlgebra.of'_apply
code: @[simp]
theorem of'_apply (a : G) : of' k G a = single a 1 
goal: AddMonoidAlgebra.of' k G a = AddMonoidAlgebra.single a 1

full_name: AddMonoidAlgebra.of'_eq_of
code: theorem of'_eq_of [AddZeroClass G] (a : G) : of' k G a = of k G (.ofAdd a) 
goal: AddMonoidAlgebra.of' k G a = (AddMonoidAlgebra.of k G) (Multiplicative.ofAdd a)

full_name: AddMonoidAlgebra.of_injective
code: theorem of_injective [Nontrivial k] [AddZeroClass G] : Function.Injective (of k G) 
goal: Function.Injective ⇑(AddMonoidAlgebra.of k G)

full_name: AddMonoidAlgebra.of'_commute
code: theorem of'_commute [Semiring k] [AddZeroClass G] {a : G} (h : ∀ a', AddCommute a a')
    (f : AddMonoidAlgebra k G) :
    Commute (of' k G a) f 
goal: Commute (AddMonoidAlgebra.of' k G a) f

full_name: AddMonoidAlgebra.singleHom_apply
code: /-- `Finsupp.single` as a `MonoidHom` from the product type into the additive monoid algebra.

Note the order of the elements of the product are reversed compared to the arguments of
`Finsupp.single`.
-/
@[simps]
def singleHom [AddZeroClass G] : k × Multiplicative G →* k[G] 
goal: AddMonoidAlgebra.singleHom a = AddMonoidAlgebra.single (Multiplicative.toAdd a.2) a.1

full_name: AddMonoidAlgebra.singleHom
code: /-- `Finsupp.single` as a `MonoidHom` from the product type into the additive monoid algebra.

Note the order of the elements of the product are reversed compared to the arguments of
`Finsupp.single`.
-/
@[simps]
def singleHom [AddZeroClass G] : k × Multiplicative G →* k[G] 
goal: k × Multiplicative G →* AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.mul_single_apply_aux
code: theorem mul_single_apply_aux [Add G] (f : k[G]) (r : k) (x y z : G)
    (H : ∀ a, a + x = z ↔ a = y) : (f * single x r) z = f y * r 
goal: (f * AddMonoidAlgebra.single x r) z = f y * r

full_name: AddMonoidAlgebra.mul_single_zero_apply
code: theorem mul_single_zero_apply [AddZeroClass G] (f : k[G]) (r : k) (x : G) :
    (f * single (0 : G) r) x = f x * r 
goal: (f * AddMonoidAlgebra.single 0 r) x = f x * r

full_name: AddMonoidAlgebra.mul_single_apply_of_not_exists_add
code: theorem mul_single_apply_of_not_exists_add [Add G] (r : k) {g g' : G} (x : k[G])
    (h : ¬∃ d, g' = d + g) : (x * single g r) g' = 0 
goal: (x * AddMonoidAlgebra.single g r) g' = 0

full_name: AddMonoidAlgebra.single_mul_apply_aux
code: theorem single_mul_apply_aux [Add G] (f : k[G]) (r : k) (x y z : G)
    (H : ∀ a, x + a = y ↔ a = z) : (single x r * f) y = r * f z 
goal: (AddMonoidAlgebra.single x r * f) y = r * f z

full_name: AddMonoidAlgebra.single_zero_mul_apply
code: theorem single_zero_mul_apply [AddZeroClass G] (f : k[G]) (r : k) (x : G) :
    (single (0 : G) r * f) x = r * f x 
goal: (AddMonoidAlgebra.single 0 r * f) x = r * f x

full_name: AddMonoidAlgebra.single_mul_apply_of_not_exists_add
code: theorem single_mul_apply_of_not_exists_add [Add G] (r : k) {g g' : G} (x : k[G])
    (h : ¬∃ d, g' = g + d) : (single g r * x) g' = 0 
goal: (AddMonoidAlgebra.single g r * x) g' = 0

full_name: AddMonoidAlgebra.mul_single_apply
code: theorem mul_single_apply [AddGroup G] (f : k[G]) (r : k) (x y : G) :
    (f * single x r) y = f (y - x) * r 
goal: (f * AddMonoidAlgebra.single x r) y = f (y - x) * r

full_name: AddMonoidAlgebra.single_mul_apply
code: theorem single_mul_apply [AddGroup G] (r : k) (x : G) (f : k[G]) (y : G) :
    (single x r * f) y = r * f (-x + y) 
goal: (AddMonoidAlgebra.single x r * f) y = r * f (-x + y)

full_name: AddMonoidAlgebra.liftNC_smul
code: theorem liftNC_smul {R : Type*} [AddZeroClass G] [Semiring R] (f : k →+* R)
    (g : Multiplicative G →* R) (c : k) (φ : MonoidAlgebra k G) :
    liftNC (f : k →+ R) g (c • φ) = f c * liftNC (f : k →+ R) g φ 
goal: (AddMonoidAlgebra.liftNC ↑f ⇑g) (c • φ) = f c * (AddMonoidAlgebra.liftNC ↑f ⇑g) φ

full_name: AddMonoidAlgebra.induction_on
code: theorem induction_on [AddMonoid G] {p : k[G] → Prop} (f : k[G])
    (hM : ∀ g, p (of k G (Multiplicative.ofAdd g)))
    (hadd : ∀ f g : k[G], p f → p g → p (f + g))
    (hsmul : ∀ (r : k) (f), p f → p (r • f)) : p f 
goal: p f

full_name: AddMonoidAlgebra.mapDomainRingHom
code: /-- If `f : G → H` is an additive homomorphism between two additive monoids, then
`Finsupp.mapDomain f` is a ring homomorphism between their add monoid algebras. -/
@[simps]
def mapDomainRingHom (k : Type*) [Semiring k] {H F : Type*} [AddMonoid G] [AddMonoid H]
    [FunLike F G H] [AddMonoidHomClass F G H] (f : F) : k[G] →+* k[H] 
goal: AddMonoidAlgebra k G →+* AddMonoidAlgebra k H

full_name: AddMonoidAlgebra.mapDomainRingHom_apply
code: /-- If `f : G → H` is an additive homomorphism between two additive monoids, then
`Finsupp.mapDomain f` is a ring homomorphism between their add monoid algebras. -/
@[simps]
def mapDomainRingHom (k : Type*) [Semiring k] {H F : Type*} [AddMonoid G] [AddMonoid H]
    [FunLike F G H] [AddMonoidHomClass F G H] (f : F) : k[G] →+* k[H] 
goal: ∀ (a : G →₀ k), (AddMonoidAlgebra.mapDomainRingHom k f) a = (↑(Finsupp.mapDomain.addMonoidHom ⇑f)).toFun a

full_name: AddMonoidAlgebra.toMultiplicative
code: /-- The equivalence between `AddMonoidAlgebra` and `MonoidAlgebra` in terms of
`Multiplicative` -/
protected def AddMonoidAlgebra.toMultiplicative [Semiring k] [Add G] :
    AddMonoidAlgebra k G ≃+* MonoidAlgebra k (Multiplicative G) 
goal: AddMonoidAlgebra k G ≃+* MonoidAlgebra k (Multiplicative G)

full_name: MonoidAlgebra.toAdditive
code: /-- The equivalence between `MonoidAlgebra` and `AddMonoidAlgebra` in terms of `Additive` -/
protected def MonoidAlgebra.toAdditive [Semiring k] [Mul G] :
    MonoidAlgebra k G ≃+* AddMonoidAlgebra k (Additive G) 
goal: MonoidAlgebra k G ≃+* AddMonoidAlgebra k (Additive G)

full_name: AddMonoidAlgebra.isScalarTower_self
code: instance isScalarTower_self [IsScalarTower R k k] :
    IsScalarTower R k[G] k[G] 
goal: IsScalarTower R (AddMonoidAlgebra k G) (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.smulCommClass_self
code: /-- Note that if `k` is a `CommSemiring` then we have `SMulCommClass k k k` and so we can take
`R = k` in the below. In other words, if the coefficients are commutative amongst themselves, they
also commute with the algebra multiplication. -/
instance smulCommClass_self [SMulCommClass R k k] :
    SMulCommClass R k[G] k[G] 
goal: SMulCommClass R (AddMonoidAlgebra k G) (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.smulCommClass_symm_self
code: instance smulCommClass_symm_self [SMulCommClass k R k] :
    SMulCommClass k[G] R k[G] 
goal: SMulCommClass (AddMonoidAlgebra k G) R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.nonUnitalAlgHom_ext
code: /-- A non_unital `k`-algebra homomorphism from `k[G]` is uniquely defined by its
values on the functions `single a 1`. -/
theorem nonUnitalAlgHom_ext [DistribMulAction k A] {φ₁ φ₂ : k[G] →ₙₐ[k] A}
    (h : ∀ x, φ₁ (single x 1) = φ₂ (single x 1)) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: AddMonoidAlgebra.nonUnitalAlgHom_ext'
code: /-- See note [partially-applied ext lemmas]. -/
@[ext high]
theorem nonUnitalAlgHom_ext' [DistribMulAction k A] {φ₁ φ₂ : k[G] →ₙₐ[k] A}
    (h : φ₁.toMulHom.comp (ofMagma k G) = φ₂.toMulHom.comp (ofMagma k G)) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: AddMonoidAlgebra.liftMagma_apply_apply
code: /-- The functor `G ↦ k[G]`, from the category of magmas to the category of
non-unital, non-associative algebras over `k` is adjoint to the forgetful functor in the other
direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (Multiplicative G →ₙ* A) ≃ (k[G] →ₙₐ[k] A) 
goal: ((AddMonoidAlgebra.liftMagma k) f) a = Finsupp.sum a fun m t => t • f (Multiplicative.ofAdd m)

full_name: AddMonoidAlgebra.liftMagma
code: /-- The functor `G ↦ k[G]`, from the category of magmas to the category of
non-unital, non-associative algebras over `k` is adjoint to the forgetful functor in the other
direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (Multiplicative G →ₙ* A) ≃ (k[G] →ₙₐ[k] A) 
goal: (Multiplicative G →ₙ* A) ≃ (AddMonoidAlgebra k G →ₙₐ[k] A)

full_name: AddMonoidAlgebra.liftMagma_symm_apply
code: /-- The functor `G ↦ k[G]`, from the category of magmas to the category of
non-unital, non-associative algebras over `k` is adjoint to the forgetful functor in the other
direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (Multiplicative G →ₙ* A) ≃ (k[G] →ₙₐ[k] A) 
goal: (AddMonoidAlgebra.liftMagma k).symm F = F.toMulHom.comp (AddMonoidAlgebra.ofMagma k G)

full_name: AddMonoidAlgebra.singleZeroRingHom
code: /-- `Finsupp.single 0` as a `RingHom` -/
@[simps]
def singleZeroRingHom [Semiring k] [AddMonoid G] : k →+* k[G] 
goal: k →+* AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.singleZeroRingHom_apply
code: /-- `Finsupp.single 0` as a `RingHom` -/
@[simps]
def singleZeroRingHom [Semiring k] [AddMonoid G] : k →+* k[G] 
goal: ∀ (a : k), AddMonoidAlgebra.singleZeroRingHom a = (↑(Finsupp.singleAddHom 0)).toFun a

full_name: AddMonoidAlgebra.ringHom_ext
code: /-- If two ring homomorphisms from `k[G]` are equal on all `single a 1`
and `single 0 b`, then they are equal. -/
theorem ringHom_ext {R} [Semiring k] [AddMonoid G] [Semiring R] {f g : k[G] →+* R}
    (h₀ : ∀ b, f (single 0 b) = g (single 0 b)) (h_of : ∀ a, f (single a 1) = g (single a 1)) :
    f = g 
goal: f = g

full_name: AddMonoidAlgebra.ringHom_ext'
code: /-- If two ring homomorphisms from `k[G]` are equal on all `single a 1`
and `single 0 b`, then they are equal.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem ringHom_ext' {R} [Semiring k] [AddMonoid G] [Semiring R] {f g : k[G] →+* R}
    (h₁ : f.comp singleZeroRingHom = g.comp singleZeroRingHom)
    (h_of : (f : k[G] →* R).comp (of k G) = (g : k[G] →* R).comp (of k G)) :
    f = g 
goal: f = g

full_name: AddMonoidAlgebra.opRingEquiv_symm_apply
code: /-- The opposite of an `R[I]` is ring equivalent to
the `AddMonoidAlgebra Rᵐᵒᵖ I` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [AddCommMonoid G] :
    k[G]ᵐᵒᵖ ≃+* kᵐᵒᵖ[G] 
goal: ∀ (a : G →₀ kᵐᵒᵖ), AddMonoidAlgebra.opRingEquiv.symm a = MulOpposite.op (Finsupp.mapRange MulOpposite.unop ⋯ a)

full_name: AddMonoidAlgebra.opRingEquiv
code: /-- The opposite of an `R[I]` is ring equivalent to
the `AddMonoidAlgebra Rᵐᵒᵖ I` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [AddCommMonoid G] :
    k[G]ᵐᵒᵖ ≃+* kᵐᵒᵖ[G] 
goal: (AddMonoidAlgebra k G)ᵐᵒᵖ ≃+* AddMonoidAlgebra kᵐᵒᵖ G

full_name: AddMonoidAlgebra.opRingEquiv_apply
code: /-- The opposite of an `R[I]` is ring equivalent to
the `AddMonoidAlgebra Rᵐᵒᵖ I` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [AddCommMonoid G] :
    k[G]ᵐᵒᵖ ≃+* kᵐᵒᵖ[G] 
goal: ∀ (a : (G →₀ k)ᵐᵒᵖ), AddMonoidAlgebra.opRingEquiv a = Finsupp.mapRange MulOpposite.op ⋯ (MulOpposite.unop a)

full_name: AddMonoidAlgebra.opRingEquiv_single
code: theorem opRingEquiv_single [AddCommMonoid G] (r : k) (x : G) :
    AddMonoidAlgebra.opRingEquiv (op (single x r)) = single x (op r) 
goal: AddMonoidAlgebra.opRingEquiv (MulOpposite.op (AddMonoidAlgebra.single x r)) =
  AddMonoidAlgebra.single x (MulOpposite.op r)

full_name: AddMonoidAlgebra.opRingEquiv_symm_single
code: theorem opRingEquiv_symm_single [AddCommMonoid G] (r : kᵐᵒᵖ) (x : Gᵐᵒᵖ) :
    AddMonoidAlgebra.opRingEquiv.symm (single x r) = op (single x r.unop) 
goal: AddMonoidAlgebra.opRingEquiv.symm (AddMonoidAlgebra.single x r) =
  MulOpposite.op (AddMonoidAlgebra.single x (MulOpposite.unop r))

full_name: AddMonoidAlgebra.algebra
code: /-- The instance `Algebra R k[G]` whenever we have `Algebra R k`.

In particular this provides the instance `Algebra k k[G]`.
-/
instance algebra [CommSemiring R] [Semiring k] [Algebra R k] [AddMonoid G] :
    Algebra R k[G] 
goal: Algebra R (AddMonoidAlgebra k G)

full_name: AddMonoidAlgebra.singleZeroAlgHom
code: /-- `Finsupp.single 0` as an `AlgHom` -/
@[simps! apply]
def singleZeroAlgHom [CommSemiring R] [Semiring k] [Algebra R k] [AddMonoid G] : k →ₐ[R] k[G] 
goal: k →ₐ[R] AddMonoidAlgebra k G

full_name: AddMonoidAlgebra.singleZeroAlgHom_apply
code: /-- `Finsupp.single 0` as an `AlgHom` -/
@[simps! apply]
def singleZeroAlgHom [CommSemiring R] [Semiring k] [Algebra R k] [AddMonoid G] : k →ₐ[R] k[G] 
goal: ∀ (a : k), AddMonoidAlgebra.singleZeroAlgHom a = Finsupp.single 0 a

full_name: AddMonoidAlgebra.coe_algebraMap
code: @[simp]
theorem coe_algebraMap [CommSemiring R] [Semiring k] [Algebra R k] [AddMonoid G] :
    (algebraMap R k[G] : R → k[G]) = single 0 ∘ algebraMap R k 
goal: ⇑(algebraMap R (AddMonoidAlgebra k G)) = AddMonoidAlgebra.single 0 ∘ ⇑(algebraMap R k)

full_name: AddMonoidAlgebra.liftNCAlgHom
code: /-- `liftNCRingHom` as an `AlgHom`, for when `f` is an `AlgHom` -/
def liftNCAlgHom (f : A →ₐ[k] B) (g : Multiplicative G →* B) (h_comm : ∀ x y, Commute (f x) (g y)) :
    A[G] →ₐ[k] B 
goal: AddMonoidAlgebra A G →ₐ[k] B

full_name: AddMonoidAlgebra.algHom_ext
code: /-- A `k`-algebra homomorphism from `k[G]` is uniquely defined by its
values on the functions `single a 1`. -/
theorem algHom_ext ⦃φ₁ φ₂ : k[G] →ₐ[k] A⦄
    (h : ∀ x, φ₁ (single x 1) = φ₂ (single x 1)) : φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: AddMonoidAlgebra.algHom_ext'
code: /-- See note [partially-applied ext lemmas]. -/
@[ext high]
theorem algHom_ext' ⦃φ₁ φ₂ : k[G] →ₐ[k] A⦄
    (h : (φ₁ : k[G] →* A).comp (of k G) = (φ₂ : k[G] →* A).comp (of k G)) :
    φ₁ = φ₂ 
goal: φ₁ = φ₂

full_name: AddMonoidAlgebra.lift
code: /-- Any monoid homomorphism `G →* A` can be lifted to an algebra homomorphism
`k[G] →ₐ[k] A`. -/
def lift : (Multiplicative G →* A) ≃ (k[G] →ₐ[k] A) 
goal: (Multiplicative G →* A) ≃ (AddMonoidAlgebra k G →ₐ[k] A)

full_name: AddMonoidAlgebra.lift_apply'
code: theorem lift_apply' (F : Multiplicative G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => algebraMap k A b * F (Multiplicative.ofAdd a) 
goal: ((AddMonoidAlgebra.lift k G A) F) f = Finsupp.sum f fun a b => (algebraMap k A) b * F (Multiplicative.ofAdd a)

full_name: AddMonoidAlgebra.lift_apply
code: theorem lift_apply (F : Multiplicative G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => b • F (Multiplicative.ofAdd a) 
goal: ((AddMonoidAlgebra.lift k G A) F) f = Finsupp.sum f fun a b => b • F (Multiplicative.ofAdd a)

full_name: AddMonoidAlgebra.lift_def
code: theorem lift_def (F : Multiplicative G →* A) :
    ⇑(lift k G A F) = liftNC ((algebraMap k A : k →+* A) : k →+ A) F 
goal: ⇑((AddMonoidAlgebra.lift k G A) F) = ⇑(AddMonoidAlgebra.liftNC ↑(algebraMap k A) ⇑F)

full_name: AddMonoidAlgebra.lift_symm_apply
code: @[simp]
theorem lift_symm_apply (F : k[G] →ₐ[k] A) (x : Multiplicative G) :
    (lift k G A).symm F x = F (single (Multiplicative.toAdd x) 1) 
goal: ((AddMonoidAlgebra.lift k G A).symm F) x = F (AddMonoidAlgebra.single (Multiplicative.toAdd x) 1)

full_name: AddMonoidAlgebra.lift_of
code: theorem lift_of (F : Multiplicative G →* A) (x : Multiplicative G) :
    lift k G A F (of k G x) = F x 
goal: ((AddMonoidAlgebra.lift k G A) F) ((AddMonoidAlgebra.of k G) x) = F x

full_name: AddMonoidAlgebra.lift_single
code: @[simp]
theorem lift_single (F : Multiplicative G →* A) (a b) :
    lift k G A F (single a b) = b • F (Multiplicative.ofAdd a) 
goal: ((AddMonoidAlgebra.lift k G A) F) (AddMonoidAlgebra.single a b) = b • F (Multiplicative.ofAdd a)

full_name: AddMonoidAlgebra.lift_of'
code: lemma lift_of' (F : Multiplicative G →* A) (x : G) :
    lift k G A F (of' k G x) = F (Multiplicative.ofAdd x) 
goal: ((AddMonoidAlgebra.lift k G A) F) (AddMonoidAlgebra.of' k G x) = F (Multiplicative.ofAdd x)

full_name: AddMonoidAlgebra.lift_unique'
code: theorem lift_unique' (F : k[G] →ₐ[k] A) :
    F = lift k G A ((F : k[G] →* A).comp (of k G)) 
goal: F = (AddMonoidAlgebra.lift k G A) ((↑F).comp (AddMonoidAlgebra.of k G))

full_name: AddMonoidAlgebra.lift_unique
code: /-- Decomposition of a `k`-algebra homomorphism from `MonoidAlgebra k G` by
its values on `F (single a 1)`. -/
theorem lift_unique (F : k[G] →ₐ[k] A) (f : MonoidAlgebra k G) :
    F f = f.sum fun a b => b • F (single a 1) 
goal: F f = Finsupp.sum f fun a b => b • F (AddMonoidAlgebra.single a 1)

full_name: AddMonoidAlgebra.algHom_ext_iff
code: theorem algHom_ext_iff {φ₁ φ₂ : k[G] →ₐ[k] A} :
    (∀ x, φ₁ (Finsupp.single x 1) = φ₂ (Finsupp.single x 1)) ↔ φ₁ = φ₂ 
goal: (∀ (x : G), φ₁ (Finsupp.single x 1) = φ₂ (Finsupp.single x 1)) ↔ φ₁ = φ₂

full_name: AddMonoidAlgebra.prod_single
code: theorem prod_single [CommSemiring k] [AddCommMonoid G] {s : Finset ι} {a : ι → G} {b : ι → k} :
    (∏ i ∈ s, single (a i) (b i)) = single (∑ i ∈ s, a i) (∏ i ∈ s, b i) 
goal: ∏ i ∈ s, AddMonoidAlgebra.single (a i) (b i) = AddMonoidAlgebra.single (∑ i ∈ s, a i) (∏ i ∈ s, b i)

full_name: AddMonoidAlgebra.mapDomain_algebraMap
code: theorem mapDomain_algebraMap (A : Type*) {H F : Type*} [CommSemiring k] [Semiring A] [Algebra k A]
    [AddMonoid G] [AddMonoid H] [FunLike F G H] [AddMonoidHomClass F G H]
    (f : F) (r : k) :
    mapDomain f (algebraMap k A[G] r) = algebraMap k A[H] r 
goal: AddMonoidAlgebra.mapDomain (⇑f) ((algebraMap k (AddMonoidAlgebra A G)) r) = (algebraMap k (AddMonoidAlgebra A H)) r

full_name: AddMonoidAlgebra.mapDomainNonUnitalAlgHom
code: /-- If `f : G → H` is a homomorphism between two additive magmas, then `Finsupp.mapDomain f` is a
non-unital algebra homomorphism between their additive magma algebras. -/
@[simps apply]
def mapDomainNonUnitalAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A]
    {G H F : Type*} [Add G] [Add H] [FunLike F G H] [AddHomClass F G H] (f : F) :
    A[G] →ₙₐ[k] A[H] 
goal: AddMonoidAlgebra A G →ₙₐ[k] AddMonoidAlgebra A H

full_name: AddMonoidAlgebra.mapDomainNonUnitalAlgHom_apply
code: /-- If `f : G → H` is a homomorphism between two additive magmas, then `Finsupp.mapDomain f` is a
non-unital algebra homomorphism between their additive magma algebras. -/
@[simps apply]
def mapDomainNonUnitalAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A]
    {G H F : Type*} [Add G] [Add H] [FunLike F G H] [AddHomClass F G H] (f : F) :
    A[G] →ₙₐ[k] A[H] 
goal: ∀ (a : G →₀ A), (AddMonoidAlgebra.mapDomainNonUnitalAlgHom k A f) a = (↑(Finsupp.mapDomain.addMonoidHom ⇑f)).toFun a

full_name: AddMonoidAlgebra.mapDomainAlgHom
code: /-- If `f : G → H` is an additive homomorphism between two additive monoids, then
`Finsupp.mapDomain f` is an algebra homomorphism between their add monoid algebras. -/
@[simps!]
def mapDomainAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A] [AddMonoid G]
    {H F : Type*} [AddMonoid H] [FunLike F G H] [AddMonoidHomClass F G H] (f : F) :
    A[G] →ₐ[k] A[H] 
goal: AddMonoidAlgebra A G →ₐ[k] AddMonoidAlgebra A H

full_name: AddMonoidAlgebra.mapDomainAlgHom_apply
code: /-- If `f : G → H` is an additive homomorphism between two additive monoids, then
`Finsupp.mapDomain f` is an algebra homomorphism between their add monoid algebras. -/
@[simps!]
def mapDomainAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A] [AddMonoid G]
    {H F : Type*} [AddMonoid H] [FunLike F G H] [AddMonoidHomClass F G H] (f : F) :
    A[G] →ₐ[k] A[H] 
goal: ∀ (a : G →₀ A), (AddMonoidAlgebra.mapDomainAlgHom k A f) a = Finsupp.mapDomain (⇑f) a

full_name: AddMonoidAlgebra.mapDomainAlgHom_id
code: @[simp]
lemma mapDomainAlgHom_id (k A) [CommSemiring k] [Semiring A] [Algebra k A] [AddMonoid G] :
    mapDomainAlgHom k A (AddMonoidHom.id G) = AlgHom.id k (AddMonoidAlgebra A G) 
goal: AddMonoidAlgebra.mapDomainAlgHom k A (AddMonoidHom.id G) = AlgHom.id k (AddMonoidAlgebra A G)

full_name: AddMonoidAlgebra.mapDomainAlgHom_comp
code: @[simp]
lemma mapDomainAlgHom_comp (k A) {G₁ G₂ G₃} [CommSemiring k] [Semiring A] [Algebra k A]
    [AddMonoid G₁] [AddMonoid G₂] [AddMonoid G₃] (f : G₁ →+ G₂) (g : G₂ →+ G₃) :
    mapDomainAlgHom k A (g.comp f) = (mapDomainAlgHom k A g).comp (mapDomainAlgHom k A f) 
goal: AddMonoidAlgebra.mapDomainAlgHom k A (g.comp f) =
  (AddMonoidAlgebra.mapDomainAlgHom k A g).comp (AddMonoidAlgebra.mapDomainAlgHom k A f)

full_name: AddMonoidAlgebra.domCongr
code: /-- If `e : G ≃* H` is a multiplicative equivalence between two monoids, then
`AddMonoidAlgebra.domCongr e` is an algebra equivalence between their monoid algebras. -/
def domCongr (e : G ≃+ H) : A[G] ≃ₐ[k] A[H] 
goal: AddMonoidAlgebra A G ≃ₐ[k] AddMonoidAlgebra A H

full_name: AddMonoidAlgebra.domCongr_toAlgHom
code: theorem domCongr_toAlgHom (e : G ≃+ H) : (domCongr k A e).toAlgHom = mapDomainAlgHom k A e 
goal: ↑(AddMonoidAlgebra.domCongr k A e) = AddMonoidAlgebra.mapDomainAlgHom k A e

full_name: AddMonoidAlgebra.domCongr_apply
code: @[simp] theorem domCongr_apply (e : G ≃+ H) (f : MonoidAlgebra A G) (h : H) :
    domCongr k A e f h = f (e.symm h) 
goal: ((AddMonoidAlgebra.domCongr k A e) f) h = f (e.symm h)

full_name: AddMonoidAlgebra.domCongr_support
code: @[simp] theorem domCongr_support (e : G ≃+ H) (f : MonoidAlgebra A G) :
    (domCongr k A e f).support = f.support.map e 
goal: ((AddMonoidAlgebra.domCongr k A e) f).support = Finset.map (↑e).toEmbedding f.support

full_name: AddMonoidAlgebra.domCongr_single
code: @[simp] theorem domCongr_single (e : G ≃+ H) (g : G) (a : A) :
    domCongr k A e (single g a) = single (e g) a 
goal: (AddMonoidAlgebra.domCongr k A e) (AddMonoidAlgebra.single g a) = AddMonoidAlgebra.single (e g) a

full_name: AddMonoidAlgebra.domCongr_refl
code: @[simp] theorem domCongr_refl : domCongr k A (AddEquiv.refl G) = AlgEquiv.refl 
goal: AddMonoidAlgebra.domCongr k A (AddEquiv.refl G) = AlgEquiv.refl

full_name: AddMonoidAlgebra.domCongr_symm
code: @[simp] theorem domCongr_symm (e : G ≃+ H) : (domCongr k A e).symm = domCongr k A e.symm 
goal: (AddMonoidAlgebra.domCongr k A e).symm = AddMonoidAlgebra.domCongr k A e.symm

full_name: AddMonoidAlgebra.toMultiplicativeAlgEquiv
code: /-- The algebra equivalence between `AddMonoidAlgebra` and `MonoidAlgebra` in terms of
`Multiplicative`. -/
def AddMonoidAlgebra.toMultiplicativeAlgEquiv [Semiring k] [Algebra R k] [AddMonoid G] :
    AddMonoidAlgebra k G ≃ₐ[R] MonoidAlgebra k (Multiplicative G) 
goal: AddMonoidAlgebra k G ≃ₐ[R] MonoidAlgebra k (Multiplicative G)

full_name: MonoidAlgebra.toAdditiveAlgEquiv
code: /-- The algebra equivalence between `MonoidAlgebra` and `AddMonoidAlgebra` in terms of
`Additive`. -/
def MonoidAlgebra.toAdditiveAlgEquiv [Semiring k] [Algebra R k] [Monoid G] :
    MonoidAlgebra k G ≃ₐ[R] AddMonoidAlgebra k (Additive G) 
goal: MonoidAlgebra k G ≃ₐ[R] AddMonoidAlgebra k (Additive G)