2 | module Syntax.PreorderReasoning
4 | import public Syntax.PreorderReasoning.Ops
13 | data Step : a -> b -> Type where
14 | (...) : (0 y : a) -> (0 step : x ~=~ y) -> Step x y
17 | data FastDerivation : (x : a) -> (y : b) -> Type where
18 | (|~) : (0 x : a) -> FastDerivation x x
19 | (~~) : FastDerivation x y -> (step : Step y z) -> FastDerivation x z
22 | Calc : {0 x : a} -> {0 y : b} -> (0 der : FastDerivation x y) -> x ~=~ y
23 | Calc der = irrelevantEq $
Calc' der
25 | Calc' : {0 x : c} -> {0 y : d} -> FastDerivation x y -> x ~=~ y
27 | Calc' ((~~) der (_ ...(Refl))) = Calc' der
41 | (..<) : (0 y : a) -> {0 x : b} -> (0 step : y ~=~ x) -> Step x y
42 | (y ..<(prf)) {x} = (y ...(sym prf))
45 | (..>) : (0 y : a) -> (0 step : x ~=~ y) -> Step x y
50 | (~=) : FastDerivation x y -> (0 z : dom) -> {auto 0 xEqy : y = z} -> FastDerivation x z
51 | (~=) der y {xEqy = Refl} = der ~~ y ... Refl