module Never where

open import Level using (Level)
open import Data.Unit.Polymorphic using ()
open import Data.Empty.Polymorphic using ()
open import Data.Product using (_,_)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as PE using (_≡_)
open import Relation.Binary.Construct.Never
open import Relation.Nullary

module _ {a} (A : Set a)  where
  impossible :  {x y : A}  ¬ Never { = } x y
  impossible ()

  sym : Symmetric {A = A} { = } Never
  sym ()

  trans : Transitive {A = A} { = } Never
  trans ()

module _ a  where

  trichotomous : Trichotomous {A =  {a}} _≡_ (Never { = })
  trichotomous _ _ = tri≈  ()) PE.refl  ())

  isStrictPartialOrder : IsStrictPartialOrder {A =  {a}} _≡_ (Never { = })
  isStrictPartialOrder = record
    { isEquivalence = PE.isEquivalence
    ; irrefl = λ _ ()
    ; trans = λ ()
    ; <-resp-≈ =  _ ()) , λ _ () }

  isStrictTotalOrder : IsStrictTotalOrder {A =  {a}} _≡_ (Never { = })
  isStrictTotalOrder = record
    { isStrictPartialOrder = isStrictPartialOrder
    ; compare = trichotomous }

  strictTotalOrder : StrictTotalOrder _ _ _
  strictTotalOrder = record { isStrictTotalOrder = isStrictTotalOrder }