The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V24. Category theory

Mathlib.Order.Category.Lat

49 declarations. Mathlib docs · Source

The category of lattices

This defines Lat, the category of lattices.

Note that Lat doesn't correspond to the literature definition of [Lat] (https://ncatlab.org/nlab/show/Lat) as we don't require bottom or top elements. Instead, Lat corresponds to BddLat.

TODO

The free functor from Lat to BddLat is X → WithTop (WithBot X).

The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

theorem Lat.mk.injEq E0 #

∀ (carrier : Type u_1) [str : Lattice carrier] (carrier_1 : Type u_1) (str_1 : Lattice carrier_1),
  ({ carrier := carrier, str := str } = { carrier := carrier_1, str := str_1 }) = (carrier = carrier_1 ∧ str ≍ str_1)

def Lat.Hom.ctorIdx E1 #

{X Y : Lat} → X.Hom Y → ℕ

theorem Lat.mk.inj E1 #

∀ {carrier : Type u_1} {str : Lattice carrier} {carrier_1 : Type u_1} {str_1 : Lattice carrier_1},
  { carrier := carrier, str := str } = { carrier := carrier_1, str := str_1 } → carrier = carrier_1 ∧ str ≍ str_1

def Lat.ctorIdx E1 #

Lat → ℕ

structure Lat E1 #

Type (u_1 + 1)

The category of lattices.

ctor Lat.mk E0 #

(carrier : Type u_1) → [str : Lattice carrier] → Lat

abbrev Lat.carrier E1 #

Lat → Type u_1

The underlying lattices.

instance Lat.str E0 #

(self : Lat) → Lattice ↑self

instance Lat.instCoeSortType E0 #

CoeSort Lat (Type u_1)

abbrev Lat.of E1 #

(X : Type u_1) → [Lattice X] → Lat

Construct a bundled Lat from the underlying type and typeclass.

def Lat.delabOf E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prints Lat.of X as ↧X.

structure Lat.Hom E1 #

Lat → Lat → Type u

The type of morphisms in Lat R.

theorem Lat.Hom.ext_iff E0 #

∀ {X Y : Lat} {x y : X.Hom Y}, x = y ↔ x.hom' = y.hom'

theorem Lat.Hom.ext E1 #

∀ {X Y : Lat} {x y : X.Hom Y}, x.hom' = y.hom' → x = y

abbrev Lat.Hom.hom' E1 #

{X Y : Lat} → X.Hom Y → LatticeHom ↑X ↑Y

The underlying LatticeHom.

instance Lat.instCategory E0 #

CategoryTheory.Category.{u, u + 1} Lat

instance Lat.instConcreteCategoryLatticeHomCarrier E0 #

CategoryTheory.ConcreteCategory Lat fun x1 x2 ↦ LatticeHom ↑x1 ↑x2

abbrev Lat.Hom.hom E1 #

{X Y : Lat} → X.Hom Y → LatticeHom ↑X ↑Y

Turn a morphism in Lat back into a LatticeHom.

abbrev Lat.ofHom E1 #

{X Y : Type u} → [inst : Lattice X] → [inst_1 : Lattice Y] → LatticeHom X Y → (↧X ⟶ ↧Y)

Typecheck a LatticeHom as a morphism in Lat.

def Lat.Hom.Simps.hom E1 #

(X Y : Lat) → X.Hom Y → LatticeHom ↑X ↑Y

Use the ConcreteCategory.hom projection for @[simps] lemmas.

theorem Lat.coe_id E0 #

∀ {X : Lat}, ⇑(CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id X)) = id

theorem Lat.coe_comp E0 #

∀ {X Y Z : Lat} {f : X ⟶ Y} {g : Y ⟶ Z},
  ⇑(CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) =
    ⇑(CategoryTheory.ConcreteCategory.hom g) ∘ ⇑(CategoryTheory.ConcreteCategory.hom f)

theorem Lat.forget_map E0 #

∀ {X Y : Lat} (f : X ⟶ Y),
  ⇑(CategoryTheory.ConcreteCategory.hom ((CategoryTheory.forget Lat).map f)) = ⇑(CategoryTheory.ConcreteCategory.hom f)

theorem Lat.ext_iff E0 #

∀ {X Y : Lat} {f g : X ⟶ Y},
  f = g ↔ ∀ (x : ↑X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x

theorem Lat.ext E1 #

∀ {X Y : Lat} {f g : X ⟶ Y},
  (∀ (x : ↑X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x) → f = g

theorem Lat.coe_of E0 #

∀ (X : Type u) [inst : Lattice X], ↑↧X = X

theorem Lat.hom_id E0 #

∀ {X : Lat}, Lat.Hom.hom (CategoryTheory.CategoryStruct.id X) = LatticeHom.id ↑X

theorem Lat.id_apply E0 #

∀ (X : Lat) (x : ↑X), (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id X)) x = x

theorem Lat.hom_comp E0 #

∀ {X Y Z : Lat} (f : X ⟶ Y) (g : Y ⟶ Z),
  Lat.Hom.hom (CategoryTheory.CategoryStruct.comp f g) = (Lat.Hom.hom g).comp (Lat.Hom.hom f)

theorem Lat.comp_apply E0 #

∀ {X Y Z : Lat} (f : X ⟶ Y) (g : Y ⟶ Z) (x : ↑X),
  (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) x =
    (CategoryTheory.ConcreteCategory.hom g) ((CategoryTheory.ConcreteCategory.hom f) x)

theorem Lat.hom_ext_iff E0 #

∀ {X Y : Lat} {f g : X ⟶ Y}, f = g ↔ Lat.Hom.hom f = Lat.Hom.hom g

theorem Lat.hom_ext E1 #

∀ {X Y : Lat} {f g : X ⟶ Y}, Lat.Hom.hom f = Lat.Hom.hom g → f = g

theorem Lat.hom_ofHom E0 #

∀ {X Y : Type u} [inst : Lattice X] [inst_1 : Lattice Y] (f : LatticeHom X Y), Lat.Hom.hom (Lat.ofHom f) = f

theorem Lat.ofHom_hom E0 #

∀ {X Y : Lat} (f : X ⟶ Y), Lat.ofHom (Lat.Hom.hom f) = f

theorem Lat.ofHom_id E0 #

∀ {X : Type u} [inst : Lattice X], Lat.ofHom (LatticeHom.id X) = CategoryTheory.CategoryStruct.id ↧X

theorem Lat.ofHom_comp E0 #

∀ {X Y Z : Type u} [inst : Lattice X] [inst_1 : Lattice Y] [inst_2 : Lattice Z] (f : LatticeHom X Y)
  (g : LatticeHom Y Z), Lat.ofHom (g.comp f) = CategoryTheory.CategoryStruct.comp (Lat.ofHom f) (Lat.ofHom g)

theorem Lat.ofHom_apply E0 #

∀ {X Y : Type u} [inst : Lattice X] [inst_1 : Lattice Y] (f : LatticeHom X Y) (x : X),
  (CategoryTheory.ConcreteCategory.hom (Lat.ofHom f)) x = f x

theorem Lat.inv_hom_apply E0 #

∀ {X Y : Lat} (e : X ≅ Y) (x : ↑X),
  (CategoryTheory.ConcreteCategory.hom e.inv) ((CategoryTheory.ConcreteCategory.hom e.hom) x) = x

theorem Lat.hom_inv_apply E0 #

∀ {X Y : Lat} (e : X ≅ Y) (s : ↑Y),
  (CategoryTheory.ConcreteCategory.hom e.hom) ((CategoryTheory.ConcreteCategory.hom e.inv) s) = s

instance Lat.hasForgetToPartOrd E0 #

CategoryTheory.HasForget₂ Lat PartOrd

def Lat.Iso.mk E1 #

{α β : Lat} → ↑α ≃o ↑β → (α ≅ β)

Constructs an isomorphism of lattices from an order isomorphism between them.

theorem Lat.Iso.mk_inv E0 #

∀ {α β : Lat} (e : ↑α ≃o ↑β), (Lat.Iso.mk e).inv = Lat.ofHom { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ }

theorem Lat.Iso.mk_hom E0 #

∀ {α β : Lat} (e : ↑α ≃o ↑β), (Lat.Iso.mk e).hom = Lat.ofHom { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ }

def Lat.dual E1 #

CategoryTheory.Functor Lat Lat

OrderDual as a functor.

theorem Lat.dual_map E0 #

∀ {X Y : Lat} (f : X ⟶ Y), Lat.dual.map f = Lat.ofHom (LatticeHom.dual (Lat.Hom.hom f))

def Lat.dualEquiv E1 #

Lat ≌ Lat

The equivalence between Lat and itself induced by OrderDual both ways.

theorem Lat.dualEquiv_functor E0 #

Lat.dualEquiv.functor = Lat.dual

theorem Lat.dualEquiv_inverse E0 #

Lat.dualEquiv.inverse = Lat.dual

theorem Lat_dual_comp_forget_to_partOrd E1 #

Lat.dual.comp (CategoryTheory.forget₂ Lat PartOrd) = (CategoryTheory.forget₂ Lat PartOrd).comp PartOrd.dual