ยซ Home

Definition. Frame [ag-000G]

{-# OPTIONS --safe --without-K #-}
module ag-000G where

open import MLTT.Spartan
open import UF.SubtypeClassifier
open import ag-000F

To build frame, we must be able to talk about arbitrary subsets of underlying set X

Fam : ๐“ค ฬ‡  โ†’ ๐“ค โบ ฬ‡
Fam {๐“ค} A = ฮฃ I ๊ž‰ ๐“ค ฬ‡ , (I โ†’ A)

module JoinStntax {A : ๐“ค ฬ‡ } (join : Fam A โ†’ A) where
  join-of : {I : ๐“ค ฬ‡ } โ†’ (I โ†’ A) โ†’ A
  join-of {I} f = join (I , f)

  syntax join-of (ฮป i โ†’ e) = โˆจโŸจ i โŸฉ e

index : {X : ๐“ค ฬ‡ } โ†’ Fam X โ†’ ๐“ค ฬ‡
index (I , _) = I

_$_ : {X : ๐“ค ฬ‡ } โ†’ (F : Fam X) โ†’ index F โ†’ X
_$_ (_ , f) = f
infixl 40 _$_

_โˆˆ_ : {X : ๐“ค ฬ‡ } โ†’ X โ†’ Fam X โ†’ ๐“ค ฬ‡
x โˆˆ (_ , f) = fiber f x

Beside poset axioms, frame axioms are

  1. There is a top element โŠค, every element xโ€„โ‰คโ€„โŠค
  2. Binary meet xโ€…โˆงโ€…y is smaller than x and y, and it is a limit
  3. Each arbitrary subset U has a join โˆจU, such that each element of it smaller than the join
  4. Binary meets must distribute over arbitrary joins
frame-axioms : (X : ๐“ค ฬ‡ ) โ†’ order-structure X โ†’ X โ†’ (X โ†’ X โ†’ X) โ†’ (Fam X โ†’ X) โ†’ ๐“ค โบ ฬ‡
frame-axioms X _โ‰ค_ โŠค _โˆง_ โˆจ =
  ((x : X) โ†’ (x โ‰ค โŠค) holds)
  ร— ((x y : X) โ†’ ((x โˆง y) โ‰ค x) holds ร— ((x โˆง y) โ‰ค y) holds)
  ร— ((x y z : X) โ†’ (z โ‰ค x) holds โ†’ (z โ‰ค y) holds โ†’ (z โ‰ค (x โˆง y)) holds)
  ร— ((U : Fam X) โ†’ (x : X) โ†’ x โˆˆ U โ†’ (x โ‰ค โˆจ U) holds)
  ร— ((U : Fam X) โ†’ (x : X) โ†’ ((y : X) โ†’ y โˆˆ U โ†’ (y โ‰ค x) holds) โ†’ (โˆจ U โ‰ค x) holds)
  ร— distrib
  where
  open JoinStntax โˆจ
  distrib = ((U : Fam X) โ†’ (x : X) โ†’ x โˆง (โˆจ U) ๏ผ โˆจโŸจ i โŸฉ (x โˆง U $ i))

Frame-structure : ๐“ค ฬ‡  โ†’ ๐“ค โบ ฬ‡
Frame-structure X =
  ฮฃ _โ‰ค_ ๊ž‰ order-structure X ,
  ฮฃ โŠค ๊ž‰ X ,
  ฮฃ _โˆง_ ๊ž‰ (X โ†’ X โ†’ X) ,
  ฮฃ โˆจ ๊ž‰ (Fam X โ†’ X) ,
  (poset-axioms X _โ‰ค_) ร— (frame-axioms X _โ‰ค_ โŠค _โˆง_ โˆจ)

Frame : (๐“ค : Universe) โ†’ ๐“ค โบ ฬ‡
Frame ๐“ค = ฮฃ X ๊ž‰ ๐“ค ฬ‡ , Frame-structure X