Subsemigroups: definition and CompleteLattice
structure #
This file defines bundled multiplicative and additive subsemigroups. We also define
a CompleteLattice
structure on Subsemigroup
s,
and define the closure of a set as the minimal subsemigroup that includes this set.
Main definitions #
Subsemigroup M
: the type of bundled subsemigroup of a magmaM
; the underlying set is given in thecarrier
field of the structure, and should be accessed through coercion as in(S : Set M)
.AddSubsemigroup M
: the type of bundled subsemigroups of an additive magmaM
.
For each of the following definitions in the Subsemigroup
namespace, there is a corresponding
definition in the AddSubsemigroup
namespace.
Subsemigroup.copy
: copy of a subsemigroup withcarrier
replaced by a set that is equal but possibly not definitionally equal to the carrier of the originalSubsemigroup
.Subsemigroup.closure
: semigroup closure of a set, i.e., the least subsemigroup that includes the set.Subsemigroup.gi
:closure : Set M → Subsemigroup M
and coercioncoe : Subsemigroup M → Set M
form aGaloisInsertion
;
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
A substructure satisfying
MulMemClass
is closed under multiplication.
MulMemClass S M
says S
is a type of sets s : Set M
that are closed under (*)
Instances
A substructure satisfying
AddMemClass
is closed under addition.
AddMemClass S M
says S
is a type of sets s : Set M
that are closed under (+)
Instances
- carrier : Set M
The carrier of a subsemigroup.
The product of two elements of a subsemigroup belongs to the subsemigroup.
A subsemigroup of a magma M
is a subset closed under multiplication.
Instances For
- carrier : Set M
The carrier of an additive subsemigroup.
The sum of two elements of an additive subsemigroup belongs to the subsemigroup.
An additive subsemigroup of an additive magma M
is a subset closed under addition.
Instances For
Equations
- AddSubsemigroup.instSetLikeSubsemigroup = { coe := AddSubsemigroup.carrier, coe_injective' := (_ : ∀ (p q : AddSubsemigroup M), p.carrier = q.carrier → p = q) }
Equations
- Subsemigroup.instSetLikeSubsemigroup = { coe := Subsemigroup.carrier, coe_injective' := (_ : ∀ (p q : Subsemigroup M), p.carrier = q.carrier → p = q) }
Two AddSubsemigroup
s are equal if they have the same elements.
Two subsemigroups are equal if they have the same elements.
Copy an additive subsemigroup replacing carrier
with a set that is equal to it.
Equations
Instances For
Copy a subsemigroup replacing carrier
with a set that is equal to it.
Equations
Instances For
An AddSubsemigroup
is closed under addition.
A subsemigroup is closed under multiplication.
The additive subsemigroup M
of the magma M
.
The trivial AddSubsemigroup
∅
of an additive magma M
.
The inf of two AddSubsemigroup
s is their intersection.
Equations
- AddSubsemigroup.instInfSubsemigroup.match_1 S₁ S₂ motive x h_1 = And.casesOn x fun left right => h_1 left right
Instances For
The inf of two subsemigroups is their intersection.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
The AddSubsemigroup
s of an AddMonoid
form a complete lattice.
Equations
- One or more equations did not get rendered due to their size.
subsemigroups of a monoid form a complete lattice.
Equations
- One or more equations did not get rendered due to their size.
The AddSubsemigroup
generated by a set
Equations
- AddSubsemigroup.closure s = sInf {S | s ⊆ ↑S}
Instances For
The Subsemigroup
generated by a set.
Equations
- Subsemigroup.closure s = sInf {S | s ⊆ ↑S}
Instances For
The AddSubsemigroup
generated by a set includes the set.
The subsemigroup generated by a set includes the set.
An additive subsemigroup S
includes closure s
if and only if it includes s
A subsemigroup S
includes closure s
if and only if it includes s
.
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
.
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
.
A dependent version of AddSubsemigroup.closure_induction
.
Equations
- AddSubsemigroup.closure_induction'.match_1 s y motive x h_1 = Exists.casesOn x fun w h => h_1 w h
Instances For
A dependent version of Subsemigroup.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
,
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
, and verify that p x
and p y
imply
p (x + y)
.
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
,
and verify that p x
and p y
imply p (x * y)
.
closure
forms a Galois insertion with the coercion to set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
closure
forms a Galois insertion with the coercion to set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Additive closure of an additive subsemigroup S
equals S
Closure of a subsemigroup S
equals S
.
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
.
Equations
- AddHom.ofDense f hs hmul = { toFun := f, map_add' := (_ : ∀ (x y : M), f (x + y) = f x + f y) }
Instances For
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
.
Equations
- MulHom.ofDense f hs hmul = { toFun := f, map_mul' := (_ : ∀ (x y : M), f (x * y) = f x * f y) }