Subsemigroups: definition and complete_lattice
structure #
This file defines bundled multiplicative and additive subsemigrousp. We also define
a complete_lattice
structure on subsemigroups
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)
.add_subsemigroup 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 add_subsemigroup
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 agalois_insertion
;
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 has_mul M
.
This file is designed to have very few dependencies. In particular, it should not use natural numbers.
Tags #
subsemigroup, subsemigroups
Equations
- subsemigroup.set_like = {coe := subsemigroup.carrier _inst_1, coe_injective' := _}
Equations
- add_subsemigroup.set_like = {coe := add_subsemigroup.carrier _inst_1, coe_injective' := _}
See Note [custom simps projection]
Equations
See Note [custom simps projection]
Equations
Two add_subsemigroup
s are equal if they have the same elements.
Two subsemigroups are equal if they have the same elements.
Copy a subsemigroup replacing carrier
with a set that is equal to it.
Copy an additive subsemigroup replacing carrier
with a set that is equal to
it.
A subsemigroup is closed under multiplication.
An add_subsemigroup
is closed under addition.
The additive subsemigroup M
of the magma M
.
The subsemigroup M
of the magma M
.
The trivial subsemigroup ∅
of a magma M
.
The trivial add_subsemigroup
∅
of an additive magma M
.
Equations
Equations
The inf of two add_subsemigroup
s is their intersection.
The inf of two subsemigroups is their intersection.
Equations
- add_subsemigroup.has_Inf = {Inf := λ (s : set (add_subsemigroup M)), {carrier := ⋂ (t : add_subsemigroup M) (H : t ∈ s), ↑t, add_mem' := _}}
Equations
- subsemigroup.has_Inf = {Inf := λ (s : set (subsemigroup M)), {carrier := ⋂ (t : subsemigroup M) (H : t ∈ s), ↑t, mul_mem' := _}}
subsemigroups of a monoid form a complete lattice.
Equations
- subsemigroup.complete_lattice = {sup := complete_lattice.sup (complete_lattice_of_Inf (subsemigroup M) subsemigroup.complete_lattice._proof_1), le := has_le.le (preorder.to_has_le (subsemigroup M)), lt := has_lt.lt (preorder.to_has_lt (subsemigroup M)), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := has_inf.inf subsemigroup.has_inf, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := complete_lattice.Sup (complete_lattice_of_Inf (subsemigroup M) subsemigroup.complete_lattice._proof_1), le_Sup := _, Sup_le := _, Inf := Inf subsemigroup.has_Inf, Inf_le := _, le_Inf := _, top := ⊤, bot := ⊥, le_top := _, bot_le := _}
The add_subsemigroup
s of an add_monoid
form a complete lattice.
Equations
- add_subsemigroup.complete_lattice = {sup := complete_lattice.sup (complete_lattice_of_Inf (add_subsemigroup M) add_subsemigroup.complete_lattice._proof_1), le := has_le.le (preorder.to_has_le (add_subsemigroup M)), lt := has_lt.lt (preorder.to_has_lt (add_subsemigroup M)), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := has_inf.inf add_subsemigroup.has_inf, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := complete_lattice.Sup (complete_lattice_of_Inf (add_subsemigroup M) add_subsemigroup.complete_lattice._proof_1), le_Sup := _, Sup_le := _, Inf := Inf add_subsemigroup.has_Inf, Inf_le := _, le_Inf := _, top := ⊤, bot := ⊥, le_top := _, bot_le := _}
The subsemigroup
generated by a set.
Equations
- subsemigroup.closure s = Inf {S : subsemigroup M | s ⊆ ↑S}
The add_subsemigroup
generated by a set
Equations
- add_subsemigroup.closure s = Inf {S : add_subsemigroup M | s ⊆ ↑S}
The add_subsemigroup
generated by a set includes the set.
The subsemigroup generated by a set includes the set.
A subsemigroup S
includes closure s
if and only if it includes s
.
An additive 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 add_subsemigroup.closure_induction
.
A dependent version of subsemigroup.closure_induction
.
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)
.
If s
is a dense set in an additive monoid M
,
add_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
- add_subsemigroup.gi M = {choice := λ (s : set M) (_x : ↑(add_subsemigroup.closure s) ≤ s), add_subsemigroup.closure s, gc := _, le_l_u := _, choice_eq := _}
closure
forms a Galois insertion with the coercion to set.
Equations
- subsemigroup.gi M = {choice := λ (s : set M) (_x : ↑(subsemigroup.closure s) ≤ s), subsemigroup.closure s, gc := _, le_l_u := _, choice_eq := _}
Additive closure of an additive subsemigroup S
equals S
Closure of a subsemigroup S
equals S
.
The additive subsemigroup of elements x : M
such that f x = g x
The subsemigroup of elements x : M
such that f x = g x
If two add homomorphisms are equal on a set, then they are equal on its additive subsemigroup closure.
If two mul homomorphisms are equal on a set, then they are equal on its subsemigroup closure.
Let s
be a subset of a semigroup M
such that the closure of s
is the whole semigroup.
Then mul_hom.of_mdense
defines a mul homomorphism from M
asking for a proof
of f (x * y) = f x * f y
only for y ∈ s
.
Equations
- mul_hom.of_mdense f hs hmul = {to_fun := f, map_mul' := _}
Let s
be a subset of an additive semigroup M
such that the closure of s
is the whole
semigroup. Then add_hom.of_mdense
defines an additive homomorphism from M
asking for a proof
of f (x + y) = f x + f y
only for y ∈ s
.
Equations
- add_hom.of_mdense f hs hmul = {to_fun := f, map_add' := _}