Subsemigroups: definition and complete_lattice
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→ Subsemigroup M
and coercioncoe : Subsemigroup M → Set 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
The carrier of a subsemigroup.
carrier : Set MThe 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
The carrier of an additive subsemigroup.
carrier : Set MThe 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) }
Equations
- (_ : AddMemClass (AddSubsemigroup M) M) = (_ : AddMemClass (AddSubsemigroup M) M)
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.
Copy a subsemigroup replacing carrier
with a set that is equal to it.
An AddSubsemigroup
is closed under addition.
A subsemigroup is closed under multiplication.
The additive subsemigroup M
of the magma M
.
Equations
- AddSubsemigroup.instInfSubsemigroup.match_1 S₁ S₂ motive x h_1 = And.casesOn x fun left right => h_1 left right
The inf of two AddSubsemigroup
s is their intersection.
The inf of two subsemigroups is their intersection.
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : a + b ∈ Set.interᵢ fun x => Set.interᵢ fun h => ↑x) = (_ : a + b ∈ Set.interᵢ fun x => Set.interᵢ fun h => ↑x)
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : ∀ (s : Set (AddSubsemigroup M)) (a : AddSubsemigroup M), a ∈ s → infₛ s ≤ a) = (_ : ∀ (s : Set (AddSubsemigroup M)) (a : AddSubsemigroup M), a ∈ s → infₛ s ≤ a)
Equations
- (_ : ∀ (a : AddSubsemigroup M), a ≤ a) = (_ : ∀ (a : AddSubsemigroup M), a ≤ a)
The AddSubsemigroup
s of an AddMonoid
form a complete lattice.
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.
Equations
- (_ : ∀ (a b : AddSubsemigroup M), a ≤ b → b ≤ a → a = b) = (_ : ∀ (a b : AddSubsemigroup M), a ≤ b → b ≤ a → a = b)
Equations
- (_ : ∀ (a b : AddSubsemigroup M), b ≤ a ⊔ b) = (_ : ∀ (a b : AddSubsemigroup M), b ≤ a ⊔ b)
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : ∀ (a b : AddSubsemigroup M), a ≤ a ⊔ b) = (_ : ∀ (a b : AddSubsemigroup M), a ≤ a ⊔ b)
Equations
- (_ : ∀ (s : Set (AddSubsemigroup M)) (a : AddSubsemigroup M), a ∈ s → a ≤ supₛ s) = (_ : ∀ (s : Set (AddSubsemigroup M)) (a : AddSubsemigroup M), a ∈ s → a ≤ supₛ s)
Equations
- (_ : ∀ (a b c : AddSubsemigroup M), a ≤ b → b ≤ c → a ≤ c) = (_ : ∀ (a b c : AddSubsemigroup M), a ≤ b → b ≤ c → a ≤ c)
subsemigroups of a monoid form a complete lattice.
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : Nontrivial (AddSubsemigroup M)) = (_ : Nontrivial (AddSubsemigroup M))
The AddSubsemigroup
generated by a set
Equations
- AddSubsemigroup.closure s = infₛ { S | s ⊆ ↑S }
The Subsemigroup
generated by a set.
Equations
- Subsemigroup.closure s = infₛ { S | s ⊆ ↑S }
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
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∈ 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∈ s
,
and verify that p x
and p y
imply p (x * y)
.
Equations
- (_ : ↑x ⊆ ↑(AddSubsemigroup.closure ↑x)) = (_ : ↑x ⊆ ↑(AddSubsemigroup.closure ↑x))
Equations
- (_ : AddSubsemigroup.closure x ≤ x ↔ x ⊆ ↑x) = (_ : AddSubsemigroup.closure x ≤ x ↔ x ⊆ ↑x)
closure
forms a Galois insertion with the coercion to set.
Equations
- One or more equations did not get rendered due to their size.
closure
forms a Galois insertion with the coercion to set.
Equations
- One or more equations did not get rendered due to their size.
Additive closure of an additive subsemigroup S
equals S
Closure of a subsemigroup S
equals S
.
If two add homomorphisms are equal on a set, then they are equal on its additive subsemigroup closure.
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) }
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) }