Submonoids: definition and CompleteLattice structure #
This file defines bundled multiplicative and additive submonoids. We also define
a CompleteLattice structure on Submonoids, define the closure of a set as the minimal submonoid
that includes this set, and prove a few results about extending properties from a dense set (i.e.
a set with closure s = ⊤) to the whole monoid, see Submonoid.dense_induction and
MonoidHom.ofClosureEqTopLeft/MonoidHom.ofClosureEqTopRight.
Main definitions #
Submonoid M: the type of bundled submonoids of a monoidM; the underlying set is given in thecarrierfield of the structure, and should be accessed through coercion as in(S : Set M).AddSubmonoid M: the type of bundled submonoids of an additive monoidM.
For each of the following definitions in the Submonoid namespace, there is a corresponding
definition in the AddSubmonoid namespace.
Submonoid.copy: copy of a submonoid withcarrierreplaced by a set that is equal but possibly not definitionally equal to the carrier of the originalSubmonoid.Submonoid.closure: monoid closure of a set, i.e., the least submonoid that includes the set.Submonoid.gi:closure : Set M → Submonoid Mand coercioncoe : Submonoid M → Set Mform aGaloisInsertion;MonoidHom.eqLocus: the submonoid of elementsx : Msuch thatf x = g x;MonoidHom.ofClosureEqTopRight: if a mapf : M → Nbetween two monoids satisfiesf 1 = 1andf (x * y) = f x * f yforyfrom some dense sets, thenfis a monoid homomorphism. E.g., iff : ℕ → Msatisfiesf 0 = 0andf (x + 1) = f x + f 1, thenfis an additive monoid homomorphism.
Implementation notes #
Submonoid inclusion is denoted ≤ rather than ⊆, although ∈ is defined as
membership of a submonoid's underlying set.
Note that Submonoid M does not actually require Monoid M, instead requiring only the weaker
MulOneClass M.
This file is designed to have very few dependencies. In particular, it should not use natural
numbers. Submonoid is implemented by extending Subsemigroup requiring one_mem'.
Tags #
submonoid, submonoids
OneMemClass S M says S is a type of subsets s ≤ M, such that 1 ∈ s for all s.
- one_mem : ∀ (s : S), 1 ∈ s
By definition, if we have
OneMemClass S M, we have1 ∈ sfor alls : S.
Instances
By definition, if we have OneMemClass S M, we have 1 ∈ s for all s : S.
ZeroMemClass S M says S is a type of subsets s ≤ M, such that 0 ∈ s for all s.
- zero_mem : ∀ (s : S), 0 ∈ s
By definition, if we have
ZeroMemClass S M, we have0 ∈ sfor alls : S.
Instances
By definition, if we have ZeroMemClass S M, we have 0 ∈ s for all s : S.
A submonoid of a monoid M is a subset containing 1 and closed under multiplication.
Instances For
A submonoid contains 1.
SubmonoidClass S M says S is a type of subsets s ≤ M that contain 1
and are closed under (*)
Instances
An additive submonoid of an additive monoid M is a subset containing 0 and
closed under addition.
Instances For
An additive submonoid contains 0.
AddSubmonoidClass S M says S is a type of subsets s ≤ M that contain 0
and are closed under (+)
Instances
Equations
- AddSubmonoid.instSetLike = { coe := fun (s : AddSubmonoid M) => s.carrier, coe_injective' := ⋯ }
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Two AddSubmonoids are equal if they have the same elements.
Two submonoids are equal if they have the same elements.
Copy an additive submonoid replacing carrier with a set that is equal to it.
Equations
- S.copy s hs = { carrier := s, add_mem' := ⋯, zero_mem' := ⋯ }
Instances For
Copy a submonoid replacing carrier with a set that is equal to it.
Equations
- S.copy s hs = { carrier := s, mul_mem' := ⋯, one_mem' := ⋯ }
Instances For
An AddSubmonoid contains the monoid's 0.
A submonoid contains the monoid's 1.
An AddSubmonoid is closed under addition.
A submonoid is closed under multiplication.
The submonoid M of the monoid M.
Equations
- Submonoid.instTop = { top := { carrier := Set.univ, mul_mem' := ⋯, one_mem' := ⋯ } }
The trivial AddSubmonoid {0} of an AddMonoid M.
Equations
- AddSubmonoid.instBot = { bot := { carrier := {0}, add_mem' := ⋯, zero_mem' := ⋯ } }
The trivial submonoid {1} of a monoid M.
Equations
- Submonoid.instBot = { bot := { carrier := {1}, mul_mem' := ⋯, one_mem' := ⋯ } }
Equations
- ⋯ = ⋯
Instances For
The inf of two AddSubmonoids is their intersection.
Equations
- AddSubmonoid.instInf = { inf := fun (S₁ S₂ : AddSubmonoid M) => { carrier := ↑S₁ ∩ ↑S₂, add_mem' := ⋯, zero_mem' := ⋯ } }
The inf of two submonoids is their intersection.
Equations
- AddSubmonoid.instInfSet = { sInf := fun (s : Set (AddSubmonoid M)) => { carrier := ⋂ t ∈ s, ↑t, add_mem' := ⋯, zero_mem' := ⋯ } }
The AddSubmonoids of an AddMonoid form a complete lattice.
Equations
- AddSubmonoid.instCompleteLattice = let __src := completeLatticeOfInf (AddSubmonoid M) ⋯; CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Submonoids of a monoid form a complete lattice.
Equations
- Submonoid.instCompleteLattice = let __src := completeLatticeOfInf (Submonoid M) ⋯; CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The AddSubmonoid generated by a set
Equations
- AddSubmonoid.closure s = sInf {S : AddSubmonoid M | s ⊆ ↑S}
Instances For
The AddSubmonoid generated by a set includes the set.
The submonoid generated by a set includes the set.
An additive submonoid S includes closure s if and only if it includes s
A submonoid S includes closure s if and only if it includes s.
Additive submonoid closure of a set is monotone in its argument: if s ⊆ t,
then closure s ≤ closure t
Submonoid closure of a set is monotone in its argument: if s ⊆ t,
then closure s ≤ closure t.
An induction principle for additive closure membership. If p holds for 0 and all
elements of s, and is preserved under addition, then p holds for all elements of the
additive closure of s.
An induction principle for closure membership. If p holds for 1 and all elements of s, and
is preserved under multiplication, then p holds for all elements of the closure of s.
Equations
- ⋯ = ⋯
Instances For
A dependent version of AddSubmonoid.closure_induction.
A dependent version of Submonoid.closure_induction.
An induction principle for additive closure membership for predicates with two arguments.
An induction principle for closure membership for predicates with two arguments.
If s is a dense set in an additive monoid M, AddSubmonoid.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, verify p 0, and verify that p x and p y imply p (x + y).
If s is a dense set in a monoid M, Submonoid.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, verify p 1,
and verify that p x and p y imply p (x * y).
The Submonoid.closure of a set is the union of {1} and its Subsemigroup.closure.
closure forms a Galois insertion with the coercion to set.
Equations
- AddSubmonoid.gi M = { choice := fun (s : Set M) (x : ↑(AddSubmonoid.closure s) ≤ s) => AddSubmonoid.closure s, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
closure forms a Galois insertion with the coercion to set.
Equations
- Submonoid.gi M = { choice := fun (s : Set M) (x : ↑(Submonoid.closure s) ≤ s) => Submonoid.closure s, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Additive closure of an additive submonoid S equals S
Closure of a submonoid S equals S.
The additive submonoid of elements x : M such that f x = g x
Instances For
The submonoid of elements x : M such that f x = g x
Instances For
If two monoid homomorphisms are equal on a set, then they are equal on its submonoid closure.
If two monoid homomorphisms are equal on a set, then they are equal on its submonoid closure.
The additive submonoid consisting of the additive units of an additive monoid
Equations
- IsAddUnit.addSubmonoid M = { carrier := setOf IsAddUnit, add_mem' := ⋯, zero_mem' := ⋯ }
Instances For
The submonoid consisting of the units of a monoid
Equations
- IsUnit.submonoid M = { carrier := setOf IsUnit, mul_mem' := ⋯, one_mem' := ⋯ }
Instances For
Let s be a subset of an additive monoid M such that the closure of s is
the whole monoid. Then AddMonoidHom.ofClosureEqTopLeft defines an additive monoid
homomorphism from M asking for a proof of f (x + y) = f x + f y only for x ∈ s.
Equations
- AddMonoidHom.ofClosureMEqTopLeft f hs h1 hmul = { toFun := f, map_zero' := h1, map_add' := ⋯ }
Instances For
Let s be a subset of a monoid M such that the closure of s is the whole monoid.
Then MonoidHom.ofClosureEqTopLeft defines a monoid homomorphism from M asking for
a proof of f (x * y) = f x * f y only for x ∈ s.
Equations
- MonoidHom.ofClosureMEqTopLeft f hs h1 hmul = { toFun := f, map_one' := h1, map_mul' := ⋯ }
Instances For
Let s be a subset of an additive monoid M such that the closure of s is
the whole monoid. Then AddMonoidHom.ofClosureEqTopRight defines an additive monoid
homomorphism from M asking for a proof of f (x + y) = f x + f y only for y ∈ s.
Equations
- AddMonoidHom.ofClosureMEqTopRight f hs h1 hmul = { toFun := f, map_zero' := h1, map_add' := ⋯ }
Instances For
Let s be a subset of a monoid M such that the closure of s is the whole monoid.
Then MonoidHom.ofClosureEqTopRight defines a monoid homomorphism from M asking for
a proof of f (x * y) = f x * f y only for y ∈ s.
Equations
- MonoidHom.ofClosureMEqTopRight f hs h1 hmul = { toFun := f, map_one' := h1, map_mul' := ⋯ }