Recursive sessions through replicated services

TheoremSelection preserves persistent offers#✓fully proved

Choice selection cannot discard a persistent SOURCE offer: sums do not expose OfferedIn, and selecting an actual communicating guard exposes no persistent offer.

theorem offered_select {s : Nat} {p q : Proc} (h : Select p q) :
    OfferedIn s p → OfferedIn s q
Uses 3 · Used by 1

TheoremPersistent service offers survive one reduction step#✓fully proved

ALL5 canonical Step rules retain every actual persistent source service offer. This is valid for arbitrary Pi syntax, WITHOUT a HasType premise.

theorem offered_step {s : Nat} {p q : Proc} (h : PiCalculus.Step p q) :
    OfferedIn s p → OfferedIn s q
Uses 9 · Used by 2

TheoremDeclared signature offers survive one reduction step#✓fully proved

Exact declared signature lookup plus an actual persistent offer is retained by every canonical Step, at unchanged shared environment/signature.

theorem Offered.step {Γ : ServiceEnv} {s : Nat} {sig : ServiceSignature} {p q : Proc}
    (h : Offered Γ p s sig) (hs : PiCalculus.Step p q) : Offered Γ q s sig
Uses 7 · Used by 1

TheoremDeclared signature offers survive finite reduction#✓fully proved

Every finite actual reduction preserves each SOURCE persistent signature offer. No liveness, all-schedules fairness or eventual service invocation is asserted.

theorem Offered.reachable {Γ : ServiceEnv} {s : Nat} {sig : ServiceSignature} {p q : Proc}
    (h : Offered Γ p s sig) (hr : Relation.ReflTransGen PiCalculus.Step p q) :
    Offered Γ q s sig
Uses 6

DefinitionAvailability of all declared services#✓fully proved

Every declared shared signature has an ACTUAL persistent offer in current syntax. There is NO typing, Step, future trace, ready pair or step-closure field.

def Available (Γ : ServiceEnv) (p : Proc) : Prop :=
  ∀ s sig, Γ.lookup s = some sig → OfferedIn s p
Uses 4 · Used by 14

TheoremAvailability as offers of all declared signatures#✓fully proved

Availability is exactly current declared signature lookup plus persistent syntax.

theorem available_iff_offered {Γ : ServiceEnv} {p : Proc} :
    Available Γ p ↔ ∀ s sig, Γ.lookup s = some sig → Offered Γ p s sig
Uses 6

TheoremStructural congruence preserves service availability#✓fully proved

All canonical structural laws preserve current syntactic availability.

theorem Available.cong_iff {Γ : ServiceEnv} {p q : Proc} (h : Cong p q) :
    Available Γ p ↔ Available Γ q
Uses 7 · Used by 2

TheoremService availability survives one reduction step#✓fully proved

Strong actual syntactic availability survives ANY canonical Step.

theorem Available.step {Γ : ServiceEnv} {p q : Proc} (h : Available Γ p)
    (hs : PiCalculus.Step p q) : Available Γ q
Uses 6 · Used by 1

TheoremService availability survives finite reduction#✓fully proved

Finite actual reductions preserve source syntactic availability; preservation is PROVED here, not encoded into its definition. This is not a progress theorem.

theorem Available.reachable {Γ : ServiceEnv} {p q : Proc} (h : Available Γ p)
    (hr : Relation.ReflTransGen PiCalculus.Step p q) : Available Γ q
Uses 5 · Used by 3

TheoremIdle processes have no unguarded output#✓fully proved

Idle is syntax-only and excludes a canonical exposed output, including inside parallel, restriction and inert replicated templates.

theorem Idle.no_unguarded_output {Γ : ServiceEnv} {p : Proc} (h : Idle Γ p) :
    ¬ PiCalculus.HasUnguardedOutput p
Uses 6 · Used by 3

TheoremIdle processes cannot step#✓fully proved

Idle services cannot Step, even through arbitrary canonical congruence.

theorem Idle.no_step {Γ : ServiceEnv} {p : Proc} (h : Idle Γ p) (q : Proc) :
    ¬ PiCalculus.Step p q
Uses 6

TheoremInvoking a replicated service is a reduction step#✓fully proved

Canonical replication unfolds and communicates on a real shared trigger.

theorem service_invocation_step (s : Nat) (b : Name) (body : Proc) :
    PiCalculus.Step (.par (.out (.const s) b .nil) (.repl (.inp (.const s) body)))
      (.par (PiCalculus.subst body b) (.repl (.inp (.const s) body)))
Uses 6 · Used by 2

DefinitionOne-state recurring send graph#✓fully proved

Every edge of this reachable one-state graph performs a session send.

def recurringGraph : Graph := ⟨1, fun _ => .sendName ⟨0, by decide⟩⟩
Uses 2 · Used by 1

DefinitionRecurring send protocol#✓fully proved

Initial cursor of the one-state recurring send protocol.

def recurringProtocol : Protocol := .regular recurringGraph ⟨0, by decide⟩ false
Uses 3 · Used by 6

DefinitionFixed-rank capability of the recurring session#✓fully proved

The recurring session keeps one literal static capability rank throughout.

def recurringCap : Capability := ⟨7, recurringProtocol⟩
Uses 3 · Used by 13

TheoremThe recurring protocol unfolds to a send of itself#✓fully proved

Literal guarded self-loop unfolding, not an unreachable extra graph node.

theorem recurring_unfold : recurringProtocol.unfold = .sendName recurringProtocol
Uses 3 · Used by 2

TheoremThe dual recurring protocol unfolds to a receive of itself#✓fully proved

The peer's literal guarded cursor returns to the same receive protocol.

theorem recurring_dual_unfold :
    recurringProtocol.dual.unfold = .recvName recurringProtocol.dual
Uses 4 · Used by 2

DefinitionSender worker process#✓fully proved

Worker code has one session action and a real endpoint-transfer reentry.

def senderWorker (b : Name) : Proc := .out b (.const 712) (.out (.const 710) b .nil)
Uses 2 · Used by 12

DefinitionReceiver worker process#✓fully proved

A received session endpoint survives the worker's passive input binder.

def receiverWorker (b : Name) : Proc := .inp b (.out (.const 711) (liftName 0 b) .nil)
Uses 3 · Used by 9

DefinitionReplicated sender daemon#✓fully proved

Sender replication captures only shared constants and its per-invocation formal.

def senderDaemon : Proc := .repl (.inp (.const 710) (senderWorker (.var 0)))
Uses 3 · Used by 12

DefinitionReplicated receiver daemon#✓fully proved

Receiver replication likewise receives, rather than captures, its endpoint.

def receiverDaemon : Proc := .repl (.inp (.const 711) (receiverWorker (.var 0)))
Uses 3 · Used by 12

DefinitionSender-role transfer to its trigger#✓fully proved

Transfer the actual sender-role endpoint to its shared trigger.

def senderRequest (b : Name) : Proc := .out (.const 710) b .nil
Uses 2 · Used by 6

DefinitionReceiver-role transfer to its trigger#✓fully proved

Transfer the actual opposite-role endpoint to its shared trigger.

def receiverRequest (b : Name) : Proc := .out (.const 711) b .nil
Uses 2 · Used by 10

DefinitionPending state with two role transfers#✓fully proved

Persistent services plus TWO pending role transfers, on one physical endpoint.

def pending (b : Name) : Proc := .par (.par (senderRequest b) senderDaemon)
  (.par (receiverRequest b) receiverDaemon)
Uses 6 · Used by 18

DefinitionState after the sender trigger invocation#✓fully proved

After one trigger invocation, the opposite request and both daemons remain.

def sentInvoked (b : Name) : Proc := .par (.par (senderWorker b) senderDaemon)
  (.par (receiverRequest b) receiverDaemon)
Uses 6 · Used by 14

DefinitionState after both trigger invocations#✓fully proved

Both received-role workers can now communicate on their actual session name.

def bothInvoked (b : Name) : Proc := .par (.par (senderWorker b) senderDaemon)
  (.par (receiverWorker b) receiverDaemon)
Uses 6 · Used by 14

TheoremSubstitution instantiates the sender worker's endpoint#✓fully proved

Capture-safe first trigger communication instantiates the actual bound endpoint.

theorem sender_subst (b : Name) : PiCalculus.subst (senderWorker (.var 0)) b = senderWorker b
Uses 4

TheoremSubstitution instantiates the receiver worker's endpoint#✓fully proved

Receiver preserves the actual endpoint under its inner passive input binder.

theorem receiver_subst (b : Name) :
    PiCalculus.subst (receiverWorker (.var 0)) b = receiverWorker b
Uses 4

TheoremPending state steps by invoking the sender trigger#✓fully proved

The first real trigger Step, leaving both persistent daemons untouched.

theorem sender_invocation (b : Name) : PiCalculus.Step (pending b) (sentInvoked b)
Uses 11 · Used by 1

TheoremSender-invoked state steps by invoking the receiver trigger#✓fully proved

The second actual trigger Step, not a pre-generated finite unrolling.

theorem receiver_invocation (b : Name) : PiCalculus.Step (sentInvoked b) (bothInvoked b)
Uses 11 · Used by 1

TheoremInterchange law for four parallel components#✓fully proved

Four canonical parallel components regroup without evaluating any body.

theorem parallel_interchange (a b c d : Proc) :
    Cong (.par (.par a b) (.par c d)) (.par (.par a c) (.par b d))
Uses 2 · Used by 1

TheoremData substitution yields the receiver's return request#✓fully proved

A passive input removes ONLY its data binder, retaining the actual endpoint.

theorem receiver_return_subst (b : Name) :
    PiCalculus.subst (.out (.const 711) (liftName 0 b) .nil) (.const 712) = receiverRequest b
Uses 7 · Used by 1

TheoremSession action steps back to the pending state#✓fully proved

Actual session action restores BOTH pending endpoint-role transfers and daemons.

theorem session_and_reentry (b : Name) : PiCalculus.Step (bothInvoked b) (pending b)
Uses 17 · Used by 2

DefinitionSender service signature of the recurring example#✓fully proved

Static sender and receiver permissions use opposite roles, exact rank7 types.

def senderSignature (r : Role) : ServiceSignature := ⟨0, r, recurringCap⟩
Uses 4 · Used by 8

DefinitionReceiver service signature of the recurring example#✓fully proved

Opposite-role receive permission retains the exact literal dual capability.

def receiverSignature (r : Role) : ServiceSignature := ⟨0, r.opposite, recurringCap.dual⟩
Uses 6 · Used by 8

DefinitionService environment declaring the two triggers#✓fully proved

Two distinct declared constant triggers; declaration alone is not an offer.

def services (r : Role) : ServiceEnv := (Finmap.singleton 710 (senderSignature r)).insert
  711 (receiverSignature r)
Uses 5 · Used by 24

TheoremThe sender trigger declares the sender signature#✓fully proved

Actual sender signature lookup with literal role, cap rank and raw protocol.

theorem sender_declared (r : Role) : (services r).lookup 710 = some (senderSignature r)
Uses 6 · Used by 3

TheoremThe receiver trigger declares the receiver signature#✓fully proved

The other trigger declares exactly the opposite-role receive permission.

theorem receiver_declared (r : Role) : (services r).lookup 711 = some (receiverSignature r)
Uses 5 · Used by 3

TheoremLifting preserves trigger freshness of an endpoint#✓fully proved

Actual canonical lifting cannot turn a distinct endpoint into a service constant.

theorem EndpointFresh.lift {b : Name} (h : EndpointFresh b) : EndpointFresh (liftName 0 b)
Uses 3 · Used by 1

TheoremA fresh endpoint singleton is separated from the triggers#✓fully proved

The exact actual-role singleton does not capture a shared trigger as a linear name.

theorem endpoint_separated (r role : Role) (b : Name) (c : Capability) (hb : EndpointFresh b) :
    Separated (services r) (Finmap.singleton (⟨b, role⟩ : Key) c)
Uses 11 · Used by 4

TheoremErasing a singleton's only key leaves the empty map#✓fully proved

Erasing the actual sole endpoint leaves exactly the empty ownership map. Shared by request and delegation consumers instead of duplicating lookup proofs.

theorem erase_singleton (e : Key) (c : Capability) :
    (Finmap.singleton e c : Context).erase e = ∅
Uses 4 · Used by 2

TheoremNil is runtime-typed with empty ownership#✓fully proved

Nil embeds the finite ranked fragment with genuinely empty ownership.

theorem nil_typed (n : Nat) (Γ : ServiceEnv) : HasType n Γ ∅ .nil
Uses 13 · Used by 2

TheoremThe sender reentry request is runtime-typed#✓fully proved

Reentry transfers the actual sender capability out, preserving role/rank/code.

theorem sender_request_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r)
    (Finmap.singleton (⟨b, r⟩ : Key) recurringCap) (senderRequest b)
Uses 24 · Used by 2

TheoremThe receiver reentry request is runtime-typed#✓fully proved

Reentry of the opposite role likewise consumes EXACTLY its own linear slot.

theorem receiver_request_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r)
    (Finmap.singleton (⟨b, r.opposite⟩ : Key) recurringCap.dual) (receiverRequest b)
Uses 26 · Used by 3

TheoremThe sender worker is runtime-typed#✓fully proved

One linear session send keeps the same actual guarded protocol cursor and rank.

theorem sender_worker_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r)
    (Finmap.singleton (⟨b, r⟩ : Key) recurringCap) (senderWorker b)
Uses 22 · Used by 3

TheoremThe receiver worker is runtime-typed#✓fully proved

One receive retains the outer received endpoint through its passive input binder.

theorem receiver_worker_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r)
    (Finmap.singleton (⟨b, r.opposite⟩ : Key) recurringCap.dual) (receiverWorker b)
Uses 31 · Used by 2

TheoremThe sender daemon is typed with empty ownership#✓fully proved

The sender daemon starts with NO captured linear capability, only its fresh formal.

theorem sender_daemon_typed (n : Nat) (r : Role) : HasType n (services r) ∅ senderDaemon
Uses 16 · Used by 3

TheoremThe receiver daemon is typed with empty ownership#✓fully proved

The receiver daemon likewise captures no linear endpoint, in either orientation.

theorem receiver_daemon_typed (n : Nat) (r : Role) : HasType n (services r) ∅ receiverDaemon
Uses 16 · Used by 3

DefinitionTwo-role linear interface of the recurring session#✓fully proved

Actual linear interface, one sender role and its opposite receiver role.

def recurringInterface (b : Name) (r : Role) : Context :=
  Finmap.singleton ⟨b, r⟩ recurringCap ∪ Finmap.singleton ⟨b, r.opposite⟩ recurringCap.dual
Uses 8 · Used by 14

TheoremThe pending state is typed at the two-role interface#✓fully proved

The real pending state owns two distinct opposite keys, not daemon captures.

theorem pending_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r) (recurringInterface b r) (pending b)
Uses 24 · Used by 2

TheoremThe state after the sender invocation is typed#✓fully proved

First invocation transfers the exact sender slot into one worker; frame unchanged.

theorem sentInvoked_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r) (recurringInterface b r) (sentInvoked b)
Uses 24 · Used by 1

TheoremThe state after both trigger invocations is typed#✓fully proved

Both workers own their actual distinct roles after the two trigger communications.

theorem bothInvoked_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) : HasType n (services r) (recurringInterface b r) (bothInvoked b)
Uses 24 · Used by 1

DefinitionPhases of the repeated-session execution#✓fully proved

Three phases of actual execution; this does not generate unrolled Pi code.

def phase (b : Name) (i : Nat) : Proc :=
  match i % 3 with
  | 0 => pending b
  | 1 => sentInvoked b
  | _ => bothInvoked b
Uses 5 · Used by 15

TheoremEach phase steps to the next#✓fully proved

Every consecutive phase has a real canonical Step, including session reentry.

theorem phase_step (b : Name) (i : Nat) : PiCalculus.Step (phase b i) (phase b (i + 1))
Uses 10 · Used by 6

TheoremEvery round count has a trace returning to the pending state#✓fully proved

For EVERY requested count, a nonzero trace returns to the identical pending code. It has exactly three times (m+1) actual Steps, never a reflexive reachability proof.

theorem repeatable_trace (b : Name) (m : Nat) :
    ∃ f : Fin (3 * (m + 1) + 1) → Proc,
      f ⟨0, by omega⟩ = pending b ∧
      f ⟨3 * (m + 1), Nat.lt_succ_self _⟩ = pending b ∧
      (∀ i : Fin (3 * (m + 1)), PiCalculus.Step (f i.castSucc) (f i.succ)) ∧
      ∀ j : Fin (m + 1),
        f ⟨3 * j.val + 2, by omega⟩ = bothInvoked b ∧
          f ⟨3 * j.val + 3, by omega⟩ = pending b
Uses 8

TheoremEvery round has a session action on the same endpoint#✓fully proved

EVERY round contains an actual action on the SAME session endpoint b.

theorem session_round_phase (b : Name) (i : Nat) :
    phase b (3 * i + 2) = bothInvoked b ∧ phase b (3 * i + 3) = pending b ∧
      PiCalculus.Step (phase b (3 * i + 2)) (phase b (3 * i + 3))
Uses 8 · Used by 3

TheoremEvery phase is typed at the two-role interface#✓fully proved

Every actual runtime phase retains the same exact two-role linear interface.

theorem phase_typed {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (i : Nat) :
    HasType n (services r) (recurringInterface b r) (phase b i)
Uses 15 · Used by 2

TheoremArbitrarily long typed repeated-session traces#✓fully proved

Arbitrarily long NONZERO actual execution with ownership at EVERY state. The conclusion is a trace; no trace/Step/result is part of service admission.

theorem typed_repeatable_trace {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (m : Nat) :
    ∃ f : Fin (3 * (m + 1) + 1) → Proc,
      f ⟨0, by omega⟩ = pending b ∧
      f ⟨3 * (m + 1), Nat.lt_succ_self _⟩ = pending b ∧
      (∀ i : Fin (3 * (m + 1)), PiCalculus.Step (f i.castSucc) (f i.succ)) ∧
      (∀ i, HasType n (services r) (recurringInterface b r) (f i)) ∧
      ∀ j : Fin (m + 1),
        f ⟨3 * j.val + 2, by omega⟩ = bothInvoked b ∧
          f ⟨3 * j.val + 3, by omega⟩ = pending b
Uses 16

TheoremEvery phase is reachable from the pending state#✓fully proved

Induction on actual Step count reaches each phase of the persistent runtime code.

theorem phase_reachable (b : Name) (i : Nat) :
    Relation.ReflTransGen PiCalculus.Step (pending b) (phase b i)
Uses 6 · Used by 2

TheoremBoth services are offered at every phase#✓fully proved

Actual unguarded daemons offer BOTH declared services at EVERY runtime phase.

theorem phase_offers (b : Name) (r : Role) (i : Nat) :
    Offered (services r) (phase b i) 710 (senderSignature r) ∧
      Offered (services r) (phase b i) 711 (receiverSignature r)
Uses 19 · Used by 1

TheoremThe recurring interface is balanced#✓fully proved

Both literal opposite-role self-loop slots form an ACTUAL balanced initial interface; balance is derived from lookup/code facts, not a ready-pair hypothesis.

theorem recurring_balanced (b : Name) (r : Role) :
    Conversion.Balanced (recurringInterface b r)
Uses 15 · Used by 4

TheoremSemantic advances of the recurring interface are the identity#✓fully proved

EVERY faithful advance of this actual literal self-loop interface is exact identity. This is a code-level property of the concrete regular cursors, not a claim that arbitrary equivalent recursive codes stay syntactically unchanged.

theorem recurring_advance_identity {b : Name} {r : Role} {Ξ : Context}
    (h : Conversion.SemanticAdvance (recurringInterface b r) Ξ) : Ξ = recurringInterface b r
Uses 23 · Used by 3

TheoremSteps preserve typing at the recurring interface#✓fully proved

ANY actually runtime-typed process at the concrete recurring interface keeps that EXACT interface after a canonical Step, by GENERAL preservation and the literal self-loop code property. No phase, readiness or schedule hypothesis.

theorem recurring_step_preserved {n : Nat} {p q : Proc} (r : Role) (b : Name)
    (h : HasType n (services r) (recurringInterface b r) p) (hs : PiCalculus.Step p q) :
    HasType n (services r) (recurringInterface b r) q
Uses 14

TheoremEach next phase is typed by subject reduction#✓fully proved

GENERAL runtime subject reduction applies to every recursive phase (hence all THREE phase kinds) in BOTH role orientations, at the exact self-loop interface.

theorem phase_step_preserved {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (i : Nat) :
    HasType n (services r) (recurringInterface b r) (phase b (i + 1))
Uses 17

TheoremEvery phase is typed by preservation from the pending state#✓fully proved

Every phase's ownership follows from the INITIAL pending typing and GENERAL finite runtime preservation, not repeated application of concrete phase typing.

theorem phase_typed_by_preservation {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (i : Nat) :
    HasType n (services r) (recurringInterface b r) (phase b i)
Uses 18 · Used by 4

TheoremAll declared services are available in the pending state#✓fully proved

Initial actual replicated daemons supply EVERY declared signature, not just requests or shared permissions. Availability remains a syntactic predicate.

theorem initial_available (b : Name) (r : Role) : Available (services r) (pending b)
Uses 12 · Used by 1

TheoremServices stay available at every phase#✓fully proved

GENERAL persistent-offer reduction closure preserves the real source daemons through every finite actual prefix of the recursive execution.

theorem phase_available_by_reduction (b : Name) (r : Role) (i : Nat) :
    Available (services r) (phase b i)
Uses 9 · Used by 4

TheoremRepeated-session traces with preserved typing and availability#✓fully proved

EVERY m has one nonzero finite SAME-session trace with all neighbor Steps, ALL round markers, ownership derived by GENERAL runtime preservation, and actual persistent availability derived by GENERAL reduction closure at EVERY state.

theorem repeatable_trace_preserved {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (m : Nat) :
    ∃ f : Fin (3 * (m + 1) + 1) → Proc,
      f ⟨0, by omega⟩ = pending b ∧
      f ⟨3 * (m + 1), Nat.lt_succ_self _⟩ = pending b ∧
      (∀ i : Fin (3 * (m + 1)), PiCalculus.Step (f i.castSucc) (f i.succ)) ∧
      (∀ i, HasType n (services r) (recurringInterface b r) (f i)) ∧
      (∀ i, Available (services r) (f i)) ∧
      ∀ j : Fin (m + 1),
        f ⟨3 * j.val + 2, by omega⟩ = bothInvoked b ∧
          f ⟨3 * j.val + 3, by omega⟩ = pending b
Uses 18

TheoremEvery phase of the repeated session can step#✓fully proved

GENERAL qualified progress produces an ACTUAL Step at every recursive phase, BOTH roles and arbitrary scoped endpoint. Idle is excluded by exposed output syntax, not by assuming the previously selected execution or readiness.

theorem phase_general_step {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (i : Nat) : ∃ q, PiCalculus.Step (phase b i) q
Uses 22 · Used by 1

TheoremEvery phase of the restricted repeated session can step#✓fully proved

GENERAL empty-interface progress includes the genuine private session in BOTH orientations/all phases. Actual output syntax forces its Step branch.

theorem bound_phase_general_step (r : Role) (i : Nat) :
    ∃ q, PiCalculus.Step (.nu (phase (.var 0) i)) q
Uses 31

TheoremRepeated-session traces with typing, availability and progress#✓fully proved

EVERY m has a SAME-witness counted repeated-session trace, all state types, actual availability and ALL marked session edges, plus GENERAL progress at EVERY state (including the last). This is not all-schedules fairness or termination.

theorem repeatable_trace_global {n : Nat} (r : Role) (b : Name) (hb : b.ClosedAt n)
    (hf : EndpointFresh b) (m : Nat) :
    ∃ f : Fin (3 * (m + 1) + 1) → Proc,
      f ⟨0, by omega⟩ = pending b ∧
      f ⟨3 * (m + 1), Nat.lt_succ_self _⟩ = pending b ∧
      (∀ i : Fin (3 * (m + 1)), PiCalculus.Step (f i.castSucc) (f i.succ)) ∧
      (∀ i, HasType n (services r) (recurringInterface b r) (f i)) ∧
      (∀ i, Available (services r) (f i)) ∧
      (∀ i, ∃ q, PiCalculus.Step (f i) q) ∧
      ∀ j : Fin (m + 1),
        f ⟨3 * j.val + 2, by omega⟩ = bothInvoked b ∧
          f ⟨3 * j.val + 3, by omega⟩ = pending b
Uses 19

TheoremUnguarded shared input communicates with a matching output#✓fully proved

Actual input syntax supplies an ACTUAL canonical Step with any matching shared-constant output. Payload and continuation are not finite-unrolled, and nested private/parallel/replica wrappers are handled by existing Cong/Step.

theorem accept_invocation_step {s : Nat} {p : Proc} (h : AcceptIn s p) (b : Name) (c : Proc) :
    ∃ q, PiCalculus.Step (.par (.out (.const s) b c) p) q
Uses 9 · Used by 1

TheoremOffered service communicates with a matching shared output#✓fully proved

A persistent offered input exposes real canonical communication, including nested templates and DONE endpoint payloads; no typing or active-key premise.

theorem offered_invocation_step {s : Nat} {p : Proc} (h : OfferedIn s p) (b : Name) (c : Proc) :
    ∃ q, PiCalculus.Step (.par (.out (.const s) b c) p) q
Uses 6 · Used by 1
74 fully proved

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.