Theory Compactification_Synchronization_Product_Generalized
chapter ‹Compactification of Synchronization Product Generalized›
theory Compactification_Synchronization_Product_Generalized
imports Compactification_Synchronization_Product
Combining_Synchronization_Product_Generalized
begin
section ‹Iterated Combine›
subsection ‹Definitions›
fun iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k :: ‹'e set ⇒ ('σ, 'e, 'r) A⇩d list ⇒ ('σ list, 'e, 'r list) A⇩d› (‹⟪⇩d⨂⟦_⟧⇩✓ _⟫› [0, 0])
where ‹⟪⇩d⨂⟦E⟧⇩✓ []⟫ = ⦇τ = λσs a. ◇, ω = λσs. ◇⦈›
| ‹⟪⇩d⨂⟦E⟧⇩✓ [A⇩0]⟫ = ⇩d⟪A⇩0⟫⇩s⇩i⇩n⇩g⇩l⇩↪⇩l⇩i⇩s⇩t›
| ‹⟪⇩d⨂⟦E⟧⇩✓ A⇩0 # A⇩1 # As⟫ = ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t ⟪⇩d⨂⟦E⟧⇩✓ A⇩1 # As⟫⟫›
fun iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k :: ‹'e set ⇒ ('σ, 'e, 'r) A⇩n⇩d list ⇒ ('σ list, 'e, 'r list) A⇩n⇩d› (‹⟪⇩n⇩d⨂⟦_⟧⇩✓ _⟫› [0, 0])
where ‹⟪⇩n⇩d⨂⟦E⟧⇩✓ []⟫ = ⦇τ = λσs a. {}, ω = λσs. {}⦈›
| ‹⟪⇩n⇩d⨂⟦E⟧⇩✓ [A⇩0]⟫ = ⇩n⇩d⟪A⇩0⟫⇩s⇩i⇩n⇩g⇩l⇩↪⇩l⇩i⇩s⇩t›
| ‹⟪⇩n⇩d⨂⟦E⟧⇩✓ A⇩0 # A⇩1 # As⟫ = ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t ⟪⇩n⇩d⨂⟦E⟧⇩✓ A⇩1 # As⟫⟫›
lemma iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k_simps_bis: ‹As ≠ [] ⟹ ⟪⇩d⨂⟦E⟧⇩✓ A⇩0 # As⟫ = ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t ⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫›
and iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_simps_bis: ‹Bs ≠ [] ⟹ ⟪⇩n⇩d⨂⟦E⟧⇩✓ B⇩0 # Bs⟫ = ⟪B⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t ⟪⇩n⇩d⨂⟦E⟧⇩✓ Bs⟫⟫›
by (induct As, simp_all) (induct Bs, simp_all)
subsection ‹First Results›
lemma τ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k:
‹τ ⟪⇩d⨂⟦E⟧⇩✓ As⟫ = τ ⟪⇩d⨂⟦E⟧ As⟫› ‹τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ Bs⟫ = τ ⟪⇩n⇩d⨂⟦E⟧ Bs⟫›
by (intro ext, induct rule: induct_list012;
simp add: σ_σs_conv_defs singl_list_conv_defs
combine⇩R⇩l⇩i⇩s⇩t_Sync_defs combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs ε_simps)+
corollary ε_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k:
‹ε ⟪⇩d⨂⟦E⟧⇩✓ As⟫ σs = ε ⟪⇩d⨂⟦E⟧ As⟫ σs›
‹ε ⟪⇩n⇩d⨂⟦E⟧⇩✓ Bs⟫ σs = ε ⟪⇩n⇩d⨂⟦E⟧ Bs⟫ σs›
by (simp_all add: ε_simps τ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k)
corollary ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k:
‹ℛ⇩d ⟪⇩d⨂⟦E⟧⇩✓ As⟫ = ℛ⇩d ⟪⇩d⨂⟦E⟧ As⟫› ‹ℛ⇩n⇩d ⟪⇩n⇩d⨂⟦E⟧⇩✓ Bs⟫ = ℛ⇩n⇩d ⟪⇩n⇩d⨂⟦E⟧ Bs⟫›
by (intro ext same_τ_implies_same_ℛ⇩d same_τ_implies_same_ℛ⇩n⇩d,
simp add: τ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k)+
lemma combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_eq:
‹ε ⟪⇩d⟪A⇩0⟫⇩s⇩i⇩n⇩g⇩l⇩↪⇩l⇩i⇩s⇩t ⇩d⊗⟦1, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫ σs = ε ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫ σs›
‹τ ⟪⇩d⟪A⇩0⟫⇩s⇩i⇩n⇩g⇩l⇩↪⇩l⇩i⇩s⇩t ⇩d⊗⟦1, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫ (s⇩0 # σs) e = τ ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫ (s⇩0 # σs) e›
‹ε ⟪⇩n⇩d⟪B⇩0⟫⇩s⇩i⇩n⇩g⇩l⇩↪⇩l⇩i⇩s⇩t ⇩n⇩d⊗⟦1, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L B⇩1⟫ σs = ε ⟪B⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t B⇩1⟫ σs›
‹τ ⟪⇩n⇩d⟪B⇩0⟫⇩s⇩i⇩n⇩g⇩l⇩↪⇩l⇩i⇩s⇩t ⇩n⇩d⊗⟦1, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L B⇩1⟫ (s⇩0 # σs) e = τ ⟪B⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t B⇩1⟫ (s⇩0 # σs) e›
by (simp_all add: ε_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k ε_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k drop_Suc combine_Sync_ε_def,
auto simp add: combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_defs combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs singl_list_conv_defs ε_simps)
(metis append_Cons append_Nil)
lemma combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_and_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_eq:
‹ε ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫ [s⇩0, s⇩1] = ε ⟪⇩d⨂⟦E⟧⇩✓ [A⇩0, A⇩1]⟫ [s⇩0, s⇩1]›
‹τ ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫ [s⇩0, s⇩1] e = τ ⟪⇩d⨂⟦E⟧⇩✓ [A⇩0, A⇩1]⟫ [s⇩0, s⇩1] e›
‹ε ⟪B⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t B⇩1⟫ [s⇩0, s⇩1] = ε ⟪⇩n⇩d⨂⟦E⟧⇩✓ [B⇩0, B⇩1]⟫ [s⇩0, s⇩1]›
‹τ ⟪B⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t B⇩1⟫ [s⇩0, s⇩1] e = τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ [B⇩0, B⇩1]⟫ [s⇩0, s⇩1] e›
by (simp_all add: ε_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ε_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k)
(auto simp add: combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs singl_list_conv_defs
option.case_eq_if ε_simps combine_Sync_ε_def)
lemmas combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_and_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_eq =
combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_and_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_eq[simplified]
subsection ‹Transmission of Properties›
lemma finite_trans_transmission_to_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k:
‹(⋀A. A ∈ set As ⟹ finite_trans A) ⟹ finite_trans ⟪⇩n⇩d⨂⟦E⟧⇩✓ As⟫›
by (induct As rule: induct_list012)
(auto simp add: singl_list_conv_defs combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs finite_trans_def finite_image_set2)
lemma ρ_disjoint_ε_transmission_to_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k:
‹(⋀A. A ∈ set As ⟹ ρ_disjoint_ε A) ⟹ ρ_disjoint_ε ⟪⇩d⨂⟦E⟧⇩✓ As⟫›
by (induct As rule: induct_list012)
(simp_all add: ρ_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ε_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ρ_disjoint_ε_def combine_Sync_ε_def)
lemma ρ_disjoint_ε_transmission_to_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k:
‹∀B ∈ set Bs. ρ_disjoint_ε B ⟹ ρ_disjoint_ε ⟪⇩n⇩d⨂⟦E⟧⇩✓ Bs⟫›
by (induct Bs rule: induct_list012)
(simp_all add: ρ_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ε_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ρ_disjoint_ε_def combine_Sync_ε_def)
lemma same_length_indep_transmission_to_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k:
‹indep_enabl A⇩0 s⇩0 E ⟪⇩d⨂⟦E⟧⇩✓ As⟫ σs›
if ‹length σs = length As›
‹⋀i j. ⟦i ≤ length As; j ≤ length As; i ≠ j⟧ ⟹
indep_enabl ((A⇩0 # As) ! i) ((s⇩0 # σs) ! i) E ((A⇩0 # As) ! j) ((s⇩0 # σs) ! j)›
using same_length_indep_transmission_to_iterated_combine⇩d_Sync[OF that]
by (simp add: indep_enabl_def ε_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k
τ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k that(1))
lemma ω_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k :
‹length σs = length As ⟹
ω ⟪⇩d⨂⟦E⟧⇩✓ As⟫ σs = (if As = [] then ◇ else those (map2 ω As σs))›
by (induct σs As rule: induct_2_lists012)
(simp_all add: singl_list_conv_defs combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs split: option.split)
lemma ω_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k :
‹length σs = length As ⟹
ω ⟪⇩n⇩d⨂⟦E⟧⇩✓ As⟫ σs =
(if As = [] then {} else {rs. length rs = length As ∧ (∀i < length As. rs ! i ∈ ω (As ! i) (σs ! i))})›
proof (induct σs As rule: induct_2_lists012)
case Nil show ?case by simp
next
case (single σ1 A1)
from length_Suc_conv show ?case
by (auto simp add: singl_list_conv_defs)
next
case (Cons σ1 σ2 σs A1 A2 As)
show ?case (is ‹_ = ?rhs σ1 σ2 σs A1 A2 As›)
proof (intro subset_antisym subsetI)
fix rs assume ‹rs ∈ ω ⟪⇩n⇩d⨂⟦E⟧⇩✓ A1 # A2 # As⟫ (σ1 # σ2 # σs)›
then obtain r1 rs' where ‹rs = r1 # rs'› ‹r1 ∈ ω A1 σ1›
‹rs' ∈ ω ⟪⇩n⇩d⨂⟦E⟧⇩✓ A2 # As⟫ (σ2 # σs)›
by (auto simp add: combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs)
from this(3) Cons.hyps(3) obtain r2 rs''
where ‹rs' = r2 # rs''› ‹length rs'' = length As›
‹∀i<Suc (length As). (r2 # rs'') ! i ∈ ω ((A2 # As) ! i) ((σ2 # σs) ! i)›
by simp (metis (no_types, lifting) length_Suc_conv)
with ‹r1 ∈ ω A1 σ1› show ‹rs ∈ ?rhs σ1 σ2 σs A1 A2 As›
by (auto simp add: ‹rs = r1 # rs'› less_Suc_eq_0_disj)
next
from Cons.hyps(3)
show ‹rs ∈ ?rhs σ1 σ2 σs A1 A2 As ⟹
rs ∈ ω ⟪⇩n⇩d⨂⟦E⟧⇩✓ A1 # A2 # As⟫ (σ1 # σ2 # σs)› for rs
by (cases rs; cases ‹tl rs›, simp_all add: combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs) auto
qed
qed
subsection ‹Normalization›
lemma ω_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_det_ndet_conv:
‹length σs = length As ⟹
ω ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫ σs = ω ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs›
proof (induct σs As rule: induct_2_lists012)
case Nil
show ?case by (simp add: base_trans_det_ndet_conv(1))
next
case (single σ1 A1)
show ?case by (simp add: from_det_to_ndet_singl_list_conv_commute)
next
case (Cons σ1 σ2 σs A1 A2 As)
thus ?case
by (auto simp add: det_ndet_conv_defs combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs split: option.split)
qed
lemma τ_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep:
‹length σs = length As ⟹
(⋀i j. ⟦i < length As; j < length As; i ≠ j⟧
⟹ indep_enabl (As ! i) (σs ! i) E (As ! j) (σs ! j)) ⟹
τ ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs e = τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫ σs e›
proof (induct σs As rule: induct_2_lists012)
case Nil
show ?case by simp
next
case (single σ1 A1)
show ?case by (simp add: from_det_to_ndet_singl_list_conv_commute(1))
next
case (Cons σ1 σ2 σs A1 A2 As)
have * : ‹τ ⟪⟪⇩d⨂⟦E⟧⇩✓ A2 # As⟫⟫⇩d⇩↪⇩n⇩d (σ2 # σs) e =
τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) (A2 # As)⟫ (σ2 # σs) e›
proof (rule Cons.hyps(3))
show ‹⟦i < length (A2 # As); j < length (A2 # As); i ≠ j⟧
⟹ indep_enabl ((A2 # As) ! i) ((σ2 # σs) ! i) E
((A2 # As) ! j) ((σ2 # σs) ! j)› for i j
using Cons.prems[of ‹Suc i› ‹Suc j›] by simp
qed
have ‹τ ⟪⟪⇩d⨂⟦E⟧⇩✓ A1 # A2 # As⟫⟫⇩d⇩↪⇩n⇩d (σ1 # σ2 # σs) e =
τ ⟪⟪A1⟫⇩d⇩↪⇩n⇩d ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t ⟪⟪⇩d⨂⟦E⟧⇩✓ A2 # As⟫⟫⇩d⇩↪⇩n⇩d⟫ (σ1 # σ2 # σs) e›
proof (subst iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k.simps(3), rule τ_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep)
show ‹ε A1 σ1 ∩ ε ⟪⇩d⨂⟦E⟧⇩✓ A2 # As⟫ (σ2 # σs) ⊆ E›
proof (rule indep_enablD[OF _ ℛ⇩d.init ℛ⇩d.init])
show ‹indep_enabl A1 σ1 E ⟪⇩d⨂⟦E⟧⇩✓ A2 # As⟫ (σ2 # σs)›
by (simp add: Cons.hyps(1) Cons.prems order_le_less_trans
same_length_indep_transmission_to_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k)
qed
qed
also have ‹… = τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) (A1 # A2 # As)⟫ (σ1 # σ2 # σs) e›
by (use "*" in ‹simp add: combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs ε_simps›)
(metis empty_from_det_to_ndet_is_None_trans option.exhaust)
finally show ?case .
qed
lemma P⇩S⇩K⇩I⇩P⇩S_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep:
assumes same_length: ‹length σs = length As›
and indep: ‹⋀i j. ⟦i < length As; j < length As; i ≠ j⟧ ⟹
indep_enabl (As ! i) (σs ! i) E (As ! j) (σs ! j)›
shows ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d σs = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫⟫⇩n⇩d σs›
proof (fold P⇩S⇩K⇩I⇩P⇩S_nd_from_det_to_ndet_is_P⇩S⇩K⇩I⇩P⇩S_d, rule P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong_id)
show ‹σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs ⟹
τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫ σs' e = τ ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs' e› for σs' e
proof (rule τ_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep[symmetric])
show ‹σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs ⟹ length σs' = length As›
by (metis ℛ⇩n⇩d_from_det_to_ndet ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k(1) same_length
same_length_ℛ⇩d_iterated_combine⇩d_Sync_description)
next
show ‹⟦σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs; i < length As; j < length As; i ≠ j⟧
⟹ indep_enabl (As ! i) (σs' ! i) E (As ! j) (σs' ! j)› for i j
by (unfold ℛ⇩n⇩d_from_det_to_ndet ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k,
drule same_length_ℛ⇩d_iterated_combine⇩d_Sync_description[OF same_length])
(meson ℛ⇩d_trans indep_enabl_def indep)
qed
next
show ‹σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs ⟹
ω ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫ σs' = ω ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs'› for σs'
by (metis ℛ⇩n⇩d_from_det_to_ndet ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k(1)
ω_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_det_ndet_conv same_length
same_length_ℛ⇩d_iterated_combine⇩d_Sync_description)
qed
lemma P_d_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep:
assumes same_length: ‹length σs = length As›
and indep: ‹⋀i j. ⟦i < length As; j < length As; i ≠ j⟧ ⟹
indep_enabl (As ! i) (σs ! i) E (As ! j) (σs ! j)›
shows ‹P⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d σs = P⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫⟫⇩n⇩d σs›
proof (fold P_nd_from_det_to_ndet_is_P_d, rule P_nd_eqI_strong_id)
show ‹σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs ⟹
τ ⟪⇩n⇩d⨂⟦E⟧⇩✓ map (λA. ⟪A⟫⇩d⇩↪⇩n⇩d) As⟫ σs' e = τ ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs' e› for σs' e
proof (rule τ_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep[symmetric])
show ‹σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs ⟹ length σs' = length As›
by (metis ℛ⇩n⇩d_from_det_to_ndet ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k(1) same_length
same_length_ℛ⇩d_iterated_combine⇩d_Sync_description)
next
show ‹⟦σs' ∈ ℛ⇩n⇩d ⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d⇩↪⇩n⇩d σs; i < length As; j < length As; i ≠ j⟧
⟹ indep_enabl (As ! i) (σs' ! i) E (As ! j) (σs' ! j)› for i j
by (unfold ℛ⇩n⇩d_from_det_to_ndet ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k,
drule same_length_ℛ⇩d_iterated_combine⇩d_Sync_description[OF same_length])
(meson ℛ⇩d_trans indep_enabl_def indep)
qed
qed
section ‹Compactification Theorems›
subsection ‹Binary›
subsubsection ‹Pair›
theorem P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k :
fixes E :: ‹'a set›
assumes ρ_disjoint_ε : ‹ρ_disjoint_ε A⇩0› ‹ρ_disjoint_ε A⇩1›
defines A_def: ‹A ≡ ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫›
defines P_def: ‹P ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩n⇩d› and Q_def: ‹Q ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩n⇩d› and S_def: ‹S ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d›
shows ‹P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1 = S (σ⇩0, σ⇩1)›
proof -
let ?f = ‹P⇩S⇩K⇩I⇩P⇩S_nd_step (ε A) (τ A) (ω A) (λσ'. case σ' of (σ⇩0, σ⇩1) ⇒ P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1)›
note cartprod_rwrt = GlobalNdet_cartprod[of _ _ ‹λx y. _ (x, y)›, simplified]
note Ndet_and_Sync⇩P⇩a⇩i⇩r = Sync⇩P⇩a⇩i⇩r.Sync⇩p⇩t⇩i⇩c⇩k_distrib_GlobalNdet_left
Sync⇩P⇩a⇩i⇩r.Sync⇩p⇩t⇩i⇩c⇩k_distrib_GlobalNdet_right
note Mprefix_Sync⇩P⇩a⇩i⇩r_constant =
Sync⇩P⇩a⇩i⇩r.SKIP_Sync⇩p⇩t⇩i⇩c⇩k_Mprefix Sync⇩P⇩a⇩i⇩r.Mprefix_Sync⇩p⇩t⇩i⇩c⇩k_SKIP
Sync⇩P⇩a⇩i⇩r.STOP_Sync⇩p⇩t⇩i⇩c⇩k_Mprefix Sync⇩P⇩a⇩i⇩r.Mprefix_Sync⇩p⇩t⇩i⇩c⇩k_STOP
note P_rec = restriction_fix_eq[OF P⇩S⇩K⇩I⇩P⇩S_nd_step_constructive_bis[of A⇩0], folded P⇩S⇩K⇩I⇩P⇩S_nd_def P_def, THEN fun_cong]
note Q_rec = restriction_fix_eq[OF P⇩S⇩K⇩I⇩P⇩S_nd_step_constructive_bis[of A⇩1], folded P⇩S⇩K⇩I⇩P⇩S_nd_def Q_def, THEN fun_cong]
have ω_A : ‹ω A (σ⇩0', σ⇩1') = ω A⇩0 σ⇩0' × ω A⇩1 σ⇩1'› for σ⇩0' σ⇩1'
by (auto simp add: A_def combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs)
have ε_A : ‹ε A (σ⇩0', σ⇩1') = combine_sets_Sync (ε A⇩0 σ⇩0') E (ε A⇩1 σ⇩1')› for σ⇩0' σ⇩1'
by (simp add: A_def ε_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k combine_Sync_ε_def)
show ‹P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1 = S (σ⇩0, σ⇩1)›
proof (rule fun_cong[of ‹λ(σ⇩0, σ⇩1). P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1› _ ‹(σ⇩0, σ⇩1)›, simplified])
show ‹(λ(σ⇩0, σ⇩1). P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1) = S›
proof (rule restriction_fix_unique[OF P⇩S⇩K⇩I⇩P⇩S_nd_step_constructive_bis[of A],
symmetric, folded P⇩S⇩K⇩I⇩P⇩S_nd_def S_def])
show ‹?f = (λ(σ⇩0, σ⇩1). P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1)›
proof (rule ext, clarify)
have ρ_disjoint_ε_bis : ‹ω A⇩0 σ⇩0 ≠ {} ⟹ ε A⇩0 σ⇩0 = {}›
‹ω A⇩1 σ⇩1 ≠ {} ⟹ ε A⇩1 σ⇩1 = {}› for σ⇩0 σ⇩1
by (simp_all add: ρ_simps ρ_disjoint_εD ρ_disjoint_ε)
show ‹?f (σ⇩0, σ⇩1) = P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1› for σ⇩0 σ⇩1
proof (cases ‹ω A⇩0 σ⇩0 = {}›; cases ‹ω A⇩1 σ⇩1 = {}›)
assume ‹ω A⇩0 σ⇩0 = {}› ‹ω A⇩1 σ⇩1 = {}›
hence P_rec' : ‹P σ⇩0 = P_nd_step (ε A⇩0) (τ A⇩0) P σ⇩0›
and Q_rec' : ‹Q σ⇩1 = P_nd_step (ε A⇩1) (τ A⇩1) Q σ⇩1›
and S_rec' : ‹P⇩S⇩K⇩I⇩P⇩S_nd_step (ε A) (τ A) (ω A) (λ(σ⇩0, σ⇩1). P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1) (σ⇩0, σ⇩1) =
P_nd_step (ε A) (τ A) (λ(σ⇩0, σ⇩1). P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1) (σ⇩0, σ⇩1)›
by (simp_all add: P_rec[of σ⇩0] Q_rec[of σ⇩1] ω_A)
show ‹?f (σ⇩0, σ⇩1) = P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1›
unfolding P_rec' Q_rec' S_rec' Sync⇩P⇩a⇩i⇩r.Mprefix_Sync⇩p⇩t⇩i⇩c⇩k_Mprefix_for_procomata
unfolding ε_A Mprefix_Un_distrib
by (intro arg_cong2[where f = ‹(□)›] mono_Mprefix_eq, fold P_rec' Q_rec',
auto simp add: A_def Ndet_and_Sync⇩P⇩a⇩i⇩r cartprod_rwrt
combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs ε_simps GlobalNdet_sets_commute[of ‹τ A⇩1 _ _›]
simp flip: GlobalNdet_factorization_union
intro!: mono_GlobalNdet_eq arg_cong2[where f = ‹(⊓)›])
next
assume ‹ω A⇩0 σ⇩0 ≠ {}› ‹ω A⇩1 σ⇩1 = {}›
from ρ_disjoint_ε(1) ‹ω A⇩0 σ⇩0 ≠ {}› have ‹ε A⇩0 σ⇩0 = {}›
by (simp add: ρ_disjoint_ε_def ρ_simps)
have ‹?f (σ⇩0, σ⇩1) = □b∈(ε A⇩1 σ⇩1 - E) → (⊓σ⇩1'∈τ A⇩1 σ⇩1 b. (SKIPS (ω A⇩0 σ⇩0) ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1'))›
by (auto simp add: ω_A ε_A ‹ω A⇩1 σ⇩1 = {}› ‹ε A⇩0 σ⇩0 = {}› intro!: mono_Mprefix_eq,
auto simp add: A_def combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs ‹ω A⇩0 σ⇩0 ≠ {}›
‹ε A⇩0 σ⇩0 = {}› cartprod_rwrt P_rec[of σ⇩0] intro!: mono_GlobalNdet_eq)
also have ‹… = P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1›
by (unfold P_rec[of σ⇩0] Q_rec[of σ⇩1])
(auto simp add: SKIPS_def Ndet_and_Sync⇩P⇩a⇩i⇩r Mprefix_Sync⇩P⇩a⇩i⇩r_constant ‹ω A⇩0 σ⇩0 ≠ {}›
GlobalNdet_Mprefix_distr GlobalNdet_sets_commute[of ‹τ A⇩1 _ _›] ‹ω A⇩1 σ⇩1 = {}›
intro!: mono_Mprefix_eq mono_GlobalNdet_eq)
finally show ‹?f (σ⇩0, σ⇩1) = …› .
next
assume ‹ω A⇩0 σ⇩0 = {}› ‹ω A⇩1 σ⇩1 ≠ {}›
from ρ_disjoint_ε(2) ‹ω A⇩1 σ⇩1 ≠ {}› have ‹ε A⇩1 σ⇩1 = {}›
by (simp add: ρ_disjoint_ε_def ρ_simps)
have ‹?f (σ⇩0, σ⇩1) = □a∈(ε A⇩0 σ⇩0 - E) → (⊓σ⇩0'∈τ A⇩0 σ⇩0 a. (P σ⇩0' ⟦E⟧⇩✓⇩P⇩a⇩i⇩r SKIPS (ω A⇩1 σ⇩1)))›
by (auto simp add: ω_A ε_A ‹ω A⇩0 σ⇩0 = {}› ‹ε A⇩1 σ⇩1 = {}› intro!: mono_Mprefix_eq,
auto simp add: A_def combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs ‹ω A⇩1 σ⇩1 ≠ {}›
‹ε A⇩1 σ⇩1 = {}› cartprod_rwrt Q_rec[of σ⇩1] intro!: mono_GlobalNdet_eq)
also have ‹… = P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1›
by (unfold P_rec[of σ⇩0] Q_rec[of σ⇩1])
(auto simp add: SKIPS_def Ndet_and_Sync⇩P⇩a⇩i⇩r Mprefix_Sync⇩P⇩a⇩i⇩r_constant ‹ω A⇩1 σ⇩1 ≠ {}›
GlobalNdet_Mprefix_distr GlobalNdet_sets_commute[of ‹τ A⇩0 _ _›] ‹ω A⇩0 σ⇩0 = {}›
intro!: mono_Mprefix_eq mono_GlobalNdet_eq)
finally show ‹?f (σ⇩0, σ⇩1) = …› .
next
assume ‹ω A⇩0 σ⇩0 ≠ {}› ‹ω A⇩1 σ⇩1 ≠ {}›
with ρ_disjoint_ε have ‹ε A⇩0 σ⇩0 = {}› ‹ε A⇩1 σ⇩1 = {}›
by (simp_all add: ρ_disjoint_ε_def ρ_simps)
show ‹ω A⇩0 σ⇩0 ≠ {} ⟹ ω A⇩1 σ⇩1 ≠ {} ⟹ ?f (σ⇩0, σ⇩1) = P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1›
by (simp add: ‹ω A⇩0 σ⇩0 ≠ {}› ‹ω A⇩1 σ⇩1 ≠ {}› ω_A P_rec[of σ⇩0] Q_rec[of σ⇩1] SKIPS_def
Ndet_and_Sync⇩P⇩a⇩i⇩r cartprod_rwrt GlobalNdet_sets_commute[of ‹ω A⇩0 _›])
qed
qed
qed
qed
qed
corollary P_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k :
‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⟪A⇩1⟫⇩n⇩d σ⇩1 = P⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σ⇩1)›
proof -
have ‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⟪A⇩1⟫⇩n⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ. {}⦈⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ. {}⦈⟫⇩n⇩d σ⇩1›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ. {}⦈ ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⦇ω := λσ. {}⦈⟫⟫⇩n⇩d (σ⇩0, σ⇩1)›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k) simp_all
also have ‹⟪A⇩0⦇ω := λσ. {}⦈ ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⦇ω := λσ. {}⦈⟫ = ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⦇ω := λσ. {}⦈›
by (auto simp add: combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs)
also have ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⦇ω := λσ. {}⦈⟫⇩n⇩d = P⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
finally show ?thesis .
qed
corollary P⇩S⇩K⇩I⇩P⇩S_d_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k:
‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σ⇩1 = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩d (σ⇩0, σ⇩1)›
if ‹ρ_disjoint_ε A⇩0› and ‹ρ_disjoint_ε A⇩1› and ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›
proof -
have ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σ⇩1 = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩1›
by (simp flip: P⇩S⇩K⇩I⇩P⇩S_nd_from_det_to_ndet_is_P⇩S⇩K⇩I⇩P⇩S_d)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r ⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⟫⇩n⇩d (σ⇩0, σ⇩1)›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k)
(metis ρ_disjoint_ε_def det_ndet_conv_ε(1) det_ndet_conv_ρ(1) ‹ρ_disjoint_ε A⇩0›,
metis ρ_disjoint_ε_def det_ndet_conv_ε(1) det_ndet_conv_ρ(1) ‹ρ_disjoint_ε A⇩1›)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩d (σ⇩0, σ⇩1)›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›)
finally show ?thesis .
qed
corollary P_d_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k:
‹P⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⟪A⇩1⟫⇩d σ⇩1 = P⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩d (σ⇩0, σ⇩1)›
if ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›
proof -
have ‹P⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⟪A⇩1⟫⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ. ◇⦈⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ. ◇⦈⟫⇩d σ⇩1›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ. ◇⦈ ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⦇ω := λσ. ◇⦈⟫⟫⇩d (σ⇩0, σ⇩1)›
by (subst P⇩S⇩K⇩I⇩P⇩S_d_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k, simp_all add: ρ_simps ρ_disjoint_ε_def)
(rule indep_enablI,
use ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›[THEN indep_enablD] in ‹simp add: ε_simps›)
also have ‹⟪A⇩0⦇ω := λσ. ◇⦈ ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⦇ω := λσ. ◇⦈⟫ = ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⦇ω := λσ. ◇⦈›
by (simp add: combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs, intro ext, simp)
also have ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⦇ω := λσ. ◇⦈⟫⇩d = P⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩d›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
finally show ?thesis .
qed
subsubsection ‹Pairlist›
theorem P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k :
fixes E :: ‹'a set›
assumes ρ_disjoint_ε : ‹ρ_disjoint_ε A⇩0› ‹ρ_disjoint_ε A⇩1›
shows ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩n⇩d σ⇩1 = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩n⇩d [σ⇩0, σ⇩1]›
proof -
let ?A = ‹⦇τ = τ ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫, ω = λσ. (λ(r, s). [r, s]) ` ω ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫ σ⦈›
have ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩n⇩d σ⇩1 =
RenamingTick (P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩n⇩d σ⇩1) (λ(r, s). [r, s])›
by (simp only: Sync⇩P⇩a⇩i⇩r_to_Sync⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t)
also have ‹… = RenamingTick (P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σ⇩1)) (λ(r, s). [r, s])›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k ρ_disjoint_ε)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪?A⟫⇩n⇩d (σ⇩0, σ⇩1)›
by (simp only: RenamingTick_P⇩S⇩K⇩I⇩P⇩S_nd)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩n⇩d [σ⇩0, σ⇩1]›
by (auto intro!: P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong[of ‹λ(r, s). [r, s]› _ ‹(σ⇩0, σ⇩1)›, simplified] inj_onI)
(auto simp add: combine_Sync⇩p⇩t⇩i⇩c⇩k_defs split: if_split_asm)
finally show ?thesis .
qed
corollary P_nd_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k :
‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩n⇩d σ⇩1 = P⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩n⇩d [σ⇩0, σ⇩1]›
proof -
have ‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩n⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ. {}⦈⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ. {}⦈⟫⇩n⇩d σ⇩1›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ. {}⦈ ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. {}⦈⟫⟫⇩n⇩d [σ⇩0, σ⇩1]›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k) simp_all
also have ‹⟪A⇩0⦇ω := λσ. {}⦈ ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. {}⦈⟫ = ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. {}⦈›
by (simp add: combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs, intro ext, simp)
also have ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. {}⦈⟫⇩n⇩d = P⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩n⇩d›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
finally show ?thesis .
qed
corollary P⇩S⇩K⇩I⇩P⇩S_d_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k :
‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σ⇩1 = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d [σ⇩0, σ⇩1]›
if ‹ρ_disjoint_ε A⇩0› and ‹ρ_disjoint_ε A⇩1› and ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›
proof -
have ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σ⇩1 = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩1›
by (simp flip: P⇩S⇩K⇩I⇩P⇩S_nd_from_det_to_ndet_is_P⇩S⇩K⇩I⇩P⇩S_d)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t ⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⟫⇩n⇩d [σ⇩0, σ⇩1]›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k)
(metis ρ_disjoint_ε_def det_ndet_conv_ε(1) det_ndet_conv_ρ(1) ‹ρ_disjoint_ε A⇩0›,
metis ρ_disjoint_ε_def det_ndet_conv_ε(1) det_ndet_conv_ρ(1) ‹ρ_disjoint_ε A⇩1›)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d [σ⇩0, σ⇩1]›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›)
finally show ?thesis .
qed
corollary P_d_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k :
‹P⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩d σ⇩1 = P⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d [σ⇩0, σ⇩1]›
if ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›
proof -
have ‹P⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ. ◇⦈⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ. ◇⦈⟫⇩d σ⇩1›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ. ◇⦈ ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. ◇⦈⟫⟫⇩d [σ⇩0, σ⇩1]›
by (subst P⇩S⇩K⇩I⇩P⇩S_d_combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k, simp_all)
(rule indep_enablI,
use ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›[THEN indep_enablD] in simp)
also have ‹⟪A⇩0⦇ω := λσ. ◇⦈ ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. ◇⦈⟫ = ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. ◇⦈›
by (simp add: combine⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs, intro ext, simp)
also have ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. ◇⦈⟫⇩d = P⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
finally show ?thesis .
qed
subsection ‹Rlist›
theorem P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k :
fixes E :: ‹'a set›
assumes ρ_disjoint_ε : ‹ρ_disjoint_ε A⇩0› ‹ρ_disjoint_ε A⇩1›
defines A_def: ‹A ≡ ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫›
defines P_def: ‹P ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩n⇩d› and Q_def: ‹Q ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩n⇩d› and S_def: ‹S ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d›
shows ‹P σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t Q σs = S (σ⇩0 # σs)›
proof -
let ?A' = ‹⦇τ = τ ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫, ω = λσ. (λ(x, y). x # y) ` ω ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫ σ⦈›
from P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k[OF ρ_disjoint_ε]
have ‹P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σs = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σs)› by (simp add: P_def Q_def)
hence ‹RenamingTick (P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σs) (λ(σ⇩0, σs). σ⇩0 # σs) =
RenamingTick (P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σs)) (λ(σ⇩0, σs). σ⇩0 # σs)› by simp
also have ‹RenamingTick (P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σs) (λ(σ⇩0, σs). σ⇩0 # σs) = P σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t Q σs›
by (auto intro: inj_onI Sync⇩P⇩a⇩i⇩r.inj_on_RenamingTick_Sync⇩p⇩t⇩i⇩c⇩k
[of ‹λ(σ⇩0, σs). σ⇩0 # σs›, simplified])
also have ‹RenamingTick (P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σs)) (λ(σ⇩0, σs). σ⇩0 # σs) = S (σ⇩0 # σs)›
proof (unfold RenamingTick_P⇩S⇩K⇩I⇩P⇩S_nd S_def,
rule P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong[of ‹λ(σ⇩0, σs). σ⇩0 # σs› ?A' ‹(σ⇩0, σs)›, simplified])
show ‹inj_on (λ(σ⇩0, σs). σ⇩0 # σs) (ℛ⇩n⇩d ?A' (σ⇩0, σs))› by (auto intro: inj_onI)
next
show ‹τ A (case σ' of (σ⇩0, σs) ⇒ σ⇩0 # σs) e =
(λσ''. case σ'' of (σ⇩0, σs) ⇒ σ⇩0 # σs) ` τ ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫ σ' e› for σ' e
by (cases σ') (auto simp add: A_def combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs)
next
show ‹ω A (case σ' of (σ⇩0, σs) ⇒ σ⇩0 # σs) =
(λσ''. case σ'' of (σ⇩0, σs) ⇒ σ⇩0 # σs) ` ω ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫ σ'› for σ'
by (cases σ') (auto simp add: A_def combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs)
qed
finally show ‹P σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t Q σs = S (σ⇩0 # σs)› .
qed
corollary P_nd_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k :
‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩n⇩d σs = P⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩n⇩d (σ⇩0 # σs)›
proof -
have ‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩n⇩d σs =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ. {}⦈⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ. {}⦈⟫⇩n⇩d σs›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ. {}⦈ ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. {}⦈⟫⟫⇩n⇩d (σ⇩0 # σs)›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k)
(simp_all add: ρ_simps ρ_disjoint_ε_def)
also have ‹⟪A⇩0⦇ω := λσ. {}⦈ ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. {}⦈⟫ = ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. {}⦈›
by (simp add: combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs, intro ext, simp add: ε_simps)
also have ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. {}⦈⟫⇩n⇩d = P⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩n⇩d›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
finally show ?thesis .
qed
corollary P⇩S⇩K⇩I⇩P⇩S_d_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k:
‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σs = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d (σ⇩0 # σs)›
if ‹ρ_disjoint_ε A⇩0› and ‹ρ_disjoint_ε A⇩1› and ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σs›
proof -
have ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σs = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σs›
by (simp flip: P⇩S⇩K⇩I⇩P⇩S_nd_from_det_to_ndet_is_P⇩S⇩K⇩I⇩P⇩S_d)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d ⇩n⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t ⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⟫⇩n⇩d (σ⇩0 # σs)›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k)
(metis ρ_disjoint_ε_def det_ndet_conv_ε(1) det_ndet_conv_ρ(1) ‹ρ_disjoint_ε A⇩0›,
metis ρ_disjoint_ε_def det_ndet_conv_ε(1) det_ndet_conv_ρ(1) ‹ρ_disjoint_ε A⇩1›)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d (σ⇩0 # σs)›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σs›)
finally show ?thesis .
qed
corollary P_d_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k:
‹P⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩d σs = P⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d (σ⇩0 # σs)›
if ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σs›
proof -
have ‹P⟪A⇩0⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⟪A⇩1⟫⇩d σs =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ. ◇⦈⟫⇩d σ⇩0 ⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ. ◇⦈⟫⇩d σs›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ. ◇⦈ ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. ◇⦈⟫⟫⇩d (σ⇩0 # σs)›
by (rule P⇩S⇩K⇩I⇩P⇩S_d_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k, simp_all add: ρ_simps ρ_disjoint_ε_def)
(rule indep_enablI,
use ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σs›[THEN indep_enablD] in ‹simp add: ε_simps›)
also have ‹⟪A⇩0⦇ω := λσ. ◇⦈ ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⦇ω := λσ. ◇⦈⟫ = ⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. ◇⦈›
by (simp add: combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k_defs, intro ext, simp add: ε_simps)
also have ‹P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⦇ω := λσ. ◇⦈⟫⇩d = P⟪⟪A⇩0 ⇩d⊗⟦E⟧⇩✓⇩R⇩l⇩i⇩s⇩t A⇩1⟫⟫⇩d›
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
finally show ?thesis .
qed
subsection ‹ListslenL›
theorem P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k :
fixes E :: ‹'a set›
assumes same_length_reach0 : ‹⋀σ⇩0'. σ⇩0' ∈ ℛ⇩n⇩d A⇩0 σ⇩0 ⟹ length σ⇩0' = len⇩0›
and same_length_term0 : ‹⋀σ⇩0' rs. σ⇩0' ∈ ℛ⇩n⇩d A⇩0 σ⇩0 ⟹ rs ∈ ω A⇩0 σ⇩0' ⟹ length rs = len⇩0›
and ρ_disjoint_ε : ‹ρ_disjoint_ε A⇩0› ‹ρ_disjoint_ε A⇩1›
defines A_def: ‹A ≡ ⟪A⇩0 ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫›
defines P_def: ‹P ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩n⇩d› and Q_def: ‹Q ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩n⇩d› and S_def: ‹S ≡ P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d›
shows ‹P σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L Q σ⇩1 = S (σ⇩0 @ σ⇩1)›
proof -
let ?A' = ‹⦇τ = τ ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫, ω = λσ. (λ(x, y). x @ y) ` ω ⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫ σ⦈›
let ?RT = RenamingTick
have * : ‹σ' ∈ ℛ⇩n⇩d ?A' (σ⇩0, σ⇩1) ⟹ length (fst σ') = len⇩0› for σ'
by (metis (no_types, lifting) ℛ⇩n⇩d_combine⇩n⇩d⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_subset mem_Sigma_iff prod.collapse
same_τ_implies_same_ℛ⇩n⇩d same_length_reach0 select_convs(1) subset_iff)
from P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k[OF ρ_disjoint_ε]
have ‹P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1 = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σ⇩1)›
by (simp add: P_def Q_def)
hence ‹?RT (P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1) (λ(σ⇩0, σs). σ⇩0 @ σs) =
?RT (P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σ⇩1)) (λ(σ⇩0, σs). σ⇩0 @ σs)› by simp
also have ‹?RT (P σ⇩0 ⟦E⟧⇩✓⇩P⇩a⇩i⇩r Q σ⇩1) (λ(σ⇩0, σs). σ⇩0 @ σs) = P σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L Q σ⇩1›
by (rule Sync⇩P⇩a⇩i⇩r_to_Sync⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L[OF is_ticks_length_P⇩S⇩K⇩I⇩P⇩S_nd[of A⇩0, folded P_def]])
(fact same_length_term0)
also have ‹?RT (P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦E⟧⇩✓⇩P⇩a⇩i⇩r A⇩1⟫⟫⇩n⇩d (σ⇩0, σ⇩1)) (λ(σ⇩0, σs). σ⇩0 @ σs) = S (σ⇩0 @ σ⇩1)›
by (auto simp add: RenamingTick_P⇩S⇩K⇩I⇩P⇩S_nd S_def dest!: "*"
intro!: P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong[of ‹λ(σ⇩0, σs). σ⇩0 @ σs› ?A' ‹(σ⇩0, σ⇩1)›, simplified] inj_onI)
(force simp add: image_iff A_def combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_defs combine⇩P⇩a⇩i⇩r_Sync⇩p⇩t⇩i⇩c⇩k_defs split: if_split_asm)+
finally show ?thesis .
qed
corollary P_nd_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k :
‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⟪A⇩1⟫⇩n⇩d σ⇩1 = P⟪⟪A⇩0 ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩n⇩d (σ⇩0 @ σ⇩1)›
if same_length_reach0 : ‹⋀σ⇩0'. σ⇩0' ∈ ℛ⇩n⇩d A⇩0 σ⇩0 ⟹ length σ⇩0' = len⇩0›
proof -
have * : ‹σs ∈ ℛ⇩n⇩d ⟪A⇩0⦇ω := λσ⇩0. {}⦈ ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⦇ω := λσ⇩1. {}⦈⟫ (σ⇩0 @ σ⇩1) ⟹ len⇩0 ≤ length σs› for σs
by (auto dest: set_rev_mp[OF _ ℛ⇩n⇩d_combine⇩n⇩d⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_subset]
simp add: same_length_reach0)
have ‹P⟪A⇩0⟫⇩n⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⟪A⇩1⟫⇩n⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ⇩0. {}⦈⟫⇩n⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ⇩1. {}⦈⟫⇩n⇩d σ⇩1›
by (simp only: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ⇩0. {}⦈ ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⦇ω := λσ⇩1. {}⦈⟫⟫⇩n⇩d (σ⇩0 @ σ⇩1)›
by (auto intro: P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k simp add: same_length_reach0)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⦇ω := λσ⇩1. {}⦈⟫⇩n⇩d (σ⇩0 @ σ⇩1)›
by (auto intro!: P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong_id dest!: "*")
(auto simp add: combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_defs split: if_split_asm)
also have ‹… = P⟪⟪A⇩0 ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩n⇩d (σ⇩0 @ σ⇩1)›
by (simp only: P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
finally show ?thesis .
qed
corollary P⇩S⇩K⇩I⇩P⇩S_d_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k :
assumes same_length_reach0 : ‹⋀σ⇩0'. σ⇩0' ∈ ℛ⇩d A⇩0 σ⇩0 ⟹ length σ⇩0' = len⇩0›
and same_length_term0 : ‹⋀σ⇩0'. σ⇩0' ∈ ℛ⇩d A⇩0 σ⇩0 ⟹ ω A⇩0 σ⇩0' ≠ ◇ ⟹ length ⌈ω A⇩0 σ⇩0'⌉ = len⇩0›
and ρ_disjoint_ε : ‹ρ_disjoint_ε A⇩0› ‹ρ_disjoint_ε A⇩1›
and indep_enabl : ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›
shows ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩d (σ⇩0 @ σ⇩1)›
proof -
have * : ‹σs ∈ ℛ⇩n⇩d ⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L ⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫ (σ⇩0 @ σ⇩1) ⟹
∃σ⇩0' σ⇩1'. σs = σ⇩0' @ σ⇩1' ∧ σ⇩0' ∈ ℛ⇩d A⇩0 σ⇩0 ∧ σ⇩1' ∈ ℛ⇩d A⇩1 σ⇩1› for σs
by (auto dest!: set_rev_mp[OF _ ℛ⇩n⇩d_combine⇩n⇩d⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_subset]
simp add: ℛ⇩n⇩d_from_det_to_ndet same_length_reach0)+
have ‹P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⟫⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⟫⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d σ⇩1›
by (simp only: P⇩S⇩K⇩I⇩P⇩S_nd_from_det_to_ndet_is_P⇩S⇩K⇩I⇩P⇩S_d)
also from same_length_term0 have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⟪A⇩0⟫⇩d⇩↪⇩n⇩d ⇩n⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L ⟪A⇩1⟫⇩d⇩↪⇩n⇩d⟫⟫⇩n⇩d (σ⇩0 @ σ⇩1)›
by (auto intro!: P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k split: option.split_asm
simp add: ρ_disjoint_ε ℛ⇩n⇩d_from_det_to_ndet same_length_reach0 ω_from_det_to_ndet)
(metis option.sel)
also from indep_enabl have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⟪A⇩0 ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩d⇩↪⇩n⇩d⟫⇩n⇩d (σ⇩0 @ σ⇩1)›
by (auto intro!: P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong_id
τ_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_behaviour_when_indep ω_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_behaviour
simp add: same_length_reach0 dest!: "*" indep_enablD)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩d (σ⇩0 @ σ⇩1)›
by (simp only: P⇩S⇩K⇩I⇩P⇩S_nd_from_det_to_ndet_is_P⇩S⇩K⇩I⇩P⇩S_d)
finally show ?thesis .
qed
corollary P_d_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k :
assumes same_length_reach0 : ‹⋀σ⇩0'. σ⇩0' ∈ ℛ⇩d A⇩0 σ⇩0 ⟹ length σ⇩0' = len⇩0›
and indep_enabl : ‹indep_enabl A⇩0 σ⇩0 E A⇩1 σ⇩1›
shows ‹P⟪A⇩0⟫⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⟪A⇩1⟫⇩d σ⇩1 =
P⟪⟪A⇩0 ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩d (σ⇩0 @ σ⇩1)›
proof -
have * : ‹σs ∈ ℛ⇩d ⟪A⇩0⦇ω := λσ⇩0. ◇⦈ ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⦇ω := λσ⇩1. ◇⦈⟫ (σ⇩0 @ σ⇩1) ⟹ len⇩0 ≤ length σs› for σs
by (auto dest: set_rev_mp[OF _ ℛ⇩d_combine⇩d⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_subset]
simp add: same_length_reach0)
have ‹P⟪A⇩0⟫⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⟪A⇩1⟫⇩d σ⇩1 =
P⇩S⇩K⇩I⇩P⇩S⟪A⇩0⦇ω := λσ⇩0. ◇⦈⟫⇩d σ⇩0 ⇘len⇩0⇙⟦E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L P⇩S⇩K⇩I⇩P⇩S⟪A⇩1⦇ω := λσ⇩1. ◇⦈⟫⇩d σ⇩1›
by (simp only: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
also from indep_enabl
have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0⦇ω := λσ⇩0. ◇⦈ ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⦇ω := λσ⇩1. ◇⦈⟫⟫⇩d (σ⇩0 @ σ⇩1)›
by (auto intro: P⇩S⇩K⇩I⇩P⇩S_d_combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k simp add: same_length_reach0)
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪A⇩0 ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⦇ω := λσ⇩0. ◇⦈⟫⇩d (σ⇩0 @ σ⇩1)›
by (auto intro!: P⇩S⇩K⇩I⇩P⇩S_d_eqI_strong_id dest!: "*")
(auto simp add: combine⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L_Sync⇩p⇩t⇩i⇩c⇩k_defs split: if_split_asm)
also have ‹… = P⟪⟪A⇩0 ⇩d⊗⟦len⇩0, E⟧⇩✓⇩L⇩i⇩s⇩t⇩s⇩l⇩e⇩n⇩L A⇩1⟫⟫⇩d (σ⇩0 @ σ⇩1)›
by (simp only: P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
finally show ?thesis .
qed
subsection ‹Multiple›
theorem P⇩S⇩K⇩I⇩P⇩S_nd_compactification_Sync⇩p⇩t⇩i⇩c⇩k:
‹length σs = length As ⟹ (⋀A. A ∈ set As ⟹ ρ_disjoint_ε A) ⟹
❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip σs As. P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d σ = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩n⇩d σs›
proof (induct σs As rule: induct_2_lists012)
case Nil show ?case by (simp, subst P⇩S⇩K⇩I⇩P⇩S_nd_rec, simp)
next
case (single σ⇩0 A⇩0) show ?case
by (auto simp add: RenamingTick_P⇩S⇩K⇩I⇩P⇩S_nd singl_list_conv_defs
intro!: inj_onI P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong)
next
case (Cons σ⇩0 σ⇩1 σs A⇩0 A⇩1 As)
have ρ_disjoint_ε : ‹A ∈ set (A⇩1 # As) ⟹ ρ_disjoint_ε A› for A
by (simp add: Cons.prems)
show ?case
by (simp add: Cons.hyps(3)[OF ρ_disjoint_ε, simplified] Cons.prems
P⇩S⇩K⇩I⇩P⇩S_nd_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ρ_disjoint_ε_transmission_to_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k)
qed
corollary P_nd_compactification_Sync⇩p⇩t⇩i⇩c⇩k:
‹length σs = length As ⟹ ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip σs As. P⟪A⟫⇩n⇩d σ = P⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩n⇩d σs›
proof (induct σs As rule: induct_2_lists012)
case Nil show ?case by (simp, subst P_nd_rec, simp)
next
case (single σ⇩0 A⇩0) show ?case
by (simp, subst (1 2) P⇩S⇩K⇩I⇩P⇩S_nd_updated_ω)
(auto simp add: RenamingTick_P⇩S⇩K⇩I⇩P⇩S_nd singl_list_conv_defs
intro!: inj_onI P⇩S⇩K⇩I⇩P⇩S_nd_eqI_strong)
next
case (Cons σ⇩0 σ⇩1 σs A⇩0 A⇩1 As)
show ?case
by (simp add: Cons.hyps(3)[simplified] Cons.prems
P_nd_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k ρ_disjoint_ε_transmission_to_iterated_combine⇩n⇩d_Sync⇩p⇩t⇩i⇩c⇩k)
qed
corollary P⇩S⇩K⇩I⇩P⇩S_d_compactification_Sync⇩p⇩t⇩i⇩c⇩k:
‹⟦length σs = length As; ⋀A. A ∈ set As ⟹ ρ_disjoint_ε A;
⋀i j. ⟦i < length As; j < length As; i ≠ j⟧ ⟹
indep_enabl (As ! i) (σs ! i) E (As ! j) (σs ! j)⟧ ⟹
❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip σs As. P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩d σ = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d σs›
proof (induct σs As rule: induct_2_lists012)
case Nil show ?case by (simp, subst P⇩S⇩K⇩I⇩P⇩S_d_rec, simp)
next
case (single σ⇩0 A⇩0) show ?case
by (auto simp add: RenamingTick_P⇩S⇩K⇩I⇩P⇩S_d singl_list_conv_defs
intro!: inj_onI P⇩S⇩K⇩I⇩P⇩S_d_eqI_strong split: option.split)
next
case (Cons σ⇩0 σ⇩1 σs A⇩0 A⇩1 As)
have ρ_disjoint_ε : ‹A ∈ set (A⇩1 # As) ⟹ ρ_disjoint_ε A› for A
by (simp add: Cons.prems(1))
have indep_enabl :
‹⟦i < length (A⇩1 # As); j < length (A⇩1 # As); i ≠ j⟧ ⟹
indep_enabl ((A⇩1 # As) ! i) ((σ⇩1 # σs) ! i) E ((A⇩1 # As) ! j) ((σ⇩1 # σs) ! j)› for i j
by (metis Cons.prems(2) Suc_less_eq length_Cons nat.inject nth_Cons_Suc)
have ‹ρ_disjoint_ε A⇩0› by (simp add: Cons.prems(1))
moreover have ‹ρ_disjoint_ε ⟪⇩d⨂⟦E⟧⇩✓ A⇩1 # As⟫›
by (meson ρ_disjoint_ε ρ_disjoint_ε_transmission_to_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k)
moreover have ‹indep_enabl A⇩0 σ⇩0 E ⟪⇩d⨂⟦E⟧⇩✓ A⇩1 # As⟫ (σ⇩1 # σs)›
by (metis Cons.hyps(1) Cons.prems(2) length_Cons less_Suc_eq_le
same_length_indep_transmission_to_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k)
ultimately show ?case
by (simp add: P⇩S⇩K⇩I⇩P⇩S_d_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k
Cons.hyps(3)[OF ρ_disjoint_ε indep_enabl, simplified])
qed
corollary P_d_compactification_Sync⇩p⇩t⇩i⇩c⇩k:
‹⟦length σs = length As;
⋀i j. ⟦i < length As; j < length As; i ≠ j⟧ ⟹
indep_enabl (As ! i) (σs ! i) E (As ! j) (σs ! j)⟧ ⟹
❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip σs As. P⟪A⟫⇩d σ = P⟪⟪⇩d⨂⟦E⟧⇩✓ As⟫⟫⇩d σs›
proof (induct σs As rule: induct_2_lists012)
case Nil show ?case by (simp, subst P_d_rec, simp)
next
case (single σ⇩0 A⇩0) show ?case
by (simp, subst (1 2) P⇩S⇩K⇩I⇩P⇩S_d_updated_ω)
(auto simp add: RenamingTick_P⇩S⇩K⇩I⇩P⇩S_d singl_list_conv_defs
intro!: inj_onI P⇩S⇩K⇩I⇩P⇩S_d_eqI_strong split: option.split)
next
case (Cons σ⇩0 σ⇩1 σs A⇩0 A⇩1 As)
have indep_enabl :
‹⟦i < length (A⇩1 # As); j < length (A⇩1 # As); i ≠ j⟧ ⟹
indep_enabl ((A⇩1 # As) ! i) ((σ⇩1 # σs) ! i) E ((A⇩1 # As) ! j) ((σ⇩1 # σs) ! j)› for i j
by (metis Cons.prems Suc_less_eq length_Cons nat.inject nth_Cons_Suc)
have ‹indep_enabl A⇩0 σ⇩0 E ⟪⇩d⨂⟦E⟧⇩✓ A⇩1 # As⟫ (σ⇩1 # σs)›
by (metis Cons.hyps(1) Cons.prems length_Cons less_Suc_eq_le
same_length_indep_transmission_to_iterated_combine⇩d_Sync⇩p⇩t⇩i⇩c⇩k)
thus ?case
by (simp add: P_d_combine⇩R⇩l⇩i⇩s⇩t_Sync⇩p⇩t⇩i⇩c⇩k
Cons.hyps(3)[OF indep_enabl, simplified])
qed
section ‹Derived Versions›
lemma P⇩S⇩K⇩I⇩P⇩S_nd_compactification_Sync⇩p⇩t⇩i⇩c⇩k_upt_version:
‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩n⇩d (replicate n 0)›
if ‹⋀i. i < n ⟹ ρ_disjoint_ε (A i)›
‹⋀i. i < n ⟹ P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩n⇩d 0 = Q i›
proof -
have ‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. Q i›
by (auto intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq2)
also have ‹… = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩n⇩d 0›
by (auto simp add: that(2) intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate n 0) (map A [0..<n]). P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d σ›
proof (induct n rule: nat_induct_012)
case (Suc k)
have ‹❙⟦E❙⟧⇩✓ i∈@ [0..<Suc k]. P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩n⇩d 0 =
❙⟦E❙⟧⇩✓ i∈@ [0..<k]. P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩n⇩d 0 ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A k⟫⇩n⇩d 0›
using Suc.hyps(1) by (simp add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate k 0) (map A [0..<k]). P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d σ ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A k⟫⇩n⇩d 0›
by (simp only: Suc.hyps(2))
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate (Suc k) 0) (map A [0..<Suc k]). P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩n⇩d σ›
using Suc.hyps(1) by (simp flip: replicate_append_same add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
finally show ?case .
qed simp_all
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩n⇩d (replicate n 0)›
by (rule P⇩S⇩K⇩I⇩P⇩S_nd_compactification_Sync⇩p⇩t⇩i⇩c⇩k) (auto simp add: that(1))
finally show ?thesis .
qed
lemma P_nd_compactification_Sync⇩p⇩t⇩i⇩c⇩k_upt_version:
‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = P⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩n⇩d (replicate n 0)›
if ‹⋀i. i < n ⟹ P⟪A i⟫⇩n⇩d 0 = Q i›
proof -
have ‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. Q i›
by (auto intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq2)
also have ‹… = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. P⟪A i⟫⇩n⇩d 0›
by (auto simp add: that intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate n 0) (map A [0..<n]). P⟪A⟫⇩n⇩d σ›
proof (induct n rule: nat_induct_012)
case (Suc k)
have ‹❙⟦E❙⟧⇩✓ i∈@ [0..<Suc k]. P⟪A i⟫⇩n⇩d 0 =
❙⟦E❙⟧⇩✓ i∈@ [0..<k]. P⟪A i⟫⇩n⇩d 0 ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⟪A k⟫⇩n⇩d 0›
using Suc.hyps(1) by (simp add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate k 0) (map A [0..<k]). P⟪A⟫⇩n⇩d σ ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⟪A k⟫⇩n⇩d 0›
by (simp only: Suc.hyps(2))
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate (Suc k) 0) (map A [0..<Suc k]). P⟪A⟫⇩n⇩d σ›
using Suc.hyps(1) by (simp flip: replicate_append_same add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
finally show ?case .
qed simp_all
also have ‹… = P⟪⟪⇩n⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩n⇩d (replicate n 0)›
by (rule P_nd_compactification_Sync⇩p⇩t⇩i⇩c⇩k) simp
finally show ?thesis .
qed
lemma P⇩S⇩K⇩I⇩P⇩S_d_compactification_Sync⇩p⇩t⇩i⇩c⇩k_upt_version:
‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩d (replicate n 0)›
if ‹⋀i. i < n ⟹ ρ_disjoint_ε (A i)›
‹⋀i j. i < n ⟹ j < n ⟹ i ≠ j ⟹ indep_enabl (A i) 0 E (A j) 0›
‹⋀i. i < n ⟹ P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩d 0 = Q i›
proof -
have ‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. Q i›
by (auto intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq2)
also have ‹… = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩d 0›
by (auto simp add: that(3) intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate n 0) (map A [0..<n]). P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩d σ›
proof (induct n rule: nat_induct_012)
case (Suc k)
have ‹❙⟦E❙⟧⇩✓ i∈@ [0..<Suc k]. P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩d 0 =
❙⟦E❙⟧⇩✓ i∈@ [0..<k]. P⇩S⇩K⇩I⇩P⇩S⟪A i⟫⇩d 0 ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A k⟫⇩d 0›
using Suc.hyps(1) by (simp add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate k 0) (map A [0..<k]). P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩d σ ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⇩S⇩K⇩I⇩P⇩S⟪A k⟫⇩d 0›
by (simp only: Suc.hyps(2))
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A) ∈@ zip (replicate (Suc k) 0) (map A [0..<Suc k]). P⇩S⇩K⇩I⇩P⇩S⟪A⟫⇩d σ›
using Suc.hyps(1) by (simp flip: replicate_append_same add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
finally show ?case .
qed simp_all
also have ‹… = P⇩S⇩K⇩I⇩P⇩S⟪⟪⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩d (replicate n 0)›
by (rule P⇩S⇩K⇩I⇩P⇩S_d_compactification_Sync⇩p⇩t⇩i⇩c⇩k) (auto simp add: that(1, 2))
finally show ?thesis .
qed
lemma P_d_compactification_Sync⇩p⇩t⇩i⇩c⇩k_upt_version:
‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = P⟪⟪⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩d (replicate n 0)›
if ‹⋀i j. i < n ⟹ j < n ⟹ i ≠ j ⟹ indep_enabl (A i) 0 E (A j) 0›
‹⋀i. i < n ⟹ P⟪A i⟫⇩d 0 = Q i›
proof -
have ‹❙⟦E❙⟧⇩✓ P ∈@ map Q [0..<n]. P = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. Q i›
by (auto intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq2)
also have ‹… = ❙⟦E❙⟧⇩✓ i ∈@ [0..<n]. P⟪A i⟫⇩d 0›
by (auto simp add: that intro: mono_MultiSync⇩p⇩t⇩i⇩c⇩k_eq)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A)∈@ (zip (replicate n 0) (map A [0..<n])). P⟪A⟫⇩d σ›
proof (induct n rule: nat_induct_012)
case (Suc k)
have ‹❙⟦E❙⟧⇩✓ i∈@ [0..<Suc k]. P⟪A i⟫⇩d 0 =
❙⟦E❙⟧⇩✓ i∈@ [0..<k]. P⟪A i⟫⇩d 0 ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⟪A k⟫⇩d 0›
using Suc.hyps(1) by (simp add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A)∈@ zip (replicate k 0) (map A [0..<k]). P⟪A⟫⇩d σ ⟦E⟧⇩✓⇩L⇩l⇩i⇩s⇩t P⟪A k⟫⇩d 0›
by (simp only: Suc.hyps(2))
also have ‹… = ❙⟦E❙⟧⇩✓ (σ, A)∈@ zip (replicate (Suc k) 0) (map A [0..<Suc k]). P⟪A⟫⇩d σ›
using Suc.hyps(1) by (simp flip: replicate_append_same add: MultiSync⇩p⇩t⇩i⇩c⇩k_snoc)
finally show ?case .
qed simp_all
also have ‹… = P⟪⟪⇩d⨂⟦E⟧⇩✓ map A [0..<n]⟫⟫⇩d (replicate n 0)›
by (rule P_d_compactification_Sync⇩p⇩t⇩i⇩c⇩k) (auto simp add: that(1))
finally show ?thesis .
qed
section ‹More on Iterated Combine and Events›
text ‹
Through @{thm [source] τ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k ε_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k ℛ_iterated_combine_Sync⇩p⇩t⇩i⇩c⇩k},
we immediately recover the results proven in
\<^theory>‹HOL-CSP_Proc-Omata.Compactification_Synchronization_Product›.
›
end