Chain.agda 403 B

12345678910111213141516171819202122
  1. module Chain
  2. { A : Set }
  3. (_==_ : A -> A -> Set )
  4. (refl : (x : A) -> x == x)
  5. (trans : (x y z : A) -> x == y -> y == z -> x == z)
  6. where
  7. infix 2 chain>_
  8. infixl 2 _===_
  9. infix 3 _by_
  10. chain>_ : (x : A) -> x == x
  11. chain> x = refl _
  12. _===_ : {x y z : A} -> x == y -> y == z -> x == z
  13. xy === yz = trans _ _ _ xy yz
  14. _by_ : {x : A}(y : A) -> x == y -> x == y
  15. y by eq = eq