include Basic.
Typed-check process:
null
Added action dependencies lemmas:
System after processing:
null
System Empty registered with actions (init).
[warning>Loaded "Prelude.sp".
<]axiom [any] eq_iff : forall (x,y:bool), (x = y) = (x <=> y)
axiom [any] eq_not : forall (x,y:bool), (not x = not y) = (x = y)
Goal eq_sym :
(x = y) = (y = x)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
(x = y) = (y = x)
[> Line 17: by (rewrite ...) [goal> lemma eq_sym is proved
lemma [any] eq_sym ['a] : forall (x,y:'a), (x = y) = (y = x)
Exiting proof mode.
Goal neq_sym :
(x <> y) = (y <> x)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
(x <> y) = (y <> x)
[> Line 23: by (rewrite ...) [goal> lemma neq_sym is proved
lemma [any] neq_sym ['a] : forall (x,y:'a), (x <> y) = (y <> x)
Exiting proof mode.
Goal eq_refl_e :
(x = x) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x:'a
----------------------------------------
(x = x) = true
[> Line 31: by (rewrite ...) [goal> lemma eq_refl_e is proved
lemma [any] eq_refl_e ['a] : forall (x:'a), (x = x) = true
Exiting proof mode.
Goal eq_refl :
x = x
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x:'a
----------------------------------------
x = x
[> Line 43: by (rewrite ...) [goal> lemma eq_refl is proved
lemma [any] eq_refl ['a] : forall (x:'a), x = x
Exiting proof mode.
Goal neq_irrefl :
x <> x <=> false
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x:'a
----------------------------------------
x <> x <=> false
[> Line 51: by split [goal> lemma neq_irrefl is proved
lemma [any] neq_irrefl ['a] : forall (x:'a), x <> x <=> false
Exiting proof mode.
Goal eq_assoc :
((b0 = b1) = b2) = (b0 = (b1 = b2))
[goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool
----------------------------------------
((b0 = b1) = b2) = (b0 = (b1 = b2))
[> Line 65: ((have ...); 1: by (rewrite ...)) [goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool[const]
true_false: (true = false) = false
----------------------------------------
((b0 = b1) = b2) = (b0 = (b1 = b2))
[> Line 67: ((have ...); 1: by (rewrite ...)) [goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool[const]
false_true: (false = true) = false
true_false: (true = false) = false
----------------------------------------
((b0 = b1) = b2) = (b0 = (b1 = b2))
[> Line 69: ((case ..., b0);
((case ..., b1);((case ..., b2);(try (auto ...)))))
[goal> Focused goal (1/2):
System: any
Variables: b0,b1,b2:bool[const]
false_true: (false = true) = false
true_false: (true = false) = false
----------------------------------------
not b2 => not b1 => b0 => ((true = false) = false) = (true = (false = false))
[> Line 69: by (rewrite ...) [goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool[const]
false_true: (false = true) = false
true_false: (true = false) = false
----------------------------------------
b2 => not b1 => not b0 => ((false = false) = true) = (false = (false = true))
[> Line 69: by (rewrite ...) [goal> lemma eq_assoc is proved
lemma [any] eq_assoc :
forall (b0,b1,b2:bool), ((b0 = b1) = b2) = (b0 = (b1 = b2))
Exiting proof mode.
Goal true_false :
(true = false) = false
[goal> Focused goal (1/1):
System: any
----------------------------------------
(true = false) = false
[> Line 87: by (rewrite ...) [goal> lemma true_false is proved
lemma [any] true_false : (true = false) = false
Exiting proof mode.
Goal false_true :
(false = true) = false
[goal> Focused goal (1/1):
System: any
----------------------------------------
(false = true) = false
[> Line 97: by (rewrite ...) [goal> lemma false_true is proved
lemma [any] false_true : (false = true) = false
Exiting proof mode.
Goal eq_true :
(b = true) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b = true) = b
[> Line 107: by (case ..., b) [goal> lemma eq_true is proved
lemma [any] eq_true : forall (b:bool), (b = true) = b
Exiting proof mode.
Goal eq_true2 :
(true = b) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(true = b) = b
[> Line 115: by (case ..., b) [goal> lemma eq_true2 is proved
lemma [any] eq_true2 : forall (b:bool), (true = b) = b
Exiting proof mode.
axiom [any] not_true : not true = false
axiom [any] not_false : not false = true
Goal not_not :
not (not b) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
not (not b) = b
[> Line 145: by (case ..., b) [goal> lemma not_not is proved
lemma [any] not_not : forall (b:bool), not (not b) = b
Exiting proof mode.
Goal not_eq :
not (x = y) = (x <> y)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
not (x = y) = (x <> y)
[> Line 157: by (rewrite ...) [goal> lemma not_eq is proved
lemma [any] not_eq ['a] : forall (x,y:'a), not (x = y) = (x <> y)
Exiting proof mode.
Goal not_neq :
not (x <> y) = (x = y)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
not (x <> y) = (x = y)
[> Line 169: by (rewrite ...) [goal> lemma not_neq is proved
lemma [any] not_neq ['a] : forall (x,y:'a), not (x <> y) = (x = y)
Exiting proof mode.
Goal not_eqfalse :
(b = false) = not b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b = false) = not b
[> Line 181: by (case ..., b) [goal> lemma not_eqfalse is proved
lemma [any] not_eqfalse : forall (b:bool), (b = false) = not b
Exiting proof mode.
Goal not_impl :
not (a => b) = (a && not b)
[goal> Focused goal (1/1):
System: any
Variables: a,b:bool
----------------------------------------
not (a => b) = (a && not b)
[> Line 191: ((rewrite ...);(split;(intro H))) [goal> Focused goal (1/2):
System: any
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
a && not b
[> Line 193: split [goal> Focused goal (1/3):
System: any
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
a
[> Line 195: (rewrite ...) [goal> Focused goal (1/3):
System: any
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
not (not a)
[> Line 197: (intro Hna) [goal> Focused goal (1/3):
System: any
Variables: a,b:bool[const]
H: not (a => b)
Hna: not a
----------------------------------------
false
[> Line 199: by (apply ... ) [goal> Focused goal (1/2):
System: any
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
not b
[> Line 201: (intro Hb) [goal> Focused goal (1/2):
System: any
Variables: a,b:bool[const]
H: not (a => b)
Hb: b
----------------------------------------
false
[> Line 203: by (apply ... ) [goal> Focused goal (1/1):
System: any
Variables: a,b:bool[const]
H: a && not b
----------------------------------------
not (a => b)
[> Line 205: (intro Hi) [goal> Focused goal (1/1):
System: any
Variables: a,b:bool[const]
H: a && not b
Hi: a => b
----------------------------------------
false
[> Line 207: (destruct H, [Ha Hnb]) [goal> Focused goal (1/1):
System: any
Variables: a,b:bool[const]
Ha: a
Hi: a => b
Hnb: not b
----------------------------------------
false
[> Line 209: (apply ... ) [goal> Focused goal (1/1):
System: any
Variables: a,b:bool[const]
Ha: a
Hi: a => b
Hnb: not b
----------------------------------------
b
[> Line 211: by (apply ... ) [goal> lemma not_impl is proved
lemma [any] not_impl : forall (a,b:bool), not (a => b) = (a && not b)
Exiting proof mode.
Goal eq_false :
((x = y) = false) = (x <> y)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
((x = y) = false) = (x <> y)
[> Line 227: (rewrite ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
((x = y) = false) = not (x = y)
[> Line 227: ((case ..., (= x y));(intro _)) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: x,y:'a
_: x = y
----------------------------------------
(true = false) = not true
[> Line 227: (simpl ...) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: x,y:'a
_: x = y
----------------------------------------
true
[> Line 227: (auto ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
_: not (x = y)
----------------------------------------
(false = false) = not false
[> Line 229: by (rewrite ...) [goal> lemma eq_false is proved
lemma [any] eq_false ['a] : forall (x,y:'a), ((x = y) = false) = (x <> y)
Exiting proof mode.
axiom [any] and_comm : forall (b,b':bool), (b && b') = (b' && b)
Goal and_dist :
((b0 || b1) && b2) = (b0 && b2 || b1 && b2)
[goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool
----------------------------------------
((b0 || b1) && b2) = (b0 && b2 || b1 && b2)
[> Line 249: (rewrite ...) [goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool[const]
----------------------------------------
(b0 || b1) && b2 <=> b0 && b2 || b1 && b2
[> Line 249: by split [goal> lemma and_dist is proved
lemma [any] and_dist :
forall (b0,b1,b2:bool), ((b0 || b1) && b2) = (b0 && b2 || b1 && b2)
Exiting proof mode.
axiom [any] and_true_l : forall (b:bool), (true && b) = b
Goal and_true_r :
(b && true) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b && true) = b
[> Line 261: by (rewrite ... ...) [goal> lemma and_true_r is proved
lemma [any] and_true_r : forall (b:bool), (b && true) = b
Exiting proof mode.
axiom [any] and_false_l : forall (b:bool), (false && b) = false
Goal and_false_r :
(b && false) = false
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b && false) = false
[> Line 275: by (rewrite ... ...) [goal> lemma and_false_r is proved
lemma [any] and_false_r : forall (b:bool), (b && false) = false
Exiting proof mode.
Goal and_double :
(b && b) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b && b) = b
[> Line 285: by (case ..., b) [goal> lemma and_double is proved
lemma [any] and_double : forall (b:bool), (b && b) = b
Exiting proof mode.
axiom [any] or_comm : forall (b,b':bool), (b || b') = (b' || b)
Goal or_dist :
((b0 || b2) && (b1 || b2)) = (b0 && b1 || b2)
[goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool
----------------------------------------
((b0 || b2) && (b1 || b2)) = (b0 && b1 || b2)
[> Line 301: (rewrite ...) [goal> Focused goal (1/1):
System: any
Variables: b0,b1,b2:bool[const]
----------------------------------------
(b0 || b2) && (b1 || b2) <=> b0 && b1 || b2
[> Line 301: by split [goal> lemma or_dist is proved
lemma [any] or_dist :
forall (b0,b1,b2:bool), ((b0 || b2) && (b1 || b2)) = (b0 && b1 || b2)
Exiting proof mode.
axiom [any] or_false_l : forall (b:bool), (false || b) = b
Goal or_false_r :
(b || false) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b || false) = b
[> Line 313: by (rewrite ... ...) [goal> lemma or_false_r is proved
lemma [any] or_false_r : forall (b:bool), (b || false) = b
Exiting proof mode.
axiom [any] or_true_l : forall (b:bool), (true || b) = true
Goal or_true_r :
(b || true) = true
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b || true) = true
[> Line 327: by (rewrite ... ...) [goal> lemma or_true_r is proved
lemma [any] or_true_r : forall (b:bool), (b || true) = true
Exiting proof mode.
Goal or_double :
(b || b) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b || b) = b
[> Line 335: by (case ..., b) [goal> lemma or_double is proved
lemma [any] or_double : forall (b:bool), (b || b) = b
Exiting proof mode.
Goal impl_charac :
(b => b') = (not b || b')
[goal> Focused goal (1/1):
System: any
Variables: b,b':bool
----------------------------------------
(b => b') = (not b || b')
[> Line 349: (((rewrite ...);(split;((case ..., b);(case ..., b'))));
(intro //=))
[goal> lemma impl_charac is proved
lemma [any] impl_charac : forall (b,b':bool), (b => b') = (not b || b')
Exiting proof mode.
Goal impl_false_l :
(false => b) = true
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(false => b) = true
[> Line 357: by ((rewrite ...);(case ..., b)) [goal> lemma impl_false_l is proved
lemma [any] impl_false_l : forall (b:bool), (false => b) = true
Exiting proof mode.
Goal impl_true_r :
(b => true) = true
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(b => true) = true
[> Line 365: (auto ...) [goal> lemma impl_true_r is proved
lemma [any] impl_true_r : forall (b:bool), (b => true) = true
Exiting proof mode.
Goal impl_true_l :
(true => b) = b
[goal> Focused goal (1/1):
System: any
Variables: b:bool
----------------------------------------
(true => b) = b
[> Line 373: by (rewrite ...) [goal> lemma impl_true_l is proved
lemma [any] impl_true_l : forall (b:bool), (true => b) = b
Exiting proof mode.
Goal impl_contra :
(b => c) = (not c => not b)
[goal> Focused goal (1/1):
System: any
Variables: b,c:bool
----------------------------------------
(b => c) = (not c => not b)
[> Line 383: (rewrite ... /=) [goal> Focused goal (1/1):
System: any
Variables: b,c:bool[const]
----------------------------------------
(not b || c) = (c || not b)
[> Line 385: by (rewrite ...) [goal> lemma impl_contra is proved
lemma [any] impl_contra : forall (b,c:bool), (b => c) = (not c => not b)
Exiting proof mode.
Goal not_and :
not (a && b) = (not a || not b)
[goal> Focused goal (1/1):
System: any
Variables: a,b:bool
----------------------------------------
not (a && b) = (not a || not b)
[> Line 401: (rewrite ...) [goal> Focused goal (1/1):
System: any
Variables: a,b:bool[const]
----------------------------------------
not (a && b) <=> not a || not b
[> Line 403: (((case ..., a);(case ..., b));(intro //=)) [goal> lemma not_and is proved
lemma [any] not_and : forall (a,b:bool), not (a && b) = (not a || not b)
Exiting proof mode.
Goal not_or :
not (a || b) = (not a && not b)
[goal> Focused goal (1/1):
System: any
Variables: a,b:bool
----------------------------------------
not (a || b) = (not a && not b)
[> Line 413: (rewrite ...) [goal> Focused goal (1/1):
System: any
Variables: a,b:bool[const]
----------------------------------------
not (a || b) <=> not a && not b
[> Line 415: (((case ..., a);(case ..., b));(intro //=)) [goal> lemma not_or is proved
lemma [any] not_or : forall (a,b:bool), not (a || b) = (not a && not b)
Exiting proof mode.
Goal if_true :
b => if b then x else y = x
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool,x,y:'a
----------------------------------------
b => if b then x else y = x
[> Line 433: (intro *) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
----------------------------------------
if b then x else y = x
[> Line 435: (case ..., (if b x y)) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
----------------------------------------
b && if b then x else y = x => x = x
[> Line 437: (auto ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
----------------------------------------
not b && if b then x else y = y => y = x
[> Line 439: (intro [HH _]) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
HH: not b
_: if b then x else y = y
----------------------------------------
y = x
[> Line 439: by (have ...) [goal> lemma if_true is proved
lemma [any] if_true ['a] :
forall (b:bool,x,y:'a), b => if b then x else y = x
Exiting proof mode.
Goal if_true0 :
if true then x else y = x
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
if true then x else y = x
[> Line 451: by (rewrite ...) [goal> lemma if_true0 is proved
lemma [any] if_true0 ['a] : forall (x,y:'a), if true then x else y = x
Exiting proof mode.
Goal if_false :
not b => if b then x else y = y
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool,x,y:'a
----------------------------------------
not b => if b then x else y = y
[> Line 465: ((intro *);(case ..., (if b x y))) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: not b
----------------------------------------
b && if b then x else y = x => x = y
[> Line 467: (intro [H1 H2]) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: not b
H1: b
H2: if b then x else y = x
----------------------------------------
x = y
[> Line 469: by (rewrite ... in H2) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: not b
----------------------------------------
not b && if b then x else y = y => y = y
[> Line 471: (auto ...) [goal> lemma if_false is proved
lemma [any] if_false ['a] :
forall (b:bool,x,y:'a), not b => if b then x else y = y
Exiting proof mode.
Goal if_false0 :
if false then x else y = y
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
if false then x else y = y
[> Line 483: by (rewrite ...) [goal> lemma if_false0 is proved
lemma [any] if_false0 ['a] : forall (x,y:'a), if false then x else y = y
Exiting proof mode.
Goal if_then_then :
if b then (if b' then x else y) else y = if (b && b') then x else y
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b,b':bool,x,y:'a
----------------------------------------
if b then (if b' then x else y) else y = if (b && b') then x else y
[> Line 497: by ((case ..., b);(case ..., b')) [goal> lemma if_then_then is proved
lemma [any] if_then_then ['a] :
forall (b,b':bool,x,y:'a),
if b then (if b' then x else y) else y = if (b && b') then x else y
Exiting proof mode.
Goal if_then_or :
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[goal> Focused goal (1/1):
System: any
Variables: b0,b1:bool,m0,m1:message
----------------------------------------
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[> Line 513: ((have ...); 1: by (auto ...)) [goal> Focused goal (1/2):
System: any
Variables: b0,b1:bool[const],m0,m1:message
_: b0
----------------------------------------
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[> Line 513: ((rewrite ...);(intro //)) [goal> Focused goal (1/2):
System: any
Variables: b0,b1:bool[const],m0,m1:message
_: b0
----------------------------------------
m0 = if (b0 || b1) then m0 else m1
[> Line 513: ((rewrite ...);(intro //)) [goal> Focused goal (1/1):
System: any
Variables: b0,b1:bool[const],m0,m1:message
_: not b0
----------------------------------------
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[> Line 515: ((have ...); 1: by (auto ...)) [goal> Focused goal (1/2):
System: any
Variables: b0,b1:bool[const],m0,m1:message
_: b1
_: not b0
----------------------------------------
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[> Line 515: ((rewrite ...);(intro //)) [goal> Focused goal (1/2):
System: any
Variables: b0,b1:bool[const],m0,m1:message
_: b1
_: not b0
----------------------------------------
if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[> Line 515: ((rewrite ...);(intro //)) [goal> Focused goal (1/1):
System: any
Variables: b0,b1:bool[const],m0,m1:message
_: not b1
_: not b0
----------------------------------------
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
[> Line 517: ((rewrite ...);(intro //)) [goal> lemma if_then_or is proved
lemma [any] if_then_or :
forall (b0,b1:bool,m0,m1:message),
if b0 then m0 else if b1 then m0 else m1 = if (b0 || b1) then m0 else m1
Exiting proof mode.
Goal if_then_implies :
if b then (if b' then x else y) else z =
if b then (if (b => b') then x else y) else z
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b,b':bool,x,y,z:'a
----------------------------------------
if b then (if b' then x else y) else z =
if b then (if (b => b') then x else y) else z
[> Line 531: ((case ..., b);
((intro H);
((case ..., b');((intro H');((simpl ...);(try (auto ...)))))))
[goal> lemma if_then_implies is proved
lemma [any] if_then_implies ['a] :
forall (b,b':bool,x,y,z:'a),
if b then (if b' then x else y) else z =
if b then (if (b => b') then x else y) else z
Exiting proof mode.
Goal if_same :
if b then x else x = x
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b:bool,x:'a
----------------------------------------
if b then x else x = x
[> Line 543: by (case ..., b) [goal> lemma if_same is proved
lemma [any] if_same ['a] : forall (b:bool,x:'a), if b then x else x = x
Exiting proof mode.
Goal if_then :
b = b' => if b then (if b' then x else y) else z = if b then x else z
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b,b':bool,x,y,z:'a
----------------------------------------
b = b' => if b then (if b' then x else y) else z = if b then x else z
[> Line 561: by ((intro ->);(case ..., b')) [goal> lemma if_then is proved
lemma [any] if_then ['a] :
forall (b,b':bool,x,y,z:'a),
b = b' => if b then (if b' then x else y) else z = if b then x else z
Exiting proof mode.
Goal if_then_inv :
if b then m0 else m1 = if b then (if b then m0) else m1
[goal> Focused goal (1/1):
System: any
Variables: b:bool,m0,m1:message
----------------------------------------
if b then m0 else m1 = if b then (if b then m0) else m1
[> Line 575: (auto ...) [goal> lemma if_then_inv is proved
lemma [any] if_then_inv :
forall (b:bool,m0,m1:message),
if b then m0 else m1 = if b then (if b then m0) else m1
Exiting proof mode.
Goal if_else :
b = b' => if b then x else if b' then y else z = if b then x else z
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b,b':bool,x,y,z:'a
----------------------------------------
b = b' => if b then x else if b' then y else z = if b then x else z
[> Line 589: by ((intro ->);(case ..., b')) [goal> lemma if_else is proved
lemma [any] if_else ['a] :
forall (b,b':bool,x,y,z:'a),
b = b' => if b then x else if b' then y else z = if b then x else z
Exiting proof mode.
Goal if_else_inv :
if b then m0 else m1 = if b then m0 else if not b then m1
[goal> Focused goal (1/1):
System: any
Variables: b:bool,m0,m1:message
----------------------------------------
if b then m0 else m1 = if b then m0 else if not b then m1
[> Line 601: by (case ..., b) [goal> lemma if_else_inv is proved
lemma [any] if_else_inv :
forall (b:bool,m0,m1:message),
if b then m0 else m1 = if b then m0 else if not b then m1
Exiting proof mode.
Goal if_push :
if b then m0 else m1 = if b then (if b then m0) else if not b then m1
[goal> Focused goal (1/1):
System: any
Variables: b:bool,m0,m1:message
----------------------------------------
if b then m0 else m1 = if b then (if b then m0) else if not b then m1
[> Line 609: by (rewrite ... ...) [goal> lemma if_push is proved
lemma [any] if_push :
forall (b:bool,m0,m1:message),
if b then m0 else m1 = if b then (if b then m0) else if not b then m1
Exiting proof mode.
Goal if_then_not :
b = not b' => if b then (if b' then x else y) else z = if b then y else z
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b,b':bool,x,y,z:'a
----------------------------------------
b = not b' => if b then (if b' then x else y) else z = if b then y else z
[> Line 623: by ((intro ->);(case ..., b')) [goal> lemma if_then_not is proved
lemma [any] if_then_not ['a] :
forall (b,b':bool,x,y,z:'a),
b = not b' => if b then (if b' then x else y) else z = if b then y else z
Exiting proof mode.
Goal if_else_not :
b = not b' => if b then x else if b' then y else z = if b then x else y
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: b,b':bool,x,y,z:'a
----------------------------------------
b = not b' => if b then x else if b' then y else z = if b then x else y
[> Line 641: by ((intro ->);(case ..., b')) [goal> lemma if_else_not is proved
lemma [any] if_else_not ['a] :
forall (b,b':bool,x,y,z:'a),
b = not b' => if b then x else if b' then y else z = if b then x else y
Exiting proof mode.
Goal if_app :
f (if c then x else y) = if c then f x else f y
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: c:bool,f:'a -> 'b,x,y:'a
----------------------------------------
f (if c then x else y) = if c then f x else f y
[> Line 653: by (case ..., c) [goal> lemma if_app is proved
lemma [any] if_app ['a 'b] :
forall (f:'a -> 'b,c:bool,x,y:'a),
f (if c then x else y) = if c then f x else f y
Exiting proof mode.
Goal fst_pair :
fst <x,y> = x
[goal> Focused goal (1/1):
System: any
Variables: x,y:message
----------------------------------------
fst <x,y> = x
[> Line 665: (auto ...) [goal> lemma fst_pair is proved
lemma [any] fst_pair : forall (x,y:message), fst <x,y> = x
Exiting proof mode.
Goal snd_pair :
snd <x,y> = y
[goal> Focused goal (1/1):
System: any
Variables: x,y:message
----------------------------------------
snd <x,y> = y
[> Line 673: (auto ...) [goal> lemma snd_pair is proved
lemma [any] snd_pair : forall (x,y:message), snd <x,y> = y
Exiting proof mode.
Goal iff_def :
(x <=> y) = ((x => y) && (y => x))
[goal> Focused goal (1/1):
System: any
Variables: x,y:bool
----------------------------------------
(x <=> y) = ((x => y) && (y => x))
[> Line 689: ((rewrite ...);split) [goal> Focused goal (1/2):
System: any
Variables: x,y:bool[const]
----------------------------------------
x <=> y => (x => y) && (y => x)
[> Line 691: by (intro ->) [goal> Focused goal (1/1):
System: any
Variables: x,y:bool[const]
----------------------------------------
(x => y) && (y => x) => x <=> y
[> Line 693: (auto ...) [goal> lemma iff_def is proved
lemma [any] iff_def : forall (x,y:bool), (x <=> y) = ((x => y) && (y => x))
Exiting proof mode.
Goal iff_refl :
(x <=> x) = true
[goal> Focused goal (1/1):
System: any
Variables: x:bool
----------------------------------------
(x <=> x) = true
[> Line 703: by (rewrite ...) [goal> lemma iff_refl is proved
lemma [any] iff_refl : forall (x:bool), (x <=> x) = true
Exiting proof mode.
Goal iff_sym :
(x <=> y) = (y <=> x)
[goal> Focused goal (1/1):
System: any
Variables: x,y:bool
----------------------------------------
(x <=> y) = (y <=> x)
[> Line 715: by (rewrite ... ...) [goal> lemma iff_sym is proved
lemma [any] iff_sym : forall (x,y:bool), (x <=> y) = (y <=> x)
Exiting proof mode.
Goal true_iff_false :
(true <=> false) = false
[goal> Focused goal (1/1):
System: any
----------------------------------------
(true <=> false) = false
[> Line 725: by (rewrite ...) [goal> lemma true_iff_false is proved
lemma [any] true_iff_false : (true <=> false) = false
Exiting proof mode.
Goal false_iff_true :
(false <=> true) = false
[goal> Focused goal (1/1):
System: any
----------------------------------------
(false <=> true) = false
[> Line 737: by (rewrite ...) [goal> lemma false_iff_true is proved
lemma [any] false_iff_true : (false <=> true) = false
Exiting proof mode.
Goal contra_iff :
(not x <=> y) = (x <=> not y)
[goal> Focused goal (1/1):
System: any
Variables: x,y:bool
----------------------------------------
(not x <=> y) = (x <=> not y)
[> Line 751: (rewrite ...) [goal> Focused goal (1/1):
System: any
Variables: x,y:bool[const]
----------------------------------------
(not x <=> y) <=> (x <=> not y)
[> Line 753: (split;by (rewrite ... ...)) [goal> lemma contra_iff is proved
lemma [any] contra_iff : forall (x,y:bool), (not x <=> y) = (x <=> not y)
Exiting proof mode.
Goal exists_false1 :
(exists (a:'a), false) = false
[goal> Focused goal (1/1):
System: any
Type variables: 'a
----------------------------------------
(exists (a:'a), false) = false
[> Line 769: by (rewrite ...) [goal> lemma exists_false1 is proved
lemma [any] exists_false1 ['a] : (exists (a:'a), false) = false
Exiting proof mode.
Goal exists_false2 :
(exists (a:'a,b:'b), false) = false
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
----------------------------------------
(exists (a:'a,b:'b), false) = false
[> Line 777: by (rewrite ...) [goal> lemma exists_false2 is proved
lemma [any] exists_false2 ['a 'b] : (exists (a:'a,b:'b), false) = false
Exiting proof mode.
Goal exists_false3 :
(exists (a:'a,b:'b,c:'c), false) = false
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c
----------------------------------------
(exists (a:'a,b:'b,c:'c), false) = false
[> Line 785: by (rewrite ...) [goal> lemma exists_false3 is proved
lemma [any] exists_false3 ['a 'b 'c] :
(exists (a:'a,b:'b,c:'c), false) = false
Exiting proof mode.
Goal exists_false4 :
(exists (a:'a,b:'b,c:'c,d:'d), false) = false
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c, 'd
----------------------------------------
(exists (a:'a,b:'b,c:'c,d:'d), false) = false
[> Line 793: by (rewrite ...) [goal> lemma exists_false4 is proved
lemma [any] exists_false4 ['a 'b 'c 'd] :
(exists (a:'a,b:'b,c:'c,d:'d), false) = false
Exiting proof mode.
Goal exists_false5 :
(exists (a:'a,b:'b,c:'c,d:'d,e:'e), false) = false
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c, 'd, 'e
----------------------------------------
(exists (a:'a,b:'b,c:'c,d:'d,e:'e), false) = false
[> Line 801: by (rewrite ...) [goal> lemma exists_false5 is proved
lemma [any] exists_false5 ['a 'b 'c 'd 'e] :
(exists (a:'a,b:'b,c:'c,d:'d,e:'e), false) = false
Exiting proof mode.
Goal exists_false6 :
(exists (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), false) = false
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c, 'd, 'e, 'f
----------------------------------------
(exists (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), false) = false
[> Line 809: by (rewrite ...) [goal> lemma exists_false6 is proved
lemma [any] exists_false6 ['a 'b 'c 'd 'e 'f] :
(exists (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), false) = false
Exiting proof mode.
Goal forall_true1 :
(forall (a:'a), true) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a
----------------------------------------
(forall (a:'a), true) = true
[> Line 829: (auto ...) [goal> lemma forall_true1 is proved
lemma [any] forall_true1 ['a] : (forall (a:'a), true) = true
Exiting proof mode.
Goal forall_true2 :
(forall (a:'a,b:'b), true) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
----------------------------------------
(forall (a:'a,b:'b), true) = true
[> Line 837: (auto ...) [goal> lemma forall_true2 is proved
lemma [any] forall_true2 ['a 'b] : (forall (a:'a,b:'b), true) = true
Exiting proof mode.
Goal forall_true3 :
(forall (a:'a,b:'b,c:'c), true) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c
----------------------------------------
(forall (a:'a,b:'b,c:'c), true) = true
[> Line 845: (auto ...) [goal> lemma forall_true3 is proved
lemma [any] forall_true3 ['a 'b 'c] : (forall (a:'a,b:'b,c:'c), true) = true
Exiting proof mode.
Goal forall_true4 :
(forall (a:'a,b:'b,c:'c,d:'d), true) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c, 'd
----------------------------------------
(forall (a:'a,b:'b,c:'c,d:'d), true) = true
[> Line 853: (auto ...) [goal> lemma forall_true4 is proved
lemma [any] forall_true4 ['a 'b 'c 'd] :
(forall (a:'a,b:'b,c:'c,d:'d), true) = true
Exiting proof mode.
Goal forall_true5 :
(forall (a:'a,b:'b,c:'c,d:'d,e:'e), true) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c, 'd, 'e
----------------------------------------
(forall (a:'a,b:'b,c:'c,d:'d,e:'e), true) = true
[> Line 861: (auto ...) [goal> lemma forall_true5 is proved
lemma [any] forall_true5 ['a 'b 'c 'd 'e] :
(forall (a:'a,b:'b,c:'c,d:'d,e:'e), true) = true
Exiting proof mode.
Goal forall_true6 :
(forall (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), true) = true
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b, 'c, 'd, 'e, 'f
----------------------------------------
(forall (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), true) = true
[> Line 869: (auto ...) [goal> lemma forall_true6 is proved
lemma [any] forall_true6 ['a 'b 'c 'd 'e 'f] :
(forall (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), true) = true
Exiting proof mode.
axiom [any] len_zeroes : forall (x:message), len (zeroes x) = len x
axiom [any] exec_not_init :
forall (tau:timestamp),
init < tau => exec@tau = (exec@pred tau && cond@tau)
axiom [any] exec_init : forall (tau:timestamp), tau = init => exec@tau = true
axiom [any] cond_init : forall (tau:timestamp), tau = init => cond@tau = true
Goal exec_le :
tau' <= tau => exec@tau => exec@tau'
[goal> Focused goal (1/1):
System: any
Variables: tau,tau':timestamp
----------------------------------------
tau' <= tau => exec@tau => exec@tau'
[> Line 917: ((induction tau);(intro tau IH Hle Hexec)) [goal> Focused goal (1/1):
System: any
Variables: tau,tau':timestamp[const]
Hexec: exec@tau
Hle: tau' <= tau
IH: forall (tau0:timestamp),
tau0 < tau => tau' <= tau0 => exec@tau0 => exec@tau'
----------------------------------------
exec@tau'
[> Line 919: (case ..., (= tau tau')) [goal> Focused goal (1/2):
System: any
Variables: tau,tau':timestamp[const]
Hexec: exec@tau
Hle: tau' <= tau
IH: forall (tau0:timestamp),
tau0 < tau => tau' <= tau0 => exec@tau0 => exec@tau'
----------------------------------------
tau = tau' => exec@tau'
[> Line 921: (auto ...) [goal> Focused goal (1/1):
System: any
Variables: tau,tau':timestamp[const]
Hexec: exec@tau
Hle: tau' <= tau
IH: forall (tau0:timestamp),
tau0 < tau => tau' <= tau0 => exec@tau0 => exec@tau'
----------------------------------------
not (tau = tau') => exec@tau'
[> Line 923: (intro Hneq) [goal> Focused goal (1/1):
System: any
Variables: tau,tau':timestamp[const]
Hexec: exec@tau
Hle: tau' <= tau
Hneq: not (tau = tau')
IH: forall (tau0:timestamp),
tau0 < tau => tau' <= tau0 => exec@tau0 => exec@tau'
----------------------------------------
exec@tau'
[> Line 925: (rewrite ... // in Hexec) [goal> Focused goal (1/1):
System: any
Variables: tau,tau':timestamp[const]
Hexec: exec@pred tau && cond@tau
Hle: tau' <= tau
Hneq: not (tau = tau')
IH: forall (tau0:timestamp),
tau0 < tau => tau' <= tau0 => exec@tau0 => exec@tau'
----------------------------------------
exec@tau'
[> Line 927: by (apply ... ) [goal> lemma exec_le is proved
lemma [any] exec_le :
forall (tau,tau':timestamp), tau' <= tau => exec@tau => exec@tau'
Exiting proof mode.
Goal exec_cond :
happens(tau) => exec@tau => cond@tau
[goal> Focused goal (1/1):
System: any
Variables: tau:timestamp
----------------------------------------
happens(tau) => exec@tau => cond@tau
[> Line 937: (intro Hap Hexec) [goal> Focused goal (1/1):
System: any
Variables: tau:timestamp[const]
Hap: happens(tau)
Hexec: exec@tau
----------------------------------------
cond@tau
[> Line 939: ((case ..., (< init tau));(intro _)) [goal> Focused goal (1/2):
System: any
Variables: tau:timestamp[const]
Hap: happens(tau)
Hexec: exec@tau
_: init < tau
----------------------------------------
cond@tau
[> Line 941: by (rewrite ... in Hexec) [goal> Focused goal (1/1):
System: any
Variables: tau:timestamp[const]
Hap: happens(tau)
Hexec: exec@tau
_: not (init < tau)
----------------------------------------
cond@tau
[> Line 943: by (rewrite ...) [goal> lemma exec_cond is proved
lemma [any] exec_cond :
forall (tau:timestamp), happens(tau) => exec@tau => cond@tau
Exiting proof mode.
Goal f_apply :
x = y => f x = f y
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: f:'a -> 'b,x,y:'a
----------------------------------------
x = y => f x = f y
[> Line 955: by (intro ->) [goal> lemma f_apply is proved
lemma [any] f_apply ['a 'b] : forall (f:'a -> 'b,x,y:'a), x = y => f x = f y
Exiting proof mode.
Goal not_exists_1 :
not exists (a:'a), phi a = forall (a:'a), not (phi a)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
not exists (a:'a), phi a = forall (a:'a), not (phi a)
[> Line 965: (rewrite ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
not exists (a:'a), phi a <=> forall (a:'a), not (phi a)
[> Line 967: split [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
not exists (a:'a), phi a => forall (a:'a), not (phi a)
[> Line 969: (intro H a Hp) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: a:'a,phi:'a -> bool
H: not exists (a:'a), phi a
Hp: phi a
----------------------------------------
false
[> Line 971: (apply ... ) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: a:'a,phi:'a -> bool
H: not exists (a:'a), phi a
Hp: phi a
----------------------------------------
exists (a:'a), phi a
[> Line 973: by (exists a) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
(forall (a:'a), not (phi a)) => not exists (a:'a), phi a
[> Line 975: (intro H [a Hp]) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: a:'a,phi:'a -> bool
H: forall (a:'a), not (phi a)
Hp: phi a
----------------------------------------
false
[> Line 977: by (have ...) [goal> lemma not_exists_1 is proved
lemma [any] not_exists_1 ['a] :
forall (phi:'a -> bool),
not exists (a:'a), phi a = forall (a:'a), not (phi a)
Exiting proof mode.
Goal not_exists_2 :
not exists (a:'a,b:'b), phi a b = forall (a:'a,b:'b), not (phi a b)
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
not exists (a:'a,b:'b), phi a b = forall (a:'a,b:'b), not (phi a b)
[> Line 989: (rewrite ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
not exists (a:'a,b:'b), phi a b <=> forall (a:'a,b:'b), not (phi a b)
[> Line 991: split [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
not exists (a:'a,b:'b), phi a b => forall (a:'a,b:'b), not (phi a b)
[> Line 993: (intro H a b Hp) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: a:'a,b:'b,phi:'a -> 'b -> bool
H: not exists (a:'a,b:'b), phi a b
Hp: phi a b
----------------------------------------
false
[> Line 995: (apply ... ) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: a:'a,b:'b,phi:'a -> 'b -> bool
H: not exists (a:'a,b:'b), phi a b
Hp: phi a b
----------------------------------------
exists (a:'a,b:'b), phi a b
[> Line 997: by (exists a, b) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
(forall (a:'a,b:'b), not (phi a b)) => not exists (a:'a,b:'b), phi a b
[> Line 999: (intro H [a b Hp]) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: a:'a,b:'b,phi:'a -> 'b -> bool
H: forall (a:'a,b:'b), not (phi a b)
Hp: phi a b
----------------------------------------
false
[> Line 1001: by (have ...) [goal> lemma not_exists_2 is proved
lemma [any] not_exists_2 ['a 'b] :
forall (phi:'a -> 'b -> bool),
not exists (a:'a,b:'b), phi a b = forall (a:'a,b:'b), not (phi a b)
Exiting proof mode.
axiom [any] not_forall_1 ['a] :
forall (phi:'a -> bool),
not forall (a:'a), phi a = exists (a:'a), not (phi a)
axiom [any] not_forall_2 ['a 'b] :
forall (phi:'a -> 'b -> bool),
not forall (a:'a,b:'b), phi a b = exists (a:'a,b:'b), not (phi a b)
axiom [any] try_carac_1 ['a 'b] :
forall (phi:'a -> bool,f:'a -> 'b,g:'b),
try find x:'a such that phi x in f x else g =
if (exists (x:'a), phi x) then f (choose phi) else g
Goal choose_spec :
phi x => phi (choose phi)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
----------------------------------------
phi x => phi (choose phi)
[> Line 1053: (intro H) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
phi (choose phi)
[> Line 1059: (have ...) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
phi (choose phi) = if (exists (x:'a), phi x) then phi (choose phi) else false
[> Line 1061: ?? [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
phi (choose phi) = if (exists (x:'a), phi x) then phi (choose phi) else false
[> Line 1063: ((rewrite ...);(intro //)) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
exists (x:'a), phi x
[> Line 1063: by (exists x) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
if (exists (x:'a), phi x) then phi (choose phi) else false
[> Line 1065: ?? [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
if (exists (x:'a), phi x) then phi (choose phi) else false
[> Line 1067: (rewrite ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
try find x:'a such that phi x in phi x else false
[> Line 1069: (case ...,
try find x:_ such that (phi x) in (phi x) else false)
[goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
(exists (x:'a),
phi x && try find x:'a such that phi x in phi x else false = phi x) =>
try find x:'a such that phi x in phi x else false
[> Line 1071: (auto ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
(forall (x:'a), not (phi x)) &&
try find x:'a such that phi x in phi x else false = false =>
try find x:'a such that phi x in phi x else false
[> Line 1073: ((intro [HH _]);by (have ...)) [goal> lemma choose_spec is proved
lemma [any] choose_spec ['a] :
forall (phi:'a -> bool,x:'a), phi x => phi (choose phi)
Exiting proof mode.
Goal try_choose :
phi x => try find x:'a such that phi x in f x else g = f (choose phi)
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: f:'a -> 'b,g:'b,phi:'a -> bool,x:'a
----------------------------------------
phi x => try find x:'a such that phi x in f x else g = f (choose phi)
[> Line 1091: (intro H) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: f:'a -> 'b,g:'b,phi:'a -> bool,x:'a
H: phi x
----------------------------------------
try find x:'a such that phi x in f x else g = f (choose phi)
[> Line 1093: (rewrite ...) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: f:'a -> 'b,g:'b,phi:'a -> bool,x:'a
H: phi x
----------------------------------------
if (exists (x:'a), phi x) then f (choose phi) else g = f (choose phi)
[> Line 1095: ((rewrite ...);(intro //)) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: f:'a -> 'b,g:'b,phi:'a -> bool,x:'a
H: phi x
----------------------------------------
exists (x:'a), phi x
[> Line 1097: by (exists x) [goal> lemma try_choose is proved
lemma [any] try_choose ['a 'b] :
forall (phi:'a -> bool,f:'a -> 'b,g:'b,x:'a),
phi x => try find x:'a such that phi x in f x else g = f (choose phi)
Exiting proof mode.
Goal forall_exists :
(forall (x:'a), exists (y:'b), phi x y) =
exists (y':'a -> 'b), forall (x:'a), phi x (y' x)
[goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
(forall (x:'a), exists (y:'b), phi x y) =
exists (y':'a -> 'b), forall (x:'a), phi x (y' x)
[> Line 1115: ((rewrite ...);split) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
(forall (x:'a), exists (y:'b), phi x y) =>
exists (y':'a -> 'b), forall (x:'a), phi x (y' x)
[> Line 1117: (intro H) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
H: forall (x:'a), exists (y:'b), phi x y
----------------------------------------
exists (y':'a -> 'b), forall (x:'a), phi x (y' x)
[> Line 1119: (exists (fun (x : _) => (choose (fun (y : _) => (phi x y))))) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
H: forall (x:'a), exists (y:'b), phi x y
----------------------------------------
forall (x:'a), phi x ((fun (x:'a) => choose (fun (y:'b) => phi x y)) x)
[> Line 1121: ((intro x);(simpl ...)) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool,x:'a
H: forall (x:'a), exists (y:'b), phi x y
----------------------------------------
phi x (choose (fun (y:'b) => phi x y))
[> Line 1123: (have (.. := ...)) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool,x:'a,y:'b
H: forall (x:'a), exists (y:'b), phi x y
Hy: phi x y
----------------------------------------
phi x (choose (fun (y:'b) => phi x y))
[> Line 1131: ((have ...); 1: by (auto ...)) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool,x:'a,y:'b
H: forall (x:'a), exists (y:'b), phi x y
Hy: phi x y
----------------------------------------
(fun (y:'b) => phi x y) (choose (fun (y:'b) => phi x y))
[> Line 1133: (apply ... ) [goal> Focused goal (1/2):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool,x:'a,y:'b
H: forall (x:'a), exists (y:'b), phi x y
Hy: phi x y
----------------------------------------
(fun (y:'b) => phi x y) y
[> Line 1135: ((simpl ...);assumption) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool
----------------------------------------
(exists (y':'a -> 'b), forall (x:'a), phi x (y' x)) =>
forall (x:'a), exists (y:'b), phi x y
[> Line 1137: (intro [y' H] x) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool,x:'a,y':'a -> 'b
H: forall (x:'a), phi x (y' x)
----------------------------------------
exists (y:'b), phi x y
[> Line 1139: (exists (y' x)) [goal> Focused goal (1/1):
System: any
Type variables: 'a, 'b
Variables: phi:'a -> 'b -> bool,x:'a,y':'a -> 'b
H: forall (x:'a), phi x (y' x)
----------------------------------------
phi x (y' x)
[> Line 1141: by (apply ... ) [goal> lemma forall_exists is proved
lemma [any] forall_exists ['a 'b] :
forall (phi:'a -> 'b -> bool),
(forall (x:'a), exists (y:'b), phi x y) =
exists (y':'a -> 'b), forall (x:'a), phi x (y' x)
Exiting proof mode.
Goal implies_exists :
(phi => exists (j:'a), psi j) = exists (x:'a), phi => psi x
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:bool,psi:'a -> bool
----------------------------------------
(phi => exists (j:'a), psi j) = exists (x:'a), phi => psi x
[> Line 1155: ((rewrite ...);split) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
----------------------------------------
(phi => exists (j:'a), psi j) => exists (x:'a), phi => psi x
[> Line 1157: (intro H) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
H: phi => exists (j:'a), psi j
----------------------------------------
exists (x:'a), phi => psi x
[> Line 1159: (case ..., phi) [goal> Focused goal (1/3):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
H: phi => exists (j:'a), psi j
----------------------------------------
phi => exists (x:'a), true => psi x
[> Line 1161: (intro phi) [goal> Focused goal (1/3):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
H: phi => exists (j:'a), psi j
phi: phi
----------------------------------------
exists (x:'a), true => psi x
[> Line 1163: ((have ...); 1: by (apply ... )) [goal> Focused goal (1/3):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool,x:'a
H: phi => exists (j:'a), psi j
_: psi x
phi: phi
----------------------------------------
exists (x:'a), true => psi x
[> Line 1165: by (exists x) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
H: phi => exists (j:'a), psi j
----------------------------------------
not phi => exists (x:'a), false => psi x
[> Line 1167: (intro _) [goal> Focused goal (1/2):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
H: phi => exists (j:'a), psi j
_: not phi
----------------------------------------
exists (x:'a), false => psi x
[> Line 1169: by (exists (choose (fun (_x : _) => false))) [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
----------------------------------------
(exists (x:'a), phi => psi x) => phi => exists (j:'a), psi j
[> Line 1171: (intro [x H] H') [goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool,x:'a
H: phi => psi x
H': phi
----------------------------------------
exists (j:'a), psi j
[> Line 1173: by (exists x) [goal> lemma implies_exists is proved
lemma [any] implies_exists ['a] :
forall (phi:bool,psi:'a -> bool),
(phi => exists (j:'a), psi j) = exists (x:'a), phi => psi x
Exiting proof mode.
axiom [any] le_trans ['a] : forall (x,y,z:'a), x <= y => y <= z => x <= z
axiom [any] lt_trans ['a] : forall (x,y,z:'a), x < y => y < z => x < z
axiom [any] lt_le_trans ['a] : forall (x,y,z:'a), x < y => y <= z => x < z
axiom [any] le_lt_trans ['a] : forall (x,y,z:'a), x <= y => y < z => x < z
axiom [any] lt_charac ['a] : forall (x,y:'a), x < y <=> x <> y && x <= y
axiom [any] le_not_lt_impl_eq ['a] :
forall (x,y:'a), x <= y => not (x < y) => x = y
Goal lt_impl_le :
x < y => x <= y
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x,y:'a
----------------------------------------
x < y => x <= y
[> Line 1205: by (rewrite ...) [goal> lemma lt_impl_le is proved
lemma [any] lt_impl_le ['a] : forall (x,y:'a), x < y => x <= y
Exiting proof mode.
Goal not_lt_refl :
not (x < x)
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x:'a
----------------------------------------
not (x < x)
[> Line 1211: (auto ...) [goal> lemma not_lt_refl is proved
lemma [any] not_lt_refl ['a] : forall (x:'a), not (x < x)
Exiting proof mode.
Goal lt_irrefl :
x < x <=> false
[goal> Focused goal (1/1):
System: any
Type variables: 'a
Variables: x:'a
----------------------------------------
x < x <=> false
[> Line 1217: (auto ...) [goal> lemma lt_irrefl is proved
lemma [any] lt_irrefl ['a] : forall (x:'a), x < x <=> false
Exiting proof mode.
axiom [any] le_impl_eq_lt ['a] : forall (x,y:'a), x <= y => x = y || x < y
axiom [any] le_refl_index : forall (x:index), x <= x
Goal le_refl_index_eq :
x <= x = true
[goal> Focused goal (1/1):
System: any
Variables: x:index
----------------------------------------
x <= x = true
[> Line 1241: by (rewrite ...) [goal> lemma le_refl_index_eq is proved
lemma [any] le_refl_index_eq : forall (x:index), x <= x = true
Exiting proof mode.
Goal le_pred_lt :
t <= pred t' = t < t'
[goal> Focused goal (1/1):
System: any
Variables: t,t':timestamp
----------------------------------------
t <= pred t' = t < t'
[> Line 1251: by (rewrite ...) [goal> lemma le_pred_lt is proved
lemma [any] le_pred_lt : forall (t,t':timestamp), t <= pred t' = t < t'
Exiting proof mode.
Goal neq_le_pred_le :
t <> t' => t <= t' = t <= pred t'
[goal> Focused goal (1/1):
System: any
Variables: t,t':timestamp
----------------------------------------
t <> t' => t <= t' = t <= pred t'
[> Line 1259: by (rewrite ...) [goal> lemma neq_le_pred_le is proved
lemma [any] neq_le_pred_le :
forall (t,t':timestamp), t <> t' => t <= t' = t <= pred t'
Exiting proof mode.
axiom [any] le_lt ['a] : forall (x,x':'a), x <> x' => x <= x' = x < x'
axiom [any] empty_set_is_empty : forall (x:message), not (mem x empty_set)
[warning>Loaded "Basic.sp".
<]
(* Assume a binary function h, which we will use a a keyed hash function,
assuming PRF and EUF (which is actually implied by PRF).
Note that we don't need to declare kty as as large type, but the
crypto assumptions on h imply that kty is large -- otherwise
the attacker could brute force the crypto games. *)
type kty.
abstract h : message * kty -> message.
game PRF = {
rnd key : kty;
var lhash = empty_set; (* Log for ohash queries. *)
var lchal = empty_set; (* Log for challenge queries. *)
oracle ohash x = {
lhash := add x lhash;
return if mem x lchal then zero else h(x,key)
}
oracle challenge x = {
rnd r : message;
var old_lchal = lchal;
lchal := add x lchal;
return if mem x old_lchal || mem x lhash then zero else diff(r, h(x,key))
}
}.
game PRF = {
rnd key : kty;
var lhash : mset = empty_set; var lchal : mset = empty_set;
oracle ohash (x:message) : message = {
lhash := add x lhash; return if mem x lchal then zero else h (x, key)
}
oracle challenge (x:message) : message = {
rnd r : message;
var old_lchal : mset = lchal;
lchal := add x lchal;
return if (mem x old_lchal || mem x lhash) then zero
else diff(r, h (x, key))
}
}
game EUF = {
rnd key : kty;
var l = empty_set;
oracle ohash x = {
l := add x l;
return h(x,key)
}
(* Verify a signature without adding it to the log [l]. *)
oracle verify s m = {
return s = h(m,key)
}
oracle challenge s m = {
return
if not (mem m l)
then diff(s <> h (m,key), true)
else true
}
}.
game EUF = {
rnd key : kty;
var l : mset = empty_set;
oracle ohash (x:message) : message = { l := add x l; return h (x, key)}
oracle verify (s,m:message) : bool = { return s = h (m, key)}
oracle challenge (s,m:message) : bool = {
return if not (mem m l) then diff(s <> h (m, key), true) else true
}
}
(* --------------------------------------------------------- *)
(* Model of Basic Hash protocol as a bi-system,
with the real protocol on the left and an ideal protocol where
each agent plays a single session on the right. *)
abstract ok : message
abstract ko : message.
name key : index -> kty
name key' : index * index -> kty
channel cT
channel cR.
process tag(i:index,k:index) =
new nT;
out(cT, <nT, h(nT,diff(key(i),key'(i,k)))>).
process tag (i,k:index) =
new nT : message; out(cT,<nT,h (nT, diff(key i, key' (i, k)))>); null
process reader(j:index) =
in(cT,x);
if exists (i,k:index), snd(x) = h(fst(x),diff(key(i),key'(i,k))) then
out(cR,ok)
else
out(cR,ko).
process reader (j:index) =
in(cT,x);
if exists (i,k:index), snd x = h (fst x, diff(key i, key' (i, k))) then
out(cR,ok); null
else
out(cR,ko); null
system [BasicHash] ((!_j R: reader(j)) | (!_i !_k T: tag(i,k))).
Typed-check process:
( !_j( R: reader j) ) | !_i( !_k( T: tag i k))
global axiom [any] namelength_nT :
[forall (i:index * index), len (nT i) = namelength_message]
Added action dependencies lemmas:
axiom [BasicHash] mutex_BasicHash_R1_R :
forall (j:index), not happens(R1(j)) || not happens(R(j))
axiom [BasicHash] mutex_BasicHash_R_R1 :
forall (j:index), not happens(R(j)) || not happens(R1(j))
axiom [BasicHash] depends_BasicHash_init_T :
forall (t:timestamp,i,k:index), t = T(i, k) => happens(t) => init < T(i, k)
axiom [BasicHash] depends_BasicHash_init_R1 :
forall (t:timestamp,j:index), t = R1(j) => happens(t) => init < R1(j)
axiom [BasicHash] depends_BasicHash_init_R :
forall (t:timestamp,j:index), t = R(j) => happens(t) => init < R(j)
System after processing:
( !_j(
in(cT,x);
if exists (i,k:index), snd x = h (fst x, diff(key i, key' (i, k))) then
R: out(cR,ok); null
else
R1: out(cR,ko); null) ) |
!_i(
!_k(
T: out(cT,<nT (i, k),h (nT (i, k), diff(key i, key' (i, k)))>); null))
System BasicHash registered with actions (init,R,R1,T).
System Empty registered with actions (init).
(* --------------------------------------------------------- *)
(* Technical lemmas to prepare the use of EUF to prove well-authentication on the left *)
lemma [BasicHash/left,BasicHash/left] wa_rewrite_left (tau:timestamp,i:index) :
((forall k, T(i,k) <= tau => fst(input@tau) <> nT(i,k)) =>
diff(snd(input@tau) <> h(fst(input@tau), key i),true))
=
diff((forall k, T(i,k) <= tau => fst(input@tau) <> nT(i,k)) =>
snd(input@tau) <> h(fst(input@tau), key i),
true).
Goal wa_rewrite_left :
((forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key i), true)) =
diff(
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key i), true)
Proof.
[goal> Focused goal (1/1):
System: left:BasicHash/left, right:BasicHash/left
Variables: i:index,tau:timestamp
----------------------------------------
((forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key i), true)) =
diff(
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key i), true)
by project; simpl.
[> Line 183: by (project;(simpl ...)) [goal> lemma wa_rewrite_left is proved
Qed.
lemma [left:BasicHash/left, right:BasicHash/left] wa_rewrite_left :
forall (tau:timestamp,i:index),
((forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key i), true)) =
diff(
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key i), true)
Exiting proof mode.
global lemma [BasicHash/left,BasicHash/left] wa_equiv_left (tau:timestamp[const],i:index[const]) :
[happens(tau)] ->
equiv(frame@tau,
diff(
snd(input@tau) = h(fst(input@tau), key i) =>
exists k, T(i,k) <= tau && fst(input@tau) = nT(i,k),
true)).
Goal wa_equiv_left :
forall i:index[const, glob],tau:timestamp[const, glob],
[happens(tau)] ->
equiv(frame@tau,
diff(
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k),
true))
Proof.
[goal> Focused goal (1/1):
Systems: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i:index[const, glob],tau:timestamp[const, glob]
----------------------------------------
[happens(tau)] ->
equiv(frame@tau,
diff(
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k),
true))
intro H.
[> Line 205: (intro H) [goal> Focused goal (1/1):
Systems: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
0: frame@tau
1: diff(
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k),
true)
rewrite impl_contra not_exists_1 /= not_and -impl_charac not_eq.
[> Line 207: (rewrite ... ... /= ... ... ...) [goal> Focused goal (1/1):
Systems: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
0: frame@tau
1: diff(
(forall (a:index), T(i, a) <= tau => fst (input@tau) <> nT (i, a)) =>
snd (input@tau) <> h (fst (input@tau), key i), true)
rewrite -wa_rewrite_left.
[> Line 209: (rewrite ...) [goal> Focused goal (1/1):
Systems: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
0: frame@tau
1: (forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key i), true)
crypto EUF (key : key i) => //.
[> Line 211: ((crypto ...);(intro //)) Direct bi-deduction sub-goal (assuming recursive calls are bi-deducible):
{ input@t0 | ∀ t0 : pred t0 <= tau },
{ output@t0 | ∀ t0 : t0 <= tau && exec@t0 },
{ exec@t0 | ∀ t0 : t0 <= tau }, { frame@t0 | ∀ t0 : t0 <= tau },
{ frame@tau | true }, { input@tau | ∀ k0 : T(i, k0) <= tau },
{ input@tau |
forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k) },
▷
(frame@tau,
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key i), true))
Bi-deduction sub-goals for recursive calls:
i0,k:index : ∅ ▷ { true | T(i0, k) <= tau }
i0,k:index :
∅
▷
{ <nT (i0, k),h (nT (i0, k), key i0)> | T(i0, k) <= tau }
j:index :
{ input@t0 | ∀ t0,k,i : pred t0 <= pred (R1(j)) && R1(j) <= tau },
{ output@t0 |
∀ t0,k,i : (t0 <= pred (R1(j)) && exec@t0) && R1(j) <= tau },
{ exec@t0 | ∀ t0,k,i : t0 <= pred (R1(j)) && R1(j) <= tau },
{ frame@t0 | ∀ t0,k,i : t0 <= pred (R1(j)) && R1(j) <= tau },
{ frame@pred (R1(j)) | ∀ k,i : R1(j) <= tau },
▷
{ not
exists (i,k:index),
snd (att (frame@pred (R1(j)))) =
h (fst (att (frame@pred (R1(j)))), key i) | R1(j) <= tau }
j:index : ∅ ▷ { ko | R1(j) <= tau }
j:index :
{ input@t0 | ∀ t0,k,i : pred t0 <= pred (R(j)) && R(j) <= tau },
{ output@t0 | ∀ t0,k,i : (t0 <= pred (R(j)) && exec@t0) && R(j) <= tau },
{ exec@t0 | ∀ t0,k,i : t0 <= pred (R(j)) && R(j) <= tau },
{ frame@t0 | ∀ t0,k,i : t0 <= pred (R(j)) && R(j) <= tau },
{ frame@pred (R(j)) | ∀ k,i : R(j) <= tau },
▷
{ exists (i,k:index),
snd (att (frame@pred (R(j)))) =
h (fst (att (frame@pred (R(j)))), key i) | R(j) <= tau }
j:index : ∅ ▷ { ok | R(j) <= tau }
∅ ▷ { true | init <= tau }
∅ ▷ { empty | init <= tau }
Constraints are:
{ nT (i, k0), A |
∀ k0 :
((forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
T(i, k0) <= tau) &&
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k) }
{ nT (i, k0), A | ∀ k0 : T(i, k0) <= tau }
{ key i0, A | ∀ i0,j0 : not (i0 = i) && not (i0 = i) && R(j0) <= tau }
{ key i0, A | ∀ i0,j0 : not (i0 = i) && not (i0 = i) && R1(j0) <= tau }
{ key i0, A | ∀ i0,k0 : not (i0 = i) && T(i0, k0) <= tau }
{ nT (i0, k0), A | ∀ i0,k0 : T(i0, k0) <= tau }
{ key i, Gkey }
Constraints subgoals are:
forall (i0,j:index), not (i0 = i) && not (i0 = i) && R(j) <= tau => i0 <> i
forall (i0,j:index),
not (i0 = i) && not (i0 = i) && R1(j) <= tau => i0 <> i
forall (i0,k:index), not (i0 = i) && T(i0, k) <= tau => i0 <> i
Oracle subgoals are:
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
forall (k:index),
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
T(i, k) <= tau => fst (input@tau) <> nT (i, k)
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
forall (j:index),
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
not (i = i) && R1(j) <= tau =>
fst (input@tau) <> fst (att (frame@pred (R1(j))))
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
forall (j:index),
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
not (i = i) && R(j) <= tau =>
fst (input@tau) <> fst (att (frame@pred (R(j))))
Final memory is:
{l -> [{ fst (att (frame@pred (R(j0)))) |
∀ j0 : not (i = i) && R(j0) <= tau },
{ fst (att (frame@pred (R1(j0)))) |
∀ j0 : not (i = i) && R1(j0) <= tau },
{ nT (i, k0) | ∀ k0 : T(i, k0) <= tau } ] }
[goal> Focused goal (1/1):
System: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
forall (k:index),
(forall (k:index), T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
T(i, k) <= tau => fst (input@tau) <> nT (i, k)
intro _ j [HH _]; by apply HH.
[> Line 213: ((intro _ j [HH _]);by (apply ... )) [goal> lemma wa_equiv_left is proved
Qed.
global lemma [left:BasicHash/left, right:BasicHash/left
(same for equivalences)] wa_equiv_left :
Forall (tau:timestamp[const, glob],i:index[const, glob]),
[happens(tau)] ->
equiv(frame@tau,
diff(
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k),
true))
Exiting proof mode.
lemma [BasicHash/left,BasicHash/left] wa_left (tau:timestamp[const],i:index[const]) :
happens(tau) =>
snd(input@tau) = h(fst(input@tau), key i) =>
exists k, T(i,k) <= tau && fst(input@tau) = nT(i,k).
Goal wa_left :
happens(tau) =>
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k)
Proof.
[goal> Focused goal (1/1):
System: left:BasicHash/left, right:BasicHash/left
Variables: i:index[const],tau:timestamp[const]
----------------------------------------
happens(tau) =>
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k)
intro H.
[> Line 229: (intro H) [goal> Focused goal (1/1):
System: left:BasicHash/left, right:BasicHash/left
Variables: i:index[const],tau:timestamp[const]
H: happens(tau)
----------------------------------------
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k)
by rewrite equiv wa_equiv_left tau i.
[> Line 231: by (rewrite equiv ...) [goal> lemma wa_left is proved
Qed.
global lemma [left:BasicHash/left, right:BasicHash/left] wa_left :
Forall (tau:timestamp[const],i:index[const]),
[happens(tau) =>
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k)]
Exiting proof mode.
(* Similar lemmas on the right *)
lemma [BasicHash/right,BasicHash/right] wa_rewrite_right (tau:timestamp,i,k:index) :
diff((T(i,k) <= tau => fst(input@tau) <> nT(i,k)) =>
snd(input@tau) <> h(fst(input@tau), key'(i,k)),
true)
=
((T(i,k) <= tau => fst(input@tau) <> nT(i,k)) =>
diff(snd(input@tau) <> h(fst(input@tau), key'(i,k)),
true)).
Goal wa_rewrite_right :
diff(
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key' (i, k)), true) =
((T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key' (i, k)), true))
Proof.
[goal> Focused goal (1/1):
System: left:BasicHash/right, right:BasicHash/right
Variables: i,k:index,tau:timestamp
----------------------------------------
diff(
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key' (i, k)), true) =
((T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key' (i, k)), true))
by project.
[> Line 259: by project [goal> lemma wa_rewrite_right is proved
Qed.
lemma [left:BasicHash/right, right:BasicHash/right] wa_rewrite_right :
forall (tau:timestamp,i,k:index),
diff(
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key' (i, k)), true) =
((T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key' (i, k)), true))
Exiting proof mode.
global lemma [BasicHash/right,BasicHash/right] wa_equiv_right (tau:timestamp[const],i,k:index[const]) :
[happens(tau)] ->
equiv(frame@tau,
diff(snd(input@tau) = h(fst(input@tau), key'(i,k)) =>
T(i,k) <= tau && fst(input@tau) = nT(i,k),
true)).
Goal wa_equiv_right :
forall i,k:index[const, glob],tau:timestamp[const, glob],
[happens(tau)] ->
equiv(frame@tau,
diff(
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k), true))
Proof.
[goal> Focused goal (1/1):
Systems: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob],tau:timestamp[const, glob]
----------------------------------------
[happens(tau)] ->
equiv(frame@tau,
diff(
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k), true))
intro H.
[> Line 279: (intro H) [goal> Focused goal (1/1):
Systems: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
0: frame@tau
1: diff(
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k), true)
rewrite impl_contra not_and -impl_charac /=.
[> Line 281: (rewrite ... ... ... /=) [goal> Focused goal (1/1):
Systems: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
0: frame@tau
1: diff(
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
snd (input@tau) <> h (fst (input@tau), key' (i, k)), true)
rewrite wa_rewrite_right.
[> Line 283: (rewrite ...) [goal> Focused goal (1/1):
Systems: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob],tau:timestamp[const, glob]
H: [happens(tau)]
----------------------------------------
0: frame@tau
1: (T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key' (i, k)), true)
crypto EUF (key : key'(i,k)) => //.
[> Line 285: ((crypto ...);(intro //)) Direct bi-deduction sub-goal (assuming recursive calls are bi-deducible):
{ input@t0 | ∀ t0 : pred t0 <= tau },
{ output@t0 | ∀ t0 : t0 <= tau && exec@t0 },
{ exec@t0 | ∀ t0 : t0 <= tau }, { frame@t0 | ∀ t0 : t0 <= tau },
{ frame@tau | true }, { input@tau | T(i, k) <= tau },
{ input@tau | T(i, k) <= tau => fst (input@tau) <> nT (i, k) },
▷
(frame@tau,
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
diff(snd (input@tau) <> h (fst (input@tau), key' (i, k)), true))
Bi-deduction sub-goals for recursive calls:
i0,k0:index : ∅ ▷ { true | T(i0, k0) <= tau }
i0,k0:index :
∅
▷
{ <nT (i0, k0),h (nT (i0, k0), key' (i0, k0))> | T(i0, k0) <= tau }
j:index :
{ input@t0 | ∀ t0,k,i : pred t0 <= pred (R1(j)) && R1(j) <= tau },
{ output@t0 |
∀ t0,k,i : (t0 <= pred (R1(j)) && exec@t0) && R1(j) <= tau },
{ exec@t0 | ∀ t0,k,i : t0 <= pred (R1(j)) && R1(j) <= tau },
{ frame@t0 | ∀ t0,k,i : t0 <= pred (R1(j)) && R1(j) <= tau },
{ frame@pred (R1(j)) | ∀ k,i : R1(j) <= tau },
▷
{ not
exists (i,k:index),
snd (att (frame@pred (R1(j)))) =
h (fst (att (frame@pred (R1(j)))), key' (i, k)) | R1(j) <= tau }
j:index : ∅ ▷ { ko | R1(j) <= tau }
j:index :
{ input@t0 | ∀ t0,k,i : pred t0 <= pred (R(j)) && R(j) <= tau },
{ output@t0 | ∀ t0,k,i : (t0 <= pred (R(j)) && exec@t0) && R(j) <= tau },
{ exec@t0 | ∀ t0,k,i : t0 <= pred (R(j)) && R(j) <= tau },
{ frame@t0 | ∀ t0,k,i : t0 <= pred (R(j)) && R(j) <= tau },
{ frame@pred (R(j)) | ∀ k,i : R(j) <= tau },
▷
{ exists (i,k:index),
snd (att (frame@pred (R(j)))) =
h (fst (att (frame@pred (R(j)))), key' (i, k)) | R(j) <= tau }
j:index : ∅ ▷ { ok | R(j) <= tau }
∅ ▷ { true | init <= tau }
∅ ▷ { empty | init <= tau }
Constraints are:
{ nT (i, k), A | T(i, k) <= tau }
{ key' (i0, k0), A |
∀ i0,j0,k0 :
not (i0 = i && k0 = k) && not (i0 = i && k0 = k) && R(j0) <= tau }
{ key' (i0, k0), A |
∀ i0,j0,k0 :
not (i0 = i && k0 = k) && not (i0 = i && k0 = k) && R1(j0) <= tau }
{ key' (i0, k0), A |
∀ i0,k0 : not (i0 = i && k0 = k) && T(i0, k0) <= tau }
{ nT (i0, k0), A | ∀ i0,k0 : T(i0, k0) <= tau }
{ key' (i, k), Gkey }
Constraints subgoals are:
forall (i0,j,k0:index),
not (i0 = i && k0 = k) && not (i0 = i && k0 = k) && R(j) <= tau =>
(i0, k0) <> (i, k)
forall (i0,j,k0:index),
not (i0 = i && k0 = k) && not (i0 = i && k0 = k) && R1(j) <= tau =>
(i0, k0) <> (i, k)
forall (i0,k0:index),
not (i0 = i && k0 = k) && T(i0, k0) <= tau => (i0, k0) <> (i, k)
Oracle subgoals are:
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) && T(i, k) <= tau =>
fst (input@tau) <> nT (i, k)
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
forall (j:index),
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
not (i = i && k = k) && R1(j) <= tau =>
fst (input@tau) <> fst (att (frame@pred (R1(j))))
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) =>
forall (j:index),
(T(i, k) <= tau => fst (input@tau) <> nT (i, k)) &&
not (i = i && k = k) && R(j) <= tau =>
fst (input@tau) <> fst (att (frame@pred (R(j))))
Final memory is:
{l -> [{ fst (att (frame@pred (R(j0)))) |
∀ j0 : not (i = i && k = k) && R(j0) <= tau },
{ fst (att (frame@pred (R1(j0)))) |
∀ j0 : not (i = i && k = k) && R1(j0) <= tau },
{ nT (i, k) | T(i, k) <= tau } ] }
[goal> lemma wa_equiv_right is proved
Qed.
global lemma [left:BasicHash/right, right:BasicHash/right
(same for equivalences)] wa_equiv_right :
Forall (tau:timestamp[const, glob],i,k:index[const, glob]),
[happens(tau)] ->
equiv(frame@tau,
diff(
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k), true))
Exiting proof mode.
lemma [BasicHash/right,BasicHash/right] wa_right (tau:timestamp[const],i,k:index[const]) :
happens(tau) =>
snd(input@tau) = h(fst(input@tau), key'(i,k)) => (T(i,k) <= tau && fst(input@tau) = nT(i,k)).
Goal wa_right :
happens(tau) =>
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k)
Proof.
[goal> Focused goal (1/1):
System: left:BasicHash/right, right:BasicHash/right
Variables: i,k:index[const],tau:timestamp[const]
----------------------------------------
happens(tau) =>
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k)
intro H.
[> Line 299: (intro H) [goal> Focused goal (1/1):
System: left:BasicHash/right, right:BasicHash/right
Variables: i,k:index[const],tau:timestamp[const]
H: happens(tau)
----------------------------------------
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k)
by rewrite equiv wa_equiv_right tau i k.
[> Line 301: by (rewrite equiv ...) [goal> lemma wa_right is proved
Qed.
global lemma [left:BasicHash/right, right:BasicHash/right] wa_right :
Forall (tau:timestamp[const],i,k:index[const]),
[happens(tau) =>
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k)]
Exiting proof mode.
(* Well-authentication property for action R *)
lemma [BasicHash] wa_R :
forall (tau:timestamp),
happens(tau) =>
((exists (i,k:index),
snd(input@tau) = h(fst(input@tau),diff(key(i),key'(i,k))))
<=>
(exists (i,k:index), T(i,k) <= tau &&
fst(output@T(i,k)) = fst(input@tau) &&
snd(output@T(i,k)) = snd(input@tau))).
Goal wa_R :
forall (tau:timestamp),
happens(tau) =>
(exists (i,k:index),
snd (input@tau) = h (fst (input@tau), diff(key i, key' (i, k)))) <=>
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
Proof.
[goal> Focused goal (1/1):
System: BasicHash
----------------------------------------
forall (tau:timestamp),
happens(tau) =>
(exists (i,k:index),
snd (input@tau) = h (fst (input@tau), diff(key i, key' (i, k)))) <=>
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
intro tau Hap.
[> Line 331: (intro tau Hap) [goal> Focused goal (1/1):
System: BasicHash
Variables: tau:timestamp[const]
Hap: happens(tau)
----------------------------------------
(exists (i,k:index),
snd (input@tau) = h (fst (input@tau), diff(key i, key' (i, k)))) <=>
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
split; intro [i k Meq].
[> Line 333: (split;(intro [i k Meq])) [goal> Focused goal (1/2):
System: BasicHash
Variables: i,k:index[const],tau:timestamp[const]
Hap: happens(tau)
Meq: snd (input@tau) = h (fst (input@tau), diff(key i, key' (i, k)))
----------------------------------------
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
+ project.
[> Line 335: project [goal> Focused goal (1/3):
System: left:BasicHash/left
Variables: i,k:index[const],tau:timestamp[const]
Hap: happens(tau)
Meq: snd (input@tau) = h (fst (input@tau), key i)
----------------------------------------
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
++ (* LEFT *)
have [k' [_ _]] := wa_left tau i Hap Meq.
[> Line 339: (have (.. := ...)) [warning>Proof-term argument
happens(tau)
system : left:BasicHash/left
vars:
is local, while the proof-term it is applied into is global
[happens(tau) =>
snd (input@tau) = h (fst (input@tau), key i) =>
exists (k:index), T(i, k) <= tau && fst (input@tau) = nT (i, k)]
system : left:BasicHash/left, right:BasicHash/left
vars:
The latter proof-term has been downgraded to a local proof-term.
<][goal> Focused goal (1/3):
System: left:BasicHash/left
Variables: i,k,k':index[const],tau:timestamp[const]
Hap: happens(tau)
Meq: snd (input@tau) = h (fst (input@tau), key i)
_: fst (input@tau) = nT (i, k')
_: T(i, k') <= tau
----------------------------------------
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
by exists i, k'.
[> Line 341: by (exists i, k') [goal> Focused goal (1/2):
System: right:BasicHash/right
Variables: i,k:index[const],tau:timestamp[const]
Hap: happens(tau)
Meq: snd (input@tau) = h (fst (input@tau), key' (i, k))
----------------------------------------
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
++ (* RIGHT *)
have [_ _] := wa_right tau i k Hap Meq.
[> Line 345: (have (.. := ...)) [warning>Proof-term argument
happens(tau)
system : right:BasicHash/right
vars:
is local, while the proof-term it is applied into is global
[happens(tau) =>
snd (input@tau) = h (fst (input@tau), key' (i, k)) =>
T(i, k) <= tau && fst (input@tau) = nT (i, k)]
system : left:BasicHash/right, right:BasicHash/right
vars:
The latter proof-term has been downgraded to a local proof-term.
<][goal> Focused goal (1/2):
System: right:BasicHash/right
Variables: i,k:index[const],tau:timestamp[const]
Hap: happens(tau)
Meq: snd (input@tau) = h (fst (input@tau), key' (i, k))
_: fst (input@tau) = nT (i, k)
_: T(i, k) <= tau
----------------------------------------
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
by exists i,k.
[> Line 347: by (exists i, k) [goal> Focused goal (1/1):
System: BasicHash
Variables: i,k:index[const],tau:timestamp[const]
Hap: happens(tau)
Meq: T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
----------------------------------------
exists (i,k:index),
snd (input@tau) = h (fst (input@tau), diff(key i, key' (i, k)))
+ by exists i,k.
[> Line 349: by (exists i, k) [goal> lemma wa_R is proved
Qed.
lemma [BasicHash] wa_R :
forall (tau:timestamp),
happens(tau) =>
(exists (i,k:index),
snd (input@tau) = h (fst (input@tau), diff(key i, key' (i, k)))) <=>
exists (i,k:index),
T(i, k) <= tau &&
fst (output@T(i, k)) = fst (input@tau) &&
snd (output@T(i, k)) = snd (input@tau)
Exiting proof mode.
(* Unlinkability *)
name dummy : index -> message.
global axiom [any] namelength_dummy :
[forall (i:index), len (dummy i) = namelength_message]
name dummy' : index*index -> message.
global axiom [any] namelength_dummy' :
[forall (i:index * index), len (dummy' i) = namelength_message]
global lemma [BasicHash] unlinkability :
Forall (tau:timestamp[const]), [happens(tau)] -> equiv(frame@tau).
Goal unlinkability :
Forall (tau:timestamp[const, glob]), [happens(tau)] -> equiv(frame@tau)
Proof.
[goal> Focused goal (1/1):
Systems: BasicHash (same for equivalences)
----------------------------------------
Forall (tau:timestamp[const, glob]), [happens(tau)] -> equiv(frame@tau)
intro t Hap.
[> Line 371: (intro t Hap) [goal> Focused goal (1/1):
Systems: BasicHash (same for equivalences)
Variables: t:timestamp[const, glob]
Hap: [happens(t)]
----------------------------------------
0: frame@t
induction t; 1: auto.
[> Line 371: ((induction t); 1: (auto ...)) [goal> Focused goal (1/3):
Systems: BasicHash (same for equivalences)
Variables: j:index[const, glob]
Hap: [happens(R(j))]
IH: equiv(frame@pred (R(j)))
----------------------------------------
0: frame@R(j)
+ rewrite /frame /exec /output; fa !<_,_>.
[> Line 373: ((rewrite ... ... ...);(fa !(pair _ _))) [goal> Focused goal (1/3):
Systems: BasicHash (same for equivalences)
Variables: j:index[const, glob]
Hap: [happens(R(j))]
IH: equiv(frame@pred (R(j)))
----------------------------------------
0: frame@pred (R(j))
1: exec@pred (R(j)) && cond@R(j)
rewrite /cond (wa_R (R j)) //.
[> Line 375: (rewrite ... ... //) [goal> Focused goal (1/3):
Systems: BasicHash (same for equivalences)
Variables: j:index[const, glob]
Hap: [happens(R(j))]
IH: equiv(frame@pred (R(j)))
----------------------------------------
0: frame@pred (R(j))
1: exec@pred (R(j)) &&
exists (i,k:index),
T(i, k) <= R(j) &&
fst (output@T(i, k)) = fst (input@R(j)) &&
snd (output@T(i, k)) = snd (input@R(j))
by deduce 1.
[> Line 377: by (deduce 1) [goal> Focused goal (1/2):
Systems: BasicHash (same for equivalences)
Variables: j:index[const, glob]
Hap: [happens(R1(j))]
IH: equiv(frame@pred (R1(j)))
----------------------------------------
0: frame@R1(j)
+ rewrite /frame /exec /output; fa !<_,_>.
[> Line 379: ((rewrite ... ... ...);(fa !(pair _ _))) [goal> Focused goal (1/2):
Systems: BasicHash (same for equivalences)
Variables: j:index[const, glob]
Hap: [happens(R1(j))]
IH: equiv(frame@pred (R1(j)))
----------------------------------------
0: frame@pred (R1(j))
1: exec@pred (R1(j)) && cond@R1(j)
rewrite /cond (wa_R (R1 j)) //.
[> Line 381: (rewrite ... ... //) [goal> Focused goal (1/2):
Systems: BasicHash (same for equivalences)
Variables: j:index[const, glob]
Hap: [happens(R1(j))]
IH: equiv(frame@pred (R1(j)))
----------------------------------------
0: frame@pred (R1(j))
1: exec@pred (R1(j)) &&
not
exists (i,k:index),
T(i, k) <= R1(j) &&
fst (output@T(i, k)) = fst (input@R1(j)) &&
snd (output@T(i, k)) = snd (input@R1(j))
by deduce 1.
[> Line 383: by (deduce 1) [goal> Focused goal (1/1):
Systems: BasicHash (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
IH: equiv(frame@pred (T(i, k)))
----------------------------------------
0: frame@T(i, k)
+ rewrite /frame /exec /cond /output.
[> Line 385: (rewrite ... ... ... ...) [goal> Focused goal (1/1):
Systems: BasicHash (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
IH: equiv(frame@pred (T(i, k)))
----------------------------------------
0: <frame@pred (T(i, k)),
<of_bool (exec@pred (T(i, k)) && true),
if (exec@pred (T(i, k)) && true) then
<nT (i, k),h (nT (i, k), diff(key i, key' (i, k)))>>>
fa !<_,_>, if _ then _, <_,_>.
[> Line 387: (fa !(pair _ _) (if _ _ zero) (pair _ _)) [goal> Focused goal (1/1):
Systems: BasicHash (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
IH: equiv(frame@pred (T(i, k)))
----------------------------------------
0: frame@pred (T(i, k))
1: nT (i, k)
2: h (nT (i, k), diff(key i, key' (i, k)))
(* Interesting case: using PRF to get rid of hashed output.
We actually have to use PRF on each side, hence we start
by a transitivity step. *)
trans 2 : dummy'(i,k); 1: sym; trans 2 : dummy(i).
[> Line 395: ((trans ...); 1: (sym;(trans ...))) [goal> Focused goal (1/3):
Systems: BasicHash (equivalences: left:BasicHash/right, right:BasicHash/left)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
IH: equiv(frame@pred (T(i, k)))
----------------------------------------
0: frame@pred (T(i, k))
1: nT (i, k)
2: diff(dummy' (i, k), dummy i)
* fresh 2; 1:auto.
[> Line 397: ((fresh ...); 1: (auto ...)) Freshness on the left side:
Freshness on the right side:
[goal> Focused goal (1/3):
Systems: BasicHash (equivalences: left:BasicHash/right, right:BasicHash/left)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
IH: equiv(frame@pred (T(i, k)))
----------------------------------------
0: frame@pred (T(i, k))
1: nT (i, k)
fresh 1; 1:auto.
[> Line 399: ((fresh ...); 1: (auto ...)) Freshness on the left side:
Indirect occurrences of nT((i, k)) in other actions:
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key' (i, k))>
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key' (i, k))>
Total: 2 occurrences
1 of them is subsumed by another
1 occurrence remaining
Freshness on the right side:
Indirect occurrences of nT((i, k)) in other actions:
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key i)>
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key i)>
Total: 2 occurrences
1 of them is subsumed by another
1 occurrence remaining
[goal> Focused goal (1/3):
Systems: BasicHash (equivalences: left:BasicHash/right, right:BasicHash/left)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
IH: equiv(frame@pred (T(i, k)))
----------------------------------------
0: frame@pred (T(i, k))
by apply IH.
[> Line 401: by (apply ... ) [goal> Focused goal (1/2):
Systems: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
----------------------------------------
0: frame@pred (T(i, k))
1: nT (i, k)
2: diff(dummy i, h (nT (i, k), key i))
* crypto PRF (key : key i) => //.
[> Line 403: ((crypto ...);(intro //)) Direct bi-deduction sub-goal (assuming recursive calls are bi-deducible):
{ input@t0 | ∀ t0 : pred t0 <= pred (T(i, k)) },
{ output@t0 | ∀ t0 : t0 <= pred (T(i, k)) && exec@t0 },
{ exec@t0 | ∀ t0 : t0 <= pred (T(i, k)) },
{ frame@t0 | ∀ t0 : t0 <= pred (T(i, k)) },
{ frame@pred (T(i, k)) | true },
▷
(frame@pred (T(i, k)), nT (i, k), diff(dummy i, h (nT (i, k), key i)))
Bi-deduction sub-goals for recursive calls:
i0,k0:index : ∅ ▷ { true | T(i0, k0) < T(i, k) }
i0,k0:index :
∅
▷
{ <nT (i0, k0),h (nT (i0, k0), key i0)> | T(i0, k0) < T(i, k) }
j:index :
{ input@t0 | ∀ t0,k0,i0 : pred t0 <= pred (R1(j)) && R1(j) < T(i, k) },
{ output@t0 |
∀ t0,k0,i0 : (t0 <= pred (R1(j)) && exec@t0) && R1(j) < T(i, k) },
{ exec@t0 | ∀ t0,k0,i0 : t0 <= pred (R1(j)) && R1(j) < T(i, k) },
{ frame@t0 | ∀ t0,k0,i0 : t0 <= pred (R1(j)) && R1(j) < T(i, k) },
{ frame@pred (R1(j)) | ∀ k0,i0 : R1(j) < T(i, k) },
▷
{ not
exists (i,k:index),
snd (att (frame@pred (R1(j)))) =
h (fst (att (frame@pred (R1(j)))), key i) | R1(j) < T(i, k) }
j:index : ∅ ▷ { ko | R1(j) < T(i, k) }
j:index :
{ input@t0 | ∀ t0,k0,i0 : pred t0 <= pred (R(j)) && R(j) < T(i, k) },
{ output@t0 |
∀ t0,k0,i0 : (t0 <= pred (R(j)) && exec@t0) && R(j) < T(i, k) },
{ exec@t0 | ∀ t0,k0,i0 : t0 <= pred (R(j)) && R(j) < T(i, k) },
{ frame@t0 | ∀ t0,k0,i0 : t0 <= pred (R(j)) && R(j) < T(i, k) },
{ frame@pred (R(j)) | ∀ k0,i0 : R(j) < T(i, k) },
▷
{ exists (i,k:index),
snd (att (frame@pred (R(j)))) =
h (fst (att (frame@pred (R(j)))), key i) | R(j) < T(i, k) }
j:index : ∅ ▷ { ok | R(j) < T(i, k) }
∅ ▷ { true | init < T(i, k) }
∅ ▷ { empty | init < T(i, k) }
Constraints are:
{ dummy i, L }
{ nT (i, k0), A | ∀ k0 : T(i, k0) < T(i, k) }
{ nT (i, k), A }
{ key i0, A | ∀ i0,j0 : not (i0 = i) && R(j0) < T(i, k) }
{ key i0, A | ∀ i0,j0 : not (i0 = i) && R1(j0) < T(i, k) }
{ key i0, A | ∀ i0,k0 : not (i0 = i) && T(i0, k0) < T(i, k) }
{ nT (i0, k0), A | ∀ i0,k0 : T(i0, k0) < T(i, k) }
{ key i, Gkey }
Constraints subgoals are:
forall (i0,j:index), not (i0 = i) && R(j) < T(i, k) => i0 <> i
forall (i0,j:index), not (i0 = i) && R1(j) < T(i, k) => i0 <> i
forall (i0,k0:index), not (i0 = i) && T(i0, k0) < T(i, k) => i0 <> i
Oracle subgoals are:
forall (k0:index), T(i, k0) < T(i, k) => nT (i, k) <> nT (i, k0)
forall (j:index),
R1(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R1(j))))
forall (j:index),
R(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R(j))))
Final memory is:
{lhash -> [{ fst (att (frame@pred (R(j0)))) | ∀ j0 : R(j0) < T(i, k) },
{ fst (att (frame@pred (R1(j0)))) | ∀ j0 : R1(j0) < T(i, k) },
{ nT (i, k0) | ∀ k0 : T(i, k0) < T(i, k) } ]
lchal -> [{ nT (i, k) | true } ] }
[goal> Focused goal (1/3):
System: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
----------------------------------------
forall (j:index),
R1(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R1(j))))
intro j Hlt Meq; by fresh Meq.
[> Line 405: ((intro j Hlt Meq);by (fresh ...)) Freshness of occurrences of nT((i, k)):
Indirect occurrences of nT((i, k)) in other actions:
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key i)>
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key i)>
Total: 2 occurrences
1 of them is subsumed by another
1 occurrence remaining
[goal> Focused goal (1/2):
System: left:BasicHash/left, right:BasicHash/left (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
----------------------------------------
forall (j:index),
R(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R(j))))
intro j Hlt Meq; by fresh Meq.
[> Line 407: ((intro j Hlt Meq);by (fresh ...)) Freshness of occurrences of nT((i, k)):
Indirect occurrences of nT((i, k)) in other actions:
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key i)>
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key i)>
Total: 2 occurrences
1 of them is subsumed by another
1 occurrence remaining
[goal> Focused goal (1/1):
Systems: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
----------------------------------------
0: frame@pred (T(i, k))
1: nT (i, k)
2: diff(dummy' (i, k), h (nT (i, k), key' (i, k)))
* crypto PRF (key : key'(i,k)) => //.
[> Line 409: ((crypto ...);(intro //)) Direct bi-deduction sub-goal (assuming recursive calls are bi-deducible):
{ input@t0 | ∀ t0 : pred t0 <= pred (T(i, k)) },
{ output@t0 | ∀ t0 : t0 <= pred (T(i, k)) && exec@t0 },
{ exec@t0 | ∀ t0 : t0 <= pred (T(i, k)) },
{ frame@t0 | ∀ t0 : t0 <= pred (T(i, k)) },
{ frame@pred (T(i, k)) | true },
▷
(frame@pred (T(i, k)),
nT (i, k),
diff(dummy' (i, k), h (nT (i, k), key' (i, k))))
Bi-deduction sub-goals for recursive calls:
i0,k0:index : ∅ ▷ { true | T(i0, k0) < T(i, k) }
i0,k0:index :
∅
▷
{ <nT (i0, k0),h (nT (i0, k0), key' (i0, k0))> | T(i0, k0) < T(i, k) }
j:index :
{ input@t0 | ∀ t0,k0,i0 : pred t0 <= pred (R1(j)) && R1(j) < T(i, k) },
{ output@t0 |
∀ t0,k0,i0 : (t0 <= pred (R1(j)) && exec@t0) && R1(j) < T(i, k) },
{ exec@t0 | ∀ t0,k0,i0 : t0 <= pred (R1(j)) && R1(j) < T(i, k) },
{ frame@t0 | ∀ t0,k0,i0 : t0 <= pred (R1(j)) && R1(j) < T(i, k) },
{ frame@pred (R1(j)) | ∀ k0,i0 : R1(j) < T(i, k) },
▷
{ not
exists (i,k:index),
snd (att (frame@pred (R1(j)))) =
h (fst (att (frame@pred (R1(j)))), key' (i, k)) | R1(j) < T(i, k) }
j:index : ∅ ▷ { ko | R1(j) < T(i, k) }
j:index :
{ input@t0 | ∀ t0,k0,i0 : pred t0 <= pred (R(j)) && R(j) < T(i, k) },
{ output@t0 |
∀ t0,k0,i0 : (t0 <= pred (R(j)) && exec@t0) && R(j) < T(i, k) },
{ exec@t0 | ∀ t0,k0,i0 : t0 <= pred (R(j)) && R(j) < T(i, k) },
{ frame@t0 | ∀ t0,k0,i0 : t0 <= pred (R(j)) && R(j) < T(i, k) },
{ frame@pred (R(j)) | ∀ k0,i0 : R(j) < T(i, k) },
▷
{ exists (i,k:index),
snd (att (frame@pred (R(j)))) =
h (fst (att (frame@pred (R(j)))), key' (i, k)) | R(j) < T(i, k) }
j:index : ∅ ▷ { ok | R(j) < T(i, k) }
∅ ▷ { true | init < T(i, k) }
∅ ▷ { empty | init < T(i, k) }
Constraints are:
{ dummy' (i, k), L }
{ nT (i, k), A }
{ key' (i0, k0), A |
∀ i0,j0,k0 : not (i0 = i && k0 = k) && R(j0) < T(i, k) }
{ key' (i0, k0), A |
∀ i0,j0,k0 : not (i0 = i && k0 = k) && R1(j0) < T(i, k) }
{ key' (i0, k0), A |
∀ i0,k0 : not (i0 = i && k0 = k) && T(i0, k0) < T(i, k) }
{ nT (i0, k0), A | ∀ i0,k0 : T(i0, k0) < T(i, k) }
{ key' (i, k), Gkey }
Constraints subgoals are:
forall (i0,j,k0:index),
not (i0 = i && k0 = k) && R(j) < T(i, k) => (i0, k0) <> (i, k)
forall (i0,j,k0:index),
not (i0 = i && k0 = k) && R1(j) < T(i, k) => (i0, k0) <> (i, k)
forall (i0,k0:index),
not (i0 = i && k0 = k) && T(i0, k0) < T(i, k) => (i0, k0) <> (i, k)
Oracle subgoals are: T(i, k) < T(i, k) => nT (i, k) <> nT (i, k)
forall (j:index),
R1(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R1(j))))
forall (j:index),
R(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R(j))))
Final memory is:
{lhash -> [{ fst (att (frame@pred (R(j0)))) | ∀ j0 : R(j0) < T(i, k) },
{ fst (att (frame@pred (R1(j0)))) | ∀ j0 : R1(j0) < T(i, k) },
{ nT (i, k) | T(i, k) < T(i, k) } ]
lchal -> [{ nT (i, k) | true } ] }
[goal> Focused goal (1/2):
System: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
----------------------------------------
forall (j:index),
R1(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R1(j))))
intro j Hlt Meq; by fresh Meq.
[> Line 411: ((intro j Hlt Meq);by (fresh ...)) Freshness of occurrences of nT((i, k)):
Indirect occurrences of nT((i, k)) in other actions:
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key' (i, k))>
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key' (i, k))>
Total: 2 occurrences
1 of them is subsumed by another
1 occurrence remaining
[goal> Focused goal (1/1):
System: left:BasicHash/right, right:BasicHash/right (same for equivalences)
Variables: i,k:index[const, glob]
Hap: [happens(T(i, k))]
----------------------------------------
forall (j:index),
R(j) < T(i, k) => nT (i, k) <> fst (att (frame@pred (R(j))))
intro j Hlt Meq; by fresh Meq.
[> Line 413: ((intro j Hlt Meq);by (fresh ...)) Freshness of occurrences of nT((i, k)):
Indirect occurrences of nT((i, k)) in other actions:
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key' (i, k))>
nT((i, k))
(collision with nT((i, k)))
in action T(i, k)
in term <nT (i, k),h (nT (i, k), key' (i, k))>
Total: 2 occurrences
1 of them is subsumed by another
1 occurrence remaining
[goal> lemma unlinkability is proved
Qed.
global lemma [BasicHash (same for equivalences)] unlinkability :
Forall (tau:timestamp[const, glob]), [happens(tau)] -> equiv(frame@tau)
Exiting proof mode.
Press the left and right arrows to do and undo an instruction.
Alternatively, you can double-click on an instruction.
This zone shows a Squirrel file. You can double-click on a comment to collapse it for better readabilility.
This zone shows the output given by Squirrel.
This zone shows the output of the previous instruction, to help identifying the change caused by the instruction.