text‹We define a notion of ``shallow'' HyperCTL* formula (sfmla) that captures
* binders as meta-level HOL binders. We also define a proof system for this
embedding.›
locale Kripke = fixes S :: "'state set"and s0 :: 'state and δ :: "'state ==> 'state set" and AP :: "'aprop set"and L :: "'state ==> 'aprop set" assumes s0: "s0 ∈ S"and δ: "∧ s. s ∈ S ==> δ s ⊆ S" and L : "∧ s. s ∈ S ==> L s ⊆ AP" begin
text‹Well-formed paths›
coinductive wfp :: "'aprop set ==> ('state,'aprop) path ==> bool" for AP' :: "'aprop set" where
intro: "[s ∈ S; A ⊆ AP'; A ∩ AP = L s; stateOf π ∈ δ s; wfp AP' π] ==> wfp AP' ((s,A) ## π)"
lemma wfp: "wfp AP' π ⟷ (∀ i. fst (π !! i) ∈ S ∧ snd (π !! i) ⊆ AP' ∧ snd (π !! i) ∩ AP = L (fst (π !! i)) ∧ fst (π !! (Suc i)) ∈ δ (fst (π !! i)) )"
(is"?L ⟷ (∀ i. ?R i)") proof (intro iffI allI) fix i assume ?L thus"?R i" apply(induction i arbitrary: π) by (metis snth.simps fst_conv snd_conv stream.sel wfp.cases)+ next assume R: "∀ i. ?R i"thus ?L apply (coinduct) using s0 fst_conv snd_conv snth.simps stream.sel by (metis inf_commute stream.collapse surj_pair) qed
lemma wfp_sdrop[simp]: "wfp AP' π ==> wfp AP' (sdrop i π)" unfolding wfp by simp (metis sdrop_add sdrop_simps(1))
(*<*) end(* context Kripke *) (*>*)
text‹end-of-context Kripke›
subsection‹Shallow representations of formulas›
text‹A shallow (representation of a) HyperCTL* formula will be a predicate on lists of paths.
atomic formulas (operator $\textit{atom}$) are parameterized by atomic propositions (as customary in temporal logic),
additionally by a number indicating the position, in the list of paths, of the path to which the atomic proposition
-- for example, $\textit{atom}\;a\;i$ holds for the list of paths $\pi l$ just in case proposition $a$ holds
the first state of $\pi l!i$, the $i$'th path in $\pi l$. The temporal operators $\textit{next}$ and $\textit{until}$ act on all the paths of the argument
$\pi l$ synchronously. Finally, the existential quantifier refers to the existence of a path whose origin state is that of
last path in $\pi l$.
an example: $\textit{exi}\; (\textit{exi}\; (\textit{until}\; (\textit{atom}\;a\;0)\;(\textit{atom}\;b\;1)))$ holds for the empty list
there exist two paths $\rho_0$ and $\rho_1$ such that, synchronously,
a$ holds on $\rho_0$ until $b$ holds on $\rho_1$. Another example will be the formula encoding Goguen-Meseguer noninterference. ›
text‹Shallow HyperCTL* formulas:›
type_synonym ('state,'aprop) sfmla = "('state,'aprop) path list ==> bool"
locale Shallow = Kripke S "s0" δ AP L for S :: "'state set"and s0 :: 'state and δ :: "'state ==> 'state set" and AP :: "'aprop set"and L :: "'state ==> 'aprop set"
+ fixes AP' assumes AP_AP': "AP ⊆ AP'" begin
text‹Primitive operators›
(* I include false as a primitive since otherwise I would have to assume nonemptyness of
the atomic propositions *) definition fls :: "('state,'aprop) sfmla"where "fls πl ≡ False"
definition atom :: "'aprop ==> nat ==> ('state,'aprop) sfmla"where "atom a i πl ≡ a ∈ apropsOf (πl!i)"
lemma fall_elim[elim]: assumes"fall F πl" and "(∧π. [wfp AP' π; πl ≠ [] ==> stateOf π = stateOf (last πl); πl = [] ==> stateOf π = s0] ==> F π πl) ==> χ" shows χ using assms unfolding fall_def by (metis exi_def neg_elim neg_intro)
text‹Temporal connectives›
lemma next_intro[intro]: assumes"φ (map stl πl)"shows"next φ πl" using assms unfolding op_defs by auto
lemma next_elim[elim]: assumes"next φ πl"and"φ (map stl πl) ==> χ"shows χ using assms unfolding op_defs by auto
lemma until_introR[intro]: assumes"ψ πl"shows"until φ ψ πl" using assms unfolding op_defs by (auto intro: exI[of _ 0])
lemma until_introL[intro]: assumes φ: "φ πl"and u: "until φ ψ (map stl πl)" shows"until φ ψ πl" proof- obtain i where ψ: "ψ (map (sdrop (Suc i)) πl)"and1: "∀j∈{0..<i}. φ (map (sdrop (Suc j)) πl)" using u unfolding op_defs by auto
{fix j assume"j ∈ {0..<Suc i}" hence"φ (map (sdrop j) πl)"using1 φ by (cases j) auto
} thus ?thesis using ψ unfolding op_defs by auto qed
text‹The elimination rules for until and eventually are induction rules.›
lemma until_induct[induct pred: until, consumes 1, case_names Base Step]: assumes u: "until φ ψ πl" and b: "∧ πl. ψ πl ==> χ πl" and i: "∧ πl. [φ πl; until φ ψ (map stl πl); χ (map stl πl)]==> χ πl" shows"χ πl" proof- obtain i where ψ: "ψ (map (sdrop i) πl)"and1: "∀j∈{0..<i}. φ (map (sdrop j) πl)" using u unfolding until_def next_def by auto
{fix k assume k: "k ≤ i" hence"until φ ψ (map (sdrop k) πl) ∧ χ (map (sdrop k) πl)" proof (induction"i-k" arbitrary: k) case0hence"k=i"by auto with b[OF ψ] u ψ show ?caseby (auto intro: until_introR) next case (Suc ii) let ?πl' = "map (sdrop k) πl" have"until φ ψ (map stl ?πl') ∧ χ (map stl ?πl')"using Suc by auto moreoverhave"φ ?πl'"using1 Suc by auto ultimatelyshow ?caseusing i by auto qed
} from this[of 0] show ?thesis by simp qed
lemma until_unfold: "until φ ψ πl = (ψ πl ∨ φ πl ∧ until φ ψ (map stl πl))" (is"?L = ?R") proof assume ?L thus ?R by induct auto qed auto
lemma ev_introR[intro]: assumes"φ πl"shows"ev φ πl" using assms unfolding ev_def by (auto intro: until_introR)
lemma ev_introL[intro]: assumes"ev φ (map stl πl)"shows"ev φ πl" using assms unfolding ev_def by (auto intro: until_introL)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.