annotate Paper/src/agda/logic.agda.replaced @ 5:339fb67b4375

INIT rbt.agda
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Sun, 07 Nov 2021 00:51:16 +0900
parents 9176dff8f38a
children
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
13 record _!$\wedge$!_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n !$\sqcup$! m) where
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
18 data _∨_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n !$\sqcup$! m) where
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
19 case1 : A !$\rightarrow$! A ∨ B
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
20 case2 : B !$\rightarrow$! A ∨ B
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
22 _⇔_ : {n m : Level } !$\rightarrow$! ( A : Set n ) ( B : Set m ) !$\rightarrow$! Set (n !$\sqcup$! m)
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
23 _⇔_ A B = ( A !$\rightarrow$! B ) !$\wedge$! ( B !$\rightarrow$! A )
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
25 contra-position : {n m : Level } {A : Set n} {B : Set m} !$\rightarrow$! (A !$\rightarrow$! B) !$\rightarrow$! !$\neg$! B !$\rightarrow$! !$\neg$! A
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
26 contra-position {n} {m} {A} {B} f !$\neg$!b a = !$\neg$!b ( f a )
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
28 double-neg : {n : Level } {A : Set n} !$\rightarrow$! A !$\rightarrow$! !$\neg$! !$\neg$! A
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
31 double-neg2 : {n : Level } {A : Set n} !$\rightarrow$! !$\neg$! !$\neg$! !$\neg$! A !$\rightarrow$! !$\neg$! A
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
34 de-morgan : {n : Level } {A B : Set n} !$\rightarrow$! A !$\wedge$! B !$\rightarrow$! !$\neg$! ( (!$\neg$! A ) ∨ (!$\neg$! B ) )
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
35 de-morgan {n} {A} {B} and (case1 !$\neg$!A) = !$\bot$!-elim ( !$\neg$!A ( _!$\wedge$!_.proj1 and ))
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
36 de-morgan {n} {A} {B} and (case2 !$\neg$!B) = !$\bot$!-elim ( !$\neg$!B ( _!$\wedge$!_.proj2 and ))
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
38 dont-or : {n m : Level} {A : Set n} { B : Set m } !$\rightarrow$! A ∨ B !$\rightarrow$! !$\neg$! A !$\rightarrow$! B
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
39 dont-or {A} {B} (case1 a) !$\neg$!A = !$\bot$!-elim ( !$\neg$!A a )
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
40 dont-or {A} {B} (case2 b) !$\neg$!A = b
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
42 dont-orb : {n m : Level} {A : Set n} { B : Set m } !$\rightarrow$! A ∨ B !$\rightarrow$! !$\neg$! B !$\rightarrow$! A
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
43 dont-orb {A} {B} (case2 b) !$\neg$!B = !$\bot$!-elim ( !$\neg$!B b )
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
44 dont-orb {A} {B} (case1 a) !$\neg$!B = a
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
48 infixr 130 _!$\wedge$!_
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
52 _!$\wedge$!_ : Bool !$\rightarrow$! Bool !$\rightarrow$! Bool
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
53 true !$\wedge$! true = true
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
54 _ !$\wedge$! _ = false
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
56 _\/_ : Bool !$\rightarrow$! Bool !$\rightarrow$! Bool
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
60 not_ : Bool !$\rightarrow$! Bool
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
64 _<=>_ : Bool !$\rightarrow$! Bool !$\rightarrow$! Bool
2
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 _\/_
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
70 infixr 140 _!$\wedge$!_
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
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
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
76 !$\equiv$!-Bool-func {true} {true} a!$\rightarrow$!b b!$\rightarrow$!a = refl
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
77 !$\equiv$!-Bool-func {false} {true} a!$\rightarrow$!b b!$\rightarrow$!a with b!$\rightarrow$!a refl
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 ... | ()
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
79 !$\equiv$!-Bool-func {true} {false} a!$\rightarrow$!b b!$\rightarrow$!a with a!$\rightarrow$!b refl
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 ... | ()
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
81 !$\equiv$!-Bool-func {false} {false} a!$\rightarrow$!b b!$\rightarrow$!a = refl
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
83 bool-!$\equiv$!-? : (a b : Bool) !$\rightarrow$! Dec ( a !$\equiv$! b )
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
84 bool-!$\equiv$!-? true true = yes refl
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
85 bool-!$\equiv$!-? true false = no (!$\lambda$! ())
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
86 bool-!$\equiv$!-? false true = no (!$\lambda$! ())
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
87 bool-!$\equiv$!-? false false = yes refl
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
89 !$\neg$!-bool-t : {a : Bool} !$\rightarrow$! !$\neg$! ( a !$\equiv$! true ) !$\rightarrow$! a !$\equiv$! false
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
90 !$\neg$!-bool-t {true} ne = !$\bot$!-elim ( ne refl )
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
91 !$\neg$!-bool-t {false} ne = refl
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
93 !$\neg$!-bool-f : {a : Bool} !$\rightarrow$! !$\neg$! ( a !$\equiv$! false ) !$\rightarrow$! a !$\equiv$! true
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
94 !$\neg$!-bool-f {true} ne = refl
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
95 !$\neg$!-bool-f {false} ne = !$\bot$!-elim ( ne refl )
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
97 !$\neg$!-bool : {a : Bool} !$\rightarrow$! a !$\equiv$! false !$\rightarrow$! a !$\equiv$! true !$\rightarrow$! !$\bot$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
98 !$\neg$!-bool refl ()
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
100 lemma-!$\wedge$!-0 : {a b : Bool} !$\rightarrow$! a !$\wedge$! b !$\equiv$! true !$\rightarrow$! a !$\equiv$! false !$\rightarrow$! !$\bot$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
101 lemma-!$\wedge$!-0 {true} {true} refl ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
102 lemma-!$\wedge$!-0 {true} {false} ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
103 lemma-!$\wedge$!-0 {false} {true} ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
104 lemma-!$\wedge$!-0 {false} {false} ()
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
106 lemma-!$\wedge$!-1 : {a b : Bool} !$\rightarrow$! a !$\wedge$! b !$\equiv$! true !$\rightarrow$! b !$\equiv$! false !$\rightarrow$! !$\bot$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
107 lemma-!$\wedge$!-1 {true} {true} refl ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
108 lemma-!$\wedge$!-1 {true} {false} ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
109 lemma-!$\wedge$!-1 {false} {true} ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
110 lemma-!$\wedge$!-1 {false} {false} ()
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
112 bool-and-tt : {a b : Bool} !$\rightarrow$! a !$\equiv$! true !$\rightarrow$! b !$\equiv$! true !$\rightarrow$! ( a !$\wedge$! b ) !$\equiv$! true
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
115 bool-!$\wedge$!!$\rightarrow$!tt-0 : {a b : Bool} !$\rightarrow$! ( a !$\wedge$! b ) !$\equiv$! true !$\rightarrow$! a !$\equiv$! true
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
116 bool-!$\wedge$!!$\rightarrow$!tt-0 {true} {true} refl = refl
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
117 bool-!$\wedge$!!$\rightarrow$!tt-0 {false} {_} ()
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
119 bool-!$\wedge$!!$\rightarrow$!tt-1 : {a b : Bool} !$\rightarrow$! ( a !$\wedge$! b ) !$\equiv$! true !$\rightarrow$! b !$\equiv$! true
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
120 bool-!$\wedge$!!$\rightarrow$!tt-1 {true} {true} refl = refl
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
121 bool-!$\wedge$!!$\rightarrow$!tt-1 {true} {false} ()
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
122 bool-!$\wedge$!!$\rightarrow$!tt-1 {false} {false} ()
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
124 bool-or-1 : {a b : Bool} !$\rightarrow$! a !$\equiv$! false !$\rightarrow$! ( a \/ b ) !$\equiv$! b
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
127 bool-or-2 : {a b : Bool} !$\rightarrow$! b !$\equiv$! false !$\rightarrow$! (a \/ b ) !$\equiv$! a
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
131 bool-or-3 : {a : Bool} !$\rightarrow$! ( a \/ true ) !$\equiv$! true
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
135 bool-or-31 : {a b : Bool} !$\rightarrow$! b !$\equiv$! true !$\rightarrow$! ( a \/ b ) !$\equiv$! true
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
139 bool-or-4 : {a : Bool} !$\rightarrow$! ( true \/ a ) !$\equiv$! true
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
143 bool-or-41 : {a b : Bool} !$\rightarrow$! a !$\equiv$! true !$\rightarrow$! ( a \/ b ) !$\equiv$! true
2
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
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
146 bool-and-1 : {a b : Bool} !$\rightarrow$! a !$\equiv$! false !$\rightarrow$! (a !$\wedge$! b ) !$\equiv$! false
2
9176dff8f38a ADD while loop description
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 bool-and-1 {false} {b} refl = refl
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
148 bool-and-2 : {a b : Bool} !$\rightarrow$! b !$\equiv$! false !$\rightarrow$! (a !$\wedge$! b ) !$\equiv$! false
2
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