From 7945fa5dd215ec683a071ead208bc9a9e060118e Mon Sep 17 00:00:00 2001 From: Louis Wasserman Date: Fri, 7 Feb 2025 12:39:47 -0800 Subject: [PATCH] Minimum and maximum for decidable total orders (#1291) --- .../decidable-total-orders.lagda.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) diff --git a/src/order-theory/decidable-total-orders.lagda.md b/src/order-theory/decidable-total-orders.lagda.md index 2aeb739708..b8541bded7 100644 --- a/src/order-theory/decidable-total-orders.lagda.md +++ b/src/order-theory/decidable-total-orders.lagda.md @@ -11,6 +11,7 @@ open import foundation.binary-relations open import foundation.coproduct-types open import foundation.decidable-propositions open import foundation.dependent-pair-types +open import foundation.empty-types open import foundation.identity-types open import foundation.propositions open import foundation.sets @@ -18,6 +19,8 @@ open import foundation.universe-levels open import order-theory.decidable-posets open import order-theory.decidable-total-preorders +open import order-theory.greatest-lower-bounds-posets +open import order-theory.least-upper-bounds-posets open import order-theory.posets open import order-theory.preorders open import order-theory.total-orders @@ -181,3 +184,170 @@ module _ set-Decidable-Total-Order : Set l1 set-Decidable-Total-Order = set-Poset poset-Decidable-Total-Order ``` + +## Properties + +### Any two elements in a decidable total order have a minimum and maximum + +```agda +module _ + {l1 l2 : Level} + (T : Decidable-Total-Order l1 l2) + (x y : type-Decidable-Total-Order T) + where + + min-Total-Order : type-Decidable-Total-Order T + min-Total-Order = + rec-coproduct + ( λ x≤y → x) + ( λ y