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
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
- OrderIso.toGaloisInsertion oi = { choice := fun (b : α) (x : (OrderIso.symm oi) (oi b) ≤ b) => oi b, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisInsertion l u
from a GaloisConnection l u
such that ∀ b, b ≤ l (u b)
Equations
- GaloisConnection.toGaloisInsertion gc h = { choice := fun (x : α) (x_1 : u (l x) ≤ x) => l x, gc := gc, le_l_u := h, choice_eq := ⋯ }
Instances For
Lift the bottom along a Galois connection
Equations
Instances For
Lift the suprema along a Galois insertion
Equations
- GaloisInsertion.liftSemilatticeSup gi = let __src := inst✝; SemilatticeSup.mk ⋯ ⋯ ⋯
Instances For
Lift the infima along a Galois insertion
Equations
- GaloisInsertion.liftSemilatticeInf gi = let __src := inst✝; SemilatticeInf.mk ⋯ ⋯ ⋯
Instances For
Lift the suprema and infima along a Galois insertion
Equations
- GaloisInsertion.liftLattice gi = let __src := GaloisInsertion.liftSemilatticeSup gi; let __src_1 := GaloisInsertion.liftSemilatticeInf gi; Lattice.mk ⋯ ⋯ ⋯
Instances For
Lift the top along a Galois insertion
Equations
Instances For
Lift the top, bottom, suprema, and infima along a Galois insertion
Equations
- GaloisInsertion.liftBoundedOrder gi = let __src := GaloisInsertion.liftOrderTop gi; let __src_1 := GaloisConnection.liftOrderBot ⋯; BoundedOrder.mk
Instances For
Lift all suprema and infima along a Galois insertion
Equations
- GaloisInsertion.liftCompleteLattice gi = let __src := GaloisInsertion.liftBoundedOrder gi; let __src_1 := GaloisInsertion.liftLattice gi; 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
Make a GaloisInsertion
between αᵒᵈ
and βᵒᵈ
from a GaloisCoinsertion
between α
and
β
.
Equations
- GaloisCoinsertion.dual x = { choice := x.choice, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisCoinsertion
between αᵒᵈ
and βᵒᵈ
from a GaloisInsertion
between α
and
β
.
Equations
- GaloisInsertion.dual x = { choice := x.choice, gc := ⋯, u_l_le := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisInsertion
between α
and β
from a GaloisCoinsertion
between αᵒᵈ
and
βᵒᵈ
.
Equations
- GaloisCoinsertion.ofDual x = { choice := x.choice, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Make a GaloisCoinsertion
between α
and β
from a GaloisInsertion
between αᵒᵈ
and
βᵒᵈ
.
Equations
- GaloisInsertion.ofDual x = { choice := x.choice, gc := ⋯, u_l_le := ⋯, choice_eq := ⋯ }
Instances For
Makes a Galois coinsertion from an order-preserving bijection.
Equations
- OrderIso.toGaloisCoinsertion oi = { choice := fun (b : β) (x : b ≤ oi ((OrderIso.symm oi) b)) => (OrderIso.symm oi) b, gc := ⋯, u_l_le := ⋯, choice_eq := ⋯ }
Instances For
A constructor for a Galois coinsertion with the trivial choice
function.
Equations
- GaloisCoinsertion.monotoneIntro hu hl hlu hul = GaloisInsertion.ofDual (GaloisInsertion.monotoneIntro ⋯ ⋯ hlu hul)
Instances For
Make a GaloisCoinsertion l u
from a GaloisConnection l u
such that ∀ a, u (l a) ≤ a
Equations
- GaloisConnection.toGaloisCoinsertion gc h = { choice := fun (x : β) (x_1 : x ≤ l (u x)) => u x, gc := gc, u_l_le := h, choice_eq := ⋯ }
Instances For
Lift the top along a Galois connection
Equations
Instances For
Lift the infima along a Galois coinsertion
Equations
- GaloisCoinsertion.liftSemilatticeInf gi = let __src := inst✝; SemilatticeInf.mk ⋯ ⋯ ⋯
Instances For
Lift the suprema along a Galois coinsertion
Equations
- GaloisCoinsertion.liftSemilatticeSup gi = let __src := inst✝; SemilatticeSup.mk ⋯ ⋯ ⋯
Instances For
Lift the suprema and infima along a Galois coinsertion
Equations
- GaloisCoinsertion.liftLattice gi = let __src := GaloisCoinsertion.liftSemilatticeSup gi; let __src_1 := GaloisCoinsertion.liftSemilatticeInf gi; Lattice.mk ⋯ ⋯ ⋯
Instances For
Lift the bot along a Galois coinsertion
Equations
- GaloisCoinsertion.liftOrderBot gi = let __src := OrderDual.instOrderBot αᵒᵈ; OrderBot.mk ⋯
Instances For
Lift the top, bottom, suprema, and infima along a Galois coinsertion
Equations
- GaloisCoinsertion.liftBoundedOrder gi = let __src := GaloisCoinsertion.liftOrderBot gi; let __src_1 := GaloisConnection.liftOrderTop ⋯; BoundedOrder.mk
Instances For
Lift all suprema and infima along a Galois coinsertion
Equations
- GaloisCoinsertion.liftCompleteLattice gi = let __src := OrderDual.instCompleteLattice αᵒᵈ; CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Instances For
sSup
and Iic
form a Galois insertion.
Equations
- gi_sSup_Iic = GaloisConnection.toGaloisInsertion ⋯ ⋯
Instances For
toDual ∘ Ici
and sInf ∘ ofDual
form a Galois coinsertion.
Equations
- gci_Ici_sInf = GaloisConnection.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 := ⋯ }