Skip to content

Instantly share code, notes, and snippets.

@rntz
Last active March 18, 2024 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rntz/a032af5bf3256fa5aae790ec364ffa89 to your computer and use it in GitHub Desktop.
Save rntz/a032af5bf3256fa5aae790ec364ffa89 to your computer and use it in GitHub Desktop.
fake agda for preorder theory
record Preorder (A : Set) : Set1 where
_≤_ : A → A → Set
refl : {a} → a ≤ a
trans : {a b c} → a ≤ b → b ≤ c → a ≤ c
record is-lub {A} (P : Preorder A) {I} (a : I → A) (⋁a : A) : Set where
bound : (i : I) → a i ≤ ⋁a
least : (b : A) → ((i : I) → a i ≤ b) → ⋁a ≤ b
module _ {A B} (P : Preorder A) (Q : Preorder B) (f : A → B) where
mono : Set
mono = {x y} → x P.≤ y → f x Q.≤ f y
ωcont : Set
ωcont = (x : ℕ → A) → (i ≤ j → x i P.≤ x j) → -- Gimme an ω-chain xᵢ
(⋁x : A) → is-lub P x ⋁x → -- and its limit ⋁ᵢ xᵢ
is-lub Q (f ∘ x) (f ⋁x) -- then f(⋁ᵢ xᵢ) = ⋁ᵢ xᵢ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment