-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbasic-hash-wa.html
More file actions
188 lines (160 loc) · 49.2 KB
/
basic-hash-wa.html
File metadata and controls
188 lines (160 loc) · 49.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Squirrel Prover - Squirrel Prover</title>
<link rel="stylesheet" href="style.css">
</head>
<body onkeydown="key(event)">
<span style="display: none;"><span class="squirrel-step" id="step0">
<span class="input-line" id="in0">include Basic.</span>
<span class="output-line" id="out0">Goal eq_sym :<br> (x = y) = (y = x)<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(x = y) = (y = x)<br><br>[> Line 11: by (rewrite ...) <br>[goal> Goal eq_sym is proved <br>Exiting proof mode.<br><br><br>Goal neq_sym :<br> (x <> y) = (y <> x)<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(x <> y) = (y <> x)<br><br>[> Line 14: by (rewrite ...) <br>[goal> Goal neq_sym is proved <br>Exiting proof mode.<br><br><br>Goal eq_refl :<br> (x = x) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(x = x) = true<br><br>[> Line 18: by (rewrite ...) <br>[goal> Goal eq_refl is proved <br>Exiting proof mode.<br><br><br>Goal false_true :<br> (false = true) = false<br>[goal> Focused goal (1/1):<br>System: any<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(false = true) = false<br><br>[> Line 30: by (rewrite ...) <br>[goal> Goal false_true is proved <br>Exiting proof mode.<br><br><br>Goal eq_true :<br> (b = true) = b<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(b = true) = b<br><br>[> Line 35: by (case b) <br>[goal> Goal eq_true is proved <br>Exiting proof mode.<br><br><br>Goal eq_true2 :<br> (true = b) = b<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(true = b) = b<br><br>[> Line 39: by (case b) <br>[goal> Goal eq_true2 is proved <br>Exiting proof mode.<br><br><br>Goal not_not :<br> not(not(b)) = b<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not(not(b)) = b<br><br>[> Line 54: by (case b) <br>[goal> Goal not_not is proved <br>Exiting proof mode.<br><br><br>Goal not_eq :<br> not(x = y) = (x <> y)<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not(x = y) = (x <> y)<br><br>[> Line 60: by (rewrite ...) <br>[goal> Goal not_eq is proved <br>Exiting proof mode.<br><br><br>Goal not_neq :<br> not(x <> y) = (x = y)<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not(x <> y) = (x = y)<br><br>[> Line 66: by (rewrite ...) <br>[goal> Goal not_neq is proved <br>Exiting proof mode.<br><br><br>Goal not_eqfalse :<br> (b = false) = not(b)<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(b = false) = not(b)<br><br>[> Line 72: by (case b) <br>[goal> Goal not_eqfalse is proved <br>Exiting proof mode.<br><br><br>Goal eq_false :<br> ((x = y) = false) = (x <> y)<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>((x = y) = false) = (x <> y)<br><br>[> Line 80: (rewrite ...) <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>((x = y) = false) = not(x = y)<br><br>[> Line 80: ((case (x = y));(intro _)) <br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br>_: x = y<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(true = false) = not(true)<br><br>[> Line 80: simpl <br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br>_: x = y<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>true<br><br>[> Line 80: auto <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br>_: not(x = y)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(false = false) = not(false)<br><br>[> Line 81: by (rewrite ...) <br>[goal> Goal eq_false is proved <br>Exiting proof mode.<br><br><br>Goal and_true_r :<br> (b && true) = b<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(b && true) = b<br><br>[> Line 94: by (rewrite ... ...) <br>[goal> Goal and_true_r is proved <br>Exiting proof mode.<br><br><br>Goal and_false_r :<br> (b && false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(b && false) = false<br><br>[> Line 101: by (rewrite ... ...) <br>[goal> Goal and_false_r is proved <br>Exiting proof mode.<br><br><br>Goal or_false_r :<br> (b || false) = b<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(b || false) = b<br><br>[> Line 112: by (rewrite ... ...) <br>[goal> Goal or_false_r is proved <br>Exiting proof mode.<br><br><br>Goal or_true_r :<br> (b || true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(b || true) = true<br><br>[> Line 119: by (rewrite ... ...) <br>[goal> Goal or_true_r is proved <br>Exiting proof mode.<br><br><br>Goal not_and :<br> not((a && b)) = (not(a) || not(b))<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: a,b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not((a && b)) = (not(a) || not(b))<br><br>[> Line 128: (rewrite ...) <br>[goal> Focused goal (1/1):<br>System: any<br>Variables: a,b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not((a && b)) <=> not(a) || not(b)<br><br>[> Line 129: (((case a);(case b));(intro //=)) <br>[goal> Goal not_and is proved <br>Exiting proof mode.<br><br><br>Goal not_or :<br> not((a || b)) = (not(a) && not(b))<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: a,b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not((a || b)) = (not(a) && not(b))<br><br>[> Line 134: (rewrite ...) <br>[goal> Focused goal (1/1):<br>System: any<br>Variables: a,b:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not((a || b)) <=> not(a) && not(b)<br><br>[> Line 135: (((case a);(case b));(intro //=)) <br>[goal> Goal not_or is proved <br>Exiting proof mode.<br><br><br>Goal if_true :<br> b => if b then x else y = x<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b => if b then x else y = x<br><br>[> Line 144: (intro *) <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: b<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>if b then x else y = x<br><br>[> Line 145: (case <span>if</span> b <span>then</span> x <span>else</span> y) <br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: b<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b && if b then x else y = x => x = x<br><br>[> Line 146: auto <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: b<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not(b) && if b then x else y = y => y = x<br><br>[> Line 147: (intro [HH _]) <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: b<br>HH: not(b)<br>_: if b then x else y = y<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>y = x<br><br>[> Line 147: by (have ... as ) <br>[goal> Goal if_true is proved <br>Exiting proof mode.<br><br><br>Goal if_true0 :<br> if true then x else y = x<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>if true then x else y = x<br><br>[> Line 153: by (rewrite ...) <br>[goal> Goal if_true0 is proved <br>Exiting proof mode.<br><br><br>Goal if_false :<br> not(b) => if b then x else y = y<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not(b) => if b then x else y = y<br><br>[> Line 160: ((intro *);(case <span>if</span> b <span>then</span> x <span>else</span> y)) <br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: not(b)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b && if b then x else y = x => x = y<br><br>[> Line 161: (intro [HH _]) <br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: not(b)<br>HH: b<br>_: if b then x else y = x<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>x = y<br><br>[> Line 161: by (have ... as ) <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x,y:'a<br>H: not(b)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not(b) && if b then x else y = y => y = y<br><br>[> Line 162: auto <br>[goal> Goal if_false is proved <br>Exiting proof mode.<br><br><br>Goal if_false0 :<br> if false then x else y = y<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>if false then x else y = y<br><br>[> Line 168: by (rewrite ...) <br>[goal> Goal if_false0 is proved <br>Exiting proof mode.<br><br><br>Goal if_then_then :<br> if b then if b' then x else y else y = if (b && b') then x else y<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>if b then if b' then x else y else y = if (b && b') then x else y<br><br>[> Line 175: by ((case b);(case b')) <br>[goal> Goal if_then_then is proved <br>Exiting proof mode.<br><br><br>Goal if_then_implies :<br> if b then if b' then x else y else z =<br> if b then if (b => b') then x else y else z<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>if b then if b' then x else y else z =<br>if b then if (b => b') then x else y else z<br><br>[> Line 182: ((case b);<br> ((intro H);((case b');((intro H');(simpl;(try auto))))))<br><br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br>H: b<br>H': b'<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>x = if (true => true) then x else y<br><br>[> Line 183: by (rewrite ...) <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br>H: b<br>H': not(b')<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>y = if (true => false) then x else y<br><br>[> Line 184: (rewrite ...) <br>[goal> Focused goal (1/2):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br>H: b<br>H': not(b')<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>not((true => false))<br><br>[> Line 185: ((intro Habs);by (have ... as )) <br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br>H: b<br>H': not(b')<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>y = y<br><br>[> Line 186: auto <br>[goal> Goal if_then_implies is proved <br>Exiting proof mode.<br><br><br>Goal if_same :<br> if b then x else x = x<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b:bool,x:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>if b then x else x = x<br><br>[> Line 192: by (case b) <br>[goal> Goal if_same is proved <br>Exiting proof mode.<br><br><br>Goal if_then :<br> b = b' => if b then if b' then x else y else z = if b then x else z<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b = b' => if b then if b' then x else y else z = if b then x else z<br><br>[> Line 201: by ((intro ->);(case b')) <br>[goal> Goal if_then is proved <br>Exiting proof mode.<br><br><br>Goal if_else :<br> b = b' => if b then x else if b' then y else z = if b then x else z<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b = b' => if b then x else if b' then y else z = if b then x else z<br><br>[> Line 210: by ((intro ->);(case b')) <br>[goal> Goal if_else is proved <br>Exiting proof mode.<br><br><br>Goal if_then_not :<br> b = not(b') => if b then if b' then x else y else z = if b then y else z<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b = not(b') => if b then if b' then x else y else z = if b then y else z<br><br>[> Line 219: by ((intro ->);(case b')) <br>[goal> Goal if_then_not is proved <br>Exiting proof mode.<br><br><br>Goal if_else_not :<br> b = not(b') => if b then x else if b' then y else z = if b then x else y<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br>Variables: b,b':bool,x,y,z:'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>b = not(b') => if b then x else if b' then y else z = if b then x else y<br><br>[> Line 228: by ((intro ->);(case b')) <br>[goal> Goal if_else_not is proved <br>Exiting proof mode.<br><br><br>Goal fst_pair :<br> <span class="gf" style="font-weight: bold">fst</span>(<x,y>) = x<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: x,y:message<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="gf" style="font-weight: bold">fst</span>(<x,y>) = x<br><br>[> Line 236: auto <br>[goal> Goal fst_pair is proved <br>Exiting proof mode.<br><br><br>Goal snd_pair :<br> <span class="gf" style="font-weight: bold">snd</span>(<x,y>) = y<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: x,y:message<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="gf" style="font-weight: bold">snd</span>(<x,y>) = y<br><br>[> Line 240: auto <br>[goal> Goal snd_pair is proved <br>Exiting proof mode.<br><br><br>Goal iff_refl :<br> (x <=> x) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: x:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(x <=> x) = true<br><br>[> Line 248: by (rewrite ...) <br>[goal> Goal iff_refl is proved <br>Exiting proof mode.<br><br><br>Goal iff_sym :<br> (x <=> y) = (y <=> x)<br>[goal> Focused goal (1/1):<br>System: any<br>Variables: x,y:bool<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(x <=> y) = (y <=> x)<br><br>[> Line 254: by (rewrite ...) <br>[goal> Goal iff_sym is proved <br>Exiting proof mode.<br><br><br>Goal true_iff_false :<br> (true <=> false) = false<br>[goal> Focused goal (1/1):<br>System: any<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(true <=> false) = false<br><br>[> Line 259: by (rewrite ...) <br>[goal> Goal true_iff_false is proved <br>Exiting proof mode.<br><br><br>Goal false_iff_true :<br> (false <=> true) = false<br>[goal> Focused goal (1/1):<br>System: any<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(false <=> true) = false<br><br>[> Line 265: by (rewrite ...) <br>[goal> Goal false_iff_true is proved <br>Exiting proof mode.<br><br><br>Goal exists_false1 :<br> (exists (a:'a), false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (a:'a), false) = false<br><br>[> Line 277: by (rewrite ...) <br>[goal> Goal exists_false1 is proved <br>Exiting proof mode.<br><br><br>Goal exists_false2 :<br> (exists (a:'a,b:'b), false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (a:'a,b:'b), false) = false<br><br>[> Line 281: by (rewrite ...) <br>[goal> Goal exists_false2 is proved <br>Exiting proof mode.<br><br><br>Goal exists_false3 :<br> (exists (a:'a,b:'b,c:'c), false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (a:'a,b:'b,c:'c), false) = false<br><br>[> Line 285: by (rewrite ...) <br>[goal> Goal exists_false3 is proved <br>Exiting proof mode.<br><br><br>Goal exists_false4 :<br> (exists (a:'a,b:'b,c:'c,d:'d), false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c, 'd<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (a:'a,b:'b,c:'c,d:'d), false) = false<br><br>[> Line 289: by (rewrite ...) <br>[goal> Goal exists_false4 is proved <br>Exiting proof mode.<br><br><br>Goal exists_false5 :<br> (exists (a:'a,b:'b,c:'c,d:'d,e:'e), false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c, 'd, 'e<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (a:'a,b:'b,c:'c,d:'d,e:'e), false) = false<br><br>[> Line 293: by (rewrite ...) <br>[goal> Goal exists_false5 is proved <br>Exiting proof mode.<br><br><br>Goal exists_false6 :<br> (exists (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), false) = false<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c, 'd, 'e, 'f<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), false) = false<br><br>[> Line 297: by (rewrite ...) <br>[goal> Goal exists_false6 is proved <br>Exiting proof mode.<br><br><br>Goal forall_true1 :<br> (forall (a:'a), true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (a:'a), true) = true<br><br>[> Line 307: auto <br>[goal> Goal forall_true1 is proved <br>Exiting proof mode.<br><br><br>Goal forall_true2 :<br> (forall (a:'a,b:'b), true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (a:'a,b:'b), true) = true<br><br>[> Line 311: auto <br>[goal> Goal forall_true2 is proved <br>Exiting proof mode.<br><br><br>Goal forall_true3 :<br> (forall (a:'a,b:'b,c:'c), true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (a:'a,b:'b,c:'c), true) = true<br><br>[> Line 315: auto <br>[goal> Goal forall_true3 is proved <br>Exiting proof mode.<br><br><br>Goal forall_true4 :<br> (forall (a:'a,b:'b,c:'c,d:'d), true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c, 'd<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (a:'a,b:'b,c:'c,d:'d), true) = true<br><br>[> Line 319: auto <br>[goal> Goal forall_true4 is proved <br>Exiting proof mode.<br><br><br>Goal forall_true5 :<br> (forall (a:'a,b:'b,c:'c,d:'d,e:'e), true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c, 'd, 'e<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (a:'a,b:'b,c:'c,d:'d,e:'e), true) = true<br><br>[> Line 323: auto <br>[goal> Goal forall_true5 is proved <br>Exiting proof mode.<br><br><br>Goal forall_true6 :<br> (forall (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), true) = true<br>[goal> Focused goal (1/1):<br>System: any<br>Type variables: 'a, 'b, 'c, 'd, 'e, 'f<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), true) = true<br><br>[> Line 327: auto <br>[goal> Goal forall_true6 is proved <br>Exiting proof mode.<br><br><br>[warning> loaded: Basic.sp <]<br></span>
<span class="com-line" id="com0"><h1 id="basic-hash">BASIC HASH</h1>
<p>The Basic Hash protocol as described in [A] is an RFID protocol involving:</p>
<ul>
<li>a tag associated to a secret key;</li>
<li>generic readers having access to a database containing all these keys.</li>
</ul>
<p>The protocol is as follows:</p>
<pre><code>T --> R : <nT, h(nT,key)>
R --> T : ok</code></pre>
<p>In this file, we prove an authentication property for the reader.</p>
<p>[A] Mayla Brusò, Kostas Chatzikokolakis, and Jerry den Hartog. Formal Verification of Privacy for RFID Systems. pages 75–88, July 2010.</p>
<p>Include basic standard library.</p>
</span>
</span>
<span class="squirrel-step" id="step1">
<span class="input-line" id="in1">hash h<br><br>abstract ok : message<br>abstract ko : message.</span>
<span class="output-line" id="out1"></span>
<span class="com-line" id="com1"><p>We start by declaring the function symbol <code>h</code> for the hash function, as well as two public constants <code>ok</code> and <code>ko</code> (used by the reader).</p>
</span>
</span>
<span class="squirrel-step" id="step2">
<span class="input-line" id="in2">name key : index -> message.</span>
<span class="output-line" id="out2"></span>
<span class="com-line" id="com2"><p>Name for modelling the keys of tags.</p>
</span>
</span>
<span class="squirrel-step" id="step3">
<span class="input-line" id="in3">channel cT<br>channel cR.</span>
<span class="output-line" id="out3"></span>
<span class="com-line" id="com3"><p>Finally, we declare the channels used by the protocol.</p>
</span>
</span>
<span class="squirrel-step" id="step4">
<span class="input-line" id="in4">process tag(i:index,k:index) =<br> new nT;<br> out(cT, <nT, h(nT,key(i))>).</span>
<span class="output-line" id="out4"></span>
<span class="com-line" id="com4"><p>Session <code>k</code> of tag <code>i</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step5">
<span class="input-line" id="in5">process reader(j:index) =<br> in(cT,x);<br> try find i such that snd(x) = h(fst(x),key(i)) in<br> out(cR,ok)<br> else<br> out(cR,ko).</span>
<span class="output-line" id="out5"></span>
<span class="com-line" id="com5"><p>Session <code>j</code> of reader.</p>
</span>
</span>
<span class="squirrel-step" id="step6">
<span class="input-line" id="in6"><br><br>system [BasicHash] ((!_j R: reader(j)) | (!_i !_k T: tag(i,k))).</span>
<span class="output-line" id="out6">System before processing:<br> <br> (!_j R: <span class="pn" style="font-weight:bold; color: #0000AA">reader</span> j) | (!_i !_k T: <span class="pn" style="font-weight:bold; color: #0000AA">tag</span> i k)<br><br>System after processing:<br> <br> (!_j<br> <span class="pio" style="font-weight: bold">in</span>(<span class="pc">cT</span>,<span class="pv" style="font-weight: bold; color: #AA00AA">x</span>);<br> <span class="pc" style="text-decoration: underline; color: #AA0000">find</span> (i) <span class="pc" style="text-decoration: underline; color: #AA0000">such that</span> (snd(x) = h(fst(x),key(i))) <span class="pc" style="text-decoration: underline; color: #AA0000">in</span> R: <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cR</span>,ok); <span class="pn" style="font-weight:bold; color: #0000AA">null</span><br> <span class="pc" style="text-decoration: underline; color: #AA0000">else</span> R1: <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cR</span>,ko); <span class="pn" style="font-weight:bold; color: #0000AA">null</span>) |<br> (!_i !_k T: <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cT</span>,pair(nT(i,k),h(nT(i,k),key(i)))); <span class="pn" style="font-weight:bold; color: #0000AA">null</span>)<br><br>System BasicHash registered with actions (init,R,R1,T).<br></span>
</span>
<span class="squirrel-step" id="step7">
<span class="input-line" id="in7">print system [BasicHash].</span>
<span class="output-line" id="out7">System [left:BasicHash/left, right:BasicHash/right]<br>Available actions:<br> <br> action name: <span class="ga" style="color: #00AA00">init</span><br> condition: true<br> output: <span class="gf" style="font-weight: bold">empty</span><br> <br> action name: <span class="ga" style="color: #00AA00">R(j,i)</span><br> indices: j,i<br> condition: <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@<span class="ga" style="color: #00AA00">R(j,i)</span>) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@<span class="ga" style="color: #00AA00">R(j,i)</span>),<span class="gn" style="color: #AA5500">key</span>(i))<br> output: <span class="gf" style="font-weight: bold">ok</span><br> <br> action name: <span class="ga" style="color: #00AA00">R1(j)</span><br> indices: j<br> condition:<br> forall (i:index), not(<span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@<span class="ga" style="color: #00AA00">R1(j)</span>) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@<span class="ga" style="color: #00AA00">R1(j)</span>),<span class="gn" style="color: #AA5500">key</span>(i)))<br> output: <span class="gf" style="font-weight: bold">ko</span><br> <br> action name: <span class="ga" style="color: #00AA00">T(i,k)</span><br> indices: i,k<br> condition: true<br> output: <<span class="gn" style="color: #AA5500">nT</span>(i,k),<span class="gf" style="font-weight: bold">h</span>(<span class="gn" style="color: #AA5500">nT</span>(i,k),<span class="gn" style="color: #AA5500">key</span>(i))><br> <br> <br> <br><br><br></span>
<span class="com-line" id="com7"><p>Show the set of actions obtained from above process.</p>
</span>
</span>
<span class="squirrel-step" id="step8">
<span class="input-line" id="in8">goal [BasicHash] wa_R :<br> forall (tau:timestamp),<br> happens(tau) =><br> ((exists (i:index),<br> snd(input@tau) = h(fst(input@tau),key(i)))<br> <=><br> (exists (i,k:index), T(i,k) < tau &&<br> fst(output@T(i,k)) = fst(input@tau) &&<br> snd(output@T(i,k)) = snd(input@tau))).</span>
<span class="output-line" id="out8">Goal wa_R :<br> forall (tau:timestamp),<br> <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau) =><br> (exists (i:index), <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))) <=><br> exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) &&<br> <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br></span>
<span class="com-line" id="com8"><p>Whenever a reader accepts a message (<em>i.e.</em> the condition of the action <code>R(j)</code> evaluates to <code>true</code>), there exists an action <code>T(i,k)</code> that has been executed before the reader, and such that the input of the reader corresponds to the output of this tag (and conversely).</p>
<p>The same holds for <code>R1</code> (the else branch of the reader) but with a negation. We will prove once and for all a property that is generalized for any <code>tau</code>, which will be useful later for <code>tau = R(j)</code> and <code>tau = R1(j)</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step9">
<span class="input-line" id="in9">Proof.</span>
<span class="output-line" id="out9">[goal> Focused goal (1/1):<br>System: left:BasicHash/left, right:BasicHash/right<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>forall (tau:timestamp),<br> <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau) =><br> (exists (i:index), <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))) <=><br> exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) &&<br> <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><br></span>
<span class="com-line" id="com9"><p>The high-level idea of the proof is to use the EUF cryptographic axiom: only the tag <code>T(i,k)</code> can forge <code>h(nT(i,k),key(i))</code> because the secret key is not known by the attacker. Therefore, any message accepted by the reader must come from a tag that has played before. The converse implication is trivial because any honest tag output is accepted by the reader.</p>
</span>
</span>
<span class="squirrel-step" id="step10">
<span class="input-line" id="in10"><br> intro tau Hap.</span>
<span class="output-line" id="out10">[> Line 87: (intro tau Hap) <br>[goal> Focused goal (1/1):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: tau:timestamp<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (i:index), <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))) <=><br>exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) && <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><br></span>
</span>
<span class="squirrel-step" id="step11">
<span class="input-line" id="in11"> split.</span>
<span class="output-line" id="out11">[> Line 87: split <br>[goal> Focused goal (1/2):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: tau:timestamp<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (i:index), <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))) =><br>exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) && <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><br></span>
</span>
<span class="squirrel-step" id="step12">
<span class="input-line" id="in12"><br> + intro [i Meq].</span>
<span class="output-line" id="out12">[> Line 88: (intro [i Meq]) <br>[goal> Focused goal (1/2):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: i:index,tau:timestamp<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br>Meq: <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) && <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><br></span>
</span>
<span class="squirrel-step" id="step13">
<span class="input-line" id="in13"> euf Meq => *.</span>
<span class="output-line" id="out13">[> Line 94: ((euf Meq);(intro *)) <br>[goal> Focused goal (1/2):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: i,k:index,tau:timestamp<br>Clt: <span class="ga" style="color: #00AA00">T(i,k)</span> < tau<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br>Meq: <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))<br>Meq0: <span class="gn" style="color: #AA5500">nT</span>(i,k) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) && <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><br></span>
<span class="com-line" id="com13"><p>Applying the <code>euf</code> tactic on the <code>Meq</code> hypothesis generates a new hypothesis stating that <code>fst(input@R(j))</code> must be equal to some message that has already been hashed before. The only possibility is that this hash comes from the output of a tag that has played before (thus the new hypothesis on timestamps).</p>
</span>
</span>
<span class="squirrel-step" id="step14">
<span class="input-line" id="in14"> exists i,k.</span>
<span class="output-line" id="out14">[> Line 94: (exists i, k) <br>[goal> Focused goal (1/2):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: i,k:index,tau:timestamp<br>Clt: <span class="ga" style="color: #00AA00">T(i,k)</span> < tau<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br>Meq: <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))<br>Meq0: <span class="gn" style="color: #AA5500">nT</span>(i,k) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br><span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) && <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><br></span>
</span>
<span class="squirrel-step" id="step15">
<span class="input-line" id="in15"> auto.</span>
<span class="output-line" id="out15">[> Line 94: auto <br>[goal> Focused goal (1/1):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: tau:timestamp<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(exists (i,k:index),<br> <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) && <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)) =><br>exists (i:index), <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))<br><br></span>
</span>
<span class="squirrel-step" id="step16">
<span class="input-line" id="in16"> + intro [i k Meq].</span>
<span class="output-line" id="out16">[> Line 97: (intro [i k Meq]) <br>[goal> Focused goal (1/1):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: i,k:index,tau:timestamp<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br>Meq: <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) &&<br> <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (i:index), <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))<br><br></span>
<span class="com-line" id="com16"><p>For the second implication (<=), the conclusion of the goal can directly be obtained from the hypotheses.</p>
</span>
</span>
<span class="squirrel-step" id="step17">
<span class="input-line" id="in17"> exists i.</span>
<span class="output-line" id="out17">[> Line 97: (exists i) <br>[goal> Focused goal (1/1):<br>System: left:BasicHash/left, right:BasicHash/right<br>Variables: i,k:index,tau:timestamp<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(tau)<br>Meq: <span class="ga" style="color: #00AA00">T(i,k)</span> < tau &&<br> <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) &&<br> <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">output</span>@<span class="ga" style="color: #00AA00">T(i,k)</span>) = <span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="gf" style="font-weight: bold">snd</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau) = <span class="gf" style="font-weight: bold">h</span>(<span class="gf" style="font-weight: bold">fst</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">input</span>@tau),<span class="gn" style="color: #AA5500">key</span>(i))<br><br></span>
</span>
<span class="squirrel-step" id="step18">
<span class="input-line" id="in18"> auto.</span>
<span class="output-line" id="out18">[> Line 97: auto <br>[goal> Goal wa_R is proved <br></span>
</span>
<span class="squirrel-step" id="step19">
<span class="input-line" id="in19"><br>Qed.</span>
<span class="output-line" id="out19">Exiting proof mode.<br><br><br></span>
</span>
</span>
<div class="page-header">
<img src="logo-circular.png" class="logo">
<h1 class="project-tagline">Squirrel Prover</h1>
<a href="https://squirrel-prover.github.io/examples.html" class="header-button">
<button type="button" class="header-button">Exit</button>
</a>
<button type="button" class="header-button" onclick="help()" id="button-panel">Help</button>
</div>
<div class="help-panel" id="help-panel">
Press the left and right arrows to do and undo an instruction.
<br><br>
Alternatively, you can double-click on an instruction.
<br><br>
<span style="color: #8B0000;" onmouseenter="highlightOn('in-zone')" onmouseleave="highlightOff('in-zone')">This zone</span> shows a Squirrel file. You can double-click on a comment to collapse it for better readabilility.
<br><br>
<span style="color: #8B0000;" onmouseenter="highlightOn('out-zone')" onmouseleave="highlightOff('out-zone')">This zone</span> shows the output given by Squirrel.
<br><br>
<span style="color: #8B0000;" onmouseenter="highlightOn('prec-zone')" onmouseleave="highlightOff('prec-zone')">This zone</span> shows the output of the previous instruction, to help identifying the change caused by the instruction.
</div>
<div class="mainsection" id="main">
<div class="example-grid">
<div class="example-col example-col-left" id="in-zone">
<p class="example-code"><span id="in-line"></span></p>
</div>
<div class="example-col example-col-right">
<div class="example-code example-code-right" style="height: 45%; border-bottom: 4px double #8B0000;" id="prec-zone"><span>Previously:</span><br><br><span id="prec-line"></span>
</div>
<div style="position: relative;">
<button type="button" class="prec-button" onclick="hidePrec()" id="prec-button" >Hide</button>
</div>
<div class="example-code example-code-right" style="height: 55%;" id="out-zone"><span id="out-line"></span>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>