Weakening conversion ranked typing by a disjoint completed context to Adding a role unused by the partner preserves conversion ranked typing

TheoremWeakening conversion ranked typing by a disjoint completed context#✓fully proved

Reattaching a disjoint completed finite context preserves all guards.

theorem RankedType.weaken_completed_union {n : Nat} {Δ Θ : Context} {p : Proc}
    (h : RankedType n Δ p) (hd : Finmap.Disjoint Δ Θ) (hc : Θ.Completed)
    (hs : ∀ e ∈ Θ, e.name.ClosedAt n) : RankedType n (Δ ∪ Θ) p
Uses 14 · Used by 1

TheoremEquivalent contexts preserve the guard condition#✓fully proved

Same domains, literal cap ranks and actual done equivalence preserve GuardMin.

theorem GuardMin.retype {Δ Ξ : Context} {e : Key} {k : Nat} (hg : GuardMin Δ e k)
    (he : ContextEquivalent Δ Ξ) : GuardMin Ξ e k
Uses 14 · Used by 2

TheoremEquivalent contexts preserve conversion ranked typing#✓fully proved

GENERAL arbitrary-depth, arbitrary-context retyping, by all seven typing constructors. Target ownership, ranks and every unfolded branch are derived.

theorem RankedType.retype {n : Nat} {Δ Ξ : Context} {p : Proc}
    (h : RankedType n Δ p) (he : ContextEquivalent Δ Ξ) : RankedType n Ξ p
Uses 32 · Used by 2

TheoremContext equivalence transports conversion ranked typing both ways#✓fully proved

Equivalence transports typing in BOTH directions at the same process/depth.

theorem RankedType.retype_iff {n : Nat} {Δ Ξ : Context} {p : Proc}
    (he : ContextEquivalent Δ Ξ) : RankedType n Δ p ↔ RankedType n Ξ p
Uses 6

TheoremCollision-free renaming preserves conversion ranked typing#✓fully proved

GENERAL name transport with collision freedom on actual owned keys and canonical ambient name scope; protocol codes, roles and ranks stay exact.

theorem RankedType.rename {n m : Nat} {Δ : Context} {p : Proc} {f : Name → Name}
    (h : RankedType n Δ p) (hscope : ∀ a, a.ClosedAt n → (f a).ClosedAt m)
    (hf : Set.InjOn (Key.mapName f) {e | e ∈ Δ}) :
    RankedType m (Context.rekey (Key.mapName f) Δ hf) (mapProc f p)
Uses 35 · Used by 5

TheoremBinder lifting preserves conversion ranked typing#✓fully proved

Lift uses the canonical cutoff-aware name and process operations.

theorem RankedType.lift {n : Nat} {Δ : Context} {p : Proc} (h : RankedType n Δ p) (k : Nat) :
    RankedType (n + 1) (Context.lift k Δ) (liftProc k p)
Uses 18 · Used by 1

TheoremBinder swap preserves conversion ranked typing#✓fully proved

Swap retains roles, protocols and ranks while permuting two ambient binders.

theorem RankedType.swap {n k : Nat} {Δ : Context} {p : Proc}
    (h : RankedType n Δ p) (hk : k + 1 < n) :
    RankedType n (Context.swap k Δ) (swapProc k p)
Uses 18

TheoremEndpoint substitution preserves conversion ranked typing#✓fully proved

GENERAL endpoint substitution: retain the ACTUAL transmitted capability's code and rank at the sent polarized key, allowing its opposite-role alias. Collision freedom is needed only for that exact key and canonical substitution.

theorem RankedType.subst_endpoint {n : Nat} {Δ : Context} {b : Name} {r : Role}
    {c v : Capability} {p : Proc}
    (h : RankedType (n + 1) ((Context.lift 0 Δ).insert ⟨.var 0, r⟩ c) p)
    (he : v.Equivalent c) (hb : b.ClosedAt n) (hfresh : (⟨b, r⟩ : Key) ∉ Δ) :
    RankedType n (Δ.insert ⟨b, r⟩ v) (PiCalculus.subst p b)
Uses 25 · Used by 1

TheoremSplit-derived freshness for conversion endpoint substitution#✓fully proved

GENERAL split-derived freshness: actual payload ownership and the receiver's already-owned carrier derive non-aliasing even after advancement.

theorem RankedType.subst_endpoint_from_split {n : Nat} {Γ Θ : Context} {b : Name} {r : Role}
    {c v old next : Capability} {e : Key} {p : Proc}
    (hd : Finmap.Disjoint Γ Θ) (hv : Γ.lookup ⟨b, r⟩ = some v)
    (hc : Θ.lookup e = some old)
    (h : RankedType (n + 1) ((Context.lift 0 (Θ.insert e next)).insert ⟨.var 0, r⟩ c) p)
    (he : v.Equivalent c) (hb : b.ClosedAt n) :
    RankedType n ((Θ.insert e next).insert ⟨b, r⟩ v) (PiCalculus.subst p b)
Uses 14 · Used by 1

TheoremPassive substitution preserves conversion ranked typing#✓fully proved

GENERAL passive substitution transports all scoped positions but adds NO capability. The input context contains only lifted outer ownership.

theorem RankedType.subst_passive {n : Nat} {Δ : Context} {p : Proc} {b : Name}
    (h : RankedType (n + 1) (Context.lift 0 Δ) p) (hb : b.ClosedAt n) :
    RankedType n Δ (PiCalculus.subst p b)
Uses 19 · Used by 2

TheoremInversion of conversion-ranked input typing#✓fully proved

Input inversion retains its actual advertised code and typed continuation.

theorem RankedType.inp_inv {n : Nat} {Δ : Context} {a : Name} {p : Proc}
    (h : RankedType n Δ (.inp a p)) :
    ∃ e c, e.name = a ∧ Δ.lookup e = some c ∧
      ((∃ s, c.protocol.unfold = .recvName s ∧
          RankedType (n + 1) (Context.lift 0 (Δ.insert e ⟨c.rank, s⟩)) p) ∨
       ∃ r k t s, c.protocol.unfold = .recvEndpoint r k t s ∧
          RankedType (n + 1)
            ((Context.lift 0 (Δ.insert e ⟨c.rank, s⟩)).insert ⟨.var 0, r⟩ ⟨k, t⟩) p)
Uses 15 · Used by 3

TheoremPassive head communication preserves conversion ranked typing#✓fully proved

GENERAL passive communicating-head preservation at a semantically compatible actual split, with literal receiver-tail and rank evidence.

theorem ranked_passive_head_preservation {n : Nat} {Γ Θ : Context} {e : Key} {c : Capability}
    {s : Protocol} {b : Name} {p q : Proc}
    (hd : Finmap.Disjoint Γ Θ) (hc : Γ.lookup e = some c)
    (hh : c.protocol.unfold = .sendName s)
    (hp : RankedType n (Γ.insert e ⟨c.rank, s⟩) p) (hq : RankedType n Θ (.inp e.name q))
    (hb : b.ClosedAt n) (hco : Compatible (Γ ∪ Θ)) :
    ∃ d u, Θ.lookup e.opposite = some d ∧ d.rank = c.rank ∧
      d.protocol.unfold = .recvName u ∧ u.TreeEquiv s.dual ∧
      RankedType n (((Γ ∪ Θ).insert e ⟨c.rank, s⟩).insert e.opposite ⟨d.rank, u⟩)
        (.par p (PiCalculus.subst q b))
Uses 26 · Used by 1

TheoremEndpoint head communication preserves conversion ranked typing#✓fully proved

At an initially semantically compatible disjoint split, endpoint head communication transfers EXACT v, retaining the receiver's separately equivalent advertised payload/tail codes.

theorem ranked_endpoint_head_preservation {n k : Nat} {Γ Θ : Context} {e f : Key}
    {c v : Capability} {t s : Protocol} {p q : Proc}
    (hd : Finmap.Disjoint Γ Θ) (hc : Γ.lookup e = some c)
    (hh : c.protocol.unfold = .sendEndpoint f.role k t s)
    (hv : Γ.lookup f = some v) (hvt : v.Equivalent ⟨k, t⟩) (hne : e ≠ f)
    (hp : RankedType n ((Γ.erase f).insert e ⟨c.rank, s⟩) p)
    (hq : RankedType n Θ (.inp e.name q)) (hb : f.name.ClosedAt n)
    (hco : Compatible (Γ ∪ Θ)) :
    ∃ d t' u, Θ.lookup e.opposite = some d ∧ d.rank = c.rank ∧
      d.protocol.unfold = .recvEndpoint f.role k t' u ∧ t'.TreeEquiv t ∧ u.TreeEquiv s.dual ∧
      RankedType n (((Γ ∪ Θ).insert e ⟨c.rank, s⟩).insert e.opposite ⟨d.rank, u⟩)
        (.par p (PiCalculus.subst q f.name))
Uses 28 · Used by 1

TheoremHead preservation for a conversion-ranked opposite pair#✓fully proved

A typed opposite-head pair at an initially semantically compatible interface yields packed literal-head preservation. Both actual heads and payload/tail correspondence are conclusions, not fields in a protocol or admission predicate.

theorem RankedType.head_preservation {n : Nat} {Δ : Context} {a b : Name} {p q : Proc}
    (h : RankedType n Δ (.par (.out a b p) (.inp a q))) (hco : Compatible Δ) :
    ∃ e c d s u, e.name = a ∧ Δ.lookup e = some c ∧ Δ.lookup e.opposite = some d ∧
      d.rank = c.rank ∧ u.TreeEquiv s.dual ∧
      ((c.protocol.unfold = .sendName s ∧ d.protocol.unfold = .recvName u) ∨
       ∃ f v k t t', f.name = b ∧ Δ.lookup f = some v ∧ v.Equivalent ⟨k, t⟩ ∧
         c.protocol.unfold = .sendEndpoint f.role k t s ∧
         d.protocol.unfold = .recvEndpoint f.role k t' u ∧ t'.TreeEquiv t) ∧
      RankedType n ((Δ.insert e ⟨c.rank, s⟩).insert e.opposite ⟨d.rank, u⟩)
        (.par p (PiCalculus.subst q b))
Uses 22 · Used by 1

TheoremConversion head communication yields a semantic advance#✓fully proved

For a ranked-typed opposite-head pair at an initially semantically compatible interface, head preservation constructs a faithful semantic advance and a compatible ranked residual.

theorem RankedType.head_advance {n : Nat} {Δ : Context} {a b : Name} {p q : Proc}
    (h : RankedType n Δ (.par (.out a b p) (.inp a q))) (hc : Compatible Δ) :
    ∃ Ξ, RankedType n Ξ (.par p (PiCalculus.subst q b)) ∧ Compatible Ξ ∧ SemanticAdvance Δ Ξ
Uses 20 · Used by 1

TheoremSame-name conversion guards are opposite and communicate#✓fully proved

For disjoint ranked-typed same-name leaves at a semantically compatible combined interface, literal guard shapes have opposite directions and yield an actual canonical Step.

theorem same_name_guards_step {n : Nat} {Γ Θ : Context} {g h : Proc} {a : Name}
    (hg : RankedType n Γ g) (hh : RankedType n Θ h)
    (hd : Finmap.Disjoint Γ Θ) (hc : Compatible (Γ ∪ Θ))
    (sg : (∃ b p, g = .out a b p) ∨ (∃ p, g = .inp a p))
    (sh : (∃ b p, h = .out a b p) ∨ (∃ p, h = .inp a p)) :
    ∃ q, PiCalculus.Step (.par g h) q
Uses 29 · Used by 1

TheoremProgress for semantically balanced conversion frontiers#✓fully proved

GENERAL balanced ranked frontier progress. A minimum over ALL active owned roles exposes two distinct opposite subject leaves, from which actual canonical communication follows. Completion is process-level Cong to nil.

theorem GuardFrontier.progress {n : Nat} {Δ : Context} {p : Proc}
    (hf : GuardFrontier p) (ht : RankedType n Δ p) (hb : Balanced Δ) :
    Cong p .nil ∨ ∃ q, PiCalculus.Step p q
Uses 28 · Used by 1

TheoremConversion ranked typing descends from a lifted process#✓fully proved

Reflection of an actual lifted term recovers every priority and context entry.

theorem RankedType.unlift {n : Nat} {Γ : Context} {q : Proc}
    (h : RankedType (n + 1) Γ (liftProc 0 q)) (hΓ : ∀ e ∈ Γ, e.name ≠ .var 0) :
    RankedType n (Context.lower Γ hΓ) q
Uses 14 · Used by 1

TheoremForward scope extrusion preserves conversion ranked typing#✓fully proved

Extrusion lifts the partner's real ownership while retaining every guard.

theorem RankedType.scope_forward {n : Nat} {Δ : Context} {p q : Proc}
    (h : RankedType n Δ (.par (.nu p) q)) :
    RankedType n Δ (.nu (.par p (liftProc 0 q)))
Uses 15 · Used by 1

TheoremAdding a role unused by the partner preserves conversion ranked typing#✓fully proved

Moving a partner-owned role back requires actual absence to DERIVE completion from conversion typing before refined completed weakening is applied.

theorem RankedType.insert_from_absent_partner {n : Nat} {Γ Ξ : Context} {p q : Proc}
    {e : Key} {c : Capability} (hp : RankedType n Γ p) (hq : RankedType n Ξ q)
    (hc : (Γ ∪ Ξ).lookup e = some c) (hab : NameAbsent e.name q)
    (he : e.name.ClosedAt n) : RankedType n (Γ.insert e c) p
Uses 13 · Used by 1
20 fully proved

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.