Submonoids: definition #
This file defines bundled multiplicative and additive submonoids. We also define
a CompleteLattice
structure on Submonoid
s, 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 thecarrier
field 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 withcarrier
replaced by a set that is equal but possibly not definitionally equal to the carrier of the originalSubmonoid
.MonoidHom.eqLocusM
: the submonoid of elementsx : M
such thatf x = g x
;
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 ∈ s
for alls : S
.
Instances
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 ∈ s
for alls : S
.
Instances
A submonoid of a monoid M
is a subset containing 1 and closed under multiplication.
- one_mem' : 1 ∈ self.carrier
A submonoid contains
1
.
Instances For
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.
- zero_mem' : 0 ∈ self.carrier
An additive submonoid contains
0
.
Instances For
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' := ⋯ }
Two AddSubmonoid
s are equal if they have the same elements.
Two submonoids are equal if they have the same elements.
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
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
A submonoid contains the monoid's 1.
An AddSubmonoid
contains the monoid's 0.
A submonoid is closed under multiplication.
An AddSubmonoid
is closed under addition.
The submonoid M
of the monoid M
.
Equations
- Submonoid.instTop = { top := { carrier := Set.univ, mul_mem' := ⋯, one_mem' := ⋯ } }
The trivial submonoid {1}
of a monoid M
.
Equations
- Submonoid.instBot = { bot := { carrier := {1}, mul_mem' := ⋯, one_mem' := ⋯ } }
The trivial AddSubmonoid
{0}
of an AddMonoid
M
.
Equations
- AddSubmonoid.instBot = { bot := { carrier := {0}, add_mem' := ⋯, zero_mem' := ⋯ } }
The inf of two submonoids is their intersection.
The inf of two AddSubmonoid
s is their intersection.
Equations
- AddSubmonoid.instMin = { min := fun (S₁ S₂ : AddSubmonoid M) => { carrier := ↑S₁ ∩ ↑S₂, add_mem' := ⋯, zero_mem' := ⋯ } }
The submonoid of elements x : M
such that f x = g x
Instances For
The additive submonoid of elements x : M
such that f x = g x
Instances For
A submonoid of a monoid inherits a 1.
Equations
- OneMemClass.one S' = { one := ⟨1, ⋯⟩ }
An AddSubmonoid
of an AddMonoid
inherits a zero.
Equations
- ZeroMemClass.zero S' = { zero := ⟨0, ⋯⟩ }
An AddSubmonoid
of an AddMonoid
inherits a scalar multiplication.
Equations
- AddSubmonoidClass.nSMul S = { smul := fun (n : ℕ) (a : ↥S) => ⟨n • ↑a, ⋯⟩ }
A submonoid of a monoid inherits a power operator.
Equations
- SubmonoidClass.nPow S = { pow := fun (a : ↥S) (n : ℕ) => ⟨↑a ^ n, ⋯⟩ }
A submonoid of a unital magma inherits a unital magma structure.
Equations
- SubmonoidClass.toMulOneClass S = Function.Injective.mulOneClass Subtype.val ⋯ ⋯ ⋯
An AddSubmonoid
of a unital additive magma inherits a unital additive magma structure.
Equations
- AddSubmonoidClass.toAddZeroClass S = Function.Injective.addZeroClass Subtype.val ⋯ ⋯ ⋯
A submonoid of a monoid inherits a monoid structure.
Equations
- SubmonoidClass.toMonoid S = Function.Injective.monoid Subtype.val ⋯ ⋯ ⋯ ⋯
An AddSubmonoid
of an AddMonoid
inherits an AddMonoid
structure.
Equations
- AddSubmonoidClass.toAddMonoid S = Function.Injective.addMonoid Subtype.val ⋯ ⋯ ⋯ ⋯
A submonoid of a CommMonoid
is a CommMonoid
.
Equations
- SubmonoidClass.toCommMonoid S = Function.Injective.commMonoid Subtype.val ⋯ ⋯ ⋯ ⋯
An AddSubmonoid
of an AddCommMonoid
is an AddCommMonoid
.
Equations
- AddSubmonoidClass.toAddCommMonoid S = Function.Injective.addCommMonoid Subtype.val ⋯ ⋯ ⋯ ⋯
The natural monoid hom from a submonoid of monoid M
to M
.
Equations
- SubmonoidClass.subtype S' = { toFun := Subtype.val, map_one' := ⋯, map_mul' := ⋯ }
Instances For
The natural monoid hom from an AddSubmonoid
of AddMonoid
M
to M
.
Equations
- AddSubmonoidClass.subtype S' = { toFun := Subtype.val, map_zero' := ⋯, map_add' := ⋯ }
Instances For
A submonoid of a monoid inherits a multiplication.
An AddSubmonoid
of an AddMonoid
inherits an addition.
A submonoid of a monoid inherits a 1.
Equations
- S.one = { one := ⟨1, ⋯⟩ }
An AddSubmonoid
of an AddMonoid
inherits a zero.
Equations
- S.zero = { zero := ⟨0, ⋯⟩ }
A submonoid of a unital magma inherits a unital magma structure.
Equations
- S.toMulOneClass = Function.Injective.mulOneClass Subtype.val ⋯ ⋯ ⋯
An AddSubmonoid
of a unital additive magma inherits a unital additive magma structure.
Equations
- S.toAddZeroClass = Function.Injective.addZeroClass Subtype.val ⋯ ⋯ ⋯
A submonoid of a monoid inherits a monoid structure.
Equations
- S.toMonoid = Function.Injective.monoid Subtype.val ⋯ ⋯ ⋯ ⋯
An AddSubmonoid
of an AddMonoid
inherits an AddMonoid
structure.
Equations
- S.toAddMonoid = Function.Injective.addMonoid Subtype.val ⋯ ⋯ ⋯ ⋯
A submonoid of a CommMonoid
is a CommMonoid
.
Equations
- S.toCommMonoid = Function.Injective.commMonoid Subtype.val ⋯ ⋯ ⋯ ⋯
An AddSubmonoid
of an AddCommMonoid
is an AddCommMonoid
.
Equations
- S.toAddCommMonoid = Function.Injective.addCommMonoid Subtype.val ⋯ ⋯ ⋯ ⋯
The natural monoid hom from a submonoid of monoid M
to M
.
Equations
- S.subtype = { toFun := Subtype.val, map_one' := ⋯, map_mul' := ⋯ }
Instances For
The natural monoid hom from an AddSubmonoid
of AddMonoid
M
to M
.
Equations
- S.subtype = { toFun := Subtype.val, map_zero' := ⋯, map_add' := ⋯ }