-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsigned-ddh-P.html
More file actions
317 lines (269 loc) · 94 KB
/
signed-ddh-P.html
File metadata and controls
317 lines (269 loc) · 94 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!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">abstract ok : message<br>abstract ko : message<br><br>name skP : message<br>name skS : message<br><br>channel cP<br>channel cS.</span>
<span class="output-line" id="out0"></span>
<span class="com-line" id="com0"><h1 id="signed-ddh">SIGNED DDH</h1>
<p>The signed DDH protocol as described in [G] features two roles, P and S. Each role is associated to a secret key (skP and skS).</p>
<ul>
<li>P -> S : <pk(skP), g^a></li>
<li>S -> P : <pk(skS),g<sup>b>,sign(<<g</sup>a,g^b>,pk(skP)>,skS)</li>
<li>P -> S : sign(<<g<sup>b,g</sup>a>,pk(skS)>,skP)</li>
</ul>
<p>We consider multiple sessions but two agents only (one agent for the role P and one agent for the role S) and show the strong secrecy of the shared key.</p>
<ul>
<li>In this file <code>signed-ddh-P.sp</code>, we show that the key g<sup>a</sup>b as computed by P is indistinguishable from g^k with k fresh (system secretP).</li>
<li>In another file <code>signed-ddh-S.sp</code>, we show that the key g<sup>a</sup>b as computed by S is indistinguishable from g^k with k fresh (system secretS).</li>
</ul>
<p>[G] ISO/IEC 9798-3:2019, IT Security techniques – Entity authentication – Part 3: Mechanisms using digital signature techniques.</p>
<hr />
<p>We first declare some public constants, the secret keys for roles P and S, the channels used by these two roles.</p>
</span>
</span>
<span class="squirrel-step" id="step1">
<span class="input-line" id="in1">name a : index -> message<br>name b : index -> message.</span>
<span class="output-line" id="out1"></span>
<span class="com-line" id="com1"><p>Names <code>a</code> and <code>b</code> represent the random numbers used by roles P and S. They are indexed so that each new session uses a new random name.</p>
</span>
</span>
<span class="squirrel-step" id="step2">
<span class="input-line" id="in2">name k : index -> index -> message.</span>
<span class="output-line" id="out2"></span>
<span class="com-line" id="com2"><p>The name <code>k</code> represents the random number used in the strong secrecy property. It has 2 as index arity to model the fact that each interaction between session <code>i</code> of role P and session <code>j</code> of role S uses a new random name.</p>
</span>
</span>
<span class="squirrel-step" id="step3">
<span class="input-line" id="in3">ddh g, (^) where group:message exponents:message.</span>
<span class="output-line" id="out3"></span>
<span class="com-line" id="com3"><p>We declare a DDH context, using <code>g</code> for the generator element and <code>^</code> for the power operator.</p>
</span>
</span>
<span class="squirrel-step" id="step4">
<span class="input-line" id="in4">signature sign,checksign,pk.</span>
<span class="output-line" id="out4"></span>
<span class="com-line" id="com4"><p>We also declare a signature scheme by specifying 3 function symbols.</p>
</span>
</span>
<span class="squirrel-step" id="step5">
<span class="input-line" id="in5">process Pchall(i:index) =<br> out(cP, <pk(skP),g^a(i)>);<br> in(cP, x2);<br> let gS = snd(fst(x2)) in<br> let pkS = fst(fst(x2)) in<br> if checksign(snd(x2),pkS) = <<g^a(i),gS>,pk(skP)> && pkS = pk(skS) then<br> out(cP,sign(<<gS,g^a(i)>,pkS>,skP));<br> in(cP, challenge);<br> try find j such that gS = g^b(j) in<br> out(cP, diff(g^a(i)^b(j),g^k(i,j)))<br> else<br> <br> out(cP, diff(ok,ko))<br><br>process S(j:index) =<br> in(cS, x1);<br> let gP = snd(x1) in<br> let pkP = fst(x1) in<br> if pkP = pk(skP) then<br> out(cS, < <pk(skS),g^b(j)>, sign(<<gP,g^b(j)>,pkP>,skS)>);<br> in(cS, x3);<br> if checksign(x3,pkP) = <<g^b(j),gP>,pk(skS)> then<br> out(cS,ok)<br><br>system (!_i Pchall(i) | !_j S(j)).</span>
<span class="output-line" id="out5">System before processing:<br> <br> (!_i <span class="pn" style="font-weight:bold; color: #0000AA">Pchall</span> i) | (!_j <span class="pn" style="font-weight:bold; color: #0000AA">S</span> j)<br><br>System after processing:<br> <br> (!_i<br> Pchall:<br> <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cP</span>,pair(pk(skP),(g ^ a(i))));<br> <span class="pio" style="font-weight: bold">in</span>(<span class="pc">cP</span>,<span class="pv" style="font-weight: bold; color: #AA00AA">x2</span>);<br> <span class="pk" style="font-weight: bold">let</span> <span class="pv" style="font-weight: bold; color: #AA00AA">gS</span> = snd(fst(x2)) <span class="pk" style="font-weight: bold">in</span><br> <span class="pk" style="font-weight: bold">let</span> <span class="pv" style="font-weight: bold; color: #AA00AA">pkS</span> = fst(fst(x2)) <span class="pk" style="font-weight: bold">in</span><br> <span class="pc" style="text-decoration: underline; color: #AA0000">if</span> ((checksign(snd(x2),pkS(i)) = pair(pair((g ^ a(i)),gS(i)),pk(skP)))<br> && (pkS(i) = pk(skS))) <span class="pc" style="text-decoration: underline; color: #AA0000">then</span><br> Pchall1:<br> <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cP</span>,sign(pair(pair(gS(i),(g ^ a(i))),pkS(i)),skP));<br> <span class="pio" style="font-weight: bold">in</span>(<span class="pc">cP</span>,<span class="pv" style="font-weight: bold; color: #AA00AA">challenge</span>);<br> <span class="pc" style="text-decoration: underline; color: #AA0000">find</span> (j) <span class="pc" style="text-decoration: underline; color: #AA0000">such that</span> (gS(i) = (g ^ b(j))) <span class="pc" style="text-decoration: underline; color: #AA0000">in</span><br> Pchall2: <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cP</span>,<span>diff</span>(((g ^ a(i)) ^ b(j)),(g ^ k(i,j)))); <span class="pn" style="font-weight:bold; color: #0000AA">null</span> <span class="pc" style="text-decoration: underline; color: #AA0000">else</span><br> Pchall3: <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cP</span>,<span>diff</span>(ok,ko)); <span class="pn" style="font-weight:bold; color: #0000AA">null</span> <span class="pc" style="text-decoration: underline; color: #AA0000">else</span> Pchall4: <span class="pn" style="font-weight:bold; color: #0000AA">null</span>) |<br> (!_j<br> <span class="pio" style="font-weight: bold">in</span>(<span class="pc">cS</span>,<span class="pv" style="font-weight: bold; color: #AA00AA">x1</span>);<br> <span class="pk" style="font-weight: bold">let</span> <span class="pv" style="font-weight: bold; color: #AA00AA">gP</span> = snd(x1) <span class="pk" style="font-weight: bold">in</span><br> <span class="pk" style="font-weight: bold">let</span> <span class="pv" style="font-weight: bold; color: #AA00AA">pkP</span> = fst(x1) <span class="pk" style="font-weight: bold">in</span><br> <span class="pc" style="text-decoration: underline; color: #AA0000">if</span> (pkP(j) = pk(skP)) <span class="pc" style="text-decoration: underline; color: #AA0000">then</span><br> S:<br> <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cS</span>,<br> pair(pair(pk(skS),(g ^ b(j))),<br> sign(pair(pair(gP(j),(g ^ b(j))),pkP(j)),skS)));<br> <span class="pio" style="font-weight: bold">in</span>(<span class="pc">cS</span>,<span class="pv" style="font-weight: bold; color: #AA00AA">x3</span>);<br> <span class="pc" style="text-decoration: underline; color: #AA0000">if</span> (checksign(x3,pkP(j)) = pair(pair((g ^ b(j)),gP(j)),pk(skS))) <span class="pc" style="text-decoration: underline; color: #AA0000">then</span><br> S1: <span class="pio" style="font-weight: bold">out</span>(<span class="pc">cS</span>,ok); <span class="pn" style="font-weight:bold; color: #0000AA">null</span> <span class="pc" style="text-decoration: underline; color: #AA0000">else</span> S2: <span class="pn" style="font-weight:bold; color: #0000AA">null</span> <span class="pc" style="text-decoration: underline; color: #AA0000">else</span> S3: <span class="pn" style="font-weight:bold; color: #0000AA">null</span>)<br><br>System default registered with actions (init,Pchall,Pchall1,Pchall2,Pchall3,<br> Pchall4,S,S1,S2,S3).<br></span>
<span class="com-line" id="com5"><p>In the system <code>secretP</code>, we add an output at the end of the role of P. This output is actually a bi-term:</p>
<ul>
<li>the left side of the system outputs the shared key as computed by P,</li>
<li>the right side of the system outputs <code>g^k(i,j)</code> where <code>k(i,j)</code> is fresh.</li>
</ul>
<p>The goal will be to prove that these two sides are indistinguishable.</p>
<p>The <code>try find</code> construct is needed to retrieve the index <code>j</code>, but this else branch should never be reachable. We thus output a bi-term with distinct public constants so that the equivalence for the strong secrecy could not hold if this else branch is reached.</p>
</span>
</span>
<span class="squirrel-step" id="step6">
<span class="input-line" id="in6"><br><br>include Basic.</span>
<span class="output-line" id="out6">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>
<span class="squirrel-step" id="step7">
<span class="input-line" id="in7">goal P_charac (i:index):<br> happens(Pchall1(i)) =><br> cond@Pchall1(i) =><br> exists (j:index), snd(fst(input@Pchall1(i))) = g^b(j).</span>
<span class="output-line" id="out7">Goal P_charac :<br> <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>) =><br> <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall1(i)</span> => exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br></span>
<span class="com-line" id="com7"><p>In the proof of strong secrecy for the system <code>secretP</code>, we will use the following property, stating that whenever P accepts a message from S, this message is of the form <code><<_,x>,_></code> where <code>x = g^b(j)</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step8">
<span class="input-line" id="in8">Proof.</span>
<span class="output-line" id="out8">[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i:index<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>) =><br><span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall1(i)</span> => exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
<span class="com-line" id="com8"><p>The high-level idea of the proof is to use the EUF cryptographic axiom: only S can forge a correct signature that will be accepted by P since the secret key is not known by the attacker.</p>
</span>
</span>
<span class="squirrel-step" id="step9">
<span class="input-line" id="in9"> intro Hap Hcond.</span>
<span class="output-line" id="out9">[> Line 118: (intro Hap Hcond) <br>[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i:index<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>)<br>Hcond: <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall1(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
<span class="com-line" id="com9"><p>We start by introducing the hypotheses and expanding the macros.</p>
</span>
</span>
<span class="squirrel-step" id="step10">
<span class="input-line" id="in10"><br> expand cond, pkS(i)@Pchall1(i).</span>
<span class="output-line" id="out10">[> Line 119: (expand cond, pkS(i)@Pchall1(i)) <br>[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i:index<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>)<br>Hcond: <span class="gf" style="font-weight: bold">checksign</span>(<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">Pchall1(i)</span>),<span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>))) =<br> <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)> &&<br> <span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
</span>
<span class="squirrel-step" id="step11">
<span class="input-line" id="in11"><br> destruct Hcond as [Meq Meq0].</span>
<span class="output-line" id="out11">[> Line 120: (destruct Hcond, [Meq Meq0]) <br>[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i:index<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>)<br>Meq: <span class="gf" style="font-weight: bold">checksign</span>(<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">Pchall1(i)</span>),<span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>))) =<br> <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)><br>Meq0: <span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
</span>
<span class="squirrel-step" id="step12">
<span class="input-line" id="in12"> rewrite Meq0 in Meq.</span>
<span class="output-line" id="out12">[> Line 123: (rewrite ... in Meq) <br>[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i:index<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>)<br>Meq: <span class="gf" style="font-weight: bold">checksign</span>(<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">Pchall1(i)</span>),<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)) =<br> <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)><br>Meq0: <span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
<span class="com-line" id="com12"><p>We then rewrite Meq using the message equality Meq0.</p>
</span>
</span>
<span class="squirrel-step" id="step13">
<span class="input-line" id="in13"> euf Meq.</span>
<span class="output-line" id="out13">[> Line 127: (euf Meq) <br>[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i,j:index<br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>)<br>Meq: <span class="gf" style="font-weight: bold">checksign</span>(<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">Pchall1(i)</span>),<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)) =<br> <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)><br>Meq0: <span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="ga" style="color: #00AA00">S(j)</span> <= <span class="ga" style="color: #00AA00">Pchall1(i)</span> || <span class="ga" style="color: #00AA00">S(j)</span> < <span class="ga" style="color: #00AA00">Pchall1(i)</span> =><br><<<span class="gm" style="font-weight: bold; color: #AA00AA">gP</span>(j)@<span class="ga" style="color: #00AA00">S(j)</span>,<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)>,<span class="gm" style="font-weight: bold; color: #AA00AA">pkP</span>(j)@<span class="ga" style="color: #00AA00">S(j)</span>> = <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)> =><br>exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
<span class="com-line" id="com13"><p>We are now able to apply the <code>euf</code> tactic, which will search for occurences of signatures with <code>skS</code>: the only possibility is the output of an action <code>S(j)</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step14">
<span class="input-line" id="in14"> intro *.</span>
<span class="output-line" id="out14">[> Line 129: (intro *) <br>[goal> Focused goal (1/1):<br>System: left:default/left, right:default/right<br>Variables: i,j:index<br>H: <span class="ga" style="color: #00AA00">S(j)</span> <= <span class="ga" style="color: #00AA00">Pchall1(i)</span> || <span class="ga" style="color: #00AA00">S(j)</span> < <span class="ga" style="color: #00AA00">Pchall1(i)</span><br>Hap: <span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>)<br>Meq: <span class="gf" style="font-weight: bold">checksign</span>(<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">Pchall1(i)</span>),<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)) =<br> <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)><br>Meq0: <span class="gf" style="font-weight: bold">fst</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skS</span>)<br>Meq1: <<<span class="gm" style="font-weight: bold; color: #AA00AA">gP</span>(j)@<span class="ga" style="color: #00AA00">S(j)</span>,<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)>,<span class="gm" style="font-weight: bold; color: #AA00AA">pkP</span>(j)@<span class="ga" style="color: #00AA00">S(j)</span>> =<br> <<<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i),<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall1(i)</span>>,<span class="gf" style="font-weight: bold">pk</span>(<span class="gn" style="color: #AA5500">skP</span>)><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>exists (j:index), <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)<br><br></span>
<span class="com-line" id="com14"><p>The conclusion is now trivial from the Meq1 and D1 hypotheses.</p>
</span>
</span>
<span class="squirrel-step" id="step15">
<span class="input-line" id="in15"><br> by exists j.</span>
<span class="output-line" id="out15">[> Line 130: by (exists j) <br>[goal> Goal P_charac is proved <br></span>
</span>
<span class="squirrel-step" id="step16">
<span class="input-line" id="in16"><br>Qed.</span>
<span class="output-line" id="out16">Exiting proof mode.<br><br><br></span>
</span>
<span class="squirrel-step" id="step17">
<span class="input-line" id="in17">equiv strongSecP.</span>
<span class="output-line" id="out17">Goal strongSecP :<br> forall t:timestamp, equiv(<span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@t)<br></span>
<span class="com-line" id="com17"><p>We now show the strong secrecy of the shared key for the system <code>secretP</code>, expressed by the logic formula <code>forall t:timestamp, frame@t</code> where <code>frame@t</code> is actually a bi-frame. We will prove that the left projection of <code>frame@t</code> (<em>i.e.</em> where the shared key <code>g^a^b</code> is outputted) is indistinguishable from the right projection of <code>frame@t</code> (<em>i.e.</em> where <code>g^k</code> is outputted).</p>
</span>
</span>
<span class="squirrel-step" id="step18">
<span class="input-line" id="in18">Proof.</span>
<span class="output-line" id="out18">[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: t:timestamp<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(t)]<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@t<br><br><br></span>
<span class="com-line" id="com18"><p>The proof is done by induction, after having enriched the frame with some additional (bi-)terms. Intuitively, the idea of enriching the frame is to simplify the cases that are contexts built using applications of public function symbols and terms added in the enriched frame. It then remains to prove:</p>
<ul>
<li>the base case, <em>i.e.</em> prove that the enriched bi-frame is indistinguishable;</li>
<li>the case corresponding to the output <code>diff(ok,ko)</code>, <em>i.e.</em> prove that this output is never reached using the previous <code>P_charac</code> property.</li>
</ul>
</span>
</span>
<span class="squirrel-step" id="step19">
<span class="input-line" id="in19"> enrich<br> skP, skS,<br> seq(i:index ->g^a(i)),<br> seq(j:index ->g^b(j)),<br> seq(i,j:index ->diff( g ^ a(i), g) ^ diff( b(j), k(i,j))).</span>
<span class="output-line" id="out19">[> Line 158: (enrich skP, skS, <span>seq</span>(i:index->(g ^ a(i))),<br> <span>seq</span>(j:index->(g ^ b(j))),<br> <span>seq</span>(i,j:index->(<span>diff</span>((g ^ a(i)),g) ^ <span>diff</span>(b(j),k(i,j)))))<br><br>[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: t:timestamp<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(t)]<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@t<br><br><br></span>
<span class="com-line" id="com19"><p>We start by enriching the frame.</p>
</span>
</span>
<span class="squirrel-step" id="step20">
<span class="input-line" id="in20"> induction t; try (by expandall; apply IH).</span>
<span class="output-line" id="out20">[> Line 166: ((induction t);(try by (expandall;(apply ... )))) <br>[goal> Focused goal (1/2):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">init</span>)]<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="ga" style="color: #00AA00">init</span><br><br><br></span>
<span class="com-line" id="com20"><p>We now apply the <code>induction</code> tactic, which generates several cases, one for each possible value that can be taken by the timestamp <code>t</code>.</p>
<p>For most cases, applying the induction hypothesis <code>IH</code> allows to conclude because <code>frame@t</code> can be built from <code>frame@pred(t)</code> and elements added to the frame by the tactic <code>enrich</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step21">
<span class="input-line" id="in21"> + expandall.</span>
<span class="output-line" id="out21">[> Line 170: expandall <br>[goal> Focused goal (1/2):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">init</span>)]<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br><br><br></span>
<span class="com-line" id="com21"><p>Case where <code>t = init</code>. We use here the DDH assumption.</p>
</span>
</span>
<span class="squirrel-step" id="step22">
<span class="input-line" id="in22"><br> by ddh g,a,b,k.</span>
<span class="output-line" id="out22">[> Line 171: by (ddh g, a, b, k) <br>[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="ga" style="color: #00AA00">Pchall3(i)</span><br><br><br></span>
</span>
<span class="squirrel-step" id="step23">
<span class="input-line" id="in23"> + expand frame, exec, output.</span>
<span class="output-line" id="out23">[> Line 177: (expand frame, exec, output) <br>[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <<span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>),<br> <<span class="gf" style="font-weight: bold">of_bool</span>(<span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>) && <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall3(i)</span>),<br> if (<span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>) && <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall3(i)</span>) then diff(<span class="gf" style="font-weight: bold">ok</span>, <span class="gf" style="font-weight: bold">ko</span>)>><br><br><br></span>
<span class="com-line" id="com23"><p>Case where <code>t = Pchall3(i)</code>. We will show that this case is not possible, by showing that the formula <code>exec@pred(Pchall3(i)) && cond@Pchall3(i)</code> is equivalent to <code>False</code>, relying on the previous property <code>P_charac</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step24">
<span class="input-line" id="in24"><br> have ->: (exec@pred(Pchall3(i)) && cond@Pchall3(i)) <=> false.</span>
<span class="output-line" id="out24">[> Line 178: (have ((exec@pred(Pchall3(i)) && cond@Pchall3(i)) <=> <span>False</span>),<br> ->)<br><br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>) && <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall3(i)</span> <=> false<br><br></span>
</span>
<span class="squirrel-step" id="step25">
<span class="input-line" id="in25"> {<br> split => //.</span>
<span class="output-line" id="out25">[> Line 179: (split;(intro //)) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>) && <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall3(i)</span> => false<br><br></span>
</span>
<span class="squirrel-step" id="step26">
<span class="input-line" id="in26"><br> intro [Hexec Hcond].</span>
<span class="output-line" id="out26">[> Line 180: (intro [Hexec Hcond]) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall3(i)</span><br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step27">
<span class="input-line" id="in27"><br> expand cond.</span>
<span class="output-line" id="out27">[> Line 181: (expand cond) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step28">
<span class="input-line" id="in28"><br> depends Pchall1(i), Pchall3(i) => //.</span>
<span class="output-line" id="out28">[> Line 182: ((depends Pchall1(i), Pchall3(i));(intro //)) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br><span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span> => false<br><br></span>
</span>
<span class="squirrel-step" id="step29">
<span class="input-line" id="in29"><br> intro Ord.</span>
<span class="output-line" id="out29">[> Line 183: (intro Ord) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br>Ord: <span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step30">
<span class="input-line" id="in30"><br> executable pred(Pchall3(i)) => //.</span>
<span class="output-line" id="out30">[> Line 184: ((executable pred(Pchall3(i)));(intro //)) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br>Ord: <span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>(forall (t:timestamp), t < <span class="ga" style="color: #00AA00">Pchall3(i)</span> => <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@t) => false<br><br></span>
</span>
<span class="squirrel-step" id="step31">
<span class="input-line" id="in31"> <br> intro Hexec'.</span>
<span class="output-line" id="out31">[> Line 185: (intro Hexec') <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>Hexec': forall (t:timestamp), t < <span class="ga" style="color: #00AA00">Pchall3(i)</span> => <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@t<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br>Ord: <span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step32">
<span class="input-line" id="in32"><br> use Hexec' with Pchall1(i) as Hexec1 => //.</span>
<span class="output-line" id="out32">[> Line 186: ((have ... as Hexec1);(intro //)) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>Hexec': forall (t:timestamp), t < <span class="ga" style="color: #00AA00">Pchall3(i)</span> => <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@t<br>Hexec1: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="ga" style="color: #00AA00">Pchall1(i)</span><br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br>Ord: <span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step33">
<span class="input-line" id="in33"><br> expand exec.</span>
<span class="output-line" id="out33">[> Line 187: (expand exec) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>Hexec': forall (t:timestamp), t < <span class="ga" style="color: #00AA00">Pchall3(i)</span> => <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@t<br>Hexec1: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>) && <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall1(i)</span><br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br>Ord: <span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step34">
<span class="input-line" id="in34"><br> use P_charac with i as [j0 Hyp] => //.</span>
<span class="output-line" id="out34">[> Line 188: ((have ... as [j0 Hyp]);(intro //)) <br>[goal> Focused goal (1/2):<br>System: left:default/left, right:default/right (same for equivalences)<br>Variables: i,j0:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>Hcond: forall (j:index), not(<span class="gm" style="font-weight: bold; color: #AA00AA">gS</span>(i)@<span class="ga" style="color: #00AA00">Pchall3(i)</span> = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))<br>Hexec: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>Hexec': forall (t:timestamp), t < <span class="ga" style="color: #00AA00">Pchall3(i)</span> => <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@t<br>Hexec1: <span class="gm" style="font-weight: bold; color: #AA00AA">exec</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall1(i)</span>) && <span class="gm" style="font-weight: bold; color: #AA00AA">cond</span>@<span class="ga" style="color: #00AA00">Pchall1(i)</span><br>Hyp: <span class="gf" style="font-weight: bold">snd</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">Pchall1(i)</span>)) = <span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j0)<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br>Ord: <span class="ga" style="color: #00AA00">Pchall1(i)</span> < <span class="ga" style="color: #00AA00">Pchall3(i)</span><br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>false<br><br></span>
</span>
<span class="squirrel-step" id="step35">
<span class="input-line" id="in35"><br> by use Hcond with j0.</span>
<span class="output-line" id="out35">[> Line 189: by (have ... as ) <br>[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <<span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>),<<span class="gf" style="font-weight: bold">of_bool</span>(false),if false then diff(<span class="gf" style="font-weight: bold">ok</span>, <span class="gf" style="font-weight: bold">ko</span>)>><br><br><br></span>
</span>
<span class="squirrel-step" id="step36">
<span class="input-line" id="in36"><br> }<br><br> fa 5.</span>
<span class="output-line" id="out36">[> Line 192: (fa 5) <br>[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>6: <<span class="gf" style="font-weight: bold">of_bool</span>(false),if false then diff(<span class="gf" style="font-weight: bold">ok</span>, <span class="gf" style="font-weight: bold">ko</span>)><br><br><br></span>
</span>
<span class="squirrel-step" id="step37">
<span class="input-line" id="in37"> fa 6.</span>
<span class="output-line" id="out37">[> Line 192: (fa 6) <br>[goal> Focused goal (1/1):<br>Systems: left:default/left, right:default/right (same for equivalences)<br>Variables: i:index<br>H: [<span class="gm" style="font-weight: bold; color: #AA00AA">happens</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)]<br>IH: equiv(seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j)))),<br> seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j))), seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i))), <span class="gn" style="color: #AA5500">skS</span>, <span class="gn" style="color: #AA5500">skP</span>,<br> <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>))<br><span class="sep" style="font-weight: bold">----------------------------------------</span><br>0: seq(i,j:index->(diff(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i), <span class="gf" style="font-weight: bold">g</span>) ^ diff(<span class="gn" style="color: #AA5500">b</span>(j), <span class="gn" style="color: #AA5500">k</span>(i,j))))<br>1: seq(j:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">b</span>(j)))<br>2: seq(i:index->(<span class="gf" style="font-weight: bold">g</span> ^ <span class="gn" style="color: #AA5500">a</span>(i)))<br>3: <span class="gn" style="color: #AA5500">skS</span><br>4: <span class="gn" style="color: #AA5500">skP</span><br>5: <span class="gm" style="font-weight: bold; color: #AA00AA">frame</span>@<span class="gf" style="font-weight: bold">pred</span>(<span class="ga" style="color: #00AA00">Pchall3(i)</span>)<br>6: if false then diff(<span class="gf" style="font-weight: bold">ok</span>, <span class="gf" style="font-weight: bold">ko</span>)<br><br><br></span>
</span>
<span class="squirrel-step" id="step38">
<span class="input-line" id="in38"> by rewrite if_false.</span>
<span class="output-line" id="out38">[> Line 194: by (rewrite ...) <br>[goal> Goal strongSecP is proved <br></span>
<span class="com-line" id="com38"><p>It now remains to simplify <code>if false then diff(ok,ko)</code>.</p>
</span>
</span>
<span class="squirrel-step" id="step39">
<span class="input-line" id="in39"><br>Qed.</span>
<span class="output-line" id="out39">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>