{-# OPTIONS --exact-split #-}
{-# OPTIONS --guardedness #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --safe #-}
{-# OPTIONS --warning=all #-}
{-# OPTIONS --warning=error #-}
{-# OPTIONS --without-K #-}
module Extra.Relation.Binary.PreorderReasoning where
open import Extra.Relation.Binary.PropositionalEquality
infix 4 _≃_
infix 3 _∎
infixr 2 _≡⟨_⟩_
infix 1 begin_
private
data _≃_ {A : Set}(x y : A) : Set where
prf : x ≡ y → x ≃ y
begin_ : {A : Set}{x y : A} → x ≃ y → x ≡ y
begin prf x≡y = x≡y
_≡⟨_⟩_ : {A : Set}(x : A){y z : A} → x ≡ y → y ≃ z → x ≃ z
_ ≡⟨ x≡y ⟩ prf y≡z = prf (trans x≡y y≡z)
_∎ : {A : Set}(x : A) → x ≃ x
_∎ _ = prf refl