Base.agda 592 B

1234567891011121314151617181920212223242526272829303132
  1. module Base where
  2. data True : Set where
  3. T : True
  4. data False : Set where
  5. infix 20 _*_
  6. data _*_ (A : Set)(B : A -> Set) : Set where
  7. <_,_> : (x : A) -> B x -> A * B
  8. rel : Set -> Set1
  9. rel A = A -> A -> Set
  10. pred : Set -> Set1
  11. pred A = A -> Set
  12. Refl : {A : Set} -> rel A -> Set
  13. Refl {A} R = {x : A} -> R x x
  14. Sym : {A : Set} -> rel A -> Set
  15. Sym {A} R = {x y : A} -> R x y -> R y x
  16. Trans : {A : Set} -> rel A -> Set
  17. Trans {A} R = {x y z : A} -> R x y -> R y z -> R x z
  18. Map : {A : Set} -> rel A -> {B : Set} -> rel B -> pred (A -> B)
  19. Map {A} _R_ _S_ f = {x y : A} -> x R y -> f x S f y