Theory inout
section ‹Correctness of the relations between sets of Input/Output channels›
theory inout
imports Secrecy_types
begin
consts
subcomponents :: "specID ⇒ specID set"
consts
ins :: "specID ⇒ chanID set"
loc :: "specID ⇒ chanID set"
out :: "specID ⇒ chanID set"
definition
inStream :: "specID ⇒ chanID set ⇒ bool"
where
"inStream x y ≡ (ins x = y)"
definition
locStream :: "specID ⇒ chanID set ⇒ bool"
where
"locStream x y ≡ (loc x = y)"
definition
outStream :: "specID ⇒ chanID set ⇒ bool"
where
"outStream x y ≡ (out x = y)"
definition
correctInOutLoc :: "specID ⇒ bool"
where
"correctInOutLoc x ≡
(ins x) ∩ (out x) = {}
∧ (ins x) ∩ (loc x) = {}
∧ (loc x) ∩ (out x) = {} "
definition
correctCompositionIn :: "specID ⇒ bool"
where
"correctCompositionIn x ≡
(ins x) = (⋃ (ins ` (subcomponents x)) - (loc x))
∧ (ins x) ∩ (⋃ (out ` (subcomponents x))) = {}"
definition
correctCompositionOut :: "specID ⇒ bool"
where
"correctCompositionOut x ≡
(out x) = (⋃ (out ` (subcomponents x))- (loc x))
∧ (out x) ∩ (⋃ (ins ` (subcomponents x))) = {} "
definition
correctCompositionLoc :: "specID ⇒ bool"
where
"correctCompositionLoc x ≡
(loc x) = ⋃ (ins ` (subcomponents x))
∩ ⋃ (out ` (subcomponents x))"
lemma subcomponents_loc:
assumes "correctCompositionLoc x"
and "subcomponents x = {}"
shows "loc x = {}"
using assms by (simp add: correctCompositionLoc_def)
end