set timeout=10. Typed-check process:

null

Added action dependencies lemmas:


System after processing:

null

System Empty registered with actions (init).
[warning>Loaded "Prelude.sp".
<]

YUBIHSM

[1] R. Künnemann, “Foundations for analyzing security APIs in the symbolic and computational model”, 2014.

Y -> S : <pid,<nonce,otp>> S -> HSM : <<pid,kh>,<aead,otp>> HSM -> S : ctr S -> Y : accept

with - aead = enc(<k,pid,sid>,mkey) - otp = enc(<sid,ctr>,npr,k)

PUBLIC DATA - kh, pid SECRET DATA KNOWN BY EACH PARTY - YubiKey(pid): k(pid), sid(pid), ctr(pid) - Server: { sid(pid), ctr(pid) | pid } - HSM: mkey, { k(pid), sid(pid) | pid }

COMMENTS - The last message “otp || nonce || hmac || status” is unclear and not modelled at all and replaced by “accept”. It was also not modelled in [1].

  • The otp is an encryption of a triple (sid, ctr, npr). It is modelled here as a randomized encryption of a pair (sid, ctr).

  • enc is assumed to be AEAD (we do not use the associated data).

  • In [1], they “over-approximate in the case that the Yubikey increases the session token by allowing the adversary to instantiate the rule for any counter value that is higher than the previous one”. Here, we model the incrementation by 1 of the counter.

  • As in [1], we model the two counters (session and token counters) as a single counter.

  • In [1], the server keeps in memory the mapping between public and secret identities of the Yubikeys. As far as we understand, this does not reflect the YubiHSM specification: secret identities have to be protected by the YubiHSM. Instead, we choose to keep the necessary information to map public to private identities in the AEADs (we simply add the public identity to the AEADs plaintext).

  • Diff terms are here to model a real system and an ideal system. The purpose of the ideal system is to replace the key inside the AEAD by a dummy one, in order to be able to use the intctxt tactic for the third security property (injective correspondence).

HELPING LEMMAS - counter increase - valid decode

SECURITY PROPERTIES The 3 security properties as stated in [1]. - Property 1: no replay counter - Property 2: injective correspondence - Property 3: monotonicity

Properties 1 and 3 are established directly on the real system. Property 2 is proved in 2 steps: first an equivalence is established between the real system and the ideal one, and then the property is proved on the ideal system. The reach equiv tactic allows one to combine these two steps, and to conclude. ******************************************************************************



(* AEAD symmetric encryption scheme: IND-CCA + INT-CTXT *)
senc enc,dec

(*------------------------------------------------------------------*)
(* protocol constants *)
abstract endplug : message
abstract accept : message
abstract setup_ok : message

(*------------------------------------------------------------------*)
(* counters initial value *)
abstract cinit : message
(* counter successor *)
abstract mySucc : message -> message

(*------------------------------------------------------------------*)
(* Encoding of a public identity as a message.
This encoding is injective (this is axiomatized later). *)
abstract mpid: index -> message

(* secret identity *)
name sid: index -> message

(*------------------------------------------------------------------*)
(* public key handle kh to reference the AES master key mkey *)
abstract kh: message
name mkey: message

(*------------------------------------------------------------------*)
(* working key k(pid) of yubikey `pid`, stored inside the AEAD *)
name k: index -> message
(* Dummy key used in AEAD idealized so that the key does not occur in
plaintext anymore in the idealized system *)
name k_dummy: index -> message

(*------------------------------------------------------------------*)
(* counters *)
mutable YCtr(i:index) : message = cinit
mutable SCtr(i:index) : message = cinit

(*------------------------------------------------------------------*)
(* authentication server's database for each pid *)
mutable AEAD(pid:index) : message = zero.
global axiom namelength_sid {'P:system} @system:(set:'P; equiv:None) :
[forall (i:index), len (sid i) = namelength_message]
global axiom namelength_mkey {'P:system} @system:(set:'P; equiv:None) :
[len mkey = namelength_message]
global axiom namelength_k {'P:system} @system:(set:'P; equiv:None) :
[forall (i:index), len (k i) = namelength_message]
global axiom namelength_k_dummy {'P:system} @system:(set:'P; equiv:None) :
[forall (i:index), len (k_dummy i) = namelength_message]


(*------------------------------------------------------------------*)
channel cY
channel cS
channel cHSM

(* Order over counters. Assumed transitive and strict later through axioms. *)
abstract (~<): message -> message -> boolean.


(* When the key is plugged for yubikey `pid`, the counter is incremented. *)
process yubikeyplug (pid:index) =
in(cY,x1);
YCtr(pid) := mySucc(YCtr(pid));
out(cY,endplug).
process yubikeyplug (pid:index) =
in(cY,x1); YCtr(pid) := mySucc (YCtr pid@τ); out(cY,endplug); null


name nonce : index * index -> message
name npr : index * index -> message

(* When the key is pressed on the `j`-th session of yubikey `pid`:
- an otp is sent with the current value of the counter,
- the counter is incremented. *)
process yubikeypress (pid:index,j:index) =
in(cY,x2);
let ctr = YCtr(pid) in
YCtr(pid) := mySucc(YCtr(pid));
let menc = enc(<sid(pid),ctr>,npr(pid,j),k(pid)) in
out(cY,<mpid(pid), <nonce(pid,j), menc>>).
global axiom namelength_nonce {'P:system} @system:(set:'P; equiv:None) :
[forall (i:index * index), len (nonce i) = namelength_message]
global axiom namelength_npr {'P:system} @system:(set:'P; equiv:None) :
[forall (i:index * index), len (npr i) = namelength_message]
process yubikeypress (pid,j:index) =
in(cY,x2);
let ctr : message = YCtr pid@τ in
YCtr(pid) := mySucc (YCtr pid@τ);
let menc : message = enc (<sid pid,ctr>, npr (pid, j), k pid) in
out(cY,<mpid pid,<nonce (pid, j),menc>>);
null


(* When the server receives a message for pid:
- it checks whether it corresponds to a pid in its database,
- it retrieves the AEAD and kh associated to this pid and asks the HSM to
decode the received otp,
- it checks that the counter inside the otp (received from the HSM) is
strictly greater than the counter associated to the token,
- if so, this counter value is used to update the database.
In our modelling, the server's request to the HSM (to retrieve k(pid)
and sid(pid)) has been inlined.
*)
process server (pid:index) =
in(cS,x); (*x = <pid,<nonce, cipher>> with cipher = enc(<sid,cpt>,r, k)*)
let cipher = snd(snd(x)) in
let deccipher = dec(cipher,k(pid)) in
let xcpt = snd(deccipher) in
if fst(x) = mpid(pid) &&
deccipher<>fail &&
fst(deccipher) = sid(pid) &&
SCtr(pid) ~< xcpt then
SCtr(pid) := xcpt;
out(cS,accept).
process server (pid:index) =
in(cS,x);
let cipher : message = snd (snd x) in
let deccipher : message = dec (cipher, k pid) in
let xcpt : message = snd deccipher in
if fst x = mpid pid &&
deccipher <> fail && fst deccipher = sid pid && SCtr pid@τ ~< xcpt then
SCtr(pid) := xcpt; out(cS,accept); null


(*------------------------------------------------------------------*)
(* The attacker can read/write AEAD stored in the server's database. *)
process read_AEAD (pid:index) =
out(cS,AEAD(pid)).
process read_AEAD (pid:index) =
out(cS,AEAD pid@τ); null


process write_AEAD (pid:index)=
in(cS,x);
AEAD(pid) := x.
process write_AEAD (pid:index) =
in(cS,x); AEAD(pid) := x; null


(*------------------------------------------------------------------*)
(* model for the rule YSM_AEAD_YUBIKEY_OTP_DECODE of the HSM. *)
process YSM_AEAD_YUBIKEY_OTP_DECODE (pid:index) =
in(cHSM,xdata);
(* xdata = <<pid,kh>, <aead, otp>> with
otp = enc(<sid,cpt>,k)
aead = enc(<k,<pid,sid>>,mkey)*)
if fst(xdata) = <mpid(pid),kh> then
let aead = fst(snd(xdata)) in
let otp = snd(snd(xdata)) in

let aead_dec = dec(aead,mkey) in

let otp_dec = dec(otp,diff(fst(aead_dec), k(pid))) in

if aead_dec <> fail &&
otp_dec <> fail &&
fst(otp_dec) = snd(snd(aead_dec)) &&
mpid(pid) = fst(snd(aead_dec))
then
out(cHSM, snd(otp_dec)).
process YSM_AEAD_YUBIKEY_OTP_DECODE (pid:index) =
in(cHSM,xdata);
if fst xdata = <mpid pid,kh> then
let aead : message = fst (snd xdata) in
let otp : message = snd (snd xdata) in
let aead_dec : message = dec (aead, mkey) in
let otp_dec : message = dec (otp, diff(fst aead_dec, k pid)) in
if aead_dec <> fail &&
otp_dec <> fail &&
fst otp_dec = snd (snd aead_dec) && mpid pid = fst (snd aead_dec) then
out(cHSM,snd otp_dec); null


(*------------------------------------------------------------------*)
(* real system with ideal system *)
system !_pid
new rinit;
AEAD(pid) :=
enc(<diff(k(pid),k_dummy(pid)), <mpid(pid), sid(pid)>>, rinit, mkey);
Setup: out(cS, accept); (
(!_j Plug : yubikeyplug(pid) ) |
(!_j Press : yubikeypress(pid,j) ) |
(!_j Server : server(pid) ) |
(!_j Read : read_AEAD(pid) ) |
(!_j Write : write_AEAD(pid) ) |
(!_j Decode : YSM_AEAD_YUBIKEY_OTP_DECODE(pid))).
Typed-check process:

!_pid(
new rinit : message;
AEAD(pid) :=
enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit, mkey);
Setup: out(cS,accept);
( !_j( Plug: yubikeyplug pid) ) |
( !_j( Press: yubikeypress pid j) ) |
( !_j( Server: server pid) ) |
( !_j( Read: read_AEAD pid) ) |
( !_j( Write: write_AEAD pid) ) |
!_j( Decode: YSM_AEAD_YUBIKEY_OTP_DECODE pid))

global axiom namelength_rinit {'P:system} @system:(set:'P; equiv:None) :
[forall (i:index), len (rinit i) = namelength_message]
Added action dependencies lemmas:

axiom mutex_Decode2_Decode1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Decode2(pid, j)) || not happens(Decode1(pid, j))
axiom mutex_Decode2_Decode {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Decode2(pid, j)) || not happens(Decode(pid, j))
axiom mutex_Decode1_Decode2 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Decode1(pid, j)) || not happens(Decode2(pid, j))
axiom mutex_Decode1_Decode {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Decode1(pid, j)) || not happens(Decode(pid, j))
axiom mutex_Decode_Decode2 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Decode(pid, j)) || not happens(Decode2(pid, j))
axiom mutex_Decode_Decode1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Decode(pid, j)) || not happens(Decode1(pid, j))
axiom mutex_Server1_Server {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Server1(pid, j)) || not happens(Server(pid, j))
axiom mutex_Server_Server1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
not happens(Server(pid, j)) || not happens(Server1(pid, j))
axiom depends_Setup_Decode2 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
happens(Decode2(pid, j)) => Setup(pid) < Decode2(pid, j)
axiom depends_Setup_Decode1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
happens(Decode1(pid, j)) => Setup(pid) < Decode1(pid, j)
axiom depends_Setup_Decode {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
happens(Decode(pid, j)) => Setup(pid) < Decode(pid, j)
axiom depends_Setup_Write {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Write(pid, j)) => Setup(pid) < Write(pid, j)
axiom depends_Setup_Read {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Read(pid, j)) => Setup(pid) < Read(pid, j)
axiom depends_Setup_Server1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
happens(Server1(pid, j)) => Setup(pid) < Server1(pid, j)
axiom depends_Setup_Server {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index),
happens(Server(pid, j)) => Setup(pid) < Server(pid, j)
axiom depends_Setup_Press {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Press(pid, j)) => Setup(pid) < Press(pid, j)
axiom depends_Setup_Plug {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Plug(pid, j)) => Setup(pid) < Plug(pid, j)
axiom depends_init_Decode2 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Decode2(pid, j)) => init < Decode2(pid, j)
axiom depends_init_Decode1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Decode1(pid, j)) => init < Decode1(pid, j)
axiom depends_init_Decode {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Decode(pid, j)) => init < Decode(pid, j)
axiom depends_init_Write {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Write(pid, j)) => init < Write(pid, j)
axiom depends_init_Read {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Read(pid, j)) => init < Read(pid, j)
axiom depends_init_Server1 {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Server1(pid, j)) => init < Server1(pid, j)
axiom depends_init_Server {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Server(pid, j)) => init < Server(pid, j)
axiom depends_init_Press {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Press(pid, j)) => init < Press(pid, j)
axiom depends_init_Plug {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid,j:index), happens(Plug(pid, j)) => init < Plug(pid, j)
axiom depends_init_Setup {'P:system[like default]}
@system:(set:'P; equiv:None) :
forall (pid:index), happens(Setup(pid)) => init < Setup(pid)

System after processing:

!_pid(
AEAD(pid) :=
enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey);
Setup: out(cS,accept);
( !_j(
in(cY,x1);
YCtr(pid) := mySucc (YCtr pid@τ);
Plug: out(cY,endplug);
null) ) |
( !_j(
in(cY,x2);
let ctr : message = YCtr pid@τ in
YCtr(pid) := mySucc (YCtr pid@τ);
let menc : message =
enc (<sid pid,ctr pid j@τ>, npr (pid, j), k pid) in
Press: out(cY,<mpid pid,<nonce (pid, j),menc pid j@τ>>);
null) ) |
( !_j(
in(cS,x);
let cipher : message = snd (snd x) in
let deccipher : message = dec (cipher pid j@τ, k pid) in
let xcpt : message = snd (deccipher pid j@τ) in
if fst x = mpid pid &&
deccipher pid j@τ <> fail &&
fst (deccipher pid j@τ) = sid pid &&
SCtr pid@τ ~< xcpt pid j@τ then
SCtr(pid) := xcpt pid j@τ; Server: out(cS,accept); null
else
Server1: null) ) |
( !_j( Read: out(cS,AEAD pid@τ); null) ) |
( !_j( in(cS,x); AEAD(pid) := x; Write: null) ) |
!_j(
in(cHSM,xdata);
if fst xdata = <mpid pid,kh> then
let aead : message = fst (snd xdata) in
let otp : message = snd (snd xdata) in
let aead_dec : message = dec (aead pid j@τ, mkey) in
let otp_dec : message =
dec (otp pid j@τ, diff(fst (aead_dec pid j@τ), k pid)) in
if aead_dec pid j@τ <> fail &&
otp_dec pid j@τ <> fail &&
fst (otp_dec pid j@τ) = snd (snd (aead_dec pid j@τ)) &&
mpid pid = fst (snd (aead_dec pid j@τ)) then
Decode: out(cHSM,snd (otp_dec pid j@τ)); null
else
Decode1: null
else
Decode2: null))

System Empty registered with actions (init).
System default registered with actions
(init,Setup,Plug,Press,Server,Server1,Read,Write,Decode,Decode1,Decode2).


(*------------------------------------------------------------------*)
(* AXIOMS *)

axiom orderTrans (n1,n2,n3:message): n1 ~< n2 => n2 ~< n3 => n1 ~< n3.
axiom orderTrans @system:(set:default; equiv:None) :
forall (n1,n2,n3:message), n1 ~< n2 => n2 ~< n3 => n1 ~< n3


axiom orderStrict(n1,n2:message): n1 = n2 => n1 ~< n2 => False.
axiom orderStrict @system:(set:default; equiv:None) :
forall (n1,n2:message), n1 = n2 => n1 ~< n2 => false


axiom mpid_inj (pid, pid':index): mpid(pid) = mpid(pid') => pid = pid'.
axiom mpid_inj @system:(set:default; equiv:None) :
forall (pid,pid':index), mpid pid = mpid pid' => pid = pid'


axiom pair_ne_fail (x,y: message) : <x,y> <> fail.
axiom pair_ne_fail @system:(set:default; equiv:None) :
forall (x,y:message), <x,y> <> fail


abstract c_pair : message.

abstract (++) : message -> message -> message.

axiom len_pair (x, y : message) : len(<x,y>) = (len(x) ++ len(y) ++ c_pair).
axiom len_pair @system:(set:default; equiv:None) :
forall (x,y:message), len <x,y> = len x ++ len y ++ c_pair


(* Utilities for simplifying some diff expressions. *)

lemma len_diff (x,y:message) : len(diff(x,y)) = diff(len(x),len(y)).
Goal len_diff :
len diff(x, y) = diff(len x, len y)

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: x,y:message
----------------------------------------
len diff(x, y) = diff(len x, len y)


by project.
[> Line 229: by (project) [goal> lemma len_diff is proved


Qed.
lemma len_diff @system:(set:default; equiv:None) :
forall (x,y:message), len diff(x, y) = diff(len x, len y)
Exiting proof mode.



(*------------------------------------------------------------------*)
(* LIBRAIRIES *)

include Core.
op assoc ['a] (f:'a -> 'a -> 'a) : bool =
forall (x,y,z:'a), f (f x y) z = f x (f y z)
axiom eq_iff {'P:system} @system:(set:'P; equiv:None) :
forall (x,y:bool), (x = y) = (x <=> y)
axiom eq_not {'P:system} @system:(set:'P; equiv:None) :
forall (x,y:bool), (not x = not y) = (x = y)
Goal eq_sym :
(x = y) = (y = x)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
(x = y) = (y = x)

[> Line 12: by (rewrite) [goal> lemma eq_sym is proved

lemma eq_sym {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
(x <> y) = (y <> x)

[> Line 15: by (rewrite) [goal> lemma neq_sym is proved

lemma neq_sym {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x:'a
----------------------------------------
(x = x) = true

[> Line 20: by (rewrite) [goal> lemma eq_refl_e is proved

lemma eq_refl_e {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x:'a), (x = x) = true
Exiting proof mode.

Goal eq_refl :
x = x
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x:'a
----------------------------------------
x = x

[> Line 26: by (rewrite) [goal> lemma eq_refl is proved

lemma eq_refl {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x:'a), x = x
Exiting proof mode.

Goal neq_irrefl :
x <> x <=> false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x:'a
----------------------------------------
x <> x <=> false

[> Line 29: by (split) [goal> lemma neq_irrefl is proved

lemma neq_irrefl {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool
----------------------------------------
((b0 = b1) = b2) = (b0 = (b1 = b2))

[> Line 37: ((have); 1: by (rewrite)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool[const]
true_false: (true = false) = false
----------------------------------------
((b0 = b1) = b2) = (b0 = (b1 = b2))

[> Line 38: ((have); 1: by (rewrite)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool[const]
false_true: (false = true) = false
true_false: (true = false) = false
----------------------------------------
((b0 = b1) = b2) = (b0 = (b1 = b2))

[> Line 38: ((case);((case);((case);(try (auto))))) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 38: by (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 38: by (rewrite) [goal> lemma eq_assoc is proved

lemma eq_assoc {'P:system} @system:(set:'P; equiv:None) :
forall (b0,b1,b2:bool), ((b0 = b1) = b2) = (b0 = (b1 = b2))
Exiting proof mode.

axiom fun_ext {'P:system} @system:(set:'P; equiv:None) ['a 'b] :
forall (f,g:'a -> 'b), (forall (x:'a), f x = g x) => f = g
Goal true_false :
(true = false) = false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
----------------------------------------
(true = false) = false

[> Line 51: by (rewrite) [goal> lemma true_false is proved

lemma true_false {'P:system} @system:(set:'P; equiv:None) :
(true = false) = false
Exiting proof mode.

Goal false_true :
(false = true) = false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
----------------------------------------
(false = true) = false

[> Line 57: by (rewrite) [goal> lemma false_true is proved

lemma false_true {'P:system} @system:(set:'P; equiv:None) :
(false = true) = false
Exiting proof mode.

Goal eq_true :
(b = true) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b = true) = b

[> Line 61: by (case) [goal> lemma eq_true is proved

lemma eq_true {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b = true) = b
Exiting proof mode.

Goal eq_true2 :
(true = b) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(true = b) = b

[> Line 65: by (case) [goal> lemma eq_true2 is proved

lemma eq_true2 {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (true = b) = b
Exiting proof mode.

axiom not_true {'P:system} @system:(set:'P; equiv:None) : not true = false
axiom not_false {'P:system} @system:(set:'P; equiv:None) : not false = true
Goal not_not :
not (not b) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
not (not b) = b

[> Line 81: by (case) [goal> lemma not_not is proved

lemma not_not {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), not (not b) = b
Exiting proof mode.

Goal not_eq :
not (x = y) = (x <> y)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
not (x = y) = (x <> y)

[> Line 86: by (rewrite) [goal> lemma not_eq is proved

lemma not_eq {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
not (x <> y) = (x = y)

[> Line 92: by (rewrite) [goal> lemma not_neq is proved

lemma not_neq {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b = false) = not b

[> Line 99: by (case) [goal> lemma not_eqfalse is proved

lemma not_eqfalse {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool
----------------------------------------
not (a => b) = (a && not b)

[> Line 104: ((rewrite);((split);(intro))) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
a && not b

[> Line 104: (split) [goal> Focused goal (1/3):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
a

[> Line 106: (rewrite) [goal> Focused goal (1/3):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
not (not a)

[> Line 107: (intro) [goal> Focused goal (1/3):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: not (a => b)
Hna: not a
----------------------------------------
false

[> Line 108: by (apply) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: not (a => b)
----------------------------------------
not b

[> Line 109: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: not (a => b)
Hb: b
----------------------------------------
false

[> Line 110: by (apply) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: a && not b
----------------------------------------
not (a => b)

[> Line 111: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
H: a && not b
Hi: a => b
----------------------------------------
false

[> Line 112: (destruct) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
Ha: a
Hi: a => b
Hnb: not b
----------------------------------------
false

[> Line 113: (apply) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
Ha: a
Hi: a => b
Hnb: not b
----------------------------------------
b

[> Line 114: by (apply) [goal> lemma not_impl is proved

lemma not_impl {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
((x = y) = false) = (x <> y)

[> Line 121: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
((x = y) = false) = not (x = y)

[> Line 121: ((case);(intro)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
_: x = y
----------------------------------------
(true = false) = not true

[> Line 121: (simpl) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
_: x = y
----------------------------------------
true

[> Line 122: (auto) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
_: not (x = y)
----------------------------------------
(false = false) = not false

[> Line 122: by (rewrite) [goal> lemma eq_false is proved

lemma eq_false {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y:'a), ((x = y) = false) = (x <> y)
Exiting proof mode.

axiom and_comm {'P:system} @system:(set:'P; equiv:None) :
forall (b,b':bool), (b && b') = (b' && b)
Goal and_dist :
((b0 || b1) && b2) = (b0 && b2 || b1 && b2)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool
----------------------------------------
((b0 || b1) && b2) = (b0 && b2 || b1 && b2)

[> Line 132: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool[const]
----------------------------------------
(b0 || b1) && b2 <=> b0 && b2 || b1 && b2

[> Line 132: by (split) [goal> lemma and_dist is proved

lemma and_dist {'P:system} @system:(set:'P; equiv:None) :
forall (b0,b1,b2:bool), ((b0 || b1) && b2) = (b0 && b2 || b1 && b2)
Exiting proof mode.

axiom and_true_l {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (true && b) = b
Goal and_true_r :
(b && true) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b && true) = b

[> Line 138: by (rewrite) [goal> lemma and_true_r is proved

lemma and_true_r {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b && true) = b
Exiting proof mode.

axiom and_false_l {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (false && b) = false
Goal and_false_r :
(b && false) = false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b && false) = false

[> Line 145: by (rewrite) [goal> lemma and_false_r is proved

lemma and_false_r {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b && false) = false
Exiting proof mode.

Goal and_double :
(b && b) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b && b) = b

[> Line 150: by (case) [goal> lemma and_double is proved

lemma and_double {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b && b) = b
Exiting proof mode.

axiom or_comm {'P:system} @system:(set:'P; equiv:None) :
forall (b,b':bool), (b || b') = (b' || b)
Goal or_dist :
((b0 || b2) && (b1 || b2)) = (b0 && b1 || b2)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool
----------------------------------------
((b0 || b2) && (b1 || b2)) = (b0 && b1 || b2)

[> Line 158: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1,b2:bool[const]
----------------------------------------
(b0 || b2) && (b1 || b2) <=> b0 && b1 || b2

[> Line 158: by (split) [goal> lemma or_dist is proved

lemma or_dist {'P:system} @system:(set:'P; equiv:None) :
forall (b0,b1,b2:bool), ((b0 || b2) && (b1 || b2)) = (b0 && b1 || b2)
Exiting proof mode.

axiom or_false_l {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (false || b) = b
Goal or_false_r :
(b || false) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b || false) = b

[> Line 164: by (rewrite) [goal> lemma or_false_r is proved

lemma or_false_r {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b || false) = b
Exiting proof mode.

axiom or_true_l {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (true || b) = true
Goal or_true_r :
(b || true) = true
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b || true) = true

[> Line 171: by (rewrite) [goal> lemma or_true_r is proved

lemma or_true_r {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b || true) = true
Exiting proof mode.

Goal or_double :
(b || b) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b || b) = b

[> Line 175: by (case) [goal> lemma or_double is proved

lemma or_double {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b || b) = b
Exiting proof mode.

Goal impl_charac :
(b => b') = (not b || b')
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b,b':bool
----------------------------------------
(b => b') = (not b || b')

[> Line 182: (((rewrite);((split);((case);(case))));(intro)) [goal> lemma impl_charac is proved

lemma impl_charac {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(false => b) = true

[> Line 186: by ((rewrite);(case)) [goal> lemma impl_false_l is proved

lemma impl_false_l {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (false => b) = true
Exiting proof mode.

Goal impl_true_r :
(b => true) = true
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(b => true) = true

[> Line 190: (auto) [goal> lemma impl_true_r is proved

lemma impl_true_r {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (b => true) = true
Exiting proof mode.

Goal impl_true_l :
(true => b) = b
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool
----------------------------------------
(true => b) = b

[> Line 194: by (rewrite) [goal> lemma impl_true_l is proved

lemma impl_true_l {'P:system} @system:(set:'P; equiv:None) :
forall (b:bool), (true => b) = b
Exiting proof mode.

Goal impl_contra :
(b => c) = (not c => not b)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b,c:bool
----------------------------------------
(b => c) = (not c => not b)

[> Line 200: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b,c:bool[const]
----------------------------------------
(not b || c) = (c || not b)

[> Line 201: by (rewrite) [goal> lemma impl_contra is proved

lemma impl_contra {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool
----------------------------------------
not (a && b) = (not a || not b)

[> Line 208: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
----------------------------------------
not (a && b) <=> not a || not b

[> Line 210: (((case);(case));(intro)) [goal> lemma not_and is proved

lemma not_and {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool
----------------------------------------
not (a || b) = (not a && not b)

[> Line 214: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: a,b:bool[const]
----------------------------------------
not (a || b) <=> not a && not b

[> Line 216: (((case);(case));(intro)) [goal> lemma not_or is proved

lemma not_or {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool,x,y:'a
----------------------------------------
b => if b then x else y = x

[> Line 225: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
----------------------------------------
if b then x else y = x

[> Line 226: (case) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
----------------------------------------
b && if b then x else y = x => x = x

[> Line 227: (auto) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: b
----------------------------------------
not b && if b then x else y = y => y = x

[> Line 227: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 228: by (have) [goal> lemma if_true is proved

lemma if_true {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
if true then x else y = x

[> Line 233: by (rewrite) [goal> lemma if_true0 is proved

lemma if_true0 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool,x,y:'a
----------------------------------------
not b => if b then x else y = y

[> Line 241: ((intro);(case)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool[const],x,y:'a
H: not b
----------------------------------------
b && if b then x else y = x => x = y

[> Line 241: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 242: by (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 244: (auto) [goal> lemma if_false is proved

lemma if_false {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
if false then x else y = y

[> Line 250: by (rewrite) [goal> lemma if_false0 is proved

lemma if_false0 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 257: by ((case);(case)) [goal> lemma if_then_then is proved

lemma if_then_then {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 264: ((have); 1: by (auto)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 264: ((rewrite);(intro)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Variables: b0,b1:bool[const],m0,m1:message
_: b0
----------------------------------------
m0 = if (b0 || b1) then m0 else m1

[> Line 264: ((rewrite);(intro)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 265: ((have); 1: by (auto)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 265: ((rewrite);(intro)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 265: ((rewrite);(intro)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 267: ((rewrite);(intro)) [goal> lemma if_then_or is proved

lemma if_then_or {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
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 273: ((case);((intro);((case);((intro);((simpl);(try (auto))))))) [goal> lemma if_then_implies is proved

lemma if_then_implies {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: b:bool,x:'a
----------------------------------------
if b then x else x = x

[> Line 280: by (case) [goal> lemma if_same is proved

lemma if_same {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 289: by ((intro);(case)) [goal> lemma if_then is proved

lemma if_then {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool,m0,m1:message
----------------------------------------
if b then m0 else m1 = if b then (if b then m0) else m1

[> Line 295: (auto) [goal> lemma if_then_inv is proved

lemma if_then_inv {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
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 303: by ((intro);(case)) [goal> lemma if_else is proved

lemma if_else {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Variables: b:bool,m0,m1:message
----------------------------------------
if b then m0 else m1 = if b then m0 else if not b then m1

[> Line 308: by (case) [goal> lemma if_else_inv is proved

lemma if_else_inv {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
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 312: by (rewrite) [goal> lemma if_push is proved

lemma if_push {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
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 320: by ((intro);(case)) [goal> lemma if_then_not is proved

lemma if_then_not {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 329: by ((intro);(case)) [goal> lemma if_else_not is proved

lemma if_else_not {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 334: by (case) [goal> lemma if_app is proved

lemma if_app {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:message
----------------------------------------
fst <x,y> = x

[> Line 340: (auto) [goal> lemma fst_pair is proved

lemma fst_pair {'P:system} @system:(set:'P; equiv:None) :
forall (x,y:message), fst <x,y> = x
Exiting proof mode.

Goal snd_pair :
snd <x,y> = y
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:message
----------------------------------------
snd <x,y> = y

[> Line 344: (auto) [goal> lemma snd_pair is proved

lemma snd_pair {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:bool
----------------------------------------
(x <=> y) = ((x => y) && (y => x))

[> Line 353: ((rewrite);(split)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:bool[const]
----------------------------------------
x <=> y => (x => y) && (y => x)

[> Line 353: by (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:bool[const]
----------------------------------------
(x => y) && (y => x) => x <=> y

[> Line 355: (auto) [goal> lemma iff_def is proved

lemma iff_def {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: x:bool
----------------------------------------
(x <=> x) = true

[> Line 359: by (rewrite) [goal> lemma iff_refl is proved

lemma iff_refl {'P:system} @system:(set:'P; equiv:None) :
forall (x:bool), (x <=> x) = true
Exiting proof mode.

Goal iff_sym :
(x <=> y) = (y <=> x)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:bool
----------------------------------------
(x <=> y) = (y <=> x)

[> Line 366: by (rewrite) [goal> lemma iff_sym is proved

lemma iff_sym {'P:system} @system:(set:'P; equiv:None) :
forall (x,y:bool), (x <=> y) = (y <=> x)
Exiting proof mode.

Goal true_iff_false :
(true <=> false) = false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
----------------------------------------
(true <=> false) = false

[> Line 370: by (rewrite) [goal> lemma true_iff_false is proved

lemma true_iff_false {'P:system} @system:(set:'P; equiv:None) :
(true <=> false) = false
Exiting proof mode.

Goal false_iff_true :
(false <=> true) = false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
----------------------------------------
(false <=> true) = false

[> Line 376: by (rewrite) [goal> lemma false_iff_true is proved

lemma false_iff_true {'P:system} @system:(set:'P; equiv:None) :
(false <=> true) = false
Exiting proof mode.

Goal contra_iff :
(not x <=> y) = (x <=> not y)
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:bool
----------------------------------------
(not x <=> y) = (x <=> not y)

[> Line 384: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y:bool[const]
----------------------------------------
(not x <=> y) <=> (x <=> not y)

[> Line 385: ((split);by (rewrite)) [goal> lemma contra_iff is proved

lemma contra_iff {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
----------------------------------------
(exists (a:'a), false) = false

[> Line 392: by (rewrite) [goal> lemma exists_false1 is proved

lemma exists_false1 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b
----------------------------------------
(exists (a:'a,b:'b), false) = false

[> Line 396: by (rewrite) [goal> lemma exists_false2 is proved

lemma exists_false2 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c
----------------------------------------
(exists (a:'a,b:'b,c:'c), false) = false

[> Line 400: by (rewrite) [goal> lemma exists_false3 is proved

lemma exists_false3 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c, 'd
----------------------------------------
(exists (a:'a,b:'b,c:'c,d:'d), false) = false

[> Line 404: by (rewrite) [goal> lemma exists_false4 is proved

lemma exists_false4 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c, 'd, 'e
----------------------------------------
(exists (a:'a,b:'b,c:'c,d:'d,e:'e), false) = false

[> Line 408: by (rewrite) [goal> lemma exists_false5 is proved

lemma exists_false5 {'P:system} @system:(set:'P; equiv:None)
['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c, 'd, 'e, 'f
----------------------------------------
(exists (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), false) = false

[> Line 412: by (rewrite) [goal> lemma exists_false6 is proved

lemma exists_false6 {'P:system} @system:(set:'P; equiv:None)
['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
----------------------------------------
(forall (a:'a), true) = true

[> Line 422: (auto) [goal> lemma forall_true1 is proved

lemma forall_true1 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b
----------------------------------------
(forall (a:'a,b:'b), true) = true

[> Line 426: (auto) [goal> lemma forall_true2 is proved

lemma forall_true2 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c
----------------------------------------
(forall (a:'a,b:'b,c:'c), true) = true

[> Line 430: (auto) [goal> lemma forall_true3 is proved

lemma forall_true3 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c, 'd
----------------------------------------
(forall (a:'a,b:'b,c:'c,d:'d), true) = true

[> Line 434: (auto) [goal> lemma forall_true4 is proved

lemma forall_true4 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c, 'd, 'e
----------------------------------------
(forall (a:'a,b:'b,c:'c,d:'d,e:'e), true) = true

[> Line 438: (auto) [goal> lemma forall_true5 is proved

lemma forall_true5 {'P:system} @system:(set:'P; equiv:None)
['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b, 'c, 'd, 'e, 'f
----------------------------------------
(forall (a:'a,b:'b,c:'c,d:'d,e:'e,f:'f), true) = true

[> Line 442: (auto) [goal> lemma forall_true6 is proved

lemma forall_true6 {'P:system} @system:(set:'P; equiv:None)
['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 len_zeroes {'P:system} @system:(set:'P; equiv:None) :
forall (x:message), len (zeroes x) = len x
Goal f_apply :
x = y => f x = f y
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b
Variables: f:'a -> 'b,x,y:'a
----------------------------------------
x = y => f x = f y

[> Line 455: by (intro) [goal> lemma f_apply is proved

lemma f_apply {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
not exists (a:'a), phi a = forall (a:'a), not (phi a)

[> Line 461: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
not exists (a:'a), phi a <=> forall (a:'a), not (phi a)

[> Line 462: (split) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
not exists (a:'a), phi a => forall (a:'a), not (phi a)

[> Line 463: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: a:'a,phi:'a -> bool
H: not exists (a:'a), phi a
Hp: phi a
----------------------------------------
false

[> Line 463: (apply) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 465: by (exists) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool
----------------------------------------
(forall (a:'a), not (phi a)) => not exists (a:'a), phi a

[> Line 465: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: a:'a,phi:'a -> bool
H: forall (a:'a), not (phi a)
Hp: phi a
----------------------------------------
false

[> Line 467: by (have) [goal> lemma not_exists_1 is proved

lemma not_exists_1 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 473: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 474: (split) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 475: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 475: (apply) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 477: by (exists) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 477: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 479: by (have) [goal> lemma not_exists_2 is proved

lemma not_exists_2 {'P:system} @system:(set:'P; equiv:None) ['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 not_forall_1 {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (phi:'a -> bool),
not forall (a:'a), phi a = exists (a:'a), not (phi a)
axiom not_forall_2 {'P:system} @system:(set:'P; equiv:None) ['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 try_carac_1 {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool,x:'a
----------------------------------------
phi x => phi (choose phi)

[> Line 505: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
phi (choose phi)

[> Line 508: (have) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 509: ?? [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 509: ((rewrite);(intro)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:'a -> bool,x:'a
H: phi x
----------------------------------------
exists (x:'a), phi x

[> Line 510: by (exists) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 511: ?? [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 512: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 513: (case) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 514: (auto) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 515: ((intro);by (have)) [goal> lemma choose_spec is proved

lemma choose_spec {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 524: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 525: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 526: ((rewrite);(intro)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a, 'b
Variables: f:'a -> 'b,g:'b,phi:'a -> bool,x:'a
H: phi x
----------------------------------------
exists (x:'a), phi x

[> Line 527: by (exists) [goal> lemma try_choose is proved

lemma try_choose {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
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 536: ((rewrite);(split)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 537: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 538: (exists) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 539: ((intro);(simpl)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 540: (have) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 544: ((have); 1: by (auto)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 545: (apply) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 546: ((simpl);(assumption)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 547: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 548: (exists) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 549: by (apply) [goal> lemma forall_exists is proved

lemma forall_exists {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:bool,psi:'a -> bool
----------------------------------------
(phi => exists (j:'a), psi j) = exists (x:'a), phi => psi x

[> Line 556: ((rewrite);(split)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
----------------------------------------
(phi => exists (j:'a), psi j) => exists (x:'a), phi => psi x

[> Line 557: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
H: phi => exists (j:'a), psi j
----------------------------------------
exists (x:'a), phi => psi x

[> Line 558: (case) [goal> Focused goal (1/3):
System variables: 'P
System: (set:'P; equiv:None)
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 559: (intro) [goal> Focused goal (1/3):
System variables: 'P
System: (set:'P; equiv:None)
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 560: ((have); 1: by (apply)) [goal> Focused goal (1/3):
System variables: 'P
System: (set:'P; equiv:None)
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 561: by (exists) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 562: (intro) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 563: by (exists) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool
----------------------------------------
(exists (x:'a), phi => psi x) => phi => exists (j:'a), psi j

[> Line 564: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: phi:bool[const],psi:'a -> bool,x:'a
H: phi => psi x
H': phi
----------------------------------------
exists (j:'a), psi j

[> Line 565: by (exists) [goal> lemma implies_exists is proved

lemma implies_exists {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (phi:bool,psi:'a -> bool),
(phi => exists (j:'a), psi j) = exists (x:'a), phi => psi x
Exiting proof mode.

axiom le_trans {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y,z:'a), x <= y => y <= z => x <= z
axiom lt_trans {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y,z:'a), x < y => y < z => x < z
axiom lt_le_trans {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y,z:'a), x < y => y <= z => x < z
axiom le_lt_trans {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y,z:'a), x <= y => y < z => x < z
axiom lt_charac {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y:'a), x < y <=> x <> y && x <= y
axiom le_not_lt_impl_eq {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x,y:'a
----------------------------------------
x < y => x <= y

[> Line 580: by (rewrite) [goal> lemma lt_impl_le is proved

lemma lt_impl_le {'P:system} @system:(set:'P; equiv:None) ['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 variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x:'a
----------------------------------------
not (x < x)

[> Line 583: (auto) [goal> lemma not_lt_refl is proved

lemma not_lt_refl {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x:'a), not (x < x)
Exiting proof mode.

Goal lt_irrefl :
x < x <=> false
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Type variables: 'a
Variables: x:'a
----------------------------------------
x < x <=> false

[> Line 586: (auto) [goal> lemma lt_irrefl is proved

lemma lt_irrefl {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x:'a), x < x <=> false
Exiting proof mode.

axiom le_impl_eq_lt {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,y:'a), x <= y => x = y || x < y
axiom le_refl_index {'P:system} @system:(set:'P; equiv:None) :
forall (x:index), x <= x
Goal le_refl_index_eq :
x <= x = true
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x:index
----------------------------------------
x <= x = true

[> Line 599: by (rewrite) [goal> lemma le_refl_index_eq is proved

lemma le_refl_index_eq {'P:system} @system:(set:'P; equiv:None) :
forall (x:index), x <= x = true
Exiting proof mode.

Goal le_pred_lt :
t <= pred t' = t < t'
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: t,t':timestamp
----------------------------------------
t <= pred t' = t < t'

[> Line 603: by (rewrite) [goal> lemma le_pred_lt is proved

lemma le_pred_lt {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: t,t':timestamp
----------------------------------------
t <> t' => t <= t' = t <= pred t'

[> Line 607: by (rewrite) [goal> lemma neq_le_pred_le is proved

lemma neq_le_pred_le {'P:system} @system:(set:'P; equiv:None) :
forall (t,t':timestamp), t <> t' => t <= t' = t <= pred t'
Exiting proof mode.

axiom le_lt {'P:system} @system:(set:'P; equiv:None) ['a] :
forall (x,x':'a), x <> x' => x <= x' = x < x'
[warning>Loaded "Logic.sp".
<]axiom empty_set_is_empty {'P:system} @system:(set:'P; equiv:None) :
forall (x:message), not (mem x empty_set)
[warning>Loaded "Set.sp".
<]new predicate:
predicate (|>) {set:system} ['a 'b] {set: u:'a,m:'b} =
Exists (f:'a -> 'b[adv, glob]), [f u = m]
new predicate:
predicate (|1>) {set:system} ['a 'b 'c] {set: u:'a -> 'b,m:'a -> 'c} =
Exists (f:'b -> 'c[adv, glob]), [forall (x:'a), f (u x) = m x]
[warning>Loaded "DeductionSyntax.sp".
<]Goal unnamed1 :
forall u:'b[glob],v:'a -> 'c[glob],
Let u0 = fun (_x:'a) => u in
$(u0 |1>{Empty} fun (x:'a) => v x) -> $(u |>{Empty} fun (x:'a) => v x)
[goal> Focused goal (1/1):
Systems: Empty
Type variables: 'a, 'b, 'c
Variables: u:'b[glob],v:'a -> 'c[glob]
----------------------------------------
Let u0 = fun (_x:'a) => u in
$(u0 |1> fun (x:'a) => v x) -> $(u |> fun (x:'a) => v x)

[> Line 11: (intro) [goal> Focused goal (1/1):
Systems: Empty
Type variables: 'a, 'b, 'c
Variables: u:'b[glob],v:'a -> 'c[glob]
H: $(u0 |1> fun (x:'a) => v x)
u0 := fun (_x:'a) => u
----------------------------------------
$(u |> fun (x:'a) => v x)

[> Line 12: (rewrite) [goal> Focused goal (1/1):
Systems: Empty
Type variables: 'a, 'b, 'c
Variables: u:'b[glob],v:'a -> 'c[glob]
H: $(u0 |1> fun (x:'a) => v x)
u0 := fun (_x:'a) => u
----------------------------------------
Exists (f:'b -> 'a -> 'c[adv, glob]), [f u = (fun (x:'a) => v x)]

[> Line 13: (rewrite) [goal> Focused goal (1/1):
Systems: Empty
Type variables: 'a, 'b, 'c
Variables: u:'b[glob],v:'a -> 'c[glob]
H: Exists (f:'b -> 'c[adv, glob]),
[forall (x:'a), f (u0 x) = (fun (x:'a) => v x) x]
u0 := fun (_x:'a) => u
----------------------------------------
Exists (f:'b -> 'a -> 'c[adv, glob]), [f u = (fun (x:'a) => v x)]

[> Line 14: (destruct) [goal> Focused goal (1/1):
Systems: Empty
Type variables: 'a, 'b, 'c
Variables: f:'b -> 'c[adv, glob],u:'b[glob],v:'a -> 'c[glob]
H: [forall (x:'a), f (u0 x) = (fun (x:'a) => v x) x]
u0 := fun (_x:'a) => u
----------------------------------------
Exists (f:'b -> 'a -> 'c[adv, glob]), [f u = (fun (x:'a) => v x)]

[> Line 14: ((exists);(intro)) [goal> Focused goal (1/1):
System: Empty
Type variables: 'a, 'b, 'c
Variables: f:'b -> 'c[adv, glob],u:'b[glob],v:'a -> 'c[glob]
H: [forall (x:'a), f (u0 x) = v x]
u0 := fun (_x:'a) => u
----------------------------------------
(fun (x:'a) => f u) = (fun (x:'a) => v x)

[> Line 16: ((apply);(intro)) [goal> Focused goal (1/1):
System: Empty
Type variables: 'a, 'b, 'c
Variables: f:'b -> 'c[adv, glob],u:'b[glob],v:'a -> 'c[glob],x:'a
H: [forall (x:'a), f (u0 x) = v x]
u0 := fun (_x:'a) => u
----------------------------------------
f u = v x

[> Line 17: (rewrite) [goal> Focused goal (1/1):
System: Empty
Type variables: 'a, 'b, 'c
Variables: f:'b -> 'c[adv, glob],u:'b[glob],v:'a -> 'c[glob],x:'a
H: [forall (x:'a), f u = v x]
u0 := fun (_x:'a) => u
----------------------------------------
f u = v x

[> Line 18: (apply) [goal> lemma unnamed1 is proved

global lemma unnamed1 @system:Empty ['a 'b 'c] :
Forall (u:'b[glob],v:'a -> 'c[glob]),
Let u0 = fun (_x:'a) => u in
$(u0 |1>{Empty} fun (x:'a) => v x) -> $(u |>{Empty} fun (x:'a) => v x)
Exiting proof mode.

global axiom frame_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (t' <= t) then frame@t')
New deduction hint frame_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (frame@t' |
t' <= x)
global axiom exec_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (t' <= t) then exec@t' else witness)
New deduction hint exec_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (exec@t' |
t' <= x)
global axiom output_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (t' <= t && exec@t') then output@t')
New deduction hint output_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (output@t' |
t' <= x && exec@t')
global axiom input_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (pred t' <= t) then input@t')
New deduction hint input_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (input@t' |
pred t' <= x)
global axiom exec_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (t' <= t) then exec@t' else witness)
New deduction hint exec_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (exec@t' |
t' <= x)
global axiom output_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (t' <= t && exec@t') then output@t')
New deduction hint output_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (output@t' |
t' <= x && exec@t')
global axiom input_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (pred t' <= t) then input@t')
New deduction hint input_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (input@t' |
pred t' <= x)
global axiom transcript_from_frame {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => frame@t |1>{P}
fun (t,t':timestamp) => if (t' <= t) then transcript@t')
New deduction hint transcript_from_frame :
∀{P:system} , @system:(P), ∀ x ⊢ frame@x ▷ λ t' ⇒ (transcript@t' |
t' <= x)
global axiom transcript_from_transcript {P:system}
@system:(set:P; equiv:None) :
$(fun (t:timestamp) => transcript@t |1>{P}
fun (t,t':timestamp) => if (t' <= t) then transcript@t')
New deduction hint transcript_from_transcript :
∀{P:system} , @system:(P), ∀ x ⊢ transcript@x ▷ λ t' ⇒ (
transcript@t' |
t' <= x)
global axiom exec_from_transcript {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => transcript@t |1>{P}
fun (t,t':timestamp) => if (t' <= t) then exec@t' else witness)
New deduction hint exec_from_transcript :
∀{P:system} , @system:(P), ∀ x ⊢ transcript@x ▷ λ t' ⇒ (
exec@t' | t' <= x)
global axiom output_from_transcript {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => transcript@t |1>{P}
fun (t,t':timestamp) => if (t' <= t && exec@t') then output@t')
New deduction hint output_from_transcript :
∀{P:system} , @system:(P), ∀ x ⊢ transcript@x ▷ λ t' ⇒ (
output@t' |
t' <= x && exec@t')
global axiom input_from_transcript {P:system} @system:(set:P; equiv:None) :
$(fun (t:timestamp) => transcript@t |1>{P}
fun (t,t':timestamp) => if (pred t' <= t) then input@t')
New deduction hint input_from_transcript :
∀{P:system} , @system:(P), ∀ x ⊢ transcript@x ▷ λ t' ⇒ (
input@t' |
pred t' <= x)
[warning>Loaded "Deduction.sp".
<]axiom exec_not_init {'P:system} @system:(set:'P; equiv:None) :
forall (tau:timestamp),
init < tau => exec@tau = (exec@pred tau && cond@tau)
axiom exec_init {'P:system} @system:(set:'P; equiv:None) :
forall (tau:timestamp), tau = init => exec@tau = true
axiom cond_init {'P:system} @system:(set:'P; equiv:None) :
forall (tau:timestamp), tau = init => cond@tau = true
Goal exec_le :
tau' <= tau => exec@tau => exec@tau'
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: tau,tau':timestamp
----------------------------------------
tau' <= tau => exec@tau => exec@tau'

[> Line 17: ((induction);(intro)) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 18: (case) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
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 19: (auto) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 20: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 21: (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
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 22: by (apply) [goal> lemma exec_le is proved

lemma exec_le {'P:system} @system:(set:'P; equiv:None) :
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 variables: 'P
System: (set:'P; equiv:None)
Variables: tau:timestamp
----------------------------------------
happens(tau) => exec@tau => cond@tau

[> Line 27: (intro) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: tau:timestamp[const]
Hap: happens(tau)
Hexec: exec@tau
----------------------------------------
cond@tau

[> Line 28: ((case);(intro)) [goal> Focused goal (1/2):
System variables: 'P
System: (set:'P; equiv:None)
Variables: tau:timestamp[const]
Hap: happens(tau)
Hexec: exec@tau
_: init < tau
----------------------------------------
cond@tau

[> Line 29: by (rewrite) [goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: tau:timestamp[const]
Hap: happens(tau)
Hexec: exec@tau
_: not (init < tau)
----------------------------------------
cond@tau

[> Line 30: by (rewrite) [goal> lemma exec_cond is proved

lemma exec_cond {'P:system} @system:(set:'P; equiv:None) :
forall (tau:timestamp), happens(tau) => exec@tau => cond@tau
Exiting proof mode.

axiom executability {'P:system} @system:(set:'P; equiv:None) :
forall (t:timestamp),
happens(t) => exec@t => forall (t0:timestamp), t0 <= t => exec@t0
[warning>Loaded "Classic.sp".
<][warning>Loaded "Core.sp".
<]


lemma [any] dec_enc (x,y,z:message) : dec(enc(x,z,y),y) = x.
Goal dec_enc :
dec (enc (x, z, y), y) = x

Proof.
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: x,y,z:message
----------------------------------------
dec (enc (x, z, y), y) = x

auto. [> Line 237: (auto) [goal> lemma dec_enc is proved

Qed. lemma dec_enc {'P:system} @system:(set:'P; equiv:None) :
forall (x,y,z:message), dec (enc (x, z, y), y) = x
Exiting proof mode.


hint rewrite dec_enc.


(* instances of f_apply *)
lemma [any] dec_apply (x,x',k : message): x = x' => dec(x,k) = dec(x',k).
Goal dec_apply :
x = x' => dec (x, k) = dec (x', k)

Proof.
[goal> Focused goal (1/1):
System variables: 'P
System: (set:'P; equiv:None)
Variables: k,x,x':message
----------------------------------------
x = x' => dec (x, k) = dec (x', k)

auto. [> Line 242: (auto) [goal> lemma dec_apply is proved

Qed. lemma dec_apply {'P:system} @system:(set:'P; equiv:None) :
forall (x,x',k:message), x = x' => dec (x, k) = dec (x', k)
Exiting proof mode.



(*------------------------------------------------------------------*)
(* HELPING LEMMAS - counter increase *)

(* The counter SCtr(j) strictly increases when t is an action Server
performed by the server with tag j. *)

lemma counterIncreaseStrictly (pid,j:index):
happens(Server(pid,j)) =>
cond@Server(pid,j) =>
SCtr(pid)@pred(Server(pid,j)) ~< SCtr(pid)@Server(pid,j).
Goal counterIncreaseStrictly :
happens(Server(pid, j)) =>
cond@Server(pid, j) =>
SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index
----------------------------------------
happens(Server(pid, j)) =>
cond@Server(pid, j) =>
SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)


auto.
[> Line 256: (auto) [goal> lemma counterIncreaseStrictly is proved


Qed.
lemma counterIncreaseStrictly @system:(set:default; equiv:None) :
forall (pid,j:index),
happens(Server(pid, j)) =>
cond@Server(pid, j) =>
SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
Exiting proof mode.



lemma counterIncrease (t:timestamp, pid : index) :
happens(t) =>
t > init && exec@t =>
SCtr(pid)@pred(t) ~< SCtr(pid)@t ||
SCtr(pid)@t = SCtr(pid)@pred(t).
Goal counterIncrease :
happens(t) =>
t > init && exec@t =>
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index,t:timestamp
----------------------------------------
happens(t) =>
t > init && exec@t =>
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t


intro Hap [Ht Hexec].
[> Line 265: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t:timestamp[const]
Hap: happens(t)
Hexec: exec@t
Ht: t > init
----------------------------------------
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t


case t;
try (intro *; by right).
[> Line 267: ((case);(try ((intro);by (right)))) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t:timestamp[const]
Hap: happens(t)
Hexec: exec@t
Ht: t > init
----------------------------------------
(exists (pid0,j:index), t = Server(pid0, j)) =>
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t



intro [pid0 j0 E].
[> Line 269: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j0,pid,pid0:index[const],t:timestamp[const]
E: t = Server(pid0, j0)
Hap: happens(t)
Hexec: exec@t
Ht: t > init
----------------------------------------
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t


case (pid = pid0) => Eq.
[> Line 270: ((case);(intro)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j0,pid,pid0:index[const],t:timestamp[const]
E: t = Server(pid0, j0)
Eq: pid = pid0
Hap: happens(t)
Hexec: exec@t
Ht: t > init
----------------------------------------
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t


+ by rewrite if_true.
[> Line 270: by (rewrite) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j0,pid,pid0:index[const],t:timestamp[const]
E: t = Server(pid0, j0)
Eq: not (pid = pid0)
Hap: happens(t)
Hexec: exec@t
Ht: t > init
----------------------------------------
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t


+ by right; rewrite if_false.
[> Line 272: by ((right);(rewrite)) [goal> lemma counterIncrease is proved


Qed.
lemma counterIncrease @system:(set:default; equiv:None) :
forall (t:timestamp,pid:index),
happens(t) =>
t > init && exec@t =>
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t
Exiting proof mode.



(* The counter SCpt(ped) increases (not strictly) between t' and t
when t' < t. *)
lemma counterIncreaseBis:
forall (t:timestamp), forall (t':timestamp), forall (pid:index),
happens(t) =>
exec@t && t' < t =>
( SCtr(pid)@t' ~< SCtr(pid)@t ||
SCtr(pid)@t = SCtr(pid)@t').
Goal counterIncreaseBis :
forall (t,t':timestamp,pid:index),
happens(t) =>
exec@t && t' < t => SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
----------------------------------------
forall (t,t':timestamp,pid:index),
happens(t) =>
exec@t && t' < t => SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'



induction.
[> Line 284: (induction) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
----------------------------------------
forall (t:timestamp),
(forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t') =>
forall (t':timestamp,pid:index),
happens(t) =>
exec@t && t' < t => SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'



intro t IH0 t' pid Hap [Hexec Ht'].
[> Line 285: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'


assert (t' = pred(t) || t' < pred(t)) as H0;
1: case t; constraints.
[> Line 287: ((have); 1: ((case);(constraints))) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' = pred t || t' < pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'


case H0.
[> Line 288: (case) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' = pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'



+ (* case t' = pred(t) *)
rewrite !H0.
[> Line 291: (rewrite) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' = pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t


by apply counterIncrease.
[> Line 292: by (apply) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'



+ (* case t' < pred(t) *)
use IH0 with pred(t),t',pid as H1 => //=.
[> Line 295: ((have);(intro)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
H1: SCtr pid@t' ~< SCtr pid@pred t || SCtr pid@pred t = SCtr pid@t'
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'


- use counterIncrease with t,pid as H3 => //.
[> Line 296: ((have);(intro)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
H1: SCtr pid@t' ~< SCtr pid@pred t || SCtr pid@pred t = SCtr pid@t'
H3: SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'


case H1 => //.
[> Line 297: ((case);(intro)) [goal> Focused goal (1/3):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
H1: SCtr pid@t' ~< SCtr pid@pred t
H3: SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'


* (* case H1 - 1/2 *)
case H3 => //.
[> Line 299: ((case);(intro)) [goal> Focused goal (1/3):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
H1: SCtr pid@t' ~< SCtr pid@pred t
H3: SCtr pid@pred t ~< SCtr pid@t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'


by left; apply orderTrans _ (SCtr(pid)@pred(t)) _.
[> Line 300: by ((left);(apply)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
H1: SCtr pid@pred t = SCtr pid@t'
H3: SCtr pid@pred t ~< SCtr pid@t || SCtr pid@t = SCtr pid@pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'



* by case H3.
[> Line 302: by (case) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
exec@pred t



- executable t => // H1.
[> Line 304: ((executable);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: pid:index[const],t,t':timestamp[const]
H0: t' < pred t
H1: forall (t0:timestamp), t0 <= t => exec@t0
Hap: happens(t)
Hexec: exec@t
Ht': t' < t
IH0: forall (t0,t':timestamp,pid:index),
t0 < t =>
happens(t0) =>
exec@t0 && t' < t0 =>
SCtr pid@t' ~< SCtr pid@t0 || SCtr pid@t0 = SCtr pid@t'
----------------------------------------
exec@pred t


by apply H1.
[> Line 305: by (apply) [goal> lemma counterIncreaseBis is proved


Qed.
lemma counterIncreaseBis @system:(set:default; equiv:None) :
forall (t,t':timestamp,pid:index),
happens(t) =>
exec@t && t' < t => SCtr pid@t' ~< SCtr pid@t || SCtr pid@t = SCtr pid@t'
Exiting proof mode.



(*------------------------------------------------------------------------------
SECURITY PROPERTIES 1 (no replay) AND 3 (monotonicity)
These two properties are proved directly on the real system, since they do not
rely on the intctxt tactic.
------------------------------------------------------------------------------*)

lemma noreplayInv (j, j', pid:index):
happens(Server(pid,j),Server(pid,j')) =>
exec@Server(pid,j') && Server(pid,j) < Server(pid,j') =>
SCtr(pid)@Server(pid,j) ~< SCtr(pid)@Server(pid,j').
Goal noreplayInv :
happens(Server(pid, j'), Server(pid, j)) =>
exec@Server(pid, j') && Server(pid, j) < Server(pid, j') =>
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index
----------------------------------------
happens(Server(pid, j'), Server(pid, j)) =>
exec@Server(pid, j') && Server(pid, j) < Server(pid, j') =>
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')


intro Hap [Hexec Ht].
[> Line 319: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')


use counterIncreaseStrictly with pid, j' as H0 => //.
[> Line 320: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H0: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')


assert (Server(pid,j) = pred(Server(pid,j')) ||
Server(pid,j) < pred(Server(pid,j'))) as H1
by constraints.
[> Line 323: ((have); 1: by (constraints)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H0: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H1: Server(pid, j) = pred (Server(pid, j')) ||
Server(pid, j) < pred (Server(pid, j'))
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')


case H1.
[> Line 324: (case) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H0: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H1: Server(pid, j) = pred (Server(pid, j'))
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')



+ (* case Server(pid,j) = pred(Server(pid,j')) *)
by rewrite H1 in *.
[> Line 327: by (rewrite) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H0: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H1: Server(pid, j) < pred (Server(pid, j'))
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')



+ (* case Server(pid,j) < pred(Server(pid,j')) *)
use counterIncreaseBis with pred(Server(pid,j')),Server(pid,j),pid as H2 => //.
[> Line 330: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H0: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H1: Server(pid, j) < pred (Server(pid, j'))
H2: SCtr pid@Server(pid, j) ~< SCtr pid@pred (Server(pid, j')) ||
SCtr pid@pred (Server(pid, j')) = SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')


case H2;
1: by apply orderTrans _ (SCtr(pid)@pred(Server(pid,j'))) _.
[> Line 332: ((case); 1: by (apply)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H0: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H1: Server(pid, j) < pred (Server(pid, j'))
H2: SCtr pid@pred (Server(pid, j')) = SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j'), Server(pid, j))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) < Server(pid, j')
----------------------------------------
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')


by rewrite H2 in *.
[> Line 333: by (rewrite) [goal> lemma noreplayInv is proved


Qed.
lemma noreplayInv @system:(set:default; equiv:None) :
forall (j,j',pid:index),
happens(Server(pid, j'), Server(pid, j)) =>
exec@Server(pid, j') && Server(pid, j) < Server(pid, j') =>
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Exiting proof mode.



lemma noreplay (j, j', pid:index):
happens(Server(pid,j')) =>
exec@Server(pid,j') =>
Server(pid,j) <= Server(pid,j') =>
SCtr(pid)@Server(pid,j)= SCtr(pid)@Server(pid,j')=>
j = j'.
Goal noreplay :
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
Server(pid, j) <= Server(pid, j') =>
SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j') => j = j'

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index
----------------------------------------
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
Server(pid, j) <= Server(pid, j') =>
SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j') => j = j'


intro Hap Hexec Ht Meq.
[> Line 343: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
Hap: happens(Server(pid, j'))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) <= Server(pid, j')
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
----------------------------------------
j = j'


assert (Server(pid,j) = Server(pid,j') ||
Server(pid,j) < Server(pid,j')) as H1
by constraints.
[> Line 346: ((have); 1: by (constraints)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H1: Server(pid, j) = Server(pid, j') || Server(pid, j) < Server(pid, j')
Hap: happens(Server(pid, j'))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) <= Server(pid, j')
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
----------------------------------------
j = j'


case H1 => //.
[> Line 347: ((case);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H1: Server(pid, j) < Server(pid, j')
Hap: happens(Server(pid, j'))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) <= Server(pid, j')
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
----------------------------------------
j = j'



use noreplayInv with j, j', pid as M1 => //.
[> Line 349: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H1: Server(pid, j) < Server(pid, j')
Hap: happens(Server(pid, j'))
Hexec: exec@Server(pid, j')
Ht: Server(pid, j) <= Server(pid, j')
M1: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
----------------------------------------
j = j'


by apply orderStrict in Meq.
[> Line 350: by (apply) [goal> lemma noreplay is proved


Qed.
lemma noreplay @system:(set:default; equiv:None) :
forall (j,j',pid:index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
Server(pid, j) <= Server(pid, j') =>
SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j') => j = j'
Exiting proof mode.



(*------------------------------------------------------------------*)
lemma monotonicity (j, j', pid:index):
happens(Server(pid,j'),Server(pid,j)) =>
exec@Server(pid,j') && exec@Server(pid,j) &&
SCtr(pid)@Server(pid,j) ~< SCtr(pid)@Server(pid,j') =>
Server(pid,j) < Server(pid,j').
Goal monotonicity :
happens(Server(pid, j), Server(pid, j')) =>
exec@Server(pid, j') &&
exec@Server(pid, j) && SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
=> Server(pid, j) < Server(pid, j')

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index
----------------------------------------
happens(Server(pid, j), Server(pid, j')) =>
exec@Server(pid, j') &&
exec@Server(pid, j) && SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
=> Server(pid, j) < Server(pid, j')


intro Hap [_ _ H].
[> Line 360: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j), Server(pid, j'))
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')


assert
(Server(pid,j) = Server(pid,j') ||
Server(pid,j)< Server(pid,j') ||
Server(pid,j) > Server(pid,j')) as Ht;
1: constraints.
[> Line 365: ((have); 1: (constraints)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j), Server(pid, j'))
Ht: Server(pid, j) = Server(pid, j') ||
Server(pid, j) < Server(pid, j') || Server(pid, j) > Server(pid, j')
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')


case Ht.
[> Line 366: (case) [goal> Focused goal (1/3):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j), Server(pid, j'))
Ht: Server(pid, j) = Server(pid, j')
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')



+ (* case Server(pid,j) = Server(pid,j') *)
by apply orderStrict in H.
[> Line 369: by (apply) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j), Server(pid, j'))
Ht: Server(pid, j) < Server(pid, j')
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')



+ (* case Server(pid,j) < Server(pid,j') *)
assumption.
[> Line 372: (assumption) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j), Server(pid, j'))
Ht: Server(pid, j) > Server(pid, j')
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')



+ (* case Server(pid,j) > Server(pid,j') *)
use noreplayInv with j', j, pid as Meq => //.
[> Line 375: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j), Server(pid, j'))
Ht: Server(pid, j) > Server(pid, j')
Meq: SCtr pid@Server(pid, j') ~< SCtr pid@Server(pid, j)
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')


use orderTrans with SCtr(pid)@Server(pid,j), SCtr(pid)@Server(pid,j'), SCtr(pid)@Server(pid,j) => //.
[> Line 376: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,j',pid:index[const]
H: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
H0: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j), Server(pid, j'))
Ht: Server(pid, j) > Server(pid, j')
Meq: SCtr pid@Server(pid, j') ~< SCtr pid@Server(pid, j)
_: exec@Server(pid, j)
_: exec@Server(pid, j')
----------------------------------------
Server(pid, j) < Server(pid, j')


by apply orderStrict in H0.
[> Line 377: by (apply) [goal> lemma monotonicity is proved


Qed.
lemma monotonicity @system:(set:default; equiv:None) :
forall (j,j',pid:index),
happens(Server(pid, j), Server(pid, j')) =>
exec@Server(pid, j') &&
exec@Server(pid, j) &&
SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j') =>
Server(pid, j) < Server(pid, j')
Exiting proof mode.




(*------------------------------------------------------------------------------
SECURITY PROPERTY 2 (injective correspondence)
The proof of this property is done in 2 steps.
- We first establish the equivalence between the real system and the ideal one
(in which the key inside the AEAD are replaced by a dummy one).
This corresponds to the lemma injective_correspondence_equiv.
- Then, we use the rule REACH-EQUIV (through the tactic rewrite equiv) in order
to replace the real system by the ideal one, so that we only have to prove the
security property on the ideal system.
This corresponds to the lemma injective_correspondence.

Beforehand, we prove some helping lemmas:
- valid_decode, in order to characterize when the AEAD decoding process is valid;
- if_aux, a lemma used to rewrite a conditional;
- equiv_real_ideal_enrich_XXX, a serie of lemmas establishing the equivalence
between the real system and an ideal one, using sequences to enrich the frame.
------------------------------------------------------------------------------*)

(*------------------------------------------------------------------*)
(* First property of AEAD decoding. *)
lemma valid_decode (t : timestamp) (pid,j : index):
(t = Decode(pid,j) || t = Decode1(pid,j)) =>
happens(t) =>
(aead_dec pid j@t <> fail) =
(exists(pid0 : index),
Setup(pid0) < t &&
AEAD(pid0)@Setup(pid0) = aead pid j@t).
Goal valid_decode :
t = Decode(pid, j) || t = Decode1(pid, j) =>
happens(t) =>
(aead_dec pid j@t <> fail) =
exists (pid0:index),
Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index,t:timestamp
----------------------------------------
t = Decode(pid, j) || t = Decode1(pid, j) =>
happens(t) =>
(aead_dec pid j@t <> fail) =
exists (pid0:index), Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t


intro Eq Hap.
[> Line 409: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
(aead_dec pid j@t <> fail) =
exists (pid0:index), Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t


rewrite eq_iff; split.
[> Line 410: ((rewrite);(split)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
aead_dec pid j@t <> fail =>
exists (pid0:index), Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t



+ (* Left => Right *)
intro AEAD_dec.
[> Line 413: (intro) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
AEAD_dec: aead_dec pid j@t <> fail
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
exists (pid0:index), Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t


case Eq;
expand aead_dec;
intctxt AEAD_dec => // [pid0 AEAD_eq];
by exists pid0.
[> Line 417: ((((case);((expand);(intctxt)));(intro));by (exists))
Indirect randomness in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining

among which 1 trivial randomness occurrence is ignored
1 possible ciphertext found.

Indirect randomness in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining

among which 1 trivial randomness occurrence is ignored
1 possible ciphertext found.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
(exists (pid0:index), Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t)
=> aead_dec pid j@t <> fail



+ (* Right => Left *)
intro [pid0 [Clt H]].
[> Line 420: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid,pid0:index[const],t:timestamp[const]
Clt: Setup(pid0) < t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
H: AEAD pid0@Setup(pid0) = aead pid j@t
Hap: happens(t)
----------------------------------------
aead_dec pid j@t <> fail


case Eq;
expand aead_dec;
rewrite -H /AEAD /=;
apply pair_ne_fail.
[> Line 424: ((case);((expand);((rewrite);(apply)))) [goal> lemma valid_decode is proved


Qed.
lemma valid_decode @system:(set:default; equiv:None) :
forall (t:timestamp,pid,j:index),
t = Decode(pid, j) || t = Decode1(pid, j) =>
happens(t) =>
(aead_dec pid j@t <> fail) =
exists (pid0:index),
Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t
Exiting proof mode.



(* Using the `valid_decode` lemma, we can characterize when the full
decoding check goes through. *)
lemma valid_decode_charac (t : timestamp) (pid,j : index):
(t = Decode(pid,j) || t = Decode1(pid,j)) =>
happens(t) =>
( aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst(otp_dec pid j@t) = snd(snd(aead_dec pid j@t)) &&
mpid(pid) = fst(snd(aead_dec pid j@t)) )
=
( AEAD(pid)@Setup(pid) = aead pid j@t &&
dec(otp pid j@t,k(pid)) <> fail &&
fst(dec(otp pid j@t,k(pid))) = sid(pid) ).
Goal valid_decode_charac :
t = Decode(pid, j) || t = Decode1(pid, j) =>
happens(t) =>
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) =
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid)

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index,t:timestamp
----------------------------------------
t = Decode(pid, j) || t = Decode1(pid, j) =>
happens(t) =>
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) =
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid)



intro Eq Hap.
[> Line 441: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) =
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid)



rewrite eq_iff; split.
[> Line 442: ((rewrite);(split)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t)) =>
AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid



+ (* => case *)
intro [AEAD_dec OTP_dec Sid_eq Pid_eq].
[> Line 445: (intro) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
AEAD_dec: aead_dec pid j@t <> fail
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
OTP_dec: otp_dec pid j@t <> fail
Pid_eq: mpid pid = fst (snd (aead_dec pid j@t))
Sid_eq: fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t))
----------------------------------------
AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid


rewrite valid_decode // in AEAD_dec.
[> Line 446: (rewrite) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
AEAD_dec: exists (pid0:index),
Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
OTP_dec: otp_dec pid j@t <> fail
Pid_eq: mpid pid = fst (snd (aead_dec pid j@t))
Sid_eq: fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t))
----------------------------------------
AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid


destruct AEAD_dec as [pid0 [Clt AEAD_dec]].
[> Line 447: (destruct) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid,pid0:index[const],t:timestamp[const]
AEAD_dec: AEAD pid0@Setup(pid0) = aead pid j@t
Clt: Setup(pid0) < t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
OTP_dec: otp_dec pid j@t <> fail
Pid_eq: mpid pid = fst (snd (aead_dec pid j@t))
Sid_eq: fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t))
----------------------------------------
AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid



assert (pid0 = pid).
[> Line 449: (have) [goal> Focused goal (1/3):
System: (set:default; equiv:None)
Variables: j,pid,pid0:index[const],t:timestamp[const]
AEAD_dec: AEAD pid0@Setup(pid0) = aead pid j@t
Clt: Setup(pid0) < t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
OTP_dec: otp_dec pid j@t <> fail
Pid_eq: mpid pid = fst (snd (aead_dec pid j@t))
Sid_eq: fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t))
----------------------------------------
pid0 = pid


by case Eq; use mpid_inj with pid, pid0.
[> Line 450: by ((case);(have)) [goal> Focused goal (1/2):
System: (set:default; equiv:None)
Variables: j,pid,pid0:index[const],t:timestamp[const]
AEAD_dec: AEAD pid0@Setup(pid0) = aead pid j@t
Clt: Setup(pid0) < t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
Ieq: pid0 = pid
OTP_dec: otp_dec pid j@t <> fail
Pid_eq: mpid pid = fst (snd (aead_dec pid j@t))
Sid_eq: fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t))
----------------------------------------
AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid


case Eq; project; auto.
[> Line 451: ((case);((project);(auto))) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
----------------------------------------
AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail && fst (dec (otp pid j@t, k pid)) = sid pid
=>
aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))



+ (* <= case *)
intro [AEAD_dec OTP_dec Sid_eq].
[> Line 454: (intro) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
AEAD_dec: AEAD pid@Setup(pid) = aead pid j@t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
OTP_dec: dec (otp pid j@t, k pid) <> fail
Sid_eq: fst (dec (otp pid j@t, k pid)) = sid pid
----------------------------------------
aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))


rewrite valid_decode //.
[> Line 455: (rewrite) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: j,pid:index[const],t:timestamp[const]
AEAD_dec: AEAD pid@Setup(pid) = aead pid j@t
Eq: t = Decode(pid, j) || t = Decode1(pid, j)
Hap: happens(t)
OTP_dec: dec (otp pid j@t, k pid) <> fail
Sid_eq: fst (dec (otp pid j@t, k pid)) = sid pid
----------------------------------------
(exists (pid0:index), Setup(pid0) < t && AEAD pid0@Setup(pid0) = aead pid j@t)
&&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))


case Eq;
(depends Setup(pid), t by auto);
intro Clt;
by project; simpl; exists pid.
[> Line 459: ((case);
(((depends); 1: by (auto));
((intro);by ((project);((simpl);(exists))))))
[goal> lemma valid_decode_charac is proved


Qed.
lemma valid_decode_charac @system:(set:default; equiv:None) :
forall (t:timestamp,pid,j:index),
t = Decode(pid, j) || t = Decode1(pid, j) =>
happens(t) =>
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) =
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid)
Exiting proof mode.




(*------------------------------------------------------------------*)
(* Auxiliary simple lemma, used to rewrite one of the conditional
equality in the then branch. *)
lemma if_aux (b,b0,b1 : boolean) (x,y,z,u,v:message):
if b && (x = y && b0) && b1 then
snd(dec(z,diff(fst(dec(y,u)),v))) =
if b && (x = y && b0) && b1 then
snd(dec(z,diff(fst(dec(x,u)),v))).
Goal if_aux :
if (b && (x = y && b0) && b1) then snd (dec (z, diff(fst (dec (y, u)), v)))
=
if (b && (x = y && b0) && b1) then snd (dec (z, diff(fst (dec (x, u)), v)))

Proof.
[goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: b,b0,b1:bool,u,v,x,y,z:message
----------------------------------------
if (b && (x = y && b0) && b1) then snd (dec (z, diff(fst (dec (y, u)), v)))
= if (b && (x = y && b0) && b1) then snd (dec (z, diff(fst (dec (x, u)), v)))


case b => _ //.
[> Line 472: ((case);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: b,b0,b1:bool[const],u,v,x,y,z:message
_: b
----------------------------------------
if (true && (x = y && b0) && b1) then
snd (dec (z, diff(fst (dec (y, u)), v))) =
if (true && (x = y && b0) && b1) then
snd (dec (z, diff(fst (dec (x, u)), v)))



case b0 => _ //.
[> Line 473: ((case);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: b,b0,b1:bool[const],u,v,x,y,z:message
_: b0
_: b
----------------------------------------
if (true && (x = y && true) && b1) then
snd (dec (z, diff(fst (dec (y, u)), v))) =
if (true && (x = y && true) && b1) then
snd (dec (z, diff(fst (dec (x, u)), v)))



case b1 => _ //.
[> Line 474: ((case);(intro)) [goal> Focused goal (1/1):
System: (set:default; equiv:None)
Variables: b,b0,b1:bool[const],u,v,x,y,z:message
_: b1
_: b0
_: b
----------------------------------------
if (true && (x = y && true) && true) then
snd (dec (z, diff(fst (dec (y, u)), v))) =
if (true && (x = y && true) && true) then
snd (dec (z, diff(fst (dec (x, u)), v)))



case (x = y) => U //.
[> Line 475: ((case);(intro)) [goal> lemma if_aux is proved


Qed.
lemma if_aux @system:(set:default; equiv:None) :
forall (b,b0,b1:bool,x,y,z,u,v:message),
if (b && (x = y && b0) && b1) then
snd (dec (z, diff(fst (dec (y, u)), v))) =
if (b && (x = y && b0) && b1) then
snd (dec (z, diff(fst (dec (x, u)), v)))
Exiting proof mode.



set showStrengthenedHyp=true.


name keyFresh : message.
global axiom namelength_keyFresh {'P:system} @system:(set:'P; equiv:None) :
[len keyFresh = namelength_message]


(*------------------------------------------------------------------*)
global lemma equiv_real_ideal_enrich (t : timestamp[const]):
[happens(t)] ->
equiv(
frame@t,
seq(pid:index => AEAD(pid)@t),
seq(pid:index => if Setup(pid) <= t then AEAD(pid)@Setup(pid)),
seq(pid:index => sid(pid)),
seq(pid,j:index => npr(pid,j)),
seq(pid,j:index => nonce(pid,j)),
seq(pid:index => k(pid)),
seq(pid:index => k_dummy(pid))
).
Goal equiv_real_ideal_enrich :
forall t:timestamp[const, glob],
[happens(t)] ->
equiv(frame@t, seq(pid:index=>(AEAD pid@t)),
seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))

Proof.
[goal> Focused goal (1/1):
Systems: default
Variables: t:timestamp[const, glob]
----------------------------------------
[happens(t)] ->
equiv(frame@t, seq(pid:index=>(AEAD pid@t)),
seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))



dependent induction t => t Hind Hap.
[> Line 496: ((dependent induction);(intro)) [goal> Focused goal (1/1):
Systems: default
Variables: t:timestamp[const, adv, glob]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



case t => Eq;
(try (repeat destruct Eq as [_ Eq];
rewrite /* in 0;
rewrite /AEAD in 1;
rewrite le_lt // -le_pred_lt in 2;
by apply ~inductive Hind (pred(t)))).
[> Line 502: (((case);(intro));
(try ((repeat (destruct));
((rewrite);((rewrite);((rewrite);by (apply)))))))
[dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ pred t}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= pred t}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= pred t}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= pred t}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= pred t)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= pred t}
{ AEAD pid@pred t | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= pred t}
{ exec@t' | t':timestamp[adv, glob]. t' <= pred t}
{ output@t' | t':timestamp[adv, glob]. t' <= pred t && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= pred t}
{ frame@pred t | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ pred t}
<][goal> Focused goal (1/4):
Systems: default
Variables: t:timestamp[const, adv, glob]
Eq: [t = init]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@init
1: seq(pid:index=>(AEAD pid@init))
2: seq(pid:index=>(if (Setup(pid) <= init) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)




+ (* init *)
rewrite /*.
[> Line 505: (rewrite) [goal> Focused goal (1/4):
Systems: default
Variables: t:timestamp[const, adv, glob]
Eq: [t = init]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: seq(pid:index=>zero)
1: seq(pid:index=>
(if (Setup(pid) <= init) then
enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey)))
2: seq(pid:index=>sid pid)
3: seq(pid,j:index=>npr (pid, j))
4: seq(pid,j:index=>nonce (pid, j))
5: seq(pid:index=>k pid)
6: seq(pid:index=>k_dummy pid)



by rewrite if_false in 1.
[> Line 506: by (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: t:timestamp[const, adv, glob]
Eq: Exists (pid:index[const, adv, glob]), [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)




+ (* Setup(pid) *)
repeat destruct Eq as [_ Eq].
[> Line 509: (repeat (destruct)) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



splitseq 2: (fun (pid0 : index) => pid = pid0).
[> Line 510: (splitseq) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid0:index=>
(if (fun (pid0:index) => pid = pid0) pid0 then
(if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))))
3: seq(pid0:index=>
(if not ((fun (pid0:index) => pid = pid0) pid0) then
(if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



constseq 2:
(fun (pid0 : index) => pid = pid0 && Setup(pid0) <= t) (AEAD(pid)@t)
(fun (pid0 : index) => pid <> pid0 ||
(pid = pid0 && not (Setup(pid0) <= t))) zero.
[> Line 514: (constseq) [goal> Focused goal (1/5):
System: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
forall (pid0:index),
(fun (pid0:index) => pid = pid0 && Setup(pid0) <= t) pid0 ||
(fun (pid0:index) => pid <> pid0 || pid = pid0 && not (Setup(pid0) <= t))
pid0



- by intro pid0; case (pid=pid0).
[> Line 515: by ((intro);(case)) [goal> Focused goal (1/4):
System: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
(forall (pid0:index),
(fun (pid0:index) => pid = pid0 && Setup(pid0) <= t) pid0 =>
if (fun (pid0:index) => pid = pid0) pid0 then
(if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0)) =
AEAD pid@t) &&
forall (pid0:index),
(fun (pid0:index) => pid <> pid0 || pid = pid0 && not (Setup(pid0) <= t))
pid0 =>
if (fun (pid0:index) => pid = pid0) pid0 then
(if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0)) =
zero



- split => pid0 /= U.
[> Line 516: ((split);(intro)) [goal> Focused goal (1/5):
System: default
Variables:
pid:index[const, adv, glob],pid0:index[const],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
U: pid = pid0 && Setup(pid0) <= t
----------------------------------------
if (pid = pid0) then (if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))
= AEAD pid@t


* by rewrite !if_true.
[> Line 517: by (rewrite) [goal> Focused goal (1/4):
System: default
Variables:
pid:index[const, adv, glob],pid0:index[const],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
U: pid <> pid0 || pid = pid0 && not (Setup(pid0) <= t)
----------------------------------------
if (pid = pid0) then (if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))
= zero



* case U.
[> Line 518: (case) [goal> Focused goal (1/5):
System: default
Variables:
pid:index[const, adv, glob],pid0:index[const],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
U: pid <> pid0
----------------------------------------
if (pid = pid0) then (if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))
= zero

by rewrite if_false. [> Line 518: by (rewrite) [goal> Focused goal (1/4):
System: default
Variables:
pid:index[const, adv, glob],pid0:index[const],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
U: pid = pid0 && not (Setup(pid0) <= t)
----------------------------------------
if (pid = pid0) then (if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))
= zero

by destruct U as [_ _]. [> Line 519: by (destruct) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: AEAD pid@t
3: seq(pid0:index=>
(if not ((fun (pid0:index) => pid = pid0) pid0) then
(if (Setup(pid0) <= t) then AEAD pid0@Setup(pid0))))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)




- rewrite if_then_then in 3.
[> Line 521: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: AEAD pid@t
3: seq(pid0:index=>
(if (not ((fun (pid0:index) => pid = pid0) pid0) && Setup(pid0) <= t)
then AEAD pid0@Setup(pid0)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



assert (forall(pid0 : index), (not (pid = pid0) && Setup(pid0) <= t) = (Setup(pid0) < t))
as H.
[> Line 522: (have) [goal> Focused goal (1/4):
System: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
forall (pid0:index), (not (pid = pid0) && Setup(pid0) <= t) = Setup(pid0) < t

{
intro pid0; case pid = pid0 => _ /=.
[> Line 524: (((intro);(case));(intro)) [goal> Focused goal (1/5):
System: default
Variables:
pid:index[const, adv, glob],pid0:index[const],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
_: pid = pid0
----------------------------------------
false = Setup(pid0) < t


by rewrite eq_iff.
[> Line 525: by (rewrite) [goal> Focused goal (1/4):
System: default
Variables:
pid:index[const, adv, glob],pid0:index[const],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
_: pid <> pid0
----------------------------------------
Setup(pid0) <= t = Setup(pid0) < t


by rewrite le_lt.
[> Line 526: by (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index),
(not (pid = pid0) && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: AEAD pid@t
3: seq(pid0:index=>
(if (not ((fun (pid0:index) => pid = pid0) pid0) && Setup(pid0) <= t)
then AEAD pid0@Setup(pid0)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



}.
[> Line 527: ?? [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index),
(not (pid = pid0) && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: AEAD pid@t
3: seq(pid0:index=>
(if (not ((fun (pid0:index) => pid = pid0) pid0) && Setup(pid0) <= t)
then AEAD pid0@Setup(pid0)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)




rewrite /= H -le_pred_lt in 3.
[> Line 529: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: AEAD pid@t
3: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



rewrite /AEAD in 1.
[> Line 530: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid0:index=>
(if (pid0 = pid) then
enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey)
else AEAD pid0@pred t))
2: AEAD pid@t
3: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



fa 1.
[> Line 531: (fa) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: fun (pid0:index) => pid0 = pid
2: enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey)
3: fun (pid:index) => AEAD pid@pred t
4: AEAD pid@t
5: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
6: seq(pid:index=>sid pid)
7: seq(pid,j:index=>npr (pid, j))
8: seq(pid,j:index=>nonce (pid, j))
9: seq(pid:index=>k pid)
10: seq(pid:index=>k_dummy pid)



rewrite /AEAD in 4.
[> Line 532: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: fun (pid0:index) => pid0 = pid
2: enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite /* in 0.
[> Line 533: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool (exec@pred t && true),if (exec@pred t && true) then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc (<diff(k pid, k_dummy pid),<mpid pid,sid pid>>, rinit pid, mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



cca1 2; [1:auto].
[> Line 534: ((cca1); 1: (auto)) Checking for side conditions on the left
Indirect occurrences of mkey and rinit(pid) in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


Indirect occurrences of randomness in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


Checking for side conditions on the right
Indirect occurrences of mkey and rinit(pid) in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k_dummy pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


Indirect occurrences of randomness in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k_dummy pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


[goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool (exec@pred t && true),if (exec@pred t && true) then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes (len <diff(k pid, k_dummy pid),<mpid pid,sid pid>>),
rinit pid,
mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite !len_pair in 2.
[> Line 535: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool (exec@pred t && true),if (exec@pred t && true) then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(len diff(k pid, k_dummy pid) ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite len_diff in 2.
[> Line 536: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool (exec@pred t && true),if (exec@pred t && true) then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(diff(len (k pid), len (k_dummy pid)) ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite namelength_k namelength_k_dummy in 2.
[> Line 536: (rewrite) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool (exec@pred t && true),if (exec@pred t && true) then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(diff(namelength_message, namelength_message) ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



simpl ~diffr.
[> Line 537: (simpl) [goal> Focused goal (1/3):
Systems: default
Variables: pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Setup(pid)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



remember
zeroes (namelength_message ++ (len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)
as tlen => Eq_len.
[> Line 541: ((remember);(intro)) [goal> Focused goal (1/3):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc (tlen, rinit pid, mkey)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



(* transitivity reasoning, to get rid of the key *)
trans 2 : enc (tlen, rinit(pid), keyFresh).
[> Line 543: (trans) [goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: diff(enc (tlen, rinit pid, mkey), enc (tlen, rinit pid, keyFresh))
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



* have ->:
diff(
enc (tlen, rinit(pid), mkey),
enc (tlen, rinit(pid), keyFresh))
=
enc (tlen, rinit(pid), diff(mkey,keyFresh))
by project.
[> Line 549: ((have); 1: by (project)) [goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc (tlen, rinit pid, diff(mkey, keyFresh))
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite Eq_len.
[> Line 551: (rewrite) [goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
diff(mkey, keyFresh))
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



enckp 2, enc(_, rinit(pid), diff(mkey, keyFresh)), keyFresh;
1: auto.
[> Line 553: ((enckp); 1: (auto)) [goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
keyFresh)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)




fa 2; fa 2.
[> Line 555: ((fa);(fa)) [goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: rinit pid
4: keyFresh
5: fun (pid:index) => AEAD pid@pred t
6: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
7: seq(pid:index=>sid pid)
8: seq(pid,j:index=>npr (pid, j))
9: seq(pid,j:index=>nonce (pid, j))
10: seq(pid:index=>k pid)
11: seq(pid:index=>k_dummy pid)



fresh 4; 1:auto.
[> Line 556: ((fresh); 1: (auto)) Freshness on the left side:


Freshness on the right side:


[goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: rinit pid
4: fun (pid:index) => AEAD pid@pred t
5: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
6: seq(pid:index=>sid pid)
7: seq(pid,j:index=>npr (pid, j))
8: seq(pid,j:index=>nonce (pid, j))
9: seq(pid:index=>k pid)
10: seq(pid:index=>k_dummy pid)



fresh 3; 1:auto.
[> Line 557: ((fresh); 1: (auto)) Freshness on the left side:
Indirect occurrences of rinit(pid) in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


Freshness on the right side:
Indirect occurrences of rinit(pid) in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k_dummy pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


[goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite /* in 0.
[> Line 558: (rewrite) [goal> Focused goal (1/4):
Systems: default
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



by apply Hind (pred t).
[> Line 559: by (apply) [goal> Focused goal (1/3):
Systems: (left:default/right, right:default/right)
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: diff(enc (tlen, rinit pid, keyFresh), enc (tlen, rinit pid, mkey))
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



* have ->:
diff(
enc (tlen, rinit(pid), keyFresh),
enc (tlen, rinit(pid), mkey))
=
enc (tlen, rinit(pid), diff(keyFresh, mkey)) by project.
[> Line 565: ((have); 1: by (project)) [goal> Focused goal (1/3):
Systems: (left:default/right, right:default/right)
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc (tlen, rinit pid, diff(keyFresh, mkey))
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite Eq_len; enckp 2; 1: auto.
[> Line 566: ((rewrite);((enckp); 1: (auto))) [goal> Focused goal (1/3):
Systems: (left:default/right, right:default/right)
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: enc
(zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair),
rinit pid,
keyFresh)
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



fa 2; fa 2.
[> Line 567: ((fa);(fa)) [goal> Focused goal (1/3):
Systems: (left:default/right, right:default/right)
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: rinit pid
4: keyFresh
5: fun (pid:index) => AEAD pid@pred t
6: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
7: seq(pid:index=>sid pid)
8: seq(pid,j:index=>npr (pid, j))
9: seq(pid,j:index=>nonce (pid, j))
10: seq(pid:index=>k pid)
11: seq(pid:index=>k_dummy pid)



fresh 4; 1:auto.
[> Line 568: ((fresh); 1: (auto)) Freshness on the left side:


Freshness on the right side:


[goal> Focused goal (1/3):
Systems: (left:default/right, right:default/right)
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: rinit pid
4: fun (pid:index) => AEAD pid@pred t
5: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
6: seq(pid:index=>sid pid)
7: seq(pid,j:index=>npr (pid, j))
8: seq(pid,j:index=>nonce (pid, j))
9: seq(pid:index=>k pid)
10: seq(pid:index=>k_dummy pid)



fresh 3; 1:auto.
[> Line 569: ((fresh); 1: (auto)) Freshness on the left side:
Indirect occurrences of rinit(pid) in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k_dummy pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


Freshness on the right side:
Indirect occurrences of rinit(pid) in other actions:
rinit(pid)
(collision with rinit(pid))
in action Setup(pid)
in term
(happens(Setup(pid)),
enc (<k_dummy pid,<mpid pid,sid pid>>, rinit pid, mkey))

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining


[goal> Focused goal (1/3):
Systems: (left:default/right, right:default/right)
Variables:
pid:index[const, adv, glob],t:timestamp[const, adv, glob],
tlen:message[glob]
Eq: [t = Setup(pid)]
Eq_len: [tlen =
zeroes
(namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair)]
H: [forall (pid0:index), (pid <> pid0 && Setup(pid0) <= t) = Setup(pid0) < t]
Hap: [happens(t)]
----------------------------------------
0: <frame@pred t,<of_bool (exec@pred t),if exec@pred t then accept>>
1: fun (pid0:index) => pid0 = pid
2: namelength_message ++
(len (mpid pid) ++ len (sid pid) ++ c_pair) ++ c_pair
3: fun (pid:index) => AEAD pid@pred t
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



refl.
[> Line 570: (refl) [goal> Focused goal (1/2):
Systems: default
Variables: t:timestamp[const, adv, glob]
Eq: Exists (pid,j:index[const, adv, glob]), [t = Decode(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)




+ (* Decode(pid,j) *)
repeat destruct Eq as [_ Eq].
[> Line 573: (repeat (destruct)) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



rewrite /AEAD in 1.
[> Line 574: (rewrite) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



rewrite le_lt // -le_pred_lt in 2.
[> Line 575: (rewrite) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



depends Setup(pid), t by auto => H.
[> Line 576: (((depends); 1: by (auto));(intro)) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



rewrite /frame /exec /output /cond in 0.
[> Line 577: (rewrite) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool
(exec@pred t &&
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>),
if (exec@pred t &&
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>) then snd (otp_dec pid j@t)>>
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



fa 0; fa 1; fa 1.
[> Line 578: ((fa);((fa);(fa))) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: (aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>
2: if (exec@pred t &&
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>) then snd (otp_dec pid j@t)
3: seq(pid:index=>(AEAD pid@pred t))
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)




rewrite valid_decode_charac //.
[> Line 580: (rewrite) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: (AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>
2: if (exec@pred t &&
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>) then snd (otp_dec pid j@t)
3: seq(pid:index=>(AEAD pid@pred t))
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



(* rewrite the content of the then branch *)
rewrite /otp_dec /aead_dec if_aux /= in 2.
[> Line 582: (rewrite) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: (AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>
2: if (exec@pred t &&
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>) then
snd (dec (otp pid j@t, diff(k pid, k pid)))
3: seq(pid:index=>(AEAD pid@pred t))
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



fa 2.
[> Line 583: (fa) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: (AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>
2: snd (dec (otp pid j@t, diff(k pid, k pid)))
3: seq(pid:index=>(AEAD pid@pred t))
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



rewrite /aead /otp in 1,2.
[> Line 584: (rewrite) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: (AEAD pid@Setup(pid) = fst (snd (input@t)) &&
dec (snd (snd (input@t)), k pid) <> fail &&
fst (dec (snd (snd (input@t)), k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>
2: snd (dec (snd (snd (input@t)), diff(k pid, k pid)))
3: seq(pid:index=>(AEAD pid@pred t))
4: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
5: seq(pid:index=>sid pid)
6: seq(pid,j:index=>npr (pid, j))
7: seq(pid,j:index=>nonce (pid, j))
8: seq(pid:index=>k pid)
9: seq(pid:index=>k_dummy pid)



fa !(_ && _).
[> Line 584: (fa) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: AEAD pid@Setup(pid) = fst (snd (input@t))
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: snd (dec (snd (snd (input@t)), diff(k pid, k pid)))
5: seq(pid:index=>(AEAD pid@pred t))
6: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
7: seq(pid:index=>sid pid)
8: seq(pid,j:index=>npr (pid, j))
9: seq(pid,j:index=>nonce (pid, j))
10: seq(pid:index=>k pid)
11: seq(pid:index=>k_dummy pid)


fa 1. [> Line 585: (fa) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: AEAD pid@Setup(pid)
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: snd (dec (snd (snd (input@t)), diff(k pid, k pid)))
5: seq(pid:index=>(AEAD pid@pred t))
6: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
7: seq(pid:index=>sid pid)
8: seq(pid,j:index=>npr (pid, j))
9: seq(pid,j:index=>nonce (pid, j))
10: seq(pid:index=>k pid)
11: seq(pid:index=>k_dummy pid)



simpl ~diffr.
[> Line 586: (simpl) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: AEAD pid@Setup(pid)
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: snd (dec (snd (snd (input@t)), k pid))
5: seq(pid:index=>(AEAD pid@pred t))
6: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
7: seq(pid:index=>sid pid)
8: seq(pid,j:index=>npr (pid, j))
9: seq(pid,j:index=>nonce (pid, j))
10: seq(pid:index=>k pid)
11: seq(pid:index=>k_dummy pid)



rewrite -(if_true (Setup(pid) <= pred t) _ zero) in 1 => //.
[> Line 587: ((rewrite);(intro)) [goal> Focused goal (1/2):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: snd (dec (snd (snd (input@t)), k pid))
5: seq(pid:index=>(AEAD pid@pred t))
6: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
7: seq(pid:index=>sid pid)
8: seq(pid,j:index=>npr (pid, j))
9: seq(pid,j:index=>nonce (pid, j))
10: seq(pid:index=>k pid)
11: seq(pid:index=>k_dummy pid)



by apply Hind (pred(t)).
[> Line 588: by (apply) [goal> Focused goal (1/1):
Systems: default
Variables: t:timestamp[const, adv, glob]
Eq: Exists (pid,j:index[const, adv, glob]), [t = Decode1(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)




+ (* Decode1(pid,j) *)
repeat destruct Eq as [_ Eq].
[> Line 591: (repeat (destruct)) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



rewrite /AEAD in 1.
[> Line 592: (rewrite) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



rewrite le_lt // -le_pred_lt in 2.
[> Line 593: (rewrite) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



depends Setup(pid), t by auto => H.
[> Line 594: (((depends); 1: by (auto));(intro)) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@t
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



rewrite /frame /exec /output /cond in 0.
[> Line 595: (rewrite) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: <frame@pred t,
<of_bool
(exec@pred t &&
not
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>),
if (exec@pred t &&
not
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>) then empty>>
1: seq(pid:index=>(AEAD pid@pred t))
2: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
3: seq(pid:index=>sid pid)
4: seq(pid,j:index=>npr (pid, j))
5: seq(pid,j:index=>nonce (pid, j))
6: seq(pid:index=>k pid)
7: seq(pid:index=>k_dummy pid)



fa 0; fa 1; fa 1.
[> Line 596: ((fa);((fa);(fa))) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: not
(aead_dec pid j@t <> fail &&
otp_dec pid j@t <> fail &&
fst (otp_dec pid j@t) = snd (snd (aead_dec pid j@t)) &&
mpid pid = fst (snd (aead_dec pid j@t))) &&
fst (input@t) = <mpid pid,kh>
2: seq(pid:index=>(AEAD pid@pred t))
3: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



rewrite valid_decode_charac //.
[> Line 597: (rewrite) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: not
(AEAD pid@Setup(pid) = aead pid j@t &&
dec (otp pid j@t, k pid) <> fail &&
fst (dec (otp pid j@t, k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>
2: seq(pid:index=>(AEAD pid@pred t))
3: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



rewrite /otp /aead.
[> Line 598: (rewrite) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: not
(AEAD pid@Setup(pid) = fst (snd (input@t)) &&
dec (snd (snd (input@t)), k pid) <> fail &&
fst (dec (snd (snd (input@t)), k pid)) = sid pid) &&
fst (input@t) = <mpid pid,kh>
2: seq(pid:index=>(AEAD pid@pred t))
3: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
4: seq(pid:index=>sid pid)
5: seq(pid,j:index=>npr (pid, j))
6: seq(pid,j:index=>nonce (pid, j))
7: seq(pid:index=>k pid)
8: seq(pid:index=>k_dummy pid)



fa _ && _, not (_), !_ && _.
[> Line 598: (fa) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: AEAD pid@Setup(pid) = fst (snd (input@t))
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: seq(pid:index=>(AEAD pid@pred t))
5: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
6: seq(pid:index=>sid pid)
7: seq(pid,j:index=>npr (pid, j))
8: seq(pid,j:index=>nonce (pid, j))
9: seq(pid:index=>k pid)
10: seq(pid:index=>k_dummy pid)


fa 1. [> Line 599: (fa) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: AEAD pid@Setup(pid)
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: seq(pid:index=>(AEAD pid@pred t))
5: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
6: seq(pid:index=>sid pid)
7: seq(pid,j:index=>npr (pid, j))
8: seq(pid,j:index=>nonce (pid, j))
9: seq(pid:index=>k pid)
10: seq(pid:index=>k_dummy pid)



rewrite -(if_true (Setup(pid) <= pred t) _ zero) in 1 => //.
[> Line 600: ((rewrite);(intro)) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, adv, glob],t:timestamp[const, adv, glob]
Eq: [t = Decode1(pid, j)]
H: [Setup(pid) < t]
Hap: [happens(t)]
Hind: Forall (t0:timestamp[const, adv, glob]),
[t0 < t] ->
[happens(t0)] ->
equiv(frame@t0, seq(pid:index=>(AEAD pid@t0)),
seq(pid:index=>
(if (Setup(pid) <= t0) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
----------------------------------------
0: frame@pred t
1: if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)
2: dec (snd (snd (input@t)), k pid) <> fail
3: fst (dec (snd (snd (input@t)), k pid)) = sid pid
4: seq(pid:index=>(AEAD pid@pred t))
5: seq(pid:index=>(if (Setup(pid) <= pred t) then AEAD pid@Setup(pid)))
6: seq(pid:index=>sid pid)
7: seq(pid,j:index=>npr (pid, j))
8: seq(pid,j:index=>nonce (pid, j))
9: seq(pid:index=>k pid)
10: seq(pid:index=>k_dummy pid)



by apply Hind (pred(t)).
[> Line 601: by (apply) [goal> lemma equiv_real_ideal_enrich is proved


Qed.
global lemma equiv_real_ideal_enrich @system:default :
Forall (t:timestamp[const, glob]),
[happens(t)] ->
equiv(frame@t, seq(pid:index=>(AEAD pid@t)),
seq(pid:index=>(if (Setup(pid) <= t) then AEAD pid@Setup(pid))),
seq(pid:index=>sid pid), seq(pid,j:index=>npr (pid, j)),
seq(pid,j:index=>nonce (pid, j)), seq(pid:index=>k pid),
seq(pid:index=>k_dummy pid))
Exiting proof mode.




(*------------------------------------------------------------------*)
abstract tmax : timestamp.


axiom max_ts :
happens(tmax) &&
(forall (t : timestamp), happens(t) => t <= tmax).
axiom max_ts @system:(set:default; equiv:None) :
happens(tmax) && forall (t:timestamp), happens(t) => t <= tmax


global lemma equiv_real_ideal_enrich_tmax0 :
([happens(tmax)] /\
[forall (t' : timestamp), happens(t') => t' <= tmax] /\
equiv(
frame@tmax,
seq(t':timestamp => if t' <= tmax then exec@t' else false),
seq(i:index, t':timestamp => if t' <= tmax then YCtr(i)@t'),
seq(i:index, t':timestamp => if t' <= tmax then SCtr(i)@t')
)).
Goal equiv_real_ideal_enrich_tmax0 :
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))

Proof.
[goal> Focused goal (1/1):
Systems: default
----------------------------------------
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))



use max_ts as [_ U].
[> Line 622: (have) [goal> Focused goal (1/1):
Systems: default
U: [forall (t:timestamp), happens(t) => t <= tmax]
_: [happens(tmax)]
----------------------------------------
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))



split; 1: auto.
[> Line 623: ((split); 1: (auto)) [goal> Focused goal (1/1):
Systems: default
U: [forall (t:timestamp), happens(t) => t <= tmax]
_: [happens(tmax)]
----------------------------------------
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))



split.
[> Line 624: (split) [goal> Focused goal (1/2):
System: default
U: [forall (t:timestamp), happens(t) => t <= tmax]
_: [happens(tmax)]
----------------------------------------
forall (t':timestamp), happens(t') => t' <= tmax


+ by intro*; apply U.
[> Line 625: by ((intro);(apply)) [goal> Focused goal (1/1):
Systems: default
U: [forall (t:timestamp), happens(t) => t <= tmax]
_: [happens(tmax)]
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false))
2: seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t'))
3: seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t'))



+ by apply ~inductive equiv_real_ideal_enrich tmax.
[> Line 626: by (apply) [dbg>init_fixpoint:
{ Classic.cond@τ | ∀ τ. τ ≤ tmax}
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}
{ AEAD@τ | ∀ τ,i. s.t. τ ≤ tmax}

<][dbg>init_terms:
{ k_dummy pid | pid:index[adv, glob]. true}
{ k pid | pid:index[adv, glob]. true}
{ nonce (pid, j) | pid,j:index[adv, glob]. true}
{ npr (pid, j) | pid,j:index[adv, glob]. true}
{ sid pid | pid:index[adv, glob]. true}
{ frame@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= tmax}
{ exec@t' | t',t'0:timestamp[adv, glob]. t' <= t'0 && t'0 <= tmax}
{ output@t' |
t',t'0:timestamp[adv, glob]. (t' <= t'0 && exec@t') && t'0 <= tmax}
{ input@t' | t',t'0:timestamp[adv, glob]. pred t' <= t'0 && t'0 <= tmax}
{ zero | pid:index[adv, glob]. not (Setup(pid) <= tmax)}
{ AEAD pid@Setup(pid) | pid:index[adv, glob]. Setup(pid) <= tmax}
{ AEAD pid@tmax | pid:index[adv, glob]. true}
{ frame@t' | t':timestamp[adv, glob]. t' <= tmax}
{ exec@t' | t':timestamp[adv, glob]. t' <= tmax}
{ output@t' | t':timestamp[adv, glob]. t' <= tmax && exec@t'}
{ input@t' | t':timestamp[adv, glob]. pred t' <= tmax}
{ frame@tmax | true}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}

<][dbg>deduce_fixpoint:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}

<][dbg>strengthened hypothesis:
{ YCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}
{ SCtr@τ | ∀ τ,i. s.t. τ ≤ tmax}
<][goal> lemma equiv_real_ideal_enrich_tmax0 is proved


Qed.
global lemma equiv_real_ideal_enrich_tmax0 @system:default :
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
Exiting proof mode.



axiom sctr_nhap (i : index, t' : timestamp) :
not (happens(t')) => SCtr(i)@t' = empty.
axiom sctr_nhap @system:(set:default; equiv:None) :
forall (i:index,t':timestamp), not happens(t') => SCtr i@t' = empty


axiom yctr_nhap (i : index, t' : timestamp) :
not (happens(t')) => YCtr(i)@t' = empty.
axiom yctr_nhap @system:(set:default; equiv:None) :
forall (i:index,t':timestamp), not happens(t') => YCtr i@t' = empty


(* default value of `exec` at timestamp not in the trace. Left arbitrary. *)
abstract exec_dflt : boolean.


axiom exec_nhap (t' : timestamp) :
not (happens(t')) => exec@t' = exec_dflt.
axiom exec_nhap @system:(set:default; equiv:None) :
forall (t':timestamp), not happens(t') => exec@t' = exec_dflt


global lemma equiv_real_ideal_enrich_tmax :
([happens(tmax)] /\
[forall (t' : timestamp), happens(t') => t' <= tmax] /\
equiv(
frame@tmax,
seq(t':timestamp => exec@t'),
seq(i:index, t':timestamp => YCtr(i)@t'),
seq(i:index, t':timestamp => SCtr(i)@t')
)).
Goal equiv_real_ideal_enrich_tmax :
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax, seq(t':timestamp=>(exec@t')),
seq(i:index,t':timestamp=>(YCtr i@t')),
seq(i:index,t':timestamp=>(SCtr i@t')))

Proof.
[goal> Focused goal (1/1):
Systems: default
----------------------------------------
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax, seq(t':timestamp=>(exec@t')),
seq(i:index,t':timestamp=>(YCtr i@t')),
seq(i:index,t':timestamp=>(SCtr i@t')))



use equiv_real_ideal_enrich_tmax0 as [Hap C U].
[> Line 651: (have) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
----------------------------------------
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax, seq(t':timestamp=>(exec@t')),
seq(i:index,t':timestamp=>(YCtr i@t')),
seq(i:index,t':timestamp=>(SCtr i@t')))



split; 1: auto.
[> Line 652: ((split); 1: (auto)) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
----------------------------------------
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax, seq(t':timestamp=>(exec@t')),
seq(i:index,t':timestamp=>(YCtr i@t')),
seq(i:index,t':timestamp=>(SCtr i@t')))



split; 1: auto.
[> Line 653: ((split); 1: (auto)) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(exec@t'))
2: seq(i:index,t':timestamp=>(YCtr i@t'))
3: seq(i:index,t':timestamp=>(SCtr i@t'))



assert (forall (t' : timestamp), (t' <= tmax) = happens(t')) as Eq.
[> Line 654: (have) [goal> Focused goal (1/2):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
----------------------------------------
forall (t':timestamp), t' <= tmax = happens(t')


{intro t'; rewrite eq_iff.
[> Line 655: ((intro);(rewrite)) [goal> Focused goal (1/2):
System: default
Variables: t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
----------------------------------------
t' <= tmax <=> happens(t')


by split; 2: intro _; apply C.
[> Line 655: by ((split); 2: ((intro);(apply))) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if (t' <= tmax) then exec@t' else false)),
seq(i:index,t':timestamp=>(if (t' <= tmax) then YCtr i@t')),
seq(i:index,t':timestamp=>(if (t' <= tmax) then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(exec@t'))
2: seq(i:index,t':timestamp=>(YCtr i@t'))
3: seq(i:index,t':timestamp=>(SCtr i@t'))


}
rewrite !Eq in U.
[> Line 657: (rewrite) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(exec@t'))
2: seq(i:index,t':timestamp=>(YCtr i@t'))
3: seq(i:index,t':timestamp=>(SCtr i@t'))




splitseq 3: (fun (i : index, t' : timestamp) => happens(t')).
[> Line 659: (splitseq) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(exec@t'))
2: seq(i:index,t':timestamp=>(YCtr i@t'))
3: seq(i:index,t':timestamp=>
(if (fun (i:index,t':timestamp) => happens(t')) i t' then SCtr i@t'))
4: seq(i:index,t':timestamp=>
(if not ((fun (i:index,t':timestamp) => happens(t')) i t') then
SCtr i@t'))



splitseq 2: (fun (i : index, t' : timestamp) => happens(t')).
[> Line 660: (splitseq) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(exec@t'))
2: seq(i:index,t':timestamp=>
(if (fun (i:index,t':timestamp) => happens(t')) i t' then YCtr i@t'))
3: seq(i:index,t':timestamp=>
(if not ((fun (i:index,t':timestamp) => happens(t')) i t') then
YCtr i@t'))
4: seq(i:index,t':timestamp=>
(if (fun (i:index,t':timestamp) => happens(t')) i t' then SCtr i@t'))
5: seq(i:index,t':timestamp=>
(if not ((fun (i:index,t':timestamp) => happens(t')) i t') then
SCtr i@t'))



splitseq 1: (fun (t' : timestamp) => happens(t')).
[> Line 661: (splitseq) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>
(if (fun (t':timestamp) => happens(t')) t' then exec@t' else false))
2: seq(t':timestamp=>
(if not ((fun (t':timestamp) => happens(t')) t') then exec@t' else false))
3: seq(i:index,t':timestamp=>
(if (fun (i:index,t':timestamp) => happens(t')) i t' then YCtr i@t'))
4: seq(i:index,t':timestamp=>
(if not ((fun (i:index,t':timestamp) => happens(t')) i t') then
YCtr i@t'))
5: seq(i:index,t':timestamp=>
(if (fun (i:index,t':timestamp) => happens(t')) i t' then SCtr i@t'))
6: seq(i:index,t':timestamp=>
(if not ((fun (i:index,t':timestamp) => happens(t')) i t') then
SCtr i@t'))



simpl.
[> Line 662: (simpl) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(if happens(t') then exec@t' else false))
2: seq(t':timestamp=>(if not happens(t') then exec@t' else false))
3: seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t'))
4: seq(i:index,t':timestamp=>(if not happens(t') then YCtr i@t'))
5: seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t'))
6: seq(i:index,t':timestamp=>(if not happens(t') then SCtr i@t'))




constseq 6 :
(fun (i : index, t' : timestamp) => happens(t')) zero
(fun (i : index, t' : timestamp) => not (happens(t'))) empty.
[> Line 666: (constseq) [goal> Focused goal (1/3):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
forall (i:index,t':timestamp),
(fun (i:index,t':timestamp) => happens(t')) i t' ||
(fun (i:index,t':timestamp) => not happens(t')) i t'



+ auto.
[> Line 667: (auto) [goal> Focused goal (1/2):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
(forall (i:index,t':timestamp),
(fun (i:index,t':timestamp) => happens(t')) i t' =>
if not happens(t') then SCtr i@t' = zero) &&
forall (i:index,t':timestamp),
(fun (i:index,t':timestamp) => not happens(t')) i t' =>
if not happens(t') then SCtr i@t' = empty



+ split; intro i t' _.
[> Line 668: ((split);(intro)) [goal> Focused goal (1/3):
System: default
Variables: i:index[const],t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
_: (fun (i:index,t':timestamp) => happens(t')) i t'
----------------------------------------
if not happens(t') then SCtr i@t' = zero


- by rewrite if_false.
[> Line 669: by (rewrite) [goal> Focused goal (1/2):
System: default
Variables: i:index[const],t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
_: (fun (i:index,t':timestamp) => not happens(t')) i t'
----------------------------------------
if not happens(t') then SCtr i@t' = empty


- by rewrite if_true // sctr_nhap.
[> Line 670: by (rewrite) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(if happens(t') then exec@t' else false))
2: seq(t':timestamp=>(if not happens(t') then exec@t' else false))
3: seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t'))
4: seq(i:index,t':timestamp=>(if not happens(t') then YCtr i@t'))
5: seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t'))




+ constseq 4 :
(fun (i : index, t' : timestamp) => happens(t')) zero
(fun (i : index, t' : timestamp) => not (happens(t'))) empty.
[> Line 674: (constseq) [goal> Focused goal (1/3):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
forall (i:index,t':timestamp),
(fun (i:index,t':timestamp) => happens(t')) i t' ||
(fun (i:index,t':timestamp) => not happens(t')) i t'



- auto.
[> Line 675: (auto) [goal> Focused goal (1/2):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
(forall (i:index,t':timestamp),
(fun (i:index,t':timestamp) => happens(t')) i t' =>
if not happens(t') then YCtr i@t' = zero) &&
forall (i:index,t':timestamp),
(fun (i:index,t':timestamp) => not happens(t')) i t' =>
if not happens(t') then YCtr i@t' = empty



- split; intro i t' _.
[> Line 676: ((split);(intro)) [goal> Focused goal (1/3):
System: default
Variables: i:index[const],t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
_: (fun (i:index,t':timestamp) => happens(t')) i t'
----------------------------------------
if not happens(t') then YCtr i@t' = zero


* by rewrite if_false.
[> Line 677: by (rewrite) [goal> Focused goal (1/2):
System: default
Variables: i:index[const],t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
_: (fun (i:index,t':timestamp) => not happens(t')) i t'
----------------------------------------
if not happens(t') then YCtr i@t' = empty


* by rewrite if_true // yctr_nhap.
[> Line 678: by (rewrite) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(if happens(t') then exec@t' else false))
2: seq(t':timestamp=>(if not happens(t') then exec@t' else false))
3: seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t'))
4: seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t'))




- constseq 2 :
(fun (t' : timestamp) => happens(t')) false
(fun (t' : timestamp) => not (happens(t'))) exec_dflt.
[> Line 682: (constseq) [goal> Focused goal (1/3):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
forall (t':timestamp),
(fun (t':timestamp) => happens(t')) t' ||
(fun (t':timestamp) => not happens(t')) t'



* auto.
[> Line 683: (auto) [goal> Focused goal (1/2):
System: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
(forall (t':timestamp),
(fun (t':timestamp) => happens(t')) t' =>
if not happens(t') then exec@t' else false = false) &&
forall (t':timestamp),
(fun (t':timestamp) => not happens(t')) t' =>
if not happens(t') then exec@t' else false = exec_dflt



* split; intro t' _.
[> Line 684: ((split);(intro)) [goal> Focused goal (1/3):
System: default
Variables: t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
_: (fun (t':timestamp) => happens(t')) t'
----------------------------------------
if not happens(t') then exec@t' else false = false


** by rewrite if_false.
[> Line 685: by (rewrite) [goal> Focused goal (1/2):
System: default
Variables: t':timestamp[const]
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
_: (fun (t':timestamp) => not happens(t')) t'
----------------------------------------
if not happens(t') then exec@t' else false = exec_dflt


** by rewrite if_true // exec_nhap.
[> Line 686: by (rewrite) [goal> Focused goal (1/1):
Systems: default
C: [forall (t':timestamp), happens(t') => t' <= tmax]
Eq: [forall (t':timestamp), t' <= tmax = happens(t')]
Hap: [happens(tmax)]
U: equiv(frame@tmax,
seq(t':timestamp=>(if happens(t') then exec@t' else false)),
seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t')),
seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t')))
----------------------------------------
0: frame@tmax
1: seq(t':timestamp=>(if happens(t') then exec@t' else false))
2: seq(i:index,t':timestamp=>(if happens(t') then YCtr i@t'))
3: seq(i:index,t':timestamp=>(if happens(t') then SCtr i@t'))



* by apply U.
[> Line 687: by (apply) [goal> lemma equiv_real_ideal_enrich_tmax is proved


Qed.
global lemma equiv_real_ideal_enrich_tmax @system:default :
[happens(tmax)] /\
[forall (t':timestamp), happens(t') => t' <= tmax] /\
equiv(frame@tmax, seq(t':timestamp=>(exec@t')),
seq(i:index,t':timestamp=>(YCtr i@t')),
seq(i:index,t':timestamp=>(SCtr i@t')))
Exiting proof mode.



(*------------------------------------------------------------------*)
global lemma injective_correspondence_equiv (pid, j:index[const]):
[happens(Server(pid,j))] ->
equiv(
exec@Server(pid,j) =>
exists (i:index),
Press(pid,i) < Server(pid,j) &&
YCtr(pid)@pred(Press(pid,i)) = SCtr(pid)@Server(pid,j) &&
forall (j':index), happens(Server(pid,j')) =>
exec@Server(pid,j') =>
YCtr(pid)@pred(Press(pid,i)) = SCtr(pid)@Server(pid,j') =>
j = j').
Goal injective_correspondence_equiv :
forall j,pid:index[const, glob],
[happens(Server(pid, j))] ->
equiv(exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j')
=> j = j')

Proof.
[goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, glob]
----------------------------------------
[happens(Server(pid, j))] ->
equiv(exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j')



intro Hap.
[> Line 703: (intro) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, glob]
Hap: [happens(Server(pid, j))]
----------------------------------------
0: exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



use equiv_real_ideal_enrich_tmax as [_ _ H].
[> Line 704: (have) [goal> Focused goal (1/1):
Systems: default
Variables: j,pid:index[const, glob]
H: equiv(frame@tmax, seq(t':timestamp=>(exec@t')),
seq(i:index,t':timestamp=>(YCtr i@t')),
seq(i:index,t':timestamp=>(SCtr i@t')))
Hap: [happens(Server(pid, j))]
_: [forall (t':timestamp), happens(t') => t' <= tmax]
_: [happens(tmax)]
----------------------------------------
0: exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



apply H.
[> Line 705: (apply) [goal> lemma injective_correspondence_equiv is proved


Qed.
global lemma injective_correspondence_equiv @system:default :
Forall (pid,j:index[const, glob]),
[happens(Server(pid, j))] ->
equiv(exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j')
=> j = j')
Exiting proof mode.



(*------------------------------------------------------------------*)
(* The final proof of injective correspondence. *)
lemma [default/left] injective_correspondence (j, pid:index[glob]):
happens(Server(pid,j)) =>
exec@Server(pid,j) =>
exists (i:index),
Press(pid,i) < Server(pid,j) &&
YCtr(pid)@pred(Press(pid,i)) = SCtr(pid)@Server(pid,j) &&
forall (j':index), happens(Server(pid,j')) =>
exec@Server(pid,j') =>
YCtr(pid)@pred(Press(pid,i)) = SCtr(pid)@Server(pid,j') =>
j = j'.
Goal injective_correspondence :
happens(Server(pid, j)) =>
exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'

Proof.
[goal> Focused goal (1/1):
System: (set:default/left; equiv:None)
Variables: j,pid:index[glob]
----------------------------------------
happens(Server(pid, j)) =>
exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



intro Hap.
[> Line 720: (intro) [goal> Focused goal (1/1):
System: (set:default/left; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
----------------------------------------
exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



rewrite equiv injective_correspondence_equiv pid j => // Hexec.
[> Line 722: ((rewrite equiv);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hexec: exec@Server(pid, j)
----------------------------------------
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



executable Server(pid,j) => //.
[> Line 723: ((executable);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hexec: exec@Server(pid, j)
----------------------------------------
(forall (t:timestamp), t <= Server(pid, j) => exec@t) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



intro exec.
[> Line 724: (intro) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hexec: exec@Server(pid, j)
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



expand exec, cond.
[> Line 725: (expand) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hexec: exec@pred (Server(pid, j)) &&
fst (input@Server(pid, j)) = mpid pid &&
deccipher pid j@Server(pid, j) <> fail &&
fst (deccipher pid j@Server(pid, j)) = sid pid &&
SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
deccipher pid j'@Server(pid, j') <> fail &&
fst (deccipher pid j'@Server(pid, j')) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



destruct Hexec as [Hexecpred Mneq1 Mneq2 Hcpt Hpid].
[> Line 726: (destruct) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hcpt: fst (deccipher pid j@Server(pid, j)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: deccipher pid j@Server(pid, j) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
deccipher pid j'@Server(pid, j') <> fail &&
fst (deccipher pid j'@Server(pid, j')) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



expand deccipher.
[> Line 727: (expand) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



intctxt Mneq2 => //.
[> Line 728: ((intctxt);(intro))
Indirect randomness in other actions:
npr((pid, j))
(collision with npr((pid, j)))
in action Press(pid, j)
in term
(happens(Press(pid, j)),
<mpid pid,<nonce (pid, j),menc pid j@Press(pid, j)>>)

Total: 1 occurrence
0 of them are subsumed by another
1 occurrence remaining

among which 1 trivial randomness occurrence is ignored
1 possible ciphertext found.
[goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,pid:index[const, glob]
Hap: happens(Server(pid, j))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
(exists (j0:index),
Press(pid, j0) < Server(pid, j) &&
cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



intro [j0 [Ht Eq]].
[> Line 729: (intro) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j:index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Hap: happens(Server(pid, j))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j'



exists j0 => /=.
[> Line 730: ((exists);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j:index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Hap: happens(Server(pid, j))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j') => j = j'



split => //.
[> Line 731: ((split);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j:index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Hap: happens(Server(pid, j))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
forall (j':index),
happens(Server(pid, j')) =>
exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j') =>
YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j') => j = j'




intro j' Hap' Hexec'.
[> Line 733: (intro) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j') => j = j'



intro Eq2 => //.
[> Line 735: ((intro);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


assert (SCtr(pid)@Server(pid,j) = SCtr(pid)@Server(pid,j')) as Meq by auto.
[> Line 736: ((have); 1: by (auto)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



assert (Server(pid,j) = Server(pid,j') ||
Server(pid,j) < Server(pid,j') ||
Server(pid,j) > Server(pid,j')) => //.
[> Line 740: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) = Server(pid, j') ||
Server(pid, j) < Server(pid, j') || Server(pid, j) > Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


case H;1: auto.
[> Line 741: ((case); 1: (auto)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



+ (* 1st case: Server(pid,j) < Server(pid,j') *)
assert (Server(pid,j) = pred(Server(pid,j')) ||
Server(pid,j) < pred(Server(pid,j'))) by constraints.
[> Line 745: ((have); 1: by (constraints)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j')) ||
Server(pid, j) < pred (Server(pid, j'))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


case H0.
[> Line 746: (case) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



- (* Server(pid,j) = pred(Server(pid,j') < Server(pid,j') *)
use counterIncreaseStrictly with pid, j'; 2: auto.
[> Line 749: ((have); 2: (auto)) [goal> Focused goal (1/4):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


* rewrite H0 in *.
[> Line 750: (rewrite) [goal> Focused goal (1/4):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@pred (Server(pid, j')) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: pred (Server(pid, j')) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
Hap: happens(pred (Server(pid, j')))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@pred (Server(pid, j')), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (pred (Server(pid, j')))
Hpid: SCtr pid@pred (pred (Server(pid, j'))) ~<
xcpt pid j@pred (Server(pid, j'))
Ht: Press(pid, j0) < pred (Server(pid, j'))
Meq: SCtr pid@pred (Server(pid, j')) = SCtr pid@Server(pid, j')
Mneq1: fst (input@pred (Server(pid, j'))) = mpid pid
Mneq2: dec (cipher pid j@pred (Server(pid, j')), k pid) <> fail
exec: forall (t:timestamp), t <= pred (Server(pid, j')) => exec@t
----------------------------------------
j = j'


by apply orderStrict in Meq.
[> Line 751: by (apply) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
cond@Server(pid, j')


* rewrite /cond.
[> Line 752: (rewrite) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
fst (input@Server(pid, j')) = mpid pid &&
deccipher pid j'@Server(pid, j') <> fail &&
fst (deccipher pid j'@Server(pid, j')) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')


destruct Hexec' as [H1 H2 H3 H4 H5].
[> Line 753: (destruct) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
H1: exec@pred (Server(pid, j'))
H2: fst (input@Server(pid, j')) = mpid pid
H3: dec (cipher pid j'@Server(pid, j'), k pid) <> fail
H4: fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid
H5: SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
fst (input@Server(pid, j')) = mpid pid &&
deccipher pid j'@Server(pid, j') <> fail &&
fst (deccipher pid j'@Server(pid, j')) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')


split; 1:congruence.
[> Line 754: ((split); 1: (congruence)) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) = pred (Server(pid, j'))
H1: exec@pred (Server(pid, j'))
H2: fst (input@Server(pid, j')) = mpid pid
H3: dec (cipher pid j'@Server(pid, j'), k pid) <> fail
H4: fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid
H5: SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
deccipher pid j'@Server(pid, j') <> fail &&
fst (deccipher pid j'@Server(pid, j')) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')


by rewrite H3 H4 H5.
[> Line 755: by (rewrite) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



- (* Server(pid,j) < pred(Server(pid,j')) < Server(pid,j') *)
use counterIncreaseStrictly with pid, j' => //.
[> Line 758: ((have);(intro)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


use counterIncreaseBis with pred(Server(pid,j')), Server(pid,j), pid => //.
[> Line 759: ((have);(intro)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H2: SCtr pid@Server(pid, j) ~< SCtr pid@pred (Server(pid, j')) ||
SCtr pid@pred (Server(pid, j')) = SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


case H2.
[> Line 760: (case) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H2: SCtr pid@Server(pid, j) ~< SCtr pid@pred (Server(pid, j'))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



* use orderTrans with
SCtr(pid)@Server(pid,j),
SCtr(pid)@pred(Server(pid,j')),
SCtr(pid)@Server(pid,j') => //.
[> Line 765: ((have);(intro)) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H2: SCtr pid@Server(pid, j) ~< SCtr pid@pred (Server(pid, j'))
H3: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


by apply orderStrict in Meq.
[> Line 766: by (apply) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
H1: SCtr pid@pred (Server(pid, j')) ~< SCtr pid@Server(pid, j')
H2: SCtr pid@pred (Server(pid, j')) = SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



* rewrite H2 in *.
[> Line 768: (rewrite) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) < Server(pid, j')
H0: Server(pid, j) < pred (Server(pid, j'))
H1: SCtr pid@Server(pid, j) ~< SCtr pid@Server(pid, j')
H2: SCtr pid@pred (Server(pid, j')) = SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@Server(pid, j) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


by apply orderStrict in Meq.
[> Line 769: by (apply) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



+ (* 2nd case: Server(pid,j) > Server(pid,j') *)
assert (pred(Server(pid,j)) = Server(pid,j')
|| pred(Server(pid,j)) > Server(pid,j')) by constraints.
[> Line 773: ((have); 1: by (constraints)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j') ||
pred (Server(pid, j)) > Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


case H0.
[> Line 774: (case) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



- (* Server(pid,j) > pred(Server(pid,j)) = Server(pid,j') *)
use counterIncreaseStrictly with pid, j as H1; 2: auto.
[> Line 777: ((have); 2: (auto)) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


* clear Eq Hexec' Mneq1 Mneq2 exec Hpid Hexecpred Hcpt Hap' Hap Ht H.
[> Line 778: (clear) [goal> Focused goal (1/3):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
----------------------------------------
j = j'


by apply orderStrict in H1.
[> Line 779: by (apply) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
cond@Server(pid, j)


* rewrite /cond.
[> Line 779: (rewrite) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
fst (input@Server(pid, j)) = mpid pid &&
deccipher pid j@Server(pid, j) <> fail &&
fst (deccipher pid j@Server(pid, j)) = sid pid &&
SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)

split; 1:congruence. [> Line 780: ((split); 1: (congruence)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
deccipher pid j@Server(pid, j) <> fail &&
fst (deccipher pid j@Server(pid, j)) = sid pid &&
SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)


clear Hexec' exec Eq Eq2 Meq Ht Hexecpred.
[> Line 781: (clear) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
----------------------------------------
deccipher pid j@Server(pid, j) <> fail &&
fst (deccipher pid j@Server(pid, j)) = sid pid &&
SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)


split; 1: by rewrite Mneq2.
[> Line 782: ((split); 1: by (rewrite)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
----------------------------------------
fst (deccipher pid j@Server(pid, j)) = sid pid &&
SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)


split; 1: by rewrite Hcpt.
[> Line 783: ((split); 1: by (rewrite)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) = Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
----------------------------------------
SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)


by rewrite Hpid.
[> Line 784: by (rewrite) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'



- (* Server(pid,j) > pred(Server(pid,j)) > Server(pid,j') *)
use counterIncreaseStrictly with pid, j => //.
[> Line 787: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


use counterIncreaseBis with pred(Server(pid,j)), Server(pid,j'), pid => //.
[> Line 788: ((have);(intro)) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
H2: SCtr pid@Server(pid, j') ~< SCtr pid@pred (Server(pid, j)) ||
SCtr pid@pred (Server(pid, j)) = SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


case H2.
[> Line 789: (case) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
H2: SCtr pid@Server(pid, j') ~< SCtr pid@pred (Server(pid, j))
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


* apply orderTrans _ _ (SCtr(pid)@Server(pid,j)) in H2; 1: auto.
[> Line 790: ((apply); 1: (auto)) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
H2: SCtr pid@Server(pid, j') ~< SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


rewrite eq_sym in Meq.
[> Line 790: (rewrite) [goal> Focused goal (1/2):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
H2: SCtr pid@Server(pid, j') ~< SCtr pid@Server(pid, j)
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j') = SCtr pid@Server(pid, j)
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'

by apply orderStrict in Meq. [> Line 791: by (apply) [goal> Focused goal (1/1):
System: (set:default/right; equiv:None)
Variables: j,j':index[const, glob],j0:index[const],pid:index[const, glob]
Eq: cipher pid j@Server(pid, j) =
enc (<sid pid,ctr pid j0@Press(pid, j0)>, npr (pid, j0), k pid)
Eq2: YCtr pid@pred (Press(pid, j0)) = SCtr pid@Server(pid, j')
H: Server(pid, j) > Server(pid, j')
H0: pred (Server(pid, j)) > Server(pid, j')
H1: SCtr pid@pred (Server(pid, j)) ~< SCtr pid@Server(pid, j)
H2: SCtr pid@pred (Server(pid, j)) = SCtr pid@Server(pid, j')
Hap: happens(Server(pid, j))
Hap': happens(Server(pid, j'))
Hcpt: fst (dec (cipher pid j@Server(pid, j), k pid)) = sid pid
Hexec': exec@pred (Server(pid, j')) &&
fst (input@Server(pid, j')) = mpid pid &&
dec (cipher pid j'@Server(pid, j'), k pid) <> fail &&
fst (dec (cipher pid j'@Server(pid, j'), k pid)) = sid pid &&
SCtr pid@pred (Server(pid, j')) ~< xcpt pid j'@Server(pid, j')
Hexecpred: exec@pred (Server(pid, j))
Hpid: SCtr pid@pred (Server(pid, j)) ~< xcpt pid j@Server(pid, j)
Ht: Press(pid, j0) < Server(pid, j)
Meq: SCtr pid@Server(pid, j) = SCtr pid@Server(pid, j')
Mneq1: fst (input@Server(pid, j)) = mpid pid
Mneq2: dec (cipher pid j@Server(pid, j), k pid) <> fail
exec: forall (t:timestamp), t <= Server(pid, j) => exec@t
----------------------------------------
j = j'


* by apply orderStrict in H1.
[> Line 792: by (apply) [goal> lemma injective_correspondence is proved


Qed.
global lemma injective_correspondence @system:(set:default/left; equiv:None)
:
Forall (j,pid:index[glob]),
[happens(Server(pid, j)) =>
exec@Server(pid, j) =>
exists (i:index),
Press(pid, i) < Server(pid, j) &&
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j) &&
forall (j':index),
happens(Server(pid, j')) =>
exec@Server(pid, j') =>
YCtr pid@pred (Press(pid, i)) = SCtr pid@Server(pid, j') => j = j']
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.

Previously: