| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Convenient syntax for "equational reasoning" using a strict partial |
| 5 |
-- order. |
| 6 |
------------------------------------------------------------------------ |
| 7 |
|
| 8 |
-- Example uses: |
| 9 |
-- |
| 10 |
-- u≤x : u ≤ x |
| 11 |
-- u≤x = begin |
| 12 |
-- u ≈⟨ u≈v ⟩ |
| 13 |
-- v ≡⟨ v≡w ⟩ |
| 14 |
-- w <⟨ w≤x ⟩ |
| 15 |
-- x ∎ |
| 16 |
-- |
| 17 |
-- u<x : u < x |
| 18 |
-- u<x = begin-strict |
| 19 |
-- u ≈⟨ u≈v ⟩ |
| 20 |
-- v ≡⟨ v≡w ⟩ |
| 21 |
-- w <⟨ w≤x ⟩ |
| 22 |
-- x ∎ |
| 23 |
-- |
| 24 |
-- u<e : u < e |
| 25 |
-- u<e = begin-strict |
| 26 |
-- u ≈⟨ u≈v ⟩ |
| 27 |
-- v ≡⟨ v≡w ⟩ |
| 28 |
-- w <⟨ w<x ⟩ |
| 29 |
-- x ≤⟨ x≤y ⟩ |
| 30 |
-- y <⟨ y<z ⟩ |
| 31 |
-- z ≡⟨ d≡z ⟨ |
| 32 |
-- d ≈⟨ e≈d ⟨ |
| 33 |
-- e ∎ |
| 34 |
-- |
| 35 |
-- u≈w : u ≈ w |
| 36 |
-- u≈w = begin-equality |
| 37 |
-- u ≈⟨ u≈v ⟩ |
| 38 |
-- v ≡⟨ v≡w ⟩ |
| 39 |
-- w ∎ |
| 40 |
|
| 41 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 42 |
|
| 43 |
open import Relation.Binary.Bundles using (StrictPartialOrder) |
| 44 |
|
| 45 |
module Relation.Binary.Reasoning.StrictPartialOrder |
| 46 |
{p₁ p₂ p₃} (S : StrictPartialOrder p₁ p₂ p₃) where |
| 47 |
|
| 48 |
open StrictPartialOrder S |
| 49 |
import Relation.Binary.Construct.StrictToNonStrict _≈_ _<_ as NonStrict |
| 50 |
|
| 51 |
------------------------------------------------------------------------ |
| 52 |
-- Publicly re-export the contents of the base module |
| 53 |
|
| 54 |
open import Relation.Binary.Reasoning.Base.Triple |
| 55 |
(NonStrict.isPreorder₂ isStrictPartialOrder) |
| 56 |
asym |
| 57 |
trans |
| 58 |
<-resp-≈ |
| 59 |
NonStrict.<⇒≤ |
| 60 |
(NonStrict.<-≤-trans trans <-respʳ-≈) |
| 61 |
(NonStrict.≤-<-trans Eq.sym trans <-respˡ-≈) |
| 62 |
public |
| 63 |
|