annotate Paper/src/agda/logic.agda.replaced @ 2:9176dff8f38a

ADD while loop description
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Fri, 05 Nov 2021 15:19:08 +0900
parents
children 339fb67b4375
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 module logic where
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 open import Level
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 open import Relation.Nullary
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 open import Relation.Binary hiding(_⇔_)
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 open import Data.Empty
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 data Bool : Set where
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 true : Bool
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 false : Bool
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 record _@$\wedge$@_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n @$\sqcup$@ m) where
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 field
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 proj1 : A
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 proj2 : B
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 data _∨_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n @$\sqcup$@ m) where
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 case1 : A @$\rightarrow$@ A ∨ B
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 case2 : B @$\rightarrow$@ A ∨ B
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 _⇔_ : {n m : Level } @$\rightarrow$@ ( A : Set n ) ( B : Set m ) @$\rightarrow$@ Set (n @$\sqcup$@ m)
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 _⇔_ A B = ( A @$\rightarrow$@ B ) @$\wedge$@ ( B @$\rightarrow$@ A )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 contra-position : {n m : Level } {A : Set n} {B : Set m} @$\rightarrow$@ (A @$\rightarrow$@ B) @$\rightarrow$@ @$\neg$@ B @$\rightarrow$@ @$\neg$@ A
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 contra-position {n} {m} {A} {B} f @$\neg$@b a = @$\neg$@b ( f a )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 double-neg : {n : Level } {A : Set n} @$\rightarrow$@ A @$\rightarrow$@ @$\neg$@ @$\neg$@ A
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 double-neg A notnot = notnot A
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 double-neg2 : {n : Level } {A : Set n} @$\rightarrow$@ @$\neg$@ @$\neg$@ @$\neg$@ A @$\rightarrow$@ @$\neg$@ A
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 double-neg2 notnot A = notnot ( double-neg A )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 de-morgan : {n : Level } {A B : Set n} @$\rightarrow$@ A @$\wedge$@ B @$\rightarrow$@ @$\neg$@ ( (@$\neg$@ A ) ∨ (@$\neg$@ B ) )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 de-morgan {n} {A} {B} and (case1 @$\neg$@A) = @$\bot$@-elim ( @$\neg$@A ( _@$\wedge$@_.proj1 and ))
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 de-morgan {n} {A} {B} and (case2 @$\neg$@B) = @$\bot$@-elim ( @$\neg$@B ( _@$\wedge$@_.proj2 and ))
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 dont-or : {n m : Level} {A : Set n} { B : Set m } @$\rightarrow$@ A ∨ B @$\rightarrow$@ @$\neg$@ A @$\rightarrow$@ B
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 dont-or {A} {B} (case1 a) @$\neg$@A = @$\bot$@-elim ( @$\neg$@A a )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 dont-or {A} {B} (case2 b) @$\neg$@A = b
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 dont-orb : {n m : Level} {A : Set n} { B : Set m } @$\rightarrow$@ A ∨ B @$\rightarrow$@ @$\neg$@ B @$\rightarrow$@ A
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 dont-orb {A} {B} (case2 b) @$\neg$@B = @$\bot$@-elim ( @$\neg$@B b )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 dont-orb {A} {B} (case1 a) @$\neg$@B = a
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 infixr 130 _@$\wedge$@_
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 infixr 140 _∨_
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 infixr 150 _⇔_
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 _@$\wedge$@_ : Bool @$\rightarrow$@ Bool @$\rightarrow$@ Bool
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 true @$\wedge$@ true = true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 _ @$\wedge$@ _ = false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 _\/_ : Bool @$\rightarrow$@ Bool @$\rightarrow$@ Bool
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 false \/ false = false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 _ \/ _ = true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 not_ : Bool @$\rightarrow$@ Bool
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 not true = false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 not false = true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 _<=>_ : Bool @$\rightarrow$@ Bool @$\rightarrow$@ Bool
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 true <=> true = true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 false <=> false = true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 _ <=> _ = false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 infixr 130 _\/_
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 infixr 140 _@$\wedge$@_
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 open import Relation.Binary.PropositionalEquality
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 @$\equiv$@-Bool-func : {A B : Bool } @$\rightarrow$@ ( A @$\equiv$@ true @$\rightarrow$@ B @$\equiv$@ true ) @$\rightarrow$@ ( B @$\equiv$@ true @$\rightarrow$@ A @$\equiv$@ true ) @$\rightarrow$@ A @$\equiv$@ B
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 @$\equiv$@-Bool-func {true} {true} a@$\rightarrow$@b b@$\rightarrow$@a = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 @$\equiv$@-Bool-func {false} {true} a@$\rightarrow$@b b@$\rightarrow$@a with b@$\rightarrow$@a refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 ... | ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 @$\equiv$@-Bool-func {true} {false} a@$\rightarrow$@b b@$\rightarrow$@a with a@$\rightarrow$@b refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 ... | ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 @$\equiv$@-Bool-func {false} {false} a@$\rightarrow$@b b@$\rightarrow$@a = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 bool-@$\equiv$@-? : (a b : Bool) @$\rightarrow$@ Dec ( a @$\equiv$@ b )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 bool-@$\equiv$@-? true true = yes refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 bool-@$\equiv$@-? true false = no (@$\lambda$@ ())
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 bool-@$\equiv$@-? false true = no (@$\lambda$@ ())
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 bool-@$\equiv$@-? false false = yes refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 @$\neg$@-bool-t : {a : Bool} @$\rightarrow$@ @$\neg$@ ( a @$\equiv$@ true ) @$\rightarrow$@ a @$\equiv$@ false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 @$\neg$@-bool-t {true} ne = @$\bot$@-elim ( ne refl )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 @$\neg$@-bool-t {false} ne = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 @$\neg$@-bool-f : {a : Bool} @$\rightarrow$@ @$\neg$@ ( a @$\equiv$@ false ) @$\rightarrow$@ a @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 @$\neg$@-bool-f {true} ne = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 @$\neg$@-bool-f {false} ne = @$\bot$@-elim ( ne refl )
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 @$\neg$@-bool : {a : Bool} @$\rightarrow$@ a @$\equiv$@ false @$\rightarrow$@ a @$\equiv$@ true @$\rightarrow$@ @$\bot$@
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 @$\neg$@-bool refl ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 lemma-@$\wedge$@-0 : {a b : Bool} @$\rightarrow$@ a @$\wedge$@ b @$\equiv$@ true @$\rightarrow$@ a @$\equiv$@ false @$\rightarrow$@ @$\bot$@
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 lemma-@$\wedge$@-0 {true} {true} refl ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 lemma-@$\wedge$@-0 {true} {false} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 lemma-@$\wedge$@-0 {false} {true} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 lemma-@$\wedge$@-0 {false} {false} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 lemma-@$\wedge$@-1 : {a b : Bool} @$\rightarrow$@ a @$\wedge$@ b @$\equiv$@ true @$\rightarrow$@ b @$\equiv$@ false @$\rightarrow$@ @$\bot$@
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 lemma-@$\wedge$@-1 {true} {true} refl ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 lemma-@$\wedge$@-1 {true} {false} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 lemma-@$\wedge$@-1 {false} {true} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 lemma-@$\wedge$@-1 {false} {false} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 bool-and-tt : {a b : Bool} @$\rightarrow$@ a @$\equiv$@ true @$\rightarrow$@ b @$\equiv$@ true @$\rightarrow$@ ( a @$\wedge$@ b ) @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 bool-and-tt refl refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 bool-@$\wedge$@@$\rightarrow$@tt-0 : {a b : Bool} @$\rightarrow$@ ( a @$\wedge$@ b ) @$\equiv$@ true @$\rightarrow$@ a @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 bool-@$\wedge$@@$\rightarrow$@tt-0 {true} {true} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 bool-@$\wedge$@@$\rightarrow$@tt-0 {false} {_} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 bool-@$\wedge$@@$\rightarrow$@tt-1 : {a b : Bool} @$\rightarrow$@ ( a @$\wedge$@ b ) @$\equiv$@ true @$\rightarrow$@ b @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 bool-@$\wedge$@@$\rightarrow$@tt-1 {true} {true} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 bool-@$\wedge$@@$\rightarrow$@tt-1 {true} {false} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 bool-@$\wedge$@@$\rightarrow$@tt-1 {false} {false} ()
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 bool-or-1 : {a b : Bool} @$\rightarrow$@ a @$\equiv$@ false @$\rightarrow$@ ( a \/ b ) @$\equiv$@ b
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 bool-or-1 {false} {true} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 bool-or-1 {false} {false} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 bool-or-2 : {a b : Bool} @$\rightarrow$@ b @$\equiv$@ false @$\rightarrow$@ (a \/ b ) @$\equiv$@ a
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 bool-or-2 {true} {false} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 bool-or-2 {false} {false} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 bool-or-3 : {a : Bool} @$\rightarrow$@ ( a \/ true ) @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 bool-or-3 {true} = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 bool-or-3 {false} = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
134
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 bool-or-31 : {a b : Bool} @$\rightarrow$@ b @$\equiv$@ true @$\rightarrow$@ ( a \/ b ) @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 bool-or-31 {true} {true} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 bool-or-31 {false} {true} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 bool-or-4 : {a : Bool} @$\rightarrow$@ ( true \/ a ) @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 bool-or-4 {true} = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 bool-or-4 {false} = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 bool-or-41 : {a b : Bool} @$\rightarrow$@ a @$\equiv$@ true @$\rightarrow$@ ( a \/ b ) @$\equiv$@ true
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 bool-or-41 {true} {b} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 bool-and-1 : {a b : Bool} @$\rightarrow$@ a @$\equiv$@ false @$\rightarrow$@ (a @$\wedge$@ b ) @$\equiv$@ false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 bool-and-1 {false} {b} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 bool-and-2 : {a b : Bool} @$\rightarrow$@ b @$\equiv$@ false @$\rightarrow$@ (a @$\wedge$@ b ) @$\equiv$@ false
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 bool-and-2 {true} {false} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 bool-and-2 {false} {false} refl = refl
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152