-- Some definitions which simplify the calculations done elsewhere.

{-# OPTIONS --universe-polymorphism #-}

module Derivation where

open import Data.Product
open import Level
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.HeterogeneousEquality

EqualTo :  {} {A : Set } (x : A)  Set 
EqualTo x =   y  x  y)

infix 0 ▷_ ▶_

▷_ :  {} {A : Set } {x y : A}  x  y  EqualTo x
 eq = (_ , eq)

▶_ :  {} {A : Set } {x y : A}  x  y  EqualTo x
 eq = (_ , ≅-to-≡ eq)

witness :  {} {A : Set } {x : A}  EqualTo x  A
witness = proj₁

proof :  {} {A : Set } {x : A}  (eq : EqualTo x)  x  witness eq
proof = proj₂