1 header {* Responsible Trust Traversal Protocol *}
9 inductive signatures_for_complete_agreement
10 :: "nat \<Rightarrow> message list \<Rightarrow> message list \<Rightarrow> message list \<Rightarrow> bool" for i
11 where "signatures_for_complete_agreement i [] [m] []"
12 | "signatures_for_complete_agreement i as (m' # ms) sigs
13 \<Longrightarrow> signatures_for_complete_agreement
17 ((Signature a (MessageList [Number i, m, m'])) # sigs)"
19 fun complete_agreement :: "message \<Rightarrow> bool" where
28 \<longleftrightarrow> distinct as
29 \<and> list_all (\<lambda> p. type_of_message p = EncryptedType) ps
30 \<and> signatures_for_complete_agreement i as (last ps # ps) sigs"
31 | "complete_agreement _ = False"
33 definition rttp_promises
35 \<Rightarrow> (actor \<Rightarrow> duration)
36 \<Rightarrow> (actor \<Rightarrow> payment \<Rightarrow> actor \<Rightarrow> payment \<Rightarrow> bool)
37 \<Rightarrow> protocol"
38 where "rttp_promises a d w h t es
39 \<longleftrightarrow> ( \<forall> i b a' m a'' c m'
50 \<longrightarrow> a' = a
52 \<and> ( \<exists> t x t' y
53 . m = MessageList [Number t, Number x]
54 \<and> m' = MessageList [Number t', Number y]
58 \<and> ( \<forall> b' M c' M'
68 \<in> events_before h t \<union> es
69 \<longrightarrow> c' = c \<and> M' = m'