Skip to content

Commit 87a3d6b

Browse files
committed
Match on _IsRelatedTo_ later
1 parent 029f251 commit 87a3d6b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Relation/Binary/Reasoning/Base/Partial.agda

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ data _IsRelatedTo_ : A → A → Set (a ⊔ ℓ) where
3131
singleStep : x x IsRelatedTo x
3232
multiStep : {x y} (x∼y : x ∼ y) x IsRelatedTo y
3333

34+
∼-go-build : Trans _∼_ _IsRelatedTo_ _∼_
35+
∼-go-build x∼y (singleStep y) = x∼y
36+
∼-go-build x∼y (multiStep y∼z) = trans x∼y y∼z
37+
3438
∼-go : Trans _∼_ _IsRelatedTo_ _IsRelatedTo_
35-
∼-go x∼y (singleStep y) = multiStep x∼y
36-
∼-go x∼y (multiStep y∼z) = multiStep (trans x∼y y∼z)
39+
∼-go x∼y y<z = multiStep (∼-go-build x∼y y<z)
3740

3841
stop : Reflexive _IsRelatedTo_
3942
stop = singleStep _

0 commit comments

Comments
 (0)