~ubuntu-branches/ubuntu/wily/agda/wily-proposed

« back to all changes in this revision

Viewing changes to examples/outdated-and-incorrect/AIM6/Cat/lib/Logic/Base.agda

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-08-05 06:38:12 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140805063812-io8e77niomivhd49
Tags: 2.4.0.2-1
* [6e140ac] Imported Upstream version 2.4.0.2
* [2049fc8] Update Build-Depends to match control
* [93dc4d4] Install the new primitives
* [e48f40f] Fix typo dev→doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
module Logic.Base where
3
 
 
4
 
infix 60 ¬_
5
 
infix 30 _/\_
6
 
infix 20 _\/_
7
 
 
8
 
data True : Set where
9
 
  tt : True
10
 
 
11
 
data False : Set where
12
 
 
13
 
elim-False : {A : Set} -> False -> A
14
 
elim-False ()
15
 
 
16
 
data _/\_ (P Q : Set) : Set where
17
 
  /\-I : P -> Q -> P /\ Q
18
 
 
19
 
data _\/_ (P Q : Set) : Set where
20
 
  \/-IL : P -> P \/ Q
21
 
  \/-IR : Q -> P \/ Q
22
 
 
23
 
elimD-\/ : {P Q : Set}(C : P \/ Q -> Set) ->
24
 
           ((p : P) -> C (\/-IL p)) ->
25
 
           ((q : Q) -> C (\/-IR q)) ->
26
 
           (pq : P \/ Q) -> C pq
27
 
elimD-\/ C left right (\/-IL p) = left p
28
 
elimD-\/ C left right (\/-IR q) = right q
29
 
 
30
 
elim-\/ : {P Q R : Set} -> (P -> R) -> (Q -> R) -> P \/ Q -> R
31
 
elim-\/ = elimD-\/ (\_ -> _)
32
 
 
33
 
¬_ : Set -> Set
34
 
¬ P = P -> False
35
 
 
36
 
data ∃ {A : Set}(P : A -> Set) : Set where
37
 
  ∃-I : (w : A) -> P w -> ∃ P
38
 
 
39
 
∏ : {A : Set}(P : A -> Set) -> Set
40
 
∏ {A} P = (x : A) -> P x
41