Documentation

Mathlib.GroupTheory.Subsemigroup.Basic

Subsemigroups: definition and complete_lattice structure #

This file defines bundled multiplicative and additive subsemigroups. We also define a CompleteLattice structure on Subsemigroups, and define the closure of a set as the minimal subsemigroup that includes this set.

Main definitions #

For each of the following definitions in the Subsemigroup namespace, there is a corresponding definition in the AddSubsemigroup namespace.

Implementation notes #

Subsemigroup inclusion is denoted ≤≤ rather than ⊆⊆, although ∈∈ is defined as membership of a subsemigroup's underlying set.

Note that Subsemigroup M does not actually require Semigroup M, instead requiring only the weaker Mul M.

This file is designed to have very few dependencies. In particular, it should not use natural numbers.

Tags #

subsemigroup, subsemigroups

class MulMemClass (S : Type u_1) (M : Type u_2) [inst : Mul M] [inst : SetLike S M] :
  • A substructure satisfying MulMemClass is closed under multiplication.

    mul_mem : ∀ {s : S} {a b : M}, a sb sa * b s

MulMemClass S M says S is a type of sets s : Set M that are closed under (*)

Instances
    class AddMemClass (S : Type u_1) (M : Type u_2) [inst : Add M] [inst : SetLike S M] :
    • A substructure satisfying AddMemClass is closed under addition.

      add_mem : ∀ {s : S} {a b : M}, a sb sa + b s

    AddMemClass S M says S is a type of sets s : Set M that are closed under (+)

    Instances
      structure Subsemigroup (M : Type u_1) [inst : Mul M] :
      Type u_1
      • The carrier of a subsemigroup.

        carrier : Set M
      • The product of two elements of a subsemigroup belongs to the subsemigroup.

        mul_mem' : ∀ {a b : M}, a carrierb carriera * b carrier

      A subsemigroup of a magma M is a subset closed under multiplication.

      Instances For
        structure AddSubsemigroup (M : Type u_1) [inst : Add M] :
        Type u_1
        • The carrier of an additive subsemigroup.

          carrier : Set M
        • The sum of two elements of an additive subsemigroup belongs to the subsemigroup.

          add_mem' : ∀ {a b : M}, a carrierb carriera + b carrier

        An additive subsemigroup of an additive magma M is a subset closed under addition.

        Instances For
          def AddSubsemigroup.instSetLikeSubsemigroup.proof_1 {M : Type u_1} [inst : Add M] (p : AddSubsemigroup M) (q : AddSubsemigroup M) (h : p.carrier = q.carrier) :
          p = q
          Equations
          • (_ : p = q) = (_ : p = q)
          Equations
          • AddSubsemigroup.instSetLikeSubsemigroup = { coe := AddSubsemigroup.carrier, coe_injective' := (_ : ∀ (p q : AddSubsemigroup M), p.carrier = q.carrierp = q) }
          Equations
          • Subsemigroup.instSetLikeSubsemigroup = { coe := Subsemigroup.carrier, coe_injective' := (_ : ∀ (p q : Subsemigroup M), p.carrier = q.carrierp = q) }
          @[simp]
          theorem AddSubsemigroup.mem_carrier {M : Type u_1} [inst : Add M] {s : AddSubsemigroup M} {x : M} :
          x s.carrier x s
          @[simp]
          theorem Subsemigroup.mem_carrier {M : Type u_1} [inst : Mul M] {s : Subsemigroup M} {x : M} :
          x s.carrier x s
          @[simp]
          theorem AddSubsemigroup.mem_mk {M : Type u_1} [inst : Add M] {s : Set M} {x : M} (h_mul : ∀ {a b : M}, a sb sa + b s) :
          x { carrier := s, add_mem' := h_mul } x s
          @[simp]
          theorem Subsemigroup.mem_mk {M : Type u_1} [inst : Mul M] {s : Set M} {x : M} (h_mul : ∀ {a b : M}, a sb sa * b s) :
          x { carrier := s, mul_mem' := h_mul } x s
          @[simp]
          theorem AddSubsemigroup.coe_set_mk {M : Type u_1} [inst : Add M] {s : Set M} (h_mul : ∀ {a b : M}, a sb sa + b s) :
          { carrier := s, add_mem' := h_mul } = s
          @[simp]
          theorem Subsemigroup.coe_set_mk {M : Type u_1} [inst : Mul M] {s : Set M} (h_mul : ∀ {a b : M}, a sb sa * b s) :
          { carrier := s, mul_mem' := h_mul } = s
          @[simp]
          theorem AddSubsemigroup.mk_le_mk {M : Type u_1} [inst : Add M] {s : Set M} {t : Set M} (h_mul : ∀ {a b : M}, a sb sa + b s) (h_mul' : ∀ {a b : M}, a tb ta + b t) :
          { carrier := s, add_mem' := h_mul } { carrier := t, add_mem' := h_mul' } s t
          @[simp]
          theorem Subsemigroup.mk_le_mk {M : Type u_1} [inst : Mul M] {s : Set M} {t : Set M} (h_mul : ∀ {a b : M}, a sb sa * b s) (h_mul' : ∀ {a b : M}, a tb ta * b t) :
          { carrier := s, mul_mem' := h_mul } { carrier := t, mul_mem' := h_mul' } s t
          theorem AddSubsemigroup.ext {M : Type u_1} [inst : Add M] {S : AddSubsemigroup M} {T : AddSubsemigroup M} (h : ∀ (x : M), x S x T) :
          S = T

          Two AddSubsemigroups are equal if they have the same elements.

          theorem Subsemigroup.ext {M : Type u_1} [inst : Mul M] {S : Subsemigroup M} {T : Subsemigroup M} (h : ∀ (x : M), x S x T) :
          S = T

          Two subsemigroups are equal if they have the same elements.

          def AddSubsemigroup.copy {M : Type u_1} [inst : Add M] (S : AddSubsemigroup M) (s : Set M) (hs : s = S) :

          Copy an additive subsemigroup replacing carrier with a set that is equal to it.

          Equations
          def AddSubsemigroup.copy.proof_1 {M : Type u_1} [inst : Add M] (S : AddSubsemigroup M) (s : Set M) (hs : s = S) :
          ∀ {a b : M}, a sb sa + b s
          Equations
          def Subsemigroup.copy {M : Type u_1} [inst : Mul M] (S : Subsemigroup M) (s : Set M) (hs : s = S) :

          Copy a subsemigroup replacing carrier with a set that is equal to it.

          Equations
          @[simp]
          theorem AddSubsemigroup.coe_copy {M : Type u_1} [inst : Add M] {S : AddSubsemigroup M} {s : Set M} (hs : s = S) :
          ↑(AddSubsemigroup.copy S s hs) = s
          @[simp]
          theorem Subsemigroup.coe_copy {M : Type u_1} [inst : Mul M] {S : Subsemigroup M} {s : Set M} (hs : s = S) :
          ↑(Subsemigroup.copy S s hs) = s
          theorem AddSubsemigroup.copy_eq {M : Type u_1} [inst : Add M] {S : AddSubsemigroup M} {s : Set M} (hs : s = S) :
          theorem Subsemigroup.copy_eq {M : Type u_1} [inst : Mul M] {S : Subsemigroup M} {s : Set M} (hs : s = S) :
          theorem AddSubsemigroup.add_mem {M : Type u_1} [inst : Add M] (S : AddSubsemigroup M) {x : M} {y : M} :
          x Sy Sx + y S

          An AddSubsemigroup is closed under addition.

          theorem Subsemigroup.mul_mem {M : Type u_1} [inst : Mul M] (S : Subsemigroup M) {x : M} {y : M} :
          x Sy Sx * y S

          A subsemigroup is closed under multiplication.

          def AddSubsemigroup.instTopSubsemigroup.proof_1 {M : Type u_1} [inst : Add M] :
          ∀ {a b : M}, a Set.univb Set.univa + b Set.univ
          Equations
          • (_ : a + b Set.univ) = (_ : a + b Set.univ)

          The additive subsemigroup M of the magma M.

          Equations
          • AddSubsemigroup.instTopSubsemigroup = { top := { carrier := Set.univ, add_mem' := (_ : ∀ {a b : M}, a Set.univb Set.univa + b Set.univ) } }
          instance Subsemigroup.instTopSubsemigroup {M : Type u_1} [inst : Mul M] :

          The subsemigroup M of the magma M.

          Equations
          • Subsemigroup.instTopSubsemigroup = { top := { carrier := Set.univ, mul_mem' := (_ : ∀ {a b : M}, a Set.univb Set.univa * b Set.univ) } }

          The trivial AddSubsemigroup ∅∅ of an additive magma M.

          Equations
          • AddSubsemigroup.instBotSubsemigroup = { bot := { carrier := , add_mem' := (_ : ∀ {a b : M}, Falseb a + b ) } }
          def AddSubsemigroup.instBotSubsemigroup.proof_1 {M : Type u_1} [inst : Add M] :
          ∀ {a b : M}, Falseb a + b
          Equations
          instance Subsemigroup.instBotSubsemigroup {M : Type u_1} [inst : Mul M] :

          The trivial subsemigroup ∅∅ of a magma M.

          Equations
          • Subsemigroup.instBotSubsemigroup = { bot := { carrier := , mul_mem' := (_ : ∀ {a b : M}, Falseb a * b ) } }
          Equations
          • AddSubsemigroup.instInhabitedSubsemigroup = { default := }
          Equations
          • Subsemigroup.instInhabitedSubsemigroup = { default := }
          theorem AddSubsemigroup.not_mem_bot {M : Type u_1} [inst : Add M] {x : M} :
          theorem Subsemigroup.not_mem_bot {M : Type u_1} [inst : Mul M] {x : M} :
          @[simp]
          theorem AddSubsemigroup.mem_top {M : Type u_1} [inst : Add M] (x : M) :
          @[simp]
          theorem Subsemigroup.mem_top {M : Type u_1} [inst : Mul M] (x : M) :
          @[simp]
          theorem AddSubsemigroup.coe_top {M : Type u_1} [inst : Add M] :
          = Set.univ
          @[simp]
          theorem Subsemigroup.coe_top {M : Type u_1} [inst : Mul M] :
          = Set.univ
          @[simp]
          theorem AddSubsemigroup.coe_bot {M : Type u_1} [inst : Add M] :
          =
          @[simp]
          theorem Subsemigroup.coe_bot {M : Type u_1} [inst : Mul M] :
          =
          abbrev AddSubsemigroup.instInfSubsemigroup.match_1 {M : Type u_1} [inst : Add M] (S₁ : AddSubsemigroup M) (S₂ : AddSubsemigroup M) :
          {b : M} → ∀ (motive : b S₁ S₂Prop) (x : b S₁ S₂), (∀ (hy : b S₁) (hy' : b S₂), motive (_ : b S₁ b S₂)) → motive x
          Equations
          def AddSubsemigroup.instInfSubsemigroup.proof_1 {M : Type u_1} [inst : Add M] (S₁ : AddSubsemigroup M) (S₂ : AddSubsemigroup M) :
          ∀ {a b : M}, a S₁ S₂b S₁ S₂a + b S₁ S₂
          Equations

          The inf of two AddSubsemigroups is their intersection.

          Equations
          • AddSubsemigroup.instInfSubsemigroup = { inf := fun S₁ S₂ => { carrier := S₁ S₂, add_mem' := (_ : ∀ {a b : M}, a S₁ S₂b S₁ S₂a + b S₁ S₂) } }
          instance Subsemigroup.instInfSubsemigroup {M : Type u_1} [inst : Mul M] :

          The inf of two subsemigroups is their intersection.

          Equations
          • Subsemigroup.instInfSubsemigroup = { inf := fun S₁ S₂ => { carrier := S₁ S₂, mul_mem' := (_ : ∀ {a b : M}, a S₁ S₂b S₁ S₂a * b S₁ S₂) } }
          @[simp]
          theorem AddSubsemigroup.coe_inf {M : Type u_1} [inst : Add M] (p : AddSubsemigroup M) (p' : AddSubsemigroup M) :
          ↑(p p') = p p'
          @[simp]
          theorem Subsemigroup.coe_inf {M : Type u_1} [inst : Mul M] (p : Subsemigroup M) (p' : Subsemigroup M) :
          ↑(p p') = p p'
          @[simp]
          theorem AddSubsemigroup.mem_inf {M : Type u_1} [inst : Add M] {p : AddSubsemigroup M} {p' : AddSubsemigroup M} {x : M} :
          x p p' x p x p'
          @[simp]
          theorem Subsemigroup.mem_inf {M : Type u_1} [inst : Mul M] {p : Subsemigroup M} {p' : Subsemigroup M} {x : M} :
          x p p' x p x p'
          Equations
          • One or more equations did not get rendered due to their size.
          def AddSubsemigroup.instInfSetSubsemigroup.proof_1 {M : Type u_1} [inst : Add M] (s : Set (AddSubsemigroup M)) :
          ∀ {a b : M}, (a Set.interᵢ fun t => Set.interᵢ fun h => t) → (b Set.interᵢ fun t => Set.interᵢ fun h => t) → a + b Set.interᵢ fun x => Set.interᵢ fun h => x
          Equations
          Equations
          • One or more equations did not get rendered due to their size.
          @[simp]
          theorem AddSubsemigroup.coe_infₛ {M : Type u_1} [inst : Add M] (S : Set (AddSubsemigroup M)) :
          ↑(infₛ S) = Set.interᵢ fun s => Set.interᵢ fun h => s
          @[simp]
          theorem Subsemigroup.coe_infₛ {M : Type u_1} [inst : Mul M] (S : Set (Subsemigroup M)) :
          ↑(infₛ S) = Set.interᵢ fun s => Set.interᵢ fun h => s
          theorem AddSubsemigroup.mem_infₛ {M : Type u_1} [inst : Add M] {S : Set (AddSubsemigroup M)} {x : M} :
          x infₛ S ∀ (p : AddSubsemigroup M), p Sx p
          theorem Subsemigroup.mem_infₛ {M : Type u_1} [inst : Mul M] {S : Set (Subsemigroup M)} {x : M} :
          x infₛ S ∀ (p : Subsemigroup M), p Sx p
          theorem AddSubsemigroup.mem_infᵢ {M : Type u_2} [inst : Add M] {ι : Sort u_1} {S : ιAddSubsemigroup M} {x : M} :
          (x i, S i) ∀ (i : ι), x S i
          theorem Subsemigroup.mem_infᵢ {M : Type u_2} [inst : Mul M] {ι : Sort u_1} {S : ιSubsemigroup M} {x : M} :
          (x i, S i) ∀ (i : ι), x S i
          @[simp]
          theorem AddSubsemigroup.coe_infᵢ {M : Type u_2} [inst : Add M] {ι : Sort u_1} {S : ιAddSubsemigroup M} :
          ↑(i, S i) = Set.interᵢ fun i => ↑(S i)
          @[simp]
          theorem Subsemigroup.coe_infᵢ {M : Type u_2} [inst : Mul M] {ι : Sort u_1} {S : ιSubsemigroup M} :
          ↑(i, S i) = Set.interᵢ fun i => ↑(S i)
          Equations
          Equations
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_9 {M : Type u_1} [inst : Add M] :
          ∀ (x x_1 : AddSubsemigroup M) (x_2 : M), x_2 x x_2 x_1x_2 x
          Equations

          The AddSubsemigroups of an AddMonoid form a complete lattice.

          Equations
          • One or more equations did not get rendered due to their size.
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_13 {M : Type u_1} [inst : Add M] (s : Set (AddSubsemigroup M)) (a : AddSubsemigroup M) :
          (∀ (b : AddSubsemigroup M), b sb a) → supₛ s a
          Equations
          • One or more equations did not get rendered due to their size.
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_5 {M : Type u_1} [inst : Add M] (a : AddSubsemigroup M) (b : AddSubsemigroup M) :
          a bb aa = b
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_10 {M : Type u_1} [inst : Add M] :
          ∀ (x x_1 : AddSubsemigroup M) (x_2 : M), x_2 x x_2 x_1x_2 x_1
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_8 {M : Type u_1} [inst : Add M] (a : AddSubsemigroup M) (b : AddSubsemigroup M) (c : AddSubsemigroup M) :
          a cb ca b c
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_11 {M : Type u_1} [inst : Add M] :
          ∀ (x x_1 x_2 : AddSubsemigroup M), x x_1x x_2∀ (x_3 : M), x_3 xx_3 x_1 x_3 x_2
          Equations
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_17 {M : Type u_1} [inst : Add M] :
          ∀ (x : AddSubsemigroup M) (x_1 : M), x_1 x_1 x
          Equations
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_15 {M : Type u_1} [inst : Add M] (s : Set (AddSubsemigroup M)) (a : AddSubsemigroup M) :
          (∀ (b : AddSubsemigroup M), b sa b) → a infₛ s
          Equations
          • One or more equations did not get rendered due to their size.
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_16 {M : Type u_1} [inst : Add M] :
          ∀ (x : AddSubsemigroup M) (x_1 : M), x_1 xx_1
          Equations
          Equations
          Equations
          def AddSubsemigroup.instCompleteLatticeSubsemigroup.proof_3 {M : Type u_1} [inst : Add M] (a : AddSubsemigroup M) (b : AddSubsemigroup M) (c : AddSubsemigroup M) :
          a bb ca c
          Equations

          subsemigroups of a monoid form a complete lattice.

          Equations
          • One or more equations did not get rendered due to their size.
          def AddSubsemigroup.closure {M : Type u_1} [inst : Add M] (s : Set M) :

          The AddSubsemigroup generated by a set

          Equations
          def Subsemigroup.closure {M : Type u_1} [inst : Mul M] (s : Set M) :

          The Subsemigroup generated by a set.

          Equations
          theorem AddSubsemigroup.mem_closure {M : Type u_1} [inst : Add M] {s : Set M} {x : M} :
          x AddSubsemigroup.closure s ∀ (S : AddSubsemigroup M), s Sx S
          theorem Subsemigroup.mem_closure {M : Type u_1} [inst : Mul M] {s : Set M} {x : M} :
          x Subsemigroup.closure s ∀ (S : Subsemigroup M), s Sx S
          @[simp]
          theorem AddSubsemigroup.subset_closure {M : Type u_1} [inst : Add M] {s : Set M} :

          The AddSubsemigroup generated by a set includes the set.

          @[simp]
          theorem Subsemigroup.subset_closure {M : Type u_1} [inst : Mul M] {s : Set M} :

          The subsemigroup generated by a set includes the set.

          theorem AddSubsemigroup.not_mem_of_not_mem_closure {M : Type u_1} [inst : Add M] {s : Set M} {P : M} (hP : ¬P AddSubsemigroup.closure s) :
          ¬P s
          theorem Subsemigroup.not_mem_of_not_mem_closure {M : Type u_1} [inst : Mul M] {s : Set M} {P : M} (hP : ¬P Subsemigroup.closure s) :
          ¬P s
          @[simp]
          theorem AddSubsemigroup.closure_le {M : Type u_1} [inst : Add M] {s : Set M} {S : AddSubsemigroup M} :

          An additive subsemigroup S includes closure s if and only if it includes s

          @[simp]
          theorem Subsemigroup.closure_le {M : Type u_1} [inst : Mul M] {s : Set M} {S : Subsemigroup M} :

          A subsemigroup S includes closure s if and only if it includes s.

          theorem AddSubsemigroup.closure_mono {M : Type u_1} [inst : Add M] ⦃s : Set M ⦃t : Set M (h : s t) :

          Additive subsemigroup closure of a set is monotone in its argument: if s ⊆ t⊆ t, then closure s ≤ closure t≤ closure t

          theorem Subsemigroup.closure_mono {M : Type u_1} [inst : Mul M] ⦃s : Set M ⦃t : Set M (h : s t) :

          subsemigroup closure of a set is monotone in its argument: if s ⊆ t⊆ t, then closure s ≤ closure t≤ closure t.

          theorem AddSubsemigroup.closure_eq_of_le {M : Type u_1} [inst : Add M] {s : Set M} {S : AddSubsemigroup M} (h₁ : s S) (h₂ : S AddSubsemigroup.closure s) :
          theorem Subsemigroup.closure_eq_of_le {M : Type u_1} [inst : Mul M] {s : Set M} {S : Subsemigroup M} (h₁ : s S) (h₂ : S Subsemigroup.closure s) :
          theorem AddSubsemigroup.closure_induction {M : Type u_1} [inst : Add M] {s : Set M} {p : MProp} {x : M} (h : x AddSubsemigroup.closure s) (Hs : (x : M) → x sp x) (Hmul : (x y : M) → p xp yp (x + y)) :
          p x

          An induction principle for additive closure membership. If p holds for all elements of s, and is preserved under addition, then p holds for all elements of the additive closure of s.

          theorem Subsemigroup.closure_induction {M : Type u_1} [inst : Mul M] {s : Set M} {p : MProp} {x : M} (h : x Subsemigroup.closure s) (Hs : (x : M) → x sp x) (Hmul : (x y : M) → p xp yp (x * y)) :
          p x

          An induction principle for closure membership. If p holds for all elements of s, and is preserved under multiplication, then p holds for all elements of the closure of s.

          theorem AddSubsemigroup.closure_induction' {M : Type u_1} [inst : Add M] (s : Set M) {p : (x : M) → x AddSubsemigroup.closure sProp} (Hs : (x : M) → (h : x s) → p x (_ : x ↑(AddSubsemigroup.closure s))) (Hmul : (x : M) → (hx : x AddSubsemigroup.closure s) → (y : M) → (hy : y AddSubsemigroup.closure s) → p x hxp y hyp (x + y) (_ : x + y AddSubsemigroup.closure s)) {x : M} (hx : x AddSubsemigroup.closure s) :
          p x hx

          A dependent version of AddSubsemigroup.closure_induction.

          abbrev AddSubsemigroup.closure_induction'.match_1 {M : Type u_1} [inst : Add M] (s : Set M) {p : (x : M) → x AddSubsemigroup.closure sProp} (y : M) (motive : (x, p y x) → Prop) :
          (x : x, p y x) → ((hy' : y AddSubsemigroup.closure s) → (hy : p y hy') → motive (_ : x, p y x)) → motive x
          Equations
          theorem Subsemigroup.closure_induction' {M : Type u_1} [inst : Mul M] (s : Set M) {p : (x : M) → x Subsemigroup.closure sProp} (Hs : (x : M) → (h : x s) → p x (_ : x ↑(Subsemigroup.closure s))) (Hmul : (x : M) → (hx : x Subsemigroup.closure s) → (y : M) → (hy : y Subsemigroup.closure s) → p x hxp y hyp (x * y) (_ : x * y Subsemigroup.closure s)) {x : M} (hx : x Subsemigroup.closure s) :
          p x hx

          A dependent version of Subsemigroup.closure_induction.

          theorem AddSubsemigroup.closure_induction₂ {M : Type u_1} [inst : Add M] {s : Set M} {p : MMProp} {x : M} {y : M} (hx : x AddSubsemigroup.closure s) (hy : y AddSubsemigroup.closure s) (Hs : (x : M) → x s(y : M) → y sp x y) (Hmul_left : (x y z : M) → p x zp y zp (x + y) z) (Hmul_right : (x y z : M) → p z xp z yp z (x + y)) :
          p x y

          An induction principle for additive closure membership for predicates with two arguments.

          theorem Subsemigroup.closure_induction₂ {M : Type u_1} [inst : Mul M] {s : Set M} {p : MMProp} {x : M} {y : M} (hx : x Subsemigroup.closure s) (hy : y Subsemigroup.closure s) (Hs : (x : M) → x s(y : M) → y sp x y) (Hmul_left : (x y z : M) → p x zp y zp (x * y) z) (Hmul_right : (x y z : M) → p z xp z yp z (x * y)) :
          p x y

          An induction principle for closure membership for predicates with two arguments.

          theorem AddSubsemigroup.dense_induction {M : Type u_1} [inst : Add M] {p : MProp} (x : M) {s : Set M} (hs : AddSubsemigroup.closure s = ) (Hs : (x : M) → x sp x) (Hmul : (x y : M) → p xp yp (x + y)) :
          p x

          If s is a dense set in an additive monoid M, AddSubsemigroup.closure s = ⊤⊤, then in order to prove that some predicate p holds for all x : M it suffices to verify p x for x ∈ s∈ s, and verify that p x and p y imply p (x + y).

          theorem Subsemigroup.dense_induction {M : Type u_1} [inst : Mul M] {p : MProp} (x : M) {s : Set M} (hs : Subsemigroup.closure s = ) (Hs : (x : M) → x sp x) (Hmul : (x y : M) → p xp yp (x * y)) :
          p x

          If s is a dense set in a magma M, Subsemigroup.closure s = ⊤⊤, then in order to prove that some predicate p holds for all x : M it suffices to verify p x for x ∈ s∈ s, and verify that p x and p y imply p (x * y).

          def AddSubsemigroup.gi.proof_2 (M : Type u_1) [inst : Add M] :
          ∀ (x : AddSubsemigroup M), x ↑(AddSubsemigroup.closure x)
          Equations
          def AddSubsemigroup.gi.proof_1 (M : Type u_1) [inst : Add M] :
          ∀ (x : Set M) (x_1 : AddSubsemigroup M), AddSubsemigroup.closure x x_1 x x_1
          Equations
          def AddSubsemigroup.gi (M : Type u_1) [inst : Add M] :
          GaloisInsertion AddSubsemigroup.closure SetLike.coe

          closure forms a Galois insertion with the coercion to set.

          Equations
          • One or more equations did not get rendered due to their size.
          def Subsemigroup.gi (M : Type u_1) [inst : Mul M] :
          GaloisInsertion Subsemigroup.closure SetLike.coe

          closure forms a Galois insertion with the coercion to set.

          Equations
          • One or more equations did not get rendered due to their size.
          @[simp]
          theorem AddSubsemigroup.closure_eq {M : Type u_1} [inst : Add M] (S : AddSubsemigroup M) :

          Additive closure of an additive subsemigroup S equals S

          @[simp]
          theorem Subsemigroup.closure_eq {M : Type u_1} [inst : Mul M] (S : Subsemigroup M) :

          Closure of a subsemigroup S equals S.

          @[simp]
          theorem AddSubsemigroup.closure_univ {M : Type u_1} [inst : Add M] :
          @[simp]
          theorem Subsemigroup.closure_univ {M : Type u_1} [inst : Mul M] :
          theorem AddSubsemigroup.closure_unionᵢ {M : Type u_2} [inst : Add M] {ι : Sort u_1} (s : ιSet M) :
          theorem Subsemigroup.closure_unionᵢ {M : Type u_2} [inst : Mul M] {ι : Sort u_1} (s : ιSet M) :
          theorem AddSubsemigroup.mem_supᵢ {M : Type u_2} [inst : Add M] {ι : Sort u_1} (p : ιAddSubsemigroup M) {m : M} :
          (m i, p i) ∀ (N : AddSubsemigroup M), (∀ (i : ι), p i N) → m N
          theorem Subsemigroup.mem_supᵢ {M : Type u_2} [inst : Mul M] {ι : Sort u_1} (p : ιSubsemigroup M) {m : M} :
          (m i, p i) ∀ (N : Subsemigroup M), (∀ (i : ι), p i N) → m N
          theorem AddSubsemigroup.supᵢ_eq_closure {M : Type u_2} [inst : Add M] {ι : Sort u_1} (p : ιAddSubsemigroup M) :
          (i, p i) = AddSubsemigroup.closure (Set.unionᵢ fun i => ↑(p i))
          theorem Subsemigroup.supᵢ_eq_closure {M : Type u_2} [inst : Mul M] {ι : Sort u_1} (p : ιSubsemigroup M) :
          (i, p i) = Subsemigroup.closure (Set.unionᵢ fun i => ↑(p i))
          def AddHom.eqLocus {M : Type u_1} {N : Type u_2} [inst : Add M] [inst : Add N] (f : AddHom M N) (g : AddHom M N) :

          The additive subsemigroup of elements x : M such that f x = g x

          Equations
          • AddHom.eqLocus f g = { carrier := { x | f x = g x }, add_mem' := (_ : ∀ {a b : M}, f a = g af b = g bf (a + b) = g (a + b)) }
          def AddHom.eqLocus.proof_1 {M : Type u_2} {N : Type u_1} [inst : Add M] [inst : Add N] (f : AddHom M N) (g : AddHom M N) :
          ∀ {a b : M}, f a = g af b = g bf (a + b) = g (a + b)
          Equations
          • (_ : f (a + b) = g (a + b)) = (_ : f (a + b) = g (a + b))
          def MulHom.eqLocus {M : Type u_1} {N : Type u_2} [inst : Mul M] [inst : Mul N] (f : M →ₙ* N) (g : M →ₙ* N) :

          The subsemigroup of elements x : M such that f x = g x

          Equations
          • MulHom.eqLocus f g = { carrier := { x | f x = g x }, mul_mem' := (_ : ∀ {a b : M}, f a = g af b = g bf (a * b) = g (a * b)) }
          theorem AddHom.eqOn_closure {M : Type u_1} {N : Type u_2} [inst : Add M] [inst : Add N] {f : AddHom M N} {g : AddHom M N} {s : Set M} (h : Set.EqOn (f) (g) s) :

          If two add homomorphisms are equal on a set, then they are equal on its additive subsemigroup closure.

          theorem MulHom.eqOn_closure {M : Type u_1} {N : Type u_2} [inst : Mul M] [inst : Mul N] {f : M →ₙ* N} {g : M →ₙ* N} {s : Set M} (h : Set.EqOn (f) (g) s) :

          If two mul homomorphisms are equal on a set, then they are equal on its subsemigroup closure.

          theorem AddHom.eq_of_eqOn_top {M : Type u_1} {N : Type u_2} [inst : Add M] [inst : Add N] {f : AddHom M N} {g : AddHom M N} (h : Set.EqOn f g ) :
          f = g
          theorem MulHom.eq_of_eqOn_top {M : Type u_1} {N : Type u_2} [inst : Mul M] [inst : Mul N] {f : M →ₙ* N} {g : M →ₙ* N} (h : Set.EqOn f g ) :
          f = g
          theorem AddHom.eq_of_eqOn_dense {M : Type u_1} {N : Type u_2} [inst : Add M] [inst : Add N] {s : Set M} (hs : AddSubsemigroup.closure s = ) {f : AddHom M N} {g : AddHom M N} (h : Set.EqOn (f) (g) s) :
          f = g
          theorem MulHom.eq_of_eqOn_dense {M : Type u_1} {N : Type u_2} [inst : Mul M] [inst : Mul N] {s : Set M} (hs : Subsemigroup.closure s = ) {f : M →ₙ* N} {g : M →ₙ* N} (h : Set.EqOn (f) (g) s) :
          f = g
          def AddHom.ofDense {M : Type u_1} {N : Type u_2} [inst : AddSemigroup M] [inst : AddSemigroup N] {s : Set M} (f : MN) (hs : AddSubsemigroup.closure s = ) (hmul : ∀ (x y : M), y sf (x + y) = f x + f y) :
          AddHom M N

          Let s be a subset of an additive semigroup M such that the closure of s is the whole semigroup. Then AddHom.ofDense defines an additive homomorphism from M asking for a proof of f (x + y) = f x + f y only for y ∈ s∈ s.

          Equations
          • AddHom.ofDense f hs hmul = { toFun := f, map_add' := (_ : ∀ (x y : M), f (x + y) = f x + f y) }
          def AddHom.ofDense.proof_1 {M : Type u_2} {N : Type u_1} [inst : AddSemigroup M] [inst : AddSemigroup N] {s : Set M} (f : MN) (hs : AddSubsemigroup.closure s = ) (hmul : ∀ (x y : M), y sf (x + y) = f x + f y) (x : M) (y : M) :
          f (x + y) = f x + f y
          Equations
          • (_ : f (x + y) = f x + f y) = (_ : f (x + y) = f x + f y)
          def MulHom.ofDense {M : Type u_1} {N : Type u_2} [inst : Semigroup M] [inst : Semigroup N] {s : Set M} (f : MN) (hs : Subsemigroup.closure s = ) (hmul : ∀ (x y : M), y sf (x * y) = f x * f y) :

          Let s be a subset of a semigroup M such that the closure of s is the whole semigroup. Then MulHom.ofDense defines a mul homomorphism from M asking for a proof of f (x * y) = f x * f y only for y ∈ s∈ s.

          Equations
          • MulHom.ofDense f hs hmul = { toFun := f, map_mul' := (_ : ∀ (x y : M), f (x * y) = f x * f y) }
          @[simp]
          theorem AddHom.coe_ofDense {M : Type u_1} {N : Type u_2} [inst : AddSemigroup M] [inst : AddSemigroup N] {s : Set M} (f : MN) (hs : AddSubsemigroup.closure s = ) (hmul : ∀ (x y : M), y sf (x + y) = f x + f y) :
          ↑(AddHom.ofDense f hs hmul) = f
          @[simp]
          theorem MulHom.coe_ofDense {M : Type u_1} {N : Type u_2} [inst : Semigroup M] [inst : Semigroup N] {s : Set M} (f : MN) (hs : Subsemigroup.closure s = ) (hmul : ∀ (x y : M), y sf (x * y) = f x * f y) :
          ↑(MulHom.ofDense f hs hmul) = f