Definition data := seq nid.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.Inductive PState :=
| PInit
| PGotRequest of data 
| PRespondedYes of data | PRespondedNo of data
| PCommitted of data | PAborted of data.(* Pointers to the state and log components *)
Definition st := ptr_nat 1.Definition log := ptr_nat 2.(* Type of data to perform a transaction over is encoded via seq nat *)
Definition Log := seq (bool * (seq nat)).(* Pairing with the current stage of type nat *)
Definition CStateT := (nat * CState)%type.Definition PStateT := (nat * PState)%type.Definition prep_req : nat := 0.Definition prep_yes : nat := 1.Definition prep_no : nat := 2.Definition commit_req : nat := 3.Definition abort_req : nat := 4.Definition commit_ack : nat := 5.Definition abort_ack : nat := 6.(* Interaction with the clients *)
Definition eval_req : nat := 7.Definition eval_resp : nat := 8.Definition ttag := nat.Definition payload := seq nat.

(* Specifications: *)
Lemma l1 d: tpc_coh d -> valid (dstate d).
Lemma l2 d: tpc_coh d -> valid (dsoup d).
Lemma l3 d: tpc_coh d -> dom (dstate d) =i nodes.