Module docstring
{"# Galois connections, insertions and coinsertions
This file contains basic results on Galois connections, insertions and coinsertions in various order structures, and provides constructions that lift order structures from one type to another.
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.
"}