Skip to content

Commit

Permalink
make ≡-syntax level polymorphic for heterogeneous equality
Browse files Browse the repository at this point in the history
  • Loading branch information
ruifengx committed Oct 5, 2024
1 parent 4ad0193 commit 298d9a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Relation/Binary/HeterogeneousEquality.agda
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,22 @@ module ≅-Reasoning where

infix 4 _IsRelatedTo_

data _IsRelatedTo_ {A : Set } {B : Set } (x : A) (y : B) : Set where
data _IsRelatedTo_ {A : Set a} {B : Set b} (x : A) (y : B) : Set a where
relTo : (x≅y : x ≅ y) x IsRelatedTo y

start : {x : A} {y : B} x IsRelatedTo y x ≅ y
start (relTo x≅y) = x≅y

≡-go : {A : Set } {B : Set } Trans {A = A} {C = B} _≡_ _IsRelatedTo_ _IsRelatedTo_
≡-go : {A : Set a} {B : Set b} Trans {A = A} {C = B} _≡_ _IsRelatedTo_ _IsRelatedTo_
≡-go x≡y (relTo y≅z) = relTo (trans (reflexive x≡y) y≅z)

-- Combinators with one heterogeneous relation
module _ {A : Set } {B : Set } where
module _ {A : Set a} {B : Set b} where
open begin-syntax (_IsRelatedTo_ {A = A} {B}) start public
open ≡-syntax (_IsRelatedTo_ {A = A} {B}) ≡-go public

-- Combinators with homogeneous relations
module _ {A : Set } where
module _ {A : Set a} where
open end-syntax (_IsRelatedTo_ {A = A}) (relTo refl) public

-- Can't create syntax in the standard `Syntax` module for
Expand Down

0 comments on commit 298d9a1

Please sign in to comment.