theory Rewriting imports< Adding to the domain of a valuation doesn't change the result ›
LTL begin
text‹ \begin{itemize} \itemConstantsRemoval \item@{constNext_ltln}alisation emficationentual,pureureiversalpendablelas \itemSyntacticImplicationChecking \end{itemize} ItreusesofL\Rewrite.hyCAVAL_OGBArthermore,omeeulesrejava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99 ><open>"DBLP:conf/cav/SomenziB00"\<close>and\<^cite>\<open>"DBLP:conf/tacas/BabiakKRS12"\<close>.Allfunctionsaredefinedfor@{typeltln}.\<close>
definitionmk_and where "mk_andxy\<equiv>casexoffalse\<^sub>n\<Rightarrow>false\<^subthusaseusingrIbysimp
definitionmk_or where "mk_orxy\<equiv>casexoffalse\<^sub>n\<Rightarrow>y|truecase_sp1
funremove_strong_ops where "remove_strong_ops(xU\<^sub>ny)=java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 |"remove_strong_ops(xM\<^sub>ny)=xand\<^sub>ny" |"remove_strong_ops(xor\<^sub>ny)=remove_strong_opsxor\<^sub>nremove_strong_opsy" |"remove_strong_opsx=x"
funremove_weak_ops where "remove_weak_ops(xR\<^sub>ny)=remove_weak_opsy" |"remove_weak_ops(xW\<^sub>ny)=xor\<^sub>ny" |"remove_weak_ops(xand\<^sub>ny)=remove_weak_opsxand\<^sub>nremove_weak_opsy" |"remove_weak_opsx=x"
definitionmk_finally where "mk_finallyx\<equiv>casexoftrue\<^sub>n\<Rightarrow>true\<^sub>n|false\<^sub>n\<Rightarrow
definitionmk_globally where "mk_globallyx\<equiv>casexofthenbtain*<><rbrakk>~sv1\<and>s=SConsptyiddcb1sv1"usingeval_v_elimsbymetis
definitionmsoof(inductruleeval_educt where "mk_untilxy\<equiv>casexoffalse\<^sub>n\<Rightarrow>y |true\<^sub>n\<Rightarrow>mk_finallyy |_\<Rightarrow>(caseyoftrue\<^sub>n\<Rightarrow>true\<^sub>n|false\<^sub>n\<Rightarrow>falsecaseval_e_leqIn2
definitionmk_release where "mk_releasexy\<equiv>casexoftrue\<^sub>n\<Rightarrow>y |false\<^sub>n\<Rightarrow>mk_globallyy |_\<Rightarrow>(caseyoftrue\<^sub><Rightarrow>\sub|alse^n\<Rightarrow>false\<^sub>n|_\<Rightarrow>xR\<sub
until where "mk_weak_untilxy\<equiv>caseyoftrue\<^sub>n\<Rightarrow>true\<^sub>n |false\<^sub>n\<Rightarrow>mk_globallyx |\Rightarrowsetrue\subtrue\<^sub>n|false\<^sub>n\<Rightarrow>_<>xW\<^sub>ny)"
definitionmk_strong_releaseeval_e_concatI1v2) where _e<caseyoffalse\<^sub>n\<Rightarrow>false\<^sub>n |true\<^sub>n\<Rightarrow>mk_finallyx |_\<Rightarrow>(casexoftrue\<^sub>n\<Rightarrow>y|false\<^sub>n\<Rightarrow>false\<^sub>n|_\java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
definitionmk_next where "mk_nextx\<equiv>usingmsroofuct:_nduct
efinition<>X^ubn'\<close>) where "mk_next_pownx\<equiv>casexoftrue\<^sub>n\<Rightarrow>true\<^sub>n|false\<^sub>n\<Rightarrow>false\<^sub>n|_\<Rightarrow>qed(simp.
lemmamk_globally_semantics[simp]: "w\<Turnstile>\<^sub>nmk_globally<longleftrightarrow>Turnstile<sub>nG\<^sub>nx" by(simpadd:mk_globally_defdel:emantics_ltlnltln.imps8,move_weak_opsitsplitsjava.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104
lemmamk_next_semantics[simp]: "w\<Turnstile>\<^sub>nmk_nextx\<longleftrightarrow>wjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 unfoldingmk_next_defby(casesx;auto)
lemmais_constant_constructors_simps2: "is_constant(mk_andxy)\longleftrightarrow>(x=true\^ub<due<subn\<or>x=false\<^sub>n\<or>y=false\<^sub>n)" "is_constant(mk_orxy)\<longleftrightarrow>(x=false\<^sub\<>~s"and"atomx\<sharp>c"and"<>s')" "is_constant(mk_finallyx)\<longleftrightarrowcase(eval_v_pairI1s1v2java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 "is_constantthenhowcaseusingl_vroso "is_constant(mk_untilyx)\<longleftrightarrow>is_constantx" "is_constant(mk_releaseyx)\<longleftrightarrow>is_constantx" "is_constant(mk_nextx)\<longleftrightarrow>is_constantx" by((casesx;casesy;simpadd:mk_and_def), (casesx;casesy;simpadd:mk_or_def), (mesonis_constant_constructorsI)+)
lemmarelease_constant_simp: "is_constant\<psi>\<Longrightarrow>w\<Turnstile>\<^sub>n\<phi>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 by(cases\<psi>)auto
funcombine::"('altln\<Rightarrow>'a\intist where "combinebinop(\<phi>,i)(\<psi>,j)=( let \<chi>=binop(mk_next_pow(the_enat_0(i-j))\<phi>)(k_next_pow_0\psi) in (\<chi>,ifis_constant\<chi>then\<infinity>elseminij))"
abbreviationto_ltln::"('altln*enat)\<Rightarrow>'altln" where "to_ltlnx\<equiv>mk_next_pow(the_enat_0(sndx))(fstx)"
funrewrite_X_enat::"'altln\<Rightarrow>('altln*enat)" where "rewrite_X_enattrue\<^sub>n=(true\<^sub>n,java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 |"write_X_enatalse<sub>n=false\<^sub>n,\<infinity>)" |"rewrite_X_enatprop\<^sub>n(a)=(prop\<^sub>n(a),0)" |"rewrite_X_enatnprop\<^sub>n(a)=(nprop\<^subthentainandwhere<pen(dc,\<lbrace>x2:b2|c2\<rbrace>)\<in>setdclist2\<close> |"rewrite_X_enat(\<phi>and:>dc,\<lbrace>x2:b2|c2\<rbrace>)\<in>setdclist2\<close>usingboxed_b_BConspIusing**bysimp |ave\<>a2gresh_Pairseytis |"rewrite_X_enat(\<phi>U\<^sub>n\<psi>)=combinemk_until(rewrite_X_enat\<phi>)(rewrite_X_enat\<psi>)" |"rewrite_X_enat(\<phi>R\<^sub>n\<psi>)=combinemk_releasemoreoverhavebvab1\^sub>\<subb=2b1<sub>b<sub>b"usingwfTh_typedef_poly_b_eq_iff*2boxed_b_BConspIbymetis |"rewrite_X_enat(\<phi>W\<^sub>n\<psi>)=combinemk_weak_until(rewrite_X_enat\<phi>)(rewrite_X_enat\<psi>)" |"rewrite_X_enat(\<phi>M\<^sub>n\<psi>)=combinemk_strong_release(rewrite_X_enat\<phi>)(rewrite_X_enat\<psi>)qed |"rewrite_X_enat(X\<^sub>n\<phi>)=(\<lambda>(\<phi>,n).(\<phi>,eSucn))(rewrite_X_enat\<phi>)"
lemmacombine_and_or_semantics assumes"i=\<infinity>\<longleftrightarrow>is_constant\<phi>" assumes"j=\<infinity>\<longleftrightarrow>is_constant\<psi>" showsTurnstile\<^sub>nto_ltln(combinemk_and(\<phi>(psi)longleftrightarrow\><^sub>nto_ltln(\<phi>,i)and\^no_ltln\psi>) and"w\<Turnstile>\<^sub>nto_ltln(combinemk_or(\<phixed_b_ex by((casesi;casesj;simpadd:min_defis_constant_constructors_simpsis_constant_constructors_simps2_structors_simps2sjava.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 113 (cases\<psi>;insertassms;auto), (cases\<phi>;insertassms;auto), (blastelim!:is_constant.elims)qed
(* TODO this proof is a bit slow and could be optimized *) lemma combine_weak_until_strong_release_semantics assumes java.lang.NullPointerException assumes "j = ∞⟷ shows java.lang.NullPointerException andsh?caseef ases "var by ((cases i; cases j; simp add: min_def SCons tyid dc s1 : B_idV.
(cases φ; simp add: assms),
(cases ψ; insert assms; auto simp: add.commute))+
lemma rewrite_X_enat_infinity_invariant: "snd (wt__enat φ ⟷ is_constant (fst (rewrit_XX_entφ proof (induction φ) ase (Andltln φ) ??case by (simp add: combine_infinity_invariant[OF And_ltln(1,2), unfolded prod.collapse]) next case (Or_ltln φ ψ) thus ?case by (simp add: combine_infinity_invariant[OF Or_ltln(1,2), unfolded prod.collapse]) next case (Until_ltln φs dclist" uto thus ?case by (simp add: combine_infinity_invariant[OF Until_ltln(1,2), unfolded prod.collapsejava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 next case (Release_ltln φ) thus ?case by (simp add: combine_infinity_invariant[OF Release_ltln(1,2), unfolded prod.collapse]) next case (WeakUntil_ltln φ ψ) thus ?case by (simp add: combine_infinity_invariant_ypid subst_bbps next case (StrongRelease_ltlnphiψ) thus ?case by (simp add: combine_infinity_invariant[OF StrongRelease_ltln(1,2), unfolded prod.collapse]) next case (Next_ltln φ thuscase by ( add split_def) (metis eSuc_inject qed auto
lemma e b1^bbb=[:bdc>" using bdc subst_bb_commute ‹ Tur>\\<^sub>n φ w ⊨n to_ltln (rewrite_X_enat φ)"
(induction φ arbitrary: w)
(n φ)
?case
using combine_and_or_semantics[OF rewrite_X_enat_infinity_invariant rewrite_X_enat_infinity_invariant] by fastforce
case (Or_ltln φ ψ
thus ?case
using combine_and_or_semantics[OF rewrite_X_enat_infinity_invariant rewrite_X_enat_infinity_invariant] by fastforce
case (Until_ltln φ usin boxed_b td_lookup_eq_iff type_def.eeq_iff
thus ?case
unfolding rewrite_X_enat.simps combine_until_release_semantics[OF rewrite_X_enat_infinity_invariant rewrite_X_enat_infinity_invariant, unfolded prod.collapse] by fastforce
\<openAF_typedef_polyse T\\› case (Release_ltln φ ψ) thus ?case unfolding rewrite_X_enat.simps combine_until_release_semantics[OF rewrite_X_enat_infinity_invariant rewrite_X_enat_infinity_invariant, unfolded prod.collapse] by fastforce next case (WeakUntil_ltln φ ψ) thus ?case unfolding rewrite_X_enat.simps combine_weak_until_strong_release_semantics[OF rewrite_X_enat_infinity_invariant rewrite_X_enat_infinity_invariant, unfolded prod.collapse] by fastforce next case (StrongRelease_ltln φ ψ) thus ?case unfolding rewrite_X_enat.simps combine_weak_until_strong_release_semantics[OF rewrite_X_enat_infinity_invariant rewrite_X_enat_infinity_invariant, unfolded prod.collapse] by fastforce next casecaseNext_ltln>) moreover have" w ⊨n to_ltln (rewrite_X_enat (Xn φ)) ⟷ suffix 1 w ⊨n to_ltln (rewrite_X_enat φ)"
( addsplit_def<> \noteq<>"
(auto simp: eSuc_def, auto simp: rewrite_X_enat_infinity_invariant eSuc_def dest: is_constant_semantics<open>x1 c1<in<closebyauto ultimately show ?case
ps qed auto
lemma rewrite_X_sound [simp]: "w ⊨n rewrite_X φ ⟷ w ⊨n φ" using rewrite_X_enat_correct unfolding rewrite_X_def Let_def by auto
pure_eventual_left_append:
"pure_eventual μ ==>'"u GC w subst_gb. by forc
(induction μ arbitrary: u w)
case (Until_ltln μ μ')
moreover
then obtain i where "suffix i w ⊨n μ'"
by auto
hence "μ = truen==> ?case"
simp met suffix_con suff)
moreover
"T ; Γa> i'" using 3" by auto
java.lang.NullPointerException
hence "pure_eventual μ' ==> ?case"
by force
ultimately :
show ?case
by fastforce
case (Release_ltln μ μ')
thus ?case
(metis linear suffix_conc_snd gr0I not_less0 prefix_suffix suffix_0)+
case (WeakUntil_ltln μ μ')
thus ?case
by (cases "∀i. suffix i w ⊨arbitrarys2s2' rule: : boxedb.inducts )
(metis zero_le le0 nat_le_linear prefix_suffix suffix_0 suffix_conc_length suffix_conc_snd suffix_subseq_join)+
case (StrongRelease_ltln μ μ')
moreover
then obtain i where "suffix i w ⊨metis
by auto
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
by simp (metis suffix_conc_length suffix_suffix)
moreover
have "pure_eventual μ ==> pure_eventual μ' ==> (u ⌢ w) ⊨ auto
by (metis ‹suffix i w ⊨case (boxed_b P s uw ux)
hence "pure_eventual μ hence " "s2 = s2'" using boxed_b_elims by metis
by force
ultimately
show ?case
by fastforce
(autq hence "s2 = s2'"'" using boxed_ by me
pure_universal_suffix_closed:
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 52
(induction ν arbitrary: u w)
case (Until_ltln νboxed_b_B tyid dclistP dcdc x b cs1 bv b'bvb' ' s1')
hence "∃i. suffix i (u ⌢ w) ⊨n ν' ∧ (∀j<i. suffix j (u ⌢ w) ⊨n ν)"
using semantics_ltln.simps(8) by blast
thus?cas
by simp (metis Until_ltln(1-3) le_0_eq le_eq_less_or_eq le_less_linear prefix_suffix pure_universal.simps(5) suffix_conc_fst suffix_conc_snd)
case (Release_ltln ν ν')
moreover
hence "∀i. suffix i (u ⌢ w) ⊨n ν' ∨ (∃j<i. suffix j ∧dc2, {"using boxed_b_(6)[OF boxe6)] metis
by simp
ultimately
show ?case
by simp (metis semantics_ltln.simps(2) not_less0 prefix_suffix suffix_0 suffix_conc_length suffix_suffix)
case (WeakUntil_ltln ν ν')
moreover
hence "∀i. suffix i (u ⌢ w) ⊨
by simp
ultimately
show ?case
by simp (metis (full_types) le_antisym prefix_suffix semantics_ltln.simps(2) suffix_0 suffix_conc_length suffix_suffix zero_le)
case (StrongRelease_ltln ν ν')
hence "∃i. suffix i (u ⌢ w) ⊨* bsimp
using semantics_ltln.simps(11) by blast
thus ?case
by simp (metis StrongRelease_ltln(1-3) diff_is_0_eq nat_le_linear prefix_conc_length prefix_suffix pure_universal.simps(8) subsequence_length suffix_conc_snd suffix_subseq_join)
case (Next_ltln μ)
thus ?case
by (metis prefix_suffix pure_universal.simps(9) semantics_ltln.simps(7) semiring_normalization_rules(24) suffix_conc_length suffix_suffix)
auto
suspendable_prefix_invariant:
"suspendable ξ ==> (u ⌢ w) ⊨n ξ ⟷ w ⊨n
(induction ξ arbitrary: u w)
case (Until_ltln ξ ξ')
proof (cases "suspendable ξ'")
case False
hence "ξ = truen" and "pure_universal ξ'"
using Until_ltln by simp+
thus ?thesis
by (simp; metis (no_types) linear pure_universal_suffix_closed suffix_conc_fst suffix_conc_length suffix_conc_snd suffix_suffix)
qed (simp; metis Until_ltln(2) not_less0 prefix_suffix)
case (Release_ltln ξ ξ')
show ?case
proof (cases "suspendable ξ'")
case False
hence "ξ = falsen" and "pure_eventual ξ'"
using Release_ltln by simp+
thus ?thesis
by (simp; metis (no_types) le_iff_add add_diff_cancel_left' linear pure_eventual_left_append suffix_0 suffix_conc_fst suffix_conc_snd)
qed (simp; metis Release_ltln(2) not_less0 prefix_suffix)
case (WeakUntil_ltln ξ ξ')
show ?case
proof (cases "suspendable ξ ∧ suspendable ξ'")
case False
hence "ξ' = falsen" and "pure_eventual ξ"
using WeakUntil_ltln by simp+
thus ?thesis
by (simp; metis (no_types) le_iff_add add_diff_cancel_left' linear pure_eventual_left_append suffix_0 suffix_conc_fst suffix_conc_snd)
qed (simp; metis (full_types) WeakUntil_ltln.IH prefix_suffix)
case (StrongRelease_ltln ξ ξ')
show ?case
proof (cases "suspendable ξ ∧ suspendable ξ'")
case False
java.lang.NullPointerException
using StrongRelease_ltln by simp+
thus ?thesis
by (simp; metis (no_types) linear pure_universal_suffix_closed suffix_conc_fst suffix_conc_length suffix_conc_snd suffix_suffix)
qed (simp; metis (full_types) StrongRelease_ltln.IH(1) StrongRelease_ltln.IH(2) prefix_suffix)
(simp_all, metis prefix_suffix)
pure_eventual_until_simp:
assumes "pure_eventual μ"
shows "w ⊨n φ Un μ ⟷ w ⊨n μ"
-
have "∧i. suffix i w ⊨n μ ==> w ⊨n μ"
using pure_eventual_left_append[OF assms] prefix_suffix by metis
thus ?thesis
by force
pure_universal_release_simp:
assumes "pure_universal ν"
shows "w ⊨n φ Rn ν ⟷")
-
java.lang.NullPointerException
using pure_universal_suffix_closed[OF assms] prefix_suffix by metis
thus ?thesis
by force
pure_universal_weak_until_simp:
assumes "pure_universal φ" and "pure_universal ψ"
shows "w ⊨n φ Wn ψ ⟷ w ⊨
-
have "∧
using assms pure_universal_suffix_closed prefix_suffix by metis+
thus es "\lbrakk🚫
by force
pure_eventual_strong_release_simp:
assumes "pure_eventual φ" and "pure_eventual ψ"
shows "w ⊨n φ Mn ψ ⟷ w ⊨assume Γ[\rbrakk>~ s" and i [ '" an"wfV \ThetaB<>v
-
have "∧i. suffix i w ⊨n φ ==> w ⊨n φ" and "∧i. suffix i w ⊨n ψ ==> w ⊨n ψ"
using assms pure_eventual_left_append prefix_suffix by metis+
thus ?thesis
by force
suspendable_formula_simp:
assumes "suspendable ξ"
shows "w ⊨n Xn ξ ⟷ w ⊨bvb' s'"
and "w ⊨n φ U(nominal_ind v arbitra: s b rule:.st)
and "w ⊨n φ Rn ξ ⟷ case (V_lit l)
-
have "∧i. suffix i w ⊨n ξ ⟷ w ⊨n ξ"
using suspendable_prefix_i
thus ?t1 ?t2 ?t3
by force+
suspendable_formula_simp2:
assumes "suspendable φ" and "suspendable ψ"
shows "w ⊨n φ Wn ψ "Some s = i x ∧ s' = i' x" using eval_v_elims subst_vb.simps by metis
and "w ⊨n φ Mn ψ ⟷ w ⊨n φ and" (is ?t2)
-
java.lang.NullPointerException
using assms suspendable_prefix_invariant prefix_suffix by metis+
thus ?t1 ?t2
force+
rewrite_modal :: "'a ltln ==> 'a ltln"
"rewrite_modal truen = trues1' ∧ s' = SPair s1' s2'" using eval_v_elims V_pair by metis
"rewrite_modal falsen = false(SPair s1 s2) (B_pair b1 b2) bv b' (SPair s1' 2) " proof(rule boxed_b_BPairI)
"rewrite_modal (φ andbo <>s1
" show "boxed_b Θ bv b' s2'" using V_pair eval_v_elims wfV_elims b s s b.e by metis
java.lang.NullPointerException
"rewrite_modal (φn ψ) = (if pure_universal \<psi suspendable ψ\psi> else (rewrite_modal \<>
"rewrite_modal (φ Wn ψ
"rewrite_modal (φ Mn ψ(V_cons tyi dc v1)
"rewrite_modal (Xn φ) = (if suspendable φ then rewrite_modal φ else Xn (rewrite_modal φ))"
"rewrite_modal φ = φ"
rewrite_modal_sound [simp]:
"w ⊨n rewrite_ using wfV_elims(4)[OF V_cons(5)] V_cons by metis
(induction φ arbi obtain s2 where s2: "s = SCons tyid dc s2 \ \<and (v1[bv::=b']b) ]~ s2" using eval_v_elims V_cons subst_vb.simps by
case (Until_ltln φ ψ)
thus ?case
apply (cases "pure_eventual ψ ∨ suspendable ψ")
apply (insert pure_eventual_until[of ψ[of ψ
apply fastforce+
done
syntactical_implies_correct:
java.lang.NullPointerException
by (induction arbitrary: w rule: syntactical_implies.induct; auto; force)
rewrite_syn_imp
"rewrite_syn_imp (φ x)
if φ ⊨s ψ then
rewrite_syn_imp φ
else if ψ ⊨s φ then
rewrite_syn_imp ψ
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.NullPointerException
else
mk_and (rewrite_syn_imp φ) (rewrite_syn_imp ψ))"
"rewrite_syn_imp (φ orn ψ) = (
if φ ⊨s ψ then
rewrite_syn_imp ψ
else if ψ ⊨s φ then
rewrite_syn_imp φ
else if (notn φ) ⊨\< by
truen
else
mk_or (rewrite_syn_imp φ
"rewrite_syn_imp (φ Un ψ) = (
if φ ⊨s ψ then
rewrite_syn_imp ψ
else if (not'"s' SNum (n1' + n2') ∧ v \rbrakkSNu n2" useval_e Plus CE_op ‹
mk_finally (rewrite_syn_imp ψ)
else
mk_until (rewrite_syn_imp φ) (rewrite_syn_imp ψ))"
"rewrite_syn_imp (φ Rn ψ) = (
if ψ ⊨s φ then
rewrite_syn_imp ψ
else if ψ ⊨s (notn φ) then
mk_globally (rewrite_syn_imp ψ)
else
mk_release (rewrite_syn_imp φ) (rewrite_syn_imp ψ))"
"rewrite_syn_imp (Xn φ) = mk_next (rewrite_syn_imp φ)"
"rewrite_syn_imp φ = φ"
rewrite_syn_imp_sound:
"w ⊨n rewrite_syn_imp φ ⟷ w ⊨n φ"
(induction φ arbitrary: w)
case And_ltln
thus ?case
by (simp add: Let_def; metis syntactical_implies_correct notn_semantics)
case (Or_ltln φ ψ)
moreover
java.lang.NullPointerException
by (auto intro: syntactical_implies_correct[of "notn φ"])
moreover
have "(notn ψ) ⊨s φ ==>∀w. w ⊨n φ orn ψ"
by (auto intro: syntactical_implies_correct[of "not:wfCE Θ" sing w wfCE_elims CE_op ‹
ultimately
show ?case
by (auto intro: syntactical_implies_correct)
case (Until_ltln φ ψ)
moreover
have "φ ⊨s ψ ==> ?case"
by (force simp add: Until_ltln dest: syntactical_implies_correct)
moreover
{
assume A: "(notn φ) ⊨s ψ" and B: "¬ φ ⊨s ψ"
hence [simp]: "rewrite_syn_imp (φ Un ψ) = mk_finally (rewrite_syn_imp ψ)"
by simp
{
assume "∃i. suffix i w ⊨n ψ"
moreover
define i where "i ≡ LEAST i. suffix i w ⊨n ψ"
ultimately
have "∀j < i
by (blast dest: not_less_Least , metis LeastI ‹
hence "∀j < i. suffix j w ⊨n φ" and "suffix i w ⊨n ψ"
using syntactical_implies_correct[OF A] by auto
}
hence ?case
by (simp del: rewrite_syn_imp.simps; unfold Until_ltln(2)) blast
}
ultimately
show ?case
by fastforce
case (Release_ltln φnext
moreover
have "ψ ⊨s φ ==> ?case"
by (force simp add: Release_ltln dest: syntactical_implies_correct)
moreover
{
assume A: "ψ ⊨s (notn φ)" and B: "¬ ψ ⊨s φ"
hence [simp]: "rewrite_syn_imp (φ Rn ψ) = mk_globally (rewrite_syn_imp ψ)"
by simp
{
assume "∃hence *:"b = B_bool" " using CE_op wfCE_elims \open>opp = Eq›
moreover
i where "i \equiv> LEAST i. ¬>n\<>"
ultimately
have "∀j < i. suffix j w ⊨n ψ" and "¬ suffix i w ⊨n ψ"
by (blast dest: not_less_Least , metis LeastI ‹∃i. ¬suffix i w ⊨n ψ› i_def)
hence "∀j < i. ¬suffix j w ⊨n φ" and "¬ suffix i w ⊨n ψ"
using syntactical_implies_correct[OF A] by auto
}
hence ?case
by (simp del: rewrite_syn_imp.simps; unfold Release_ltln(2)) blast
}
ultimately
show ?case
by fastforce
auto
‹Iterated Rewriting›
iterate
"iterate f x 0 = x"
"iterate f x (Suc n) = (let x' = f x in if x = x' then x else iterate f x' n)"
"rewrite_iter_fast φ ≡ "boxed_b Θ b n n' CE_o by m
"rewri \phi\<equiv
‹The rewriting functions defined in the previous subsections can be used as-is. However, in the
most cases one wants to iterate these rules until the formula cannot be simplified further.
@{const rewrite_iter_fast} pulls X operators up in the syntax tree and the uses the
"modal" simplification rules. @{const rewrite_iter_slow} additionally tries to simplify the
formula using syntactic implication checking.›
iterate_sound:
assumes "∧φ. w ⊨n f φ ⟷ w ⊨n φ"
shows "w ⊨n iterate f φ n ⟷
by (induction n arbitrary: φ; simp add: assms Let_def)
rewrite
java.lang.NullPointerException
using iterate_sound[of _ "rewrite_modal o rewrite_X"]
unfolding comp_def rewrite_modal_sound rewrite_X_sound rewrite_iter_fast_def
by bla
rewrite_iter_slow_sound [simp]:
"w ⊨n rewrite_iter_slow φ ⟷ w ⊨n φ"
itera[of _ "rewrite_syn_im orewri o rewrite_X"]
unfolding comp_def rewrite_modal_sound rewrite_X_sound rewrite_syn_imp_sound rewrite_iter_slow_def
by blast
‹Preservation of atoms›
iterate_atoms:
assumes
ms_ltln (f 🚫 sin boxed_wfCEelim s s' CE_con
shows
"atom (iterate f \phin)⊆
by (induction n arbitrary: φ) (auto, metis (mono_tags, lifting) assms in_mono)
rewrite_modal_atoms:
"atoms_ltln (rewrite_modal φ) ⊆ atoms_ltln φ"
by (in \phi) auto
s1 where s: "i[" u CE_len eval_e_ subst_c.simps by metis
"atoms_ltln (mk_next_pow n φ) = atoms_ltln φ"
by (induction n) (auto simp: mk_next_pow_def split: ltln.splits)
combine_atoms:
assumes
"∧φ ψ. atoms_ltln (f φ ψ) ⊆
shows
"atoms_ltln (fst (combine f x y)) ⊆ atoms_ltln (fst x) ∪ atoms_ltln (fst y)"
by (metis assms fst_combine mk_next_pow_atoms prod.collapse)
rewrite_syn_imp_atoms:
java.lang.NullPointerException
(induction φ)
case (And_ltln φ1 φ2)
then show ?case
using mk_and_atoms by simp fast
case (Or_ltln φ1 φ2)
then show ?case
using mk_or_atoms by simp fast
case (Next_ltln φ)
then show ?case
using mk_next_atoms by simp fast
case (Until_ltln φ1 φ2)
then show ?case
using mk_finally_atoms mk_until_atoms by simp fast
case (Release_ltln φ1 φ2)
then show ?case
using mk_globally_atoms mk_release_atoms by simp fast
simp_all
:
"atoms_ltln (rewrite_iter_fast φ) ⊆ atoms_ltln φ"
-
have 1: "∧φ. atoms_ltln (rewrite_modal (rewrite_X φ)) ⊆
using rewrite_modal_atoms rewrite_X_atoms by force
show ?thesis
by (simp add: rewrite_iter_fast_def 1 iterate_atoms)
rewrite_iter_slow_atoms:
"atoms_ltln (rewrite_iter_slow φ (Cconjc1 c2)
-
have 1: "∧ φ
using rewrite_syn_imp_atoms rewrite_modal_atoms rewrite_X_atoms by force
show ?thesis
by (simp add: rewrite_iter_slow_def 1 iterate_atoms)
‹\andusCconj eval_c_elim(3) bymet
‹We now define a convenience wrapper for the rewriting engine›
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.