Move Bool to live on its own (#118)

This commit is contained in:
Patrick Stevens
2020-04-18 17:14:39 +01:00
committed by GitHub
parent 264a5e2bd9
commit 84a146f72c
30 changed files with 270 additions and 123 deletions

View File

@@ -1,5 +1,6 @@
{-# OPTIONS --safe --warning=error --without-K #-}
open import Sets.EquivalenceRelations
open import LogicalFormulae
open import Orders.Total.Definition
open import Orders.Partial.Definition
@@ -18,6 +19,11 @@ record SetoidPartialOrder {a b c : _} {A : Set a} (S : Setoid {a} {b} A) (_<_ :
<Transitive : {a b c : A} (a < b) (b < c) (a < c)
_<=_ : Rel {a} {b c} A
a <= b = (a < b) || (a b)
<=Transitive : {a b c : A} (a <= b) (b <= c) (a <= c)
<=Transitive (inl a<b) (inl b<c) = inl (<Transitive a<b b<c)
<=Transitive (inl a<b) (inr b=c) = inl (<WellDefined (Equivalence.reflexive eq) b=c a<b)
<=Transitive (inr a=b) (inl b<c) = inl (<WellDefined (Equivalence.symmetric eq a=b) (Equivalence.reflexive eq) b<c)
<=Transitive (inr a=b) (inr b=c) = inr (Equivalence.transitive eq a=b b=c)
partialOrderToSetoidPartialOrder : {a b : _} {A : Set a} (P : PartialOrder {a} A {b}) SetoidPartialOrder (reflSetoid A) (PartialOrder._<_ P)
SetoidPartialOrder.<WellDefined (partialOrderToSetoidPartialOrder P) a=b c=d a<c rewrite a=b | c=d = a<c