File: Mathlib/Algebra/Group/Submonoid/Membership.lean

full_name: AddSubmonoidClass.coe_list_sum
code: @[to_additive (attr := norm_cast, simp)]
theorem coe_list_prod (l : List S) : (l.prod : M) = (l.map (↑)).prod 
goal: ↑l.sum = (List.map Subtype.val l).sum

full_name: SubmonoidClass.coe_list_prod
code: @[to_additive (attr := norm_cast, simp)]
theorem coe_list_prod (l : List S) : (l.prod : M) = (l.map (↑)).prod 
goal: ↑l.prod = (List.map Subtype.val l).prod

full_name: AddSubmonoidClass.coe_multiset_sum
code: @[to_additive (attr := norm_cast, simp)]
theorem coe_multiset_prod {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod 
goal: ↑m.sum = (Multiset.map Subtype.val m).sum

full_name: SubmonoidClass.coe_multiset_prod
code: @[to_additive (attr := norm_cast, simp)]
theorem coe_multiset_prod {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod 
goal: ↑m.prod = (Multiset.map Subtype.val m).prod

full_name: AddSubmonoidClass.coe_finset_sum
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_finset_prod {ι M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (f : ι → S)
    (s : Finset ι) : ↑(∏ i ∈ s, f i) = (∏ i ∈ s, f i : M) 
goal: ↑(∑ i ∈ s, f i) = ∑ i ∈ s, ↑(f i)

full_name: SubmonoidClass.coe_finset_prod
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_finset_prod {ι M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (f : ι → S)
    (s : Finset ι) : ↑(∏ i ∈ s, f i) = (∏ i ∈ s, f i : M) 
goal: ↑(∏ i ∈ s, f i) = ∏ i ∈ s, ↑(f i)

full_name: list_prod_mem
code: /-- Product of a list of elements in a submonoid is in the submonoid. -/
@[to_additive "Sum of a list of elements in an `AddSubmonoid` is in the `AddSubmonoid`."]
theorem list_prod_mem {l : List M} (hl : ∀ x ∈ l, x ∈ S) : l.prod ∈ S 
goal: l.prod ∈ S

full_name: list_sum_mem
code: /-- Product of a list of elements in a submonoid is in the submonoid. -/
@[to_additive "Sum of a list of elements in an `AddSubmonoid` is in the `AddSubmonoid`."]
theorem list_prod_mem {l : List M} (hl : ∀ x ∈ l, x ∈ S) : l.prod ∈ S 
goal: l.sum ∈ S

full_name: multiset_sum_mem
code: /-- Product of a multiset of elements in a submonoid of a `CommMonoid` is in the submonoid. -/
@[to_additive
      "Sum of a multiset of elements in an `AddSubmonoid` of an `AddCommMonoid` is
      in the `AddSubmonoid`."]
theorem multiset_prod_mem {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset M)
    (hm : ∀ a ∈ m, a ∈ S) : m.prod ∈ S 
goal: m.sum ∈ S

full_name: multiset_prod_mem
code: /-- Product of a multiset of elements in a submonoid of a `CommMonoid` is in the submonoid. -/
@[to_additive
      "Sum of a multiset of elements in an `AddSubmonoid` of an `AddCommMonoid` is
      in the `AddSubmonoid`."]
theorem multiset_prod_mem {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset M)
    (hm : ∀ a ∈ m, a ∈ S) : m.prod ∈ S 
goal: m.prod ∈ S

full_name: sum_mem
code: /-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] {ι : Type*}
    {t : Finset ι} {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S 
goal: ∑ c ∈ t, f c ∈ S

full_name: prod_mem
code: /-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] {ι : Type*}
    {t : Finset ι} {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S 
goal: ∏ c ∈ t, f c ∈ S

full_name: Submonoid.coe_list_prod
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_list_prod (l : List s) : (l.prod : M) = (l.map (↑)).prod 
goal: ↑l.prod = (List.map Subtype.val l).prod

full_name: AddSubmonoid.coe_list_sum
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_list_prod (l : List s) : (l.prod : M) = (l.map (↑)).prod 
goal: ↑l.sum = (List.map Subtype.val l).sum

full_name: AddSubmonoid.coe_multiset_sum
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_multiset_prod {M} [CommMonoid M] (S : Submonoid M) (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod 
goal: ↑m.sum = (Multiset.map Subtype.val m).sum

full_name: Submonoid.coe_multiset_prod
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_multiset_prod {M} [CommMonoid M] (S : Submonoid M) (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod 
goal: ↑m.prod = (Multiset.map Subtype.val m).prod

full_name: Submonoid.coe_finset_prod
code: @[to_additive (attr := norm_cast, simp)]
theorem coe_finset_prod {ι M} [CommMonoid M] (S : Submonoid M) (f : ι → S) (s : Finset ι) :
    ↑(∏ i ∈ s, f i) = (∏ i ∈ s, f i : M) 
goal: ↑(∏ i ∈ s, f i) = ∏ i ∈ s, ↑(f i)

full_name: AddSubmonoid.coe_finset_sum
code: @[to_additive (attr := norm_cast, simp)]
theorem coe_finset_prod {ι M} [CommMonoid M] (S : Submonoid M) (f : ι → S) (s : Finset ι) :
    ↑(∏ i ∈ s, f i) = (∏ i ∈ s, f i : M) 
goal: ↑(∑ i ∈ s, f i) = ∑ i ∈ s, ↑(f i)

full_name: Submonoid.list_prod_mem
code: /-- Product of a list of elements in a submonoid is in the submonoid. -/
@[to_additive "Sum of a list of elements in an `AddSubmonoid` is in the `AddSubmonoid`."]
theorem list_prod_mem {l : List M} (hl : ∀ x ∈ l, x ∈ s) : l.prod ∈ s 
goal: l.prod ∈ s

full_name: AddSubmonoid.list_sum_mem
code: /-- Product of a list of elements in a submonoid is in the submonoid. -/
@[to_additive "Sum of a list of elements in an `AddSubmonoid` is in the `AddSubmonoid`."]
theorem list_prod_mem {l : List M} (hl : ∀ x ∈ l, x ∈ s) : l.prod ∈ s 
goal: l.sum ∈ s

full_name: Submonoid.multiset_prod_mem
code: /-- Product of a multiset of elements in a submonoid of a `CommMonoid` is in the submonoid. -/
@[to_additive
      "Sum of a multiset of elements in an `AddSubmonoid` of an `AddCommMonoid` is
      in the `AddSubmonoid`."]
theorem multiset_prod_mem {M} [CommMonoid M] (S : Submonoid M) (m : Multiset M)
    (hm : ∀ a ∈ m, a ∈ S) : m.prod ∈ S 
goal: m.prod ∈ S

full_name: AddSubmonoid.multiset_sum_mem
code: /-- Product of a multiset of elements in a submonoid of a `CommMonoid` is in the submonoid. -/
@[to_additive
      "Sum of a multiset of elements in an `AddSubmonoid` of an `AddCommMonoid` is
      in the `AddSubmonoid`."]
theorem multiset_prod_mem {M} [CommMonoid M] (S : Submonoid M) (m : Multiset M)
    (hm : ∀ a ∈ m, a ∈ S) : m.prod ∈ S 
goal: m.sum ∈ S

full_name: AddSubmonoid.multiset_noncommSum_mem
code: @[to_additive]
theorem multiset_noncommProd_mem (S : Submonoid M) (m : Multiset M) (comm) (h : ∀ x ∈ m, x ∈ S) :
    m.noncommProd comm ∈ S 
goal: m.noncommSum comm ∈ S

full_name: Submonoid.multiset_noncommProd_mem
code: @[to_additive]
theorem multiset_noncommProd_mem (S : Submonoid M) (m : Multiset M) (comm) (h : ∀ x ∈ m, x ∈ S) :
    m.noncommProd comm ∈ S 
goal: m.noncommProd comm ∈ S

full_name: AddSubmonoid.sum_mem
code: /-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] (S : Submonoid M) {ι : Type*} {t : Finset ι}
    {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S 
goal: ∑ c ∈ t, f c ∈ S

full_name: Submonoid.prod_mem
code: /-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] (S : Submonoid M) {ι : Type*} {t : Finset ι}
    {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S 
goal: ∏ c ∈ t, f c ∈ S

full_name: Submonoid.noncommProd_mem
code: @[to_additive]
theorem noncommProd_mem (S : Submonoid M) {ι : Type*} (t : Finset ι) (f : ι → M) (comm)
    (h : ∀ c ∈ t, f c ∈ S) : t.noncommProd f comm ∈ S 
goal: t.noncommProd f comm ∈ S

full_name: AddSubmonoid.noncommSum_mem
code: @[to_additive]
theorem noncommProd_mem (S : Submonoid M) {ι : Type*} (t : Finset ι) (f : ι → M) (comm)
    (h : ∀ c ∈ t, f c ∈ S) : t.noncommProd f comm ∈ S 
goal: t.noncommSum f comm ∈ S

full_name: AddSubmonoid.mem_iSup_of_directed
code: @[to_additive]
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Submonoid M} (hS : Directed (· ≤ ·) S)
    {x : M} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i 
goal: x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i

full_name: Submonoid.mem_iSup_of_directed
code: @[to_additive]
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Submonoid M} (hS : Directed (· ≤ ·) S)
    {x : M} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i 
goal: x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i

full_name: Submonoid.coe_iSup_of_directed
code: @[to_additive]
theorem coe_iSup_of_directed {ι} [Nonempty ι] {S : ι → Submonoid M} (hS : Directed (· ≤ ·) S) :
    ((⨆ i, S i : Submonoid M) : Set M) = ⋃ i, S i 
goal: ↑(⨆ i, S i) = ⋃ i, ↑(S i)

full_name: AddSubmonoid.coe_iSup_of_directed
code: @[to_additive]
theorem coe_iSup_of_directed {ι} [Nonempty ι] {S : ι → Submonoid M} (hS : Directed (· ≤ ·) S) :
    ((⨆ i, S i : Submonoid M) : Set M) = ⋃ i, S i 
goal: ↑(⨆ i, S i) = ⋃ i, ↑(S i)

full_name: Submonoid.mem_sSup_of_directedOn
code: @[to_additive]
theorem mem_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) {x : M} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s 
goal: x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

full_name: AddSubmonoid.mem_sSup_of_directedOn
code: @[to_additive]
theorem mem_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) {x : M} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s 
goal: x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

full_name: AddSubmonoid.coe_sSup_of_directedOn
code: @[to_additive]
theorem coe_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set M) = ⋃ s ∈ S, ↑s 
goal: ↑(sSup S) = ⋃ s ∈ S, ↑s

full_name: Submonoid.coe_sSup_of_directedOn
code: @[to_additive]
theorem coe_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set M) = ⋃ s ∈ S, ↑s 
goal: ↑(sSup S) = ⋃ s ∈ S, ↑s

full_name: Submonoid.mem_sup_left
code: @[to_additive]
theorem mem_sup_left {S T : Submonoid M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T 
goal: x ∈ S → x ∈ S ⊔ T

full_name: AddSubmonoid.mem_sup_left
code: @[to_additive]
theorem mem_sup_left {S T : Submonoid M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T 
goal: x ∈ S → x ∈ S ⊔ T

full_name: Submonoid.mem_sup_right
code: @[to_additive]
theorem mem_sup_right {S T : Submonoid M} : ∀ {x : M}, x ∈ T → x ∈ S ⊔ T 
goal: x ∈ T → x ∈ S ⊔ T

full_name: AddSubmonoid.mem_sup_right
code: @[to_additive]
theorem mem_sup_right {S T : Submonoid M} : ∀ {x : M}, x ∈ T → x ∈ S ⊔ T 
goal: x ∈ T → x ∈ S ⊔ T

full_name: AddSubmonoid.add_mem_sup
code: @[to_additive]
theorem mul_mem_sup {S T : Submonoid M} {x y : M} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T 
goal: x + y ∈ S ⊔ T

full_name: Submonoid.mul_mem_sup
code: @[to_additive]
theorem mul_mem_sup {S T : Submonoid M} {x y : M} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T 
goal: x * y ∈ S ⊔ T

full_name: Submonoid.mem_iSup_of_mem
code: @[to_additive]
theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Submonoid M} (i : ι) :
    ∀ {x : M}, x ∈ S i → x ∈ iSup S 
goal: x ∈ S i → x ∈ iSup S

full_name: AddSubmonoid.mem_iSup_of_mem
code: @[to_additive]
theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Submonoid M} (i : ι) :
    ∀ {x : M}, x ∈ S i → x ∈ iSup S 
goal: x ∈ S i → x ∈ iSup S

full_name: AddSubmonoid.mem_sSup_of_mem
code: @[to_additive]
theorem mem_sSup_of_mem {S : Set (Submonoid M)} {s : Submonoid M} (hs : s ∈ S) :
    ∀ {x : M}, x ∈ s → x ∈ sSup S 
goal: x ∈ s → x ∈ sSup S

full_name: Submonoid.mem_sSup_of_mem
code: @[to_additive]
theorem mem_sSup_of_mem {S : Set (Submonoid M)} {s : Submonoid M} (hs : s ∈ S) :
    ∀ {x : M}, x ∈ s → x ∈ sSup S 
goal: x ∈ s → x ∈ sSup S

full_name: AddSubmonoid.iSup_induction
code: /-- An induction principle for elements of `⨆ i, S i`.
If `C` holds for `1` and all elements of `S i` for all `i`, and is preserved under multiplication,
then it holds for all elements of the supremum of `S`. -/
@[to_additive (attr := elab_as_elim)
      " An induction principle for elements of `⨆ i, S i`.
      If `C` holds for `0` and all elements of `S i` for all `i`, and is preserved under addition,
      then it holds for all elements of the supremum of `S`. "]
theorem iSup_induction {ι : Sort*} (S : ι → Submonoid M) {C : M → Prop} {x : M} (hx : x ∈ ⨆ i, S i)
    (mem : ∀ (i), ∀ x ∈ S i, C x) (one : C 1) (mul : ∀ x y, C x → C y → C (x * y)) : C x 
goal: C x

full_name: Submonoid.iSup_induction
code: /-- An induction principle for elements of `⨆ i, S i`.
If `C` holds for `1` and all elements of `S i` for all `i`, and is preserved under multiplication,
then it holds for all elements of the supremum of `S`. -/
@[to_additive (attr := elab_as_elim)
      " An induction principle for elements of `⨆ i, S i`.
      If `C` holds for `0` and all elements of `S i` for all `i`, and is preserved under addition,
      then it holds for all elements of the supremum of `S`. "]
theorem iSup_induction {ι : Sort*} (S : ι → Submonoid M) {C : M → Prop} {x : M} (hx : x ∈ ⨆ i, S i)
    (mem : ∀ (i), ∀ x ∈ S i, C x) (one : C 1) (mul : ∀ x y, C x → C y → C (x * y)) : C x 
goal: C x

full_name: Submonoid.iSup_induction'
code: /-- A dependent version of `Submonoid.iSup_induction`. -/
@[to_additive (attr := elab_as_elim) "A dependent version of `AddSubmonoid.iSup_induction`. "]
theorem iSup_induction' {ι : Sort*} (S : ι → Submonoid M) {C : ∀ x, (x ∈ ⨆ i, S i) → Prop}
    (mem : ∀ (i), ∀ (x) (hxS : x ∈ S i), C x (mem_iSup_of_mem i hxS)) (one : C 1 (one_mem _))
    (mul : ∀ x y hx hy, C x hx → C y hy → C (x * y) (mul_mem ‹_› ‹_›)) {x : M}
    (hx : x ∈ ⨆ i, S i) : C x hx 
goal: C x hx

full_name: AddSubmonoid.iSup_induction'
code: /-- A dependent version of `Submonoid.iSup_induction`. -/
@[to_additive (attr := elab_as_elim) "A dependent version of `AddSubmonoid.iSup_induction`. "]
theorem iSup_induction' {ι : Sort*} (S : ι → Submonoid M) {C : ∀ x, (x ∈ ⨆ i, S i) → Prop}
    (mem : ∀ (i), ∀ (x) (hxS : x ∈ S i), C x (mem_iSup_of_mem i hxS)) (one : C 1 (one_mem _))
    (mul : ∀ x y hx hy, C x hx → C y hy → C (x * y) (mul_mem ‹_› ‹_›)) {x : M}
    (hx : x ∈ ⨆ i, S i) : C x hx 
goal: C x hx

full_name: FreeAddMonoid.closure_range_of
code: @[to_additive]
theorem closure_range_of : closure (Set.range <| @of α) = ⊤ 
goal: AddSubmonoid.closure (Set.range FreeAddMonoid.of) = ⊤

full_name: FreeMonoid.closure_range_of
code: @[to_additive]
theorem closure_range_of : closure (Set.range <| @of α) = ⊤ 
goal: Submonoid.closure (Set.range FreeMonoid.of) = ⊤

full_name: Submonoid.closure_singleton_eq
code: theorem closure_singleton_eq (x : M) : closure ({x} : Set M) = mrange (powersHom M x) 
goal: Submonoid.closure {x} = MonoidHom.mrange ((powersHom M) x)

full_name: Submonoid.mem_closure_singleton
code: /-- The submonoid generated by an element of a monoid equals the set of natural number powers of
    the element. -/
theorem mem_closure_singleton {x y : M} : y ∈ closure ({x} : Set M) ↔ ∃ n : ℕ, x ^ n = y 
goal: y ∈ Submonoid.closure {x} ↔ ∃ n, x ^ n = y

full_name: Submonoid.mem_closure_singleton_self
code: theorem mem_closure_singleton_self {y : M} : y ∈ closure ({y} : Set M) 
goal: y ∈ Submonoid.closure {y}

full_name: Submonoid.closure_singleton_one
code: theorem closure_singleton_one : closure ({1} : Set M) = ⊥ 
goal: Submonoid.closure {1} = ⊥

full_name: Submonoid.card_bot
code: @[to_additive]
theorem card_bot {_ : Fintype (⊥ : Submonoid M)} : card (⊥ : Submonoid M) = 1 
goal: ∀ {x : Fintype ↥⊥}, Fintype.card ↥⊥ = 1

full_name: AddSubmonoid.card_bot
code: @[to_additive]
theorem card_bot {_ : Fintype (⊥ : Submonoid M)} : card (⊥ : Submonoid M) = 1 
goal: ∀ {x : Fintype ↥⊥}, Fintype.card ↥⊥ = 1

full_name: AddSubmonoid.eq_bot_of_card_le
code: @[to_additive]
theorem eq_bot_of_card_le (h : card S ≤ 1) : S = ⊥ 
goal: S = ⊥

full_name: Submonoid.eq_bot_of_card_le
code: @[to_additive]
theorem eq_bot_of_card_le (h : card S ≤ 1) : S = ⊥ 
goal: S = ⊥

full_name: AddSubmonoid.eq_bot_of_card_eq
code: @[to_additive]
theorem eq_bot_of_card_eq (h : card S = 1) : S = ⊥ 
goal: S = ⊥

full_name: Submonoid.eq_bot_of_card_eq
code: @[to_additive]
theorem eq_bot_of_card_eq (h : card S = 1) : S = ⊥ 
goal: S = ⊥

full_name: Submonoid.card_le_one_iff_eq_bot
code: @[to_additive card_le_one_iff_eq_bot]
theorem card_le_one_iff_eq_bot : card S ≤ 1 ↔ S = ⊥ 
goal: Fintype.card ↥S ≤ 1 ↔ S = ⊥

full_name: AddSubmonoid.card_le_one_iff_eq_bot
code: @[to_additive card_le_one_iff_eq_bot]
theorem card_le_one_iff_eq_bot : card S ≤ 1 ↔ S = ⊥ 
goal: Fintype.card ↥S ≤ 1 ↔ S = ⊥

full_name: Submonoid.eq_bot_iff_card
code: @[to_additive]
lemma eq_bot_iff_card : S = ⊥ ↔ card S = 1 
goal: S = ⊥ ↔ Fintype.card ↥S = 1

full_name: AddSubmonoid.eq_bot_iff_card
code: @[to_additive]
lemma eq_bot_iff_card : S = ⊥ ↔ card S = 1 
goal: S = ⊥ ↔ Fintype.card ↥S = 1

full_name: FreeAddMonoid.mrange_lift
code: @[to_additive]
theorem _root_.FreeMonoid.mrange_lift {α} (f : α → M) :
    mrange (FreeMonoid.lift f) = closure (Set.range f) 
goal: AddMonoidHom.mrange (FreeAddMonoid.lift f) = AddSubmonoid.closure (Set.range f)

full_name: FreeMonoid.mrange_lift
code: @[to_additive]
theorem _root_.FreeMonoid.mrange_lift {α} (f : α → M) :
    mrange (FreeMonoid.lift f) = closure (Set.range f) 
goal: MonoidHom.mrange (FreeMonoid.lift f) = Submonoid.closure (Set.range f)

full_name: AddSubmonoid.closure_eq_mrange
code: @[to_additive]
theorem closure_eq_mrange (s : Set M) : closure s = mrange (FreeMonoid.lift ((↑) : s → M)) 
goal: AddSubmonoid.closure s = AddMonoidHom.mrange (FreeAddMonoid.lift Subtype.val)

full_name: Submonoid.closure_eq_mrange
code: @[to_additive]
theorem closure_eq_mrange (s : Set M) : closure s = mrange (FreeMonoid.lift ((↑) : s → M)) 
goal: Submonoid.closure s = MonoidHom.mrange (FreeMonoid.lift Subtype.val)

full_name: Submonoid.closure_eq_image_prod
code: @[to_additive]
theorem closure_eq_image_prod (s : Set M) :
    (closure s : Set M) = List.prod '' { l : List M | ∀ x ∈ l, x ∈ s } 
goal: ↑(Submonoid.closure s) = List.prod '' {l | ∀ x ∈ l, x ∈ s}

full_name: AddSubmonoid.closure_eq_image_sum
code: @[to_additive]
theorem closure_eq_image_prod (s : Set M) :
    (closure s : Set M) = List.prod '' { l : List M | ∀ x ∈ l, x ∈ s } 
goal: ↑(AddSubmonoid.closure s) = List.sum '' {l | ∀ x ∈ l, x ∈ s}

full_name: AddSubmonoid.exists_list_of_mem_closure
code: @[to_additive]
theorem exists_list_of_mem_closure {s : Set M} {x : M} (hx : x ∈ closure s) :
    ∃ l : List M, (∀ y ∈ l, y ∈ s) ∧ l.prod = x 
goal: ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.sum = x

full_name: Submonoid.exists_list_of_mem_closure
code: @[to_additive]
theorem exists_list_of_mem_closure {s : Set M} {x : M} (hx : x ∈ closure s) :
    ∃ l : List M, (∀ y ∈ l, y ∈ s) ∧ l.prod = x 
goal: ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.prod = x

full_name: Submonoid.exists_multiset_of_mem_closure
code: @[to_additive]
theorem exists_multiset_of_mem_closure {M : Type*} [CommMonoid M] {s : Set M} {x : M}
    (hx : x ∈ closure s) : ∃ l : Multiset M, (∀ y ∈ l, y ∈ s) ∧ l.prod = x 
goal: ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.prod = x

full_name: AddSubmonoid.exists_multiset_of_mem_closure
code: @[to_additive]
theorem exists_multiset_of_mem_closure {M : Type*} [CommMonoid M] {s : Set M} {x : M}
    (hx : x ∈ closure s) : ∃ l : Multiset M, (∀ y ∈ l, y ∈ s) ∧ l.prod = x 
goal: ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.sum = x

full_name: AddSubmonoid.closure_induction_left
code: @[to_additive (attr := elab_as_elim)]
theorem closure_induction_left {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_left : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy → p (x * y) (mul_mem (subset_closure hx) hy))
    {x : M} (h : x ∈ closure s) :
    p x h 
goal: p x h

full_name: Submonoid.closure_induction_left
code: @[to_additive (attr := elab_as_elim)]
theorem closure_induction_left {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_left : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy → p (x * y) (mul_mem (subset_closure hx) hy))
    {x : M} (h : x ∈ closure s) :
    p x h 
goal: p x h

full_name: Submonoid.induction_of_closure_eq_top_left
code: @[to_additive (attr := elab_as_elim)]
theorem induction_of_closure_eq_top_left {s : Set M} {p : M → Prop} (hs : closure s = ⊤) (x : M)
    (one : p 1) (mul : ∀ x ∈ s, ∀ (y), p y → p (x * y)) : p x 
goal: p x

full_name: AddSubmonoid.induction_of_closure_eq_top_left
code: @[to_additive (attr := elab_as_elim)]
theorem induction_of_closure_eq_top_left {s : Set M} {p : M → Prop} (hs : closure s = ⊤) (x : M)
    (one : p 1) (mul : ∀ x ∈ s, ∀ (y), p y → p (x * y)) : p x 
goal: p x

full_name: AddSubmonoid.closure_induction_right
code: @[to_additive (attr := elab_as_elim)]
theorem closure_induction_right {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_right : ∀ x hx, ∀ (y) (hy : y ∈ s), p x hx → p (x * y) (mul_mem hx (subset_closure hy)))
    {x : M} (h : x ∈ closure s) : p x h 
goal: p x h

full_name: Submonoid.closure_induction_right
code: @[to_additive (attr := elab_as_elim)]
theorem closure_induction_right {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_right : ∀ x hx, ∀ (y) (hy : y ∈ s), p x hx → p (x * y) (mul_mem hx (subset_closure hy)))
    {x : M} (h : x ∈ closure s) : p x h 
goal: p x h

full_name: Submonoid.induction_of_closure_eq_top_right
code: @[to_additive (attr := elab_as_elim)]
theorem induction_of_closure_eq_top_right {s : Set M} {p : M → Prop} (hs : closure s = ⊤) (x : M)
    (H1 : p 1) (Hmul : ∀ (x), ∀ y ∈ s, p x → p (x * y)) : p x 
goal: p x

full_name: AddSubmonoid.induction_of_closure_eq_top_right
code: @[to_additive (attr := elab_as_elim)]
theorem induction_of_closure_eq_top_right {s : Set M} {p : M → Prop} (hs : closure s = ⊤) (x : M)
    (H1 : p 1) (Hmul : ∀ (x), ∀ y ∈ s, p x → p (x * y)) : p x 
goal: p x

full_name: Submonoid.powers
code: /-- The submonoid generated by an element. -/
def powers (n : M) : Submonoid M 
goal: Submonoid M

full_name: Submonoid.mem_powers
code: theorem mem_powers (n : M) : n ∈ powers n 
goal: n ∈ Submonoid.powers n

full_name: Submonoid.coe_powers
code: theorem coe_powers (x : M) : ↑(powers x) = Set.range fun n : ℕ => x ^ n 
goal: ↑(Submonoid.powers x) = Set.range fun n => x ^ n

full_name: Submonoid.mem_powers_iff
code: theorem mem_powers_iff (x z : M) : x ∈ powers z ↔ ∃ n : ℕ, z ^ n = x 
goal: x ∈ Submonoid.powers z ↔ ∃ n, z ^ n = x

full_name: Submonoid.decidableMemPowers
code: noncomputable instance decidableMemPowers : DecidablePred (· ∈ Submonoid.powers a) 
goal: DecidablePred fun x => x ∈ Submonoid.powers a

full_name: Submonoid.fintypePowers
code: noncomputable instance fintypePowers [Fintype M] : Fintype (powers a) 
goal: Fintype ↥(Submonoid.powers a)

full_name: Submonoid.powers_eq_closure
code: theorem powers_eq_closure (n : M) : powers n = closure {n} 
goal: Submonoid.powers n = Submonoid.closure {n}

full_name: Submonoid.powers_le
code: lemma powers_le {n : M} {P : Submonoid M} : powers n ≤ P ↔ n ∈ P 
goal: Submonoid.powers n ≤ P ↔ n ∈ P

full_name: Submonoid.powers_one
code: lemma powers_one : powers (1 : M) = ⊥ 
goal: Submonoid.powers 1 = ⊥

full_name: Submonoid.groupPowers
code: /-- The submonoid generated by an element is a group if that element has finite order. -/
abbrev groupPowers {x : M} {n : ℕ} (hpos : 0 < n) (hx : x ^ n = 1) : Group (powers x) 
goal: Group ↥(Submonoid.powers x)

full_name: Submonoid.pow_coe
code: /-- Exponentiation map from natural numbers to powers. -/
@[simps!]
def pow (n : M) (m : ℕ) : powers n 
goal: ↑(Submonoid.pow n m) = n ^ m

full_name: Submonoid.pow
code: /-- Exponentiation map from natural numbers to powers. -/
@[simps!]
def pow (n : M) (m : ℕ) : powers n 
goal: ↥(Submonoid.powers n)

full_name: Submonoid.pow_apply
code: theorem pow_apply (n : M) (m : ℕ) : Submonoid.pow n m = ⟨n ^ m, m, rfl⟩ 
goal: Submonoid.pow n m = ⟨n ^ m, ⋯⟩

full_name: Submonoid.log
code: /-- Logarithms from powers to natural numbers. -/
def log [DecidableEq M] {n : M} (p : powers n) : ℕ 
goal: ℕ

full_name: Submonoid.pow_log_eq_self
code: @[simp]
theorem pow_log_eq_self [DecidableEq M] {n : M} (p : powers n) : pow n (log p) = p 
goal: Submonoid.pow n (Submonoid.log p) = p

full_name: Submonoid.pow_right_injective_iff_pow_injective
code: theorem pow_right_injective_iff_pow_injective {n : M} :
    (Function.Injective fun m : ℕ => n ^ m) ↔ Function.Injective (pow n) 
goal: (Function.Injective fun m => n ^ m) ↔ Function.Injective (Submonoid.pow n)

full_name: Submonoid.log_pow_eq_self
code: @[simp]
theorem log_pow_eq_self [DecidableEq M] {n : M} (h : Function.Injective fun m : ℕ => n ^ m)
    (m : ℕ) : log (pow n m) = m 
goal: Submonoid.log (Submonoid.pow n m) = m

full_name: Submonoid.powLogEquiv_apply
code: /-- The exponentiation map is an isomorphism from the additive monoid on natural numbers to powers
when it is injective. The inverse is given by the logarithms. -/
@[simps]
def powLogEquiv [DecidableEq M] {n : M} (h : Function.Injective fun m : ℕ => n ^ m) :
    Multiplicative ℕ ≃* powers n 
goal: (Submonoid.powLogEquiv h) m = Submonoid.pow n (Multiplicative.toAdd m)

full_name: Submonoid.powLogEquiv_symm_apply
code: /-- The exponentiation map is an isomorphism from the additive monoid on natural numbers to powers
when it is injective. The inverse is given by the logarithms. -/
@[simps]
def powLogEquiv [DecidableEq M] {n : M} (h : Function.Injective fun m : ℕ => n ^ m) :
    Multiplicative ℕ ≃* powers n 
goal: (Submonoid.powLogEquiv h).symm m = Multiplicative.ofAdd (Submonoid.log m)

full_name: Submonoid.powLogEquiv
code: /-- The exponentiation map is an isomorphism from the additive monoid on natural numbers to powers
when it is injective. The inverse is given by the logarithms. -/
@[simps]
def powLogEquiv [DecidableEq M] {n : M} (h : Function.Injective fun m : ℕ => n ^ m) :
    Multiplicative ℕ ≃* powers n 
goal: Multiplicative ℕ ≃* ↥(Submonoid.powers n)

full_name: Submonoid.log_mul
code: theorem log_mul [DecidableEq M] {n : M} (h : Function.Injective fun m : ℕ => n ^ m)
    (x y : powers (n : M)) : log (x * y) = log x + log y 
goal: Submonoid.log (x * y) = Submonoid.log x + Submonoid.log y

full_name: Submonoid.log_pow_int_eq_self
code: theorem log_pow_int_eq_self {x : ℤ} (h : 1 < x.natAbs) (m : ℕ) : log (pow x m) = m 
goal: Submonoid.log (Submonoid.pow x m) = m

full_name: Submonoid.map_powers
code: @[simp]
theorem map_powers {N : Type*} {F : Type*} [Monoid N] [FunLike F M N] [MonoidHomClass F M N]
    (f : F) (m : M) :
    (powers m).map f = powers (f m) 
goal: Submonoid.map f (Submonoid.powers m) = Submonoid.powers (f m)

full_name: Submonoid.closureCommMonoidOfComm
code: /-- If all the elements of a set `s` commute, then `closure s` is a commutative monoid. -/
@[to_additive
      "If all the elements of a set `s` commute, then `closure s` forms an additive
      commutative monoid."]
def closureCommMonoidOfComm {s : Set M} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
    CommMonoid (closure s) 
goal: CommMonoid ↥(Submonoid.closure s)

full_name: AddSubmonoid.closureAddCommMonoidOfComm
code: /-- If all the elements of a set `s` commute, then `closure s` is a commutative monoid. -/
@[to_additive
      "If all the elements of a set `s` commute, then `closure s` forms an additive
      commutative monoid."]
def closureCommMonoidOfComm {s : Set M} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
    CommMonoid (closure s) 
goal: AddCommMonoid ↥(AddSubmonoid.closure s)

full_name: IsScalarTower.of_mclosure_eq_top
code: @[to_additive]
theorem IsScalarTower.of_mclosure_eq_top {N α} [Monoid M] [MulAction M N] [SMul N α] [MulAction M α]
    {s : Set M} (htop : Submonoid.closure s = ⊤)
    (hs : ∀ x ∈ s, ∀ (y : N) (z : α), (x • y) • z = x • y • z) : IsScalarTower M N α 
goal: IsScalarTower M N α

full_name: VAddAssocClass.of_mclosure_eq_top
code: @[to_additive]
theorem IsScalarTower.of_mclosure_eq_top {N α} [Monoid M] [MulAction M N] [SMul N α] [MulAction M α]
    {s : Set M} (htop : Submonoid.closure s = ⊤)
    (hs : ∀ x ∈ s, ∀ (y : N) (z : α), (x • y) • z = x • y • z) : IsScalarTower M N α 
goal: VAddAssocClass M N α

full_name: VAddCommClass.of_mclosure_eq_top
code: @[to_additive]
theorem SMulCommClass.of_mclosure_eq_top {N α} [Monoid M] [SMul N α] [MulAction M α] {s : Set M}
    (htop : Submonoid.closure s = ⊤) (hs : ∀ x ∈ s, ∀ (y : N) (z : α), x • y • z = y • x • z) :
    SMulCommClass M N α 
goal: VAddCommClass M N α

full_name: SMulCommClass.of_mclosure_eq_top
code: @[to_additive]
theorem SMulCommClass.of_mclosure_eq_top {N α} [Monoid M] [SMul N α] [MulAction M α] {s : Set M}
    (htop : Submonoid.closure s = ⊤) (hs : ∀ x ∈ s, ∀ (y : N) (z : α), x • y • z = y • x • z) :
    SMulCommClass M N α 
goal: SMulCommClass M N α

full_name: Submonoid.sup_eq_range
code: @[to_additive]
theorem sup_eq_range (s t : Submonoid N) : s ⊔ t = mrange (s.subtype.coprod t.subtype) 
goal: s ⊔ t = MonoidHom.mrange (s.subtype.coprod t.subtype)

full_name: AddSubmonoid.sup_eq_range
code: @[to_additive]
theorem sup_eq_range (s t : Submonoid N) : s ⊔ t = mrange (s.subtype.coprod t.subtype) 
goal: s ⊔ t = AddMonoidHom.mrange (s.subtype.coprod t.subtype)

full_name: Submonoid.mem_sup
code: @[to_additive]
theorem mem_sup {s t : Submonoid N} {x : N} : x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x 
goal: x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x

full_name: AddSubmonoid.mem_sup
code: @[to_additive]
theorem mem_sup {s t : Submonoid N} {x : N} : x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x 
goal: x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y + z = x

full_name: AddSubmonoid.closure_singleton_eq
code: theorem closure_singleton_eq (x : A) :
    closure ({x} : Set A) = AddMonoidHom.mrange (multiplesHom A x) 
goal: AddSubmonoid.closure {x} = AddMonoidHom.mrange ((multiplesHom A) x)

full_name: AddSubmonoid.mem_closure_singleton
code: /-- The `AddSubmonoid` generated by an element of an `AddMonoid` equals the set of
natural number multiples of the element. -/
theorem mem_closure_singleton {x y : A} : y ∈ closure ({x} : Set A) ↔ ∃ n : ℕ, n • x = y 
goal: y ∈ AddSubmonoid.closure {x} ↔ ∃ n, n • x = y

full_name: AddSubmonoid.closure_singleton_zero
code: theorem closure_singleton_zero : closure ({0} : Set A) = ⊥ 
goal: AddSubmonoid.closure {0} = ⊥

full_name: AddSubmonoid.multiples
code: /-- The additive submonoid generated by an element. -/
def multiples (x : A) : AddSubmonoid A 
goal: AddSubmonoid A

full_name: MulMemClass.mul_right_mem_add_closure
code: /-- The product of an element of the additive closure of a multiplicative subsemigroup `M`
and an element of `M` is contained in the additive closure of `M`. -/
theorem mul_right_mem_add_closure (ha : a ∈ AddSubmonoid.closure (S : Set R)) (hb : b ∈ S) :
    a * b ∈ AddSubmonoid.closure (S : Set R) 
goal: a * b ∈ AddSubmonoid.closure ↑S

full_name: MulMemClass.mul_mem_add_closure
code: /-- The product of two elements of the additive closure of a submonoid `M` is an element of the
additive closure of `M`. -/
theorem mul_mem_add_closure (ha : a ∈ AddSubmonoid.closure (S : Set R))
    (hb : b ∈ AddSubmonoid.closure (S : Set R)) : a * b ∈ AddSubmonoid.closure (S : Set R) 
goal: a * b ∈ AddSubmonoid.closure ↑S

full_name: MulMemClass.mul_left_mem_add_closure
code: /-- The product of an element of `S` and an element of the additive closure of a multiplicative
submonoid `S` is contained in the additive closure of `S`. -/
theorem mul_left_mem_add_closure (ha : a ∈ S) (hb : b ∈ AddSubmonoid.closure (S : Set R)) :
    a * b ∈ AddSubmonoid.closure (S : Set R) 
goal: a * b ∈ AddSubmonoid.closure ↑S

full_name: Submonoid.mem_closure_pair
code: /-- An element is in the closure of a two-element set if it is a linear combination of those two
elements. -/
@[to_additive
      "An element is in the closure of a two-element set if it is a linear combination of
      those two elements."]
theorem mem_closure_pair {A : Type*} [CommMonoid A] (a b c : A) :
    c ∈ Submonoid.closure ({a, b} : Set A) ↔ ∃ m n : ℕ, a ^ m * b ^ n = c 
goal: c ∈ Submonoid.closure {a, b} ↔ ∃ m n, a ^ m * b ^ n = c

full_name: AddSubmonoid.mem_closure_pair
code: /-- An element is in the closure of a two-element set if it is a linear combination of those two
elements. -/
@[to_additive
      "An element is in the closure of a two-element set if it is a linear combination of
      those two elements."]
theorem mem_closure_pair {A : Type*} [CommMonoid A] (a b c : A) :
    c ∈ Submonoid.closure ({a, b} : Set A) ↔ ∃ m n : ℕ, a ^ m * b ^ n = c 
goal: c ∈ AddSubmonoid.closure {a, b} ↔ ∃ m n, m • a + n • b = c

full_name: ofMul_image_powers_eq_multiples_ofMul
code: theorem ofMul_image_powers_eq_multiples_ofMul [Monoid M] {x : M} :
    Additive.ofMul '' (Submonoid.powers x : Set M) = AddSubmonoid.multiples (Additive.ofMul x) 
goal: ⇑Additive.ofMul '' ↑(Submonoid.powers x) = ↑(AddSubmonoid.multiples (Additive.ofMul x))

full_name: ofAdd_image_multiples_eq_powers_ofAdd
code: theorem ofAdd_image_multiples_eq_powers_ofAdd [AddMonoid A] {x : A} :
    Multiplicative.ofAdd '' (AddSubmonoid.multiples x : Set A) =
      Submonoid.powers (Multiplicative.ofAdd x) 
goal: ⇑Multiplicative.ofAdd '' ↑(AddSubmonoid.multiples x) = ↑(Submonoid.powers (Multiplicative.ofAdd x))

full_name: Submonoid.isPrimal
code: /-- The submonoid of primal elements in a cancellative commutative monoid with zero. -/
def Submonoid.isPrimal (α) [CancelCommMonoidWithZero α] : Submonoid α 
goal: Submonoid α