Galois connections, insertions and coinsertions #
Galois connections are order theoretic adjoints, i.e. a pair of functions u
and l
,
such that ∀ a b, l a ≤ b ↔ a ≤ u b
.
Main definitions #
GaloisConnection
: A Galois connection is a pair of functionsl
andu
satisfyingl a ≤ b ↔ a ≤ u b
. They are special cases of adjoint functors in category theory, but do not depend on the category theory library in mathlib.GaloisInsertion
: A Galois insertion is a Galois connection wherel ∘ u = id
GaloisCoinsertion
: A Galois coinsertion is a Galois connection whereu ∘ l = id
Implementation details #
Galois insertions can be used to lift order structures from one type to another.
For example, if α
is a complete lattice, and l : α → β
and u : β → α
form a Galois insertion,
then β
is also a complete lattice. l
is the lower adjoint and u
is the upper adjoint.
An example of a Galois insertion is in group theory. If G
is a group, then there is a Galois
insertion between the set of subsets of G
, Set G
, and the set of subgroups of G
,
Subgroup G
. The lower adjoint is Subgroup.closure
, taking the Subgroup
generated by a Set
,
and the upper adjoint is the coercion from Subgroup G
to Set G
, taking the underlying set
of a subgroup.
Naively lifting a lattice structure along this Galois insertion would mean that the definition
of inf
on subgroups would be Subgroup.closure (↑S ∩ ↑T)
. This is an undesirable definition
because the intersection of subgroups is already a subgroup, so there is no need to take the
closure. For this reason a choice
function is added as a field to the GaloisInsertion
structure. It has type Π S : Set G, ↑(closure S) ≤ S → Subgroup G
. When ↑(closure S) ≤ S
, then
S
is already a subgroup, so this function can be defined using Subgroup.mk
and not closure
.
This means the infimum of subgroups will be defined to be the intersection of sets, paired
with a proof that intersection of subgroups is a subgroup, rather than the closure of the
intersection.
A Galois connection is a pair of functions l
and u
satisfying
l a ≤ b ↔ a ≤ u b
. They are special cases of adjoint functors in category theory,
but do not depend on the category theory library in mathlib.
Equations
- GaloisConnection l u = ∀ (a : α) (b : β), l a ≤ b ↔ a ≤ u b
Instances For
Makes a Galois connection from an order-preserving bijection.
If (l, u)
is a Galois connection, then the relation x ≤ u (l y)
is a transitive relation.
If l
is a closure operator (Submodule.span
, Subgroup.closure
, ...) and u
is the coercion to
Set
, this reads as "if U
is in the closure of V
and V
is in the closure of W
then U
is
in the closure of W
".
If there exists a b
such that a = u a
, then b = l a
is one such element.
If there exists an a
such that b = l a
, then a = u b
is one such element.
sSup
and Iic
form a Galois connection.
toDual ∘ Ici
and sInf ∘ ofDual
form a Galois connection.
A Galois insertion is a Galois connection where l ∘ u = id
. It also contains a constructive
choice function, to give better definitional equalities when lifting order structures. Dual
to GaloisCoinsertion
- choice : (x : α) → u (l x) ≤ x → β
A contructive choice function for images of
l
. - gc : GaloisConnection l u
The Galois connection associated to a Galois insertion.
- le_l_u : ∀ (x : β), x ≤ l (u x)
Main property of a Galois insertion.
Property of the choice function.
Instances For
The Galois connection associated to a Galois insertion.
Main property of a Galois insertion.
Property of the choice function.
A constructor for a Galois insertion with the trivial choice
function.
Equations
- GaloisInsertion.monotoneIntro hu hl hul hlu = { choice := fun (x : α) (x_1 : u (l x) ≤ x) => l x, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Makes a Galois insertion from an order-preserving bijection.
Equations
Instances For
Make a GaloisInsertion l u
from a GaloisConnection l u
such that ∀ b, b ≤ l (u b)
Equations
Instances For
Lift the bottom along a Galois connection
Equations
- gc.liftOrderBot = OrderBot.mk ⋯
Instances For
Lift the suprema along a Galois insertion
Equations
- gi.liftSemilatticeSup = SemilatticeSup.mk ⋯ ⋯ ⋯
Instances For
Lift the infima along a Galois insertion
Equations
- gi.liftSemilatticeInf = SemilatticeInf.mk ⋯ ⋯ ⋯
Instances For
Lift the suprema and infima along a Galois insertion
Equations
- gi.liftLattice = Lattice.mk ⋯ ⋯ ⋯
Instances For
Lift the top along a Galois insertion
Equations
- gi.liftOrderTop = OrderTop.mk ⋯
Instances For
Lift the top, bottom, suprema, and infima along a Galois insertion
Equations
- gi.liftBoundedOrder = BoundedOrder.mk
Instances For
Lift all suprema and infima along a Galois insertion
Equations
- gi.liftCompleteLattice = CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Instances For
A Galois coinsertion is a Galois connection where u ∘ l = id
. It also contains a constructive
choice function, to give better definitional equalities when lifting order structures. Dual to
GaloisInsertion
- choice : (x : β) → x ≤ l (u x) → α
A contructive choice function for images of
u
. - gc : GaloisConnection l u
The Galois connection associated to a Galois coinsertion.
- u_l_le : ∀ (x : α), u (l x) ≤ x
Main property of a Galois coinsertion.
Property of the choice function.
Instances For
The Galois connection associated to a Galois coinsertion.
Main property of a Galois coinsertion.
Property of the choice function.
Make a GaloisInsertion
between αᵒᵈ
and βᵒᵈ
from a GaloisCoinsertion
between α
and
β
.
Equations
- x.dual = { choice := x.choice, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisCoinsertion
between αᵒᵈ
and βᵒᵈ
from a GaloisInsertion
between α
and
β
.
Equations
- x.dual = { choice := x.choice, gc := ⋯, u_l_le := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisInsertion
between α
and β
from a GaloisCoinsertion
between αᵒᵈ
and
βᵒᵈ
.
Equations
- x.ofDual = { choice := x.choice, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisCoinsertion
between α
and β
from a GaloisInsertion
between αᵒᵈ
and
βᵒᵈ
.
Equations
- x.ofDual = { choice := x.choice, gc := ⋯, u_l_le := ⋯, choice_eq := ⋯ }
Instances For
Makes a Galois coinsertion from an order-preserving bijection.
Equations
Instances For
A constructor for a Galois coinsertion with the trivial choice
function.
Equations
- GaloisCoinsertion.monotoneIntro hu hl hlu hul = (GaloisInsertion.monotoneIntro ⋯ ⋯ hlu hul).ofDual
Instances For
Make a GaloisCoinsertion l u
from a GaloisConnection l u
such that ∀ a, u (l a) ≤ a
Equations
Instances For
Lift the top along a Galois connection
Equations
- gc.liftOrderTop = OrderTop.mk ⋯
Instances For
Lift the infima along a Galois coinsertion
Equations
- gi.liftSemilatticeInf = SemilatticeInf.mk ⋯ ⋯ ⋯
Instances For
Lift the suprema along a Galois coinsertion
Equations
- gi.liftSemilatticeSup = SemilatticeSup.mk ⋯ ⋯ ⋯
Instances For
Lift the suprema and infima along a Galois coinsertion
Equations
- gi.liftLattice = Lattice.mk ⋯ ⋯ ⋯
Instances For
Lift the bot along a Galois coinsertion
Equations
- gi.liftOrderBot = OrderBot.mk ⋯
Instances For
Lift the top, bottom, suprema, and infima along a Galois coinsertion
Equations
- gi.liftBoundedOrder = BoundedOrder.mk
Instances For
Lift all suprema and infima along a Galois coinsertion
Equations
- gi.liftCompleteLattice = CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Instances For
toDual ∘ Ici
and sInf ∘ ofDual
form a Galois coinsertion.
Equations
- gci_Ici_sInf = ⋯.toGaloisCoinsertion ⋯
Instances For
If α
is a partial order with bottom element (e.g., ℕ
, ℝ≥0
), then WithBot.unbot' ⊥
and
coercion form a Galois insertion.
Equations
- WithBot.giUnbot'Bot = { choice := fun (o : WithBot α) (x : ↑(WithBot.unbot' ⊥ o) ≤ o) => WithBot.unbot' ⊥ o, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }