{-# OPTIONS --cubical-compatible --safe #-}
module PropositionalEquality where

open import Relation.Nullary
  using (Dec ; yes ; no ; ¬_)

open import Agda.Builtin.Equality public

sym :  {} {A : Set } {x y : A}
     x  y  y  x
sym refl = refl

infixr 20 _∙_

_∙_ :  {} {A : Set } {x y z : A}
     x  y  y  z  x  z
refl  refl = refl

subst :  { ℓ'} {A : Set } (P : A  Set ℓ') {x y : A}
       x  y  P x  P y
subst P refl p = p

cong :  { ℓ'} {A : Set } {B : Set ℓ'} {x y : A}
      (f : A  B)  x  y  f x  f y
cong f refl = refl

cong₂ :  { ℓ' ℓ″} {A : Set } {B : Set ℓ'} {C : Set ℓ″}
       {x y : A} {u v : B}
       (f : A  B  C)  x  y  u  v  f x u  f y v
cong₂ f refl refl = refl

J :  { ℓ'} {A : Set } {x y : A}
   (P :  y  x  y  Set ℓ')
   P x refl  (p : x  y)  P y p
J P d refl = d

lCancel :  {} {A : Set } {x y : A}
         (p : x  y)  sym p  p  refl
lCancel refl = refl

isProp isSet :  {}  Set   Set 
isProp A = (x y : A)  x  y
isSet  A = (x y : A)  isProp (x  y)

Discrete :  {}  Set   Set 
Discrete A = (x y : A)  Dec (x  y)