Theorem 5.22 — communication safety
DisprovedMPSTAsync.Progress.theorem_5_22Suppose , the session typing is coherent, and has a redex at a free session channel . First, the queue at is unique and the active prefixes at have one of the three forms stated in the paper: one receiving prefix with a nonempty queue, one emitting prefix, or one of each. Second, a value input, delegated-channel input or branch selection has a queue-head message of the corresponding kind, with matching vector length or offered label.
This theorem is the communication-safety input to Proposition 5.29.
Formalization Note is well formed by the section's standing convention. The notation uses structural congruence and a one-hole reduction context. An occurrence of in means any free occurrence outside its hole, including queue names and transmitted channels. The redex predicate requires to be free and identifies a firing session rule; the receiving part in clause (2) must participate in that redex.
import Definitions.Def_MPSTAsync_Progress_Activity set_option autoImplicit false
namespace MPSTAsync.Progress
theorem theorem_5_22 (Γ : Env) (hΓ : Γ.WellFormed) (P : Proc)
(q : List Chan) (Δ : Typing) (c : Chan)
(hP : RTyped true Γ P q Δ) (hcoh : TypingCoherent Δ)
(hred : HasRedexAt P c) :
(∃ (E : Ctx) (h : List Msg), Congr P (E.fill (.queue c h)) ∧
((ActiveRecv P c ∧ E.occ c = 1 ∧ h ≠ []) ∨
(ActiveEmit P c ∧ E.occ c = 1) ∨
(ActiveRecv P c ∧ ActiveEmit P c ∧ E.occ c = 2))) ∧
(∀ (E : Ctx) (R : Proc), Congr P (E.fill R) → ReceivingRedexPart P R c →
((∀ (xs : List Name) (Q : Proc), Congr R (.recv c xs Q) →
∃ (E' : Ctx) (vs : List Val) (h : List Msg),
Congr P (E'.fill (.queue c (.vals vs :: h))) ∧ vs.length = xs.length) ∧
(∀ (ss : List Chan) (Q : Proc), Congr R (.srecv c ss Q) →
∃ (E' : Ctx) (ts : List Chan) (h : List Msg),
Congr P (E'.fill (.queue c (.chans ts :: h))) ∧ ts.length = ss.length) ∧
(∀ (bs : List (Label × Proc)), Congr R (.branch c bs) →
∃ (E' : Ctx) (l : Label) (Q : Proc) (h : List Msg),
(l,Q) ∈ bs ∧ Congr P (E'.fill (.queue c (.label l :: h)))))) := by sorry
end MPSTAsync.Progress
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.