Binder lifting preserves separation to Inversion of runtime typing for input on a shared name
TheoremBinder lifting preserves separation#✓fully proved
Actual binder lifting preserves nonshared physical names: constants cannot be newly produced by lifting a linear variable.
theorem Separated.lift {Γ : ServiceEnv} {Δ : Context} (h : Separated Γ Δ) (k : Nat) :
Separated Γ (Context.lift k Δ)
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
def Context.lift (k : Nat) (Δ : Context) : Context :=
rekey (Key.mapName (liftName k)) Δ
(fun _ _ _ _ h => Key.mapName_injective (liftName_injective k) h)
CSLibExt/Languages/SessionTypes/Endpoint/ContextTransport.lean:28
Uses 15 · Used by 3
TheoremBinding a private pair preserves separation#✓fully proved
A literal private pair has variable names, never declared shared constants.
theorem Separated.bind {Γ : ServiceEnv} {Δ : Context} (h : Separated Γ Δ) (c : Capability) :
Separated Γ (Context.bind c Δ)
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
def Context.bind (c : Capability) (Δ : Context) : Context :=
(lift 0 Δ).insert ⟨.var 0, .positive⟩ c |>
Finmap.insert ⟨.var 0, .negative⟩ c.dual
CSLibExt/Languages/SessionTypes/Endpoint/ContextTransport.lean:49
Uses 13 · Used by 5
TheoremSeparation restricts to the left part of a union#✓fully proved
A left child of the actual ownership union retains static shared-name separation.
theorem Separated.union_left {Γ : ServiceEnv} {Δ Θ : Context} (h : Separated Γ (Δ ∪ Θ)) :
Separated Γ Δ
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 8 · Used by 3
TheoremSeparation restricts to the right part of a disjoint union#✓fully proved
Disjointness prevents right-child lookup shadowing by the left ownership domain.
theorem Separated.union_right {Γ : ServiceEnv} {Δ Θ : Context} (h : Separated Γ (Δ ∪ Θ))
(hd : Finmap.Disjoint Δ Θ) : Separated Γ Θ
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 8 · Used by 2
InductiveRuntime typing with guarded shared replication#✓fully proved
Ten syntax-directed rules over canonical Pi, fixed static ranks and actual ownership. Accept/serve may carry completed ambient annotations, never body capture.
Cslib.SessionTypes.Endpoint.Runtime.HasType · 46 lines
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
HasType (n + 1) Γ (Context.lift 0 (Δ.insert e ⟨c.rank, s⟩)) p →
HasType n Γ Δ (.inp e.name p)
| outEndpoint {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e d : Key} {c v : Capability}
{k : Nat} {t s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendEndpoint d.role k t s → Δ.lookup d = some v →
v.Equivalent ⟨k, t⟩ → e ≠ d → e.name.ClosedAt n → d.name.ClosedAt n →
HasType n Γ ((Δ.erase d).insert e ⟨c.rank, s⟩) p →
HasType n Γ Δ (.out e.name d.name p)
| inpEndpoint {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{r : Role} {k : Nat} {t s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvEndpoint r k t s → e.name.ClosedAt n →
HasType (n + 1) Γ
((Context.lift 0 (Δ.insert e ⟨c.rank, s⟩)).insert ⟨.var 0, r⟩ ⟨k, t⟩) p →
HasType n Γ Δ (.inp e.name p)
| invoke {n : Nat} {Γ : ServiceEnv} {Δ : Context} {s : Nat} {sig : ServiceSignature}
{e : Key} {v : Capability} {p : Proc} :
Γ.lookup s = some sig → Separated Γ Δ → Δ.lookup e = some v →
e.role = sig.role → v.Equivalent sig.capability → InvocationPriority sig Δ →
e.name.ClosedAt n → HasType n Γ (Δ.erase e) p → HasType n Γ Δ (.out (.const s) e.name p)
| accept {n : Nat} {Γ : ServiceEnv} {Δ : Context} {s : Nat} {sig : ServiceSignature}
{p : Proc} :
Γ.lookup s = some sig → Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ →
HasType (n + 1) Γ (Finmap.singleton ⟨.var 0, sig.role⟩ sig.capability) p →
HasType n Γ Δ (.inp (.const s) p)
| serve {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc} :
ServiceTemplate Γ p → HasType n Γ ∅ p → Δ.Completed →
(∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ (.repl p)
| par {n : Nat} {Γ : ServiceEnv} {Δ Θ : Context} {p q : Proc} :
Finmap.Disjoint Δ Θ → HasType n Γ Δ p → HasType n Γ Θ q →
HasType n Γ (Δ ∪ Θ) (.par p q)
| nu {n : Nat} {Γ : ServiceEnv} {Δ : Context} {c : Capability} {p : Proc} :
Separated Γ Δ → HasType (n + 1) Γ (Context.bind c Δ) p → HasType n Γ Δ (.nu p)
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
structure Key where
name : PiCalculus.Name
role : Role
deriving DecidableEq, Repr
CSLibExt/Languages/SessionTypes/Endpoint/Identity.lean:30
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
inductive Name where
| const (n : ℕ) : Name
| var (i : ℕ) : Name
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:45
inductive Protocol where
| done
| sendName (next : Protocol)
| recvName (next : Protocol)
| sendEndpoint (role : Role) (rank : Nat) (payload next : Protocol)
| recvEndpoint (role : Role) (rank : Nat) (payload next : Protocol)
| regular (graph : Graph) (cursor : Fin graph.size) (reversed : Bool)
CSLibExt/Languages/SessionTypes/Endpoint/Protocol.lean:26
def GuardMin (Δ : Context) (e : Key) (rank : Nat) : Prop :=
∀ d c, Δ.lookup d = some c → c.protocol.unfold ≠ .done →
d ≠ e → rank < c.rank
CSLibExt/Languages/SessionTypes/Endpoint/Priority.lean:26
def Context.lift (k : Nat) (Δ : Context) : Context :=
rekey (Key.mapName (liftName k)) Δ
(fun _ _ _ _ h => Key.mapName_injective (liftName_injective k) h)
CSLibExt/Languages/SessionTypes/Endpoint/ContextTransport.lean:28
inductive Role where
| positive
| negative
deriving DecidableEq, Repr
CSLibExt/Languages/SessionTypes/Endpoint/Identity.lean:24
structure ServiceSignature where
priority : Nat
role : Role
capability : Capability
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:27
def InvocationPriority (sig : ServiceSignature) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → c.protocol.unfold ≠ .done → sig.priority < c.rank
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:40
def ServiceTemplate (Γ : ServiceEnv) : Proc → Prop
| .nil => True
| .inp a _ => ∃ s, a = .const s ∧ s ∈ Γ
| .par p q => ServiceTemplate Γ p ∧ ServiceTemplate Γ q
| .nu p | .repl p => ServiceTemplate Γ p
| .out .. | .sum .. => False
CSLibExt/Languages/SessionTypes/Endpoint/ServiceTemplates.lean:29
def Context.bind (c : Capability) (Δ : Context) : Context :=
(lift 0 Δ).insert ⟨.var 0, .positive⟩ c |>
Finmap.insert ⟨.var 0, .negative⟩ c.dual
CSLibExt/Languages/SessionTypes/Endpoint/ContextTransport.lean:49
Uses 19 · Used by 85
TheoremFinite ranked typing embeds into runtime typing under separation#✓fully proved
Real ALL7-rule induction embeds finite ranked typing, including delegation; there is no finite-judgement constructor in the new runtime typing.
theorem HasType.of_finite {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc}
(h : Conversion.RankedType n Δ p) (hs : Separated Γ Δ) : HasType n Γ Δ p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive RankedType : Nat → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → RankedType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Δ.lookup e = some c → c.protocol.unfold = .sendName s →
e.name.ClosedAt n → b.ClosedAt n →
RankedType n (Δ.insert e ⟨c.rank, s⟩) p → RankedType n Δ (.out e.name b p)
| inpName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Δ.lookup e = some c → c.protocol.unfold = .recvName s →
e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/RankedConversionTyping.lean:30
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
Uses 25 · Used by 1
DefinitionExtension of a shared service environment#✓fully proved
Old shared declarations retain their EXACT signature in the larger environment.
def EnvExtends (Γ Ξ : ServiceEnv) : Prop :=
∀ s sig, Γ.lookup s = some sig → Ξ.lookup s = some sig
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
Uses 2 · Used by 2
TheoremService templates survive environment extension#✓fully proved
A declared guarded template remains such under literal signature extension.
theorem ServiceTemplate.env_extend {Γ Ξ : ServiceEnv} {p : Proc}
(h : ServiceTemplate Γ p) (he : EnvExtends Γ Ξ) : ServiceTemplate Ξ p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
def ServiceTemplate (Γ : ServiceEnv) : Proc → Prop
| .nil => True
| .inp a _ => ∃ s, a = .const s ∧ s ∈ Γ
| .par p q => ServiceTemplate Γ p ∧ ServiceTemplate Γ q
| .nu p | .repl p => ServiceTemplate Γ p
| .out .. | .sum .. => False
CSLibExt/Languages/SessionTypes/Endpoint/ServiceTemplates.lean:29
def EnvExtends (Γ Ξ : ServiceEnv) : Prop :=
∀ s sig, Γ.lookup s = some sig → Ξ.lookup s = some sig
CSLibExt/Languages/SessionTypes/Endpoint/RuntimeEnvironmentWeakening.lean:28
Uses 6 · Used by 1
TheoremEnvironment extension preserves runtime typing under separation#✓fully proved
General Γ-extension requires static separation of ALL actual owned names. The proof establishes fresh lifted/private/received BODY names, rather than assuming environment monotonicity or carrying a future/result field.
theorem HasType.env_extend {n : Nat} {Γ Ξ : ServiceEnv} {Δ : Context} {p : Proc}
(h : HasType n Γ Δ p) (he : EnvExtends Γ Ξ) (hs : Separated Ξ Δ) : HasType n Ξ Δ p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def EnvExtends (Γ Ξ : ServiceEnv) : Prop :=
∀ s sig, Γ.lookup s = some sig → Ξ.lookup s = some sig
CSLibExt/Languages/SessionTypes/Endpoint/RuntimeEnvironmentWeakening.lean:28
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 30
TheoremRuntime typing separates owned names from shared services#✓fully proved
Completed ambient annotations still obey actual shared/linear name separation.
theorem HasType.separated {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc}
(h : HasType n Γ Δ p) : Separated Γ Δ
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 20 · Used by 13
TheoremReplicated runtime processes have completed ownership#✓fully proved
Replication has only COMPLETED ambient ownership, not necessarily empty annotation.
theorem HasType.repl_completed {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc}
(h : HasType n Γ Δ (.repl p)) : Δ.Completed
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
Uses 20 · Used by 1
TheoremTyped replication has a body with empty ownership#✓fully proved
Replicated BODY ownership is exactly EMPTY, while ambient annotations may be completed.
theorem HasType.repl_body_empty {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc}
(h : HasType n Γ Δ (.repl p)) : ServiceTemplate Γ p ∧ HasType n Γ ∅ p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def ServiceTemplate (Γ : ServiceEnv) : Proc → Prop
| .nil => True
| .inp a _ => ∃ s, a = .const s ∧ s ∈ Γ
| .par p q => ServiceTemplate Γ p ∧ ServiceTemplate Γ q
| .nu p | .repl p => ServiceTemplate Γ p
| .out .. | .sum .. => False
CSLibExt/Languages/SessionTypes/Endpoint/ServiceTemplates.lean:29
Uses 20 · Used by 2
TheoremRuntime-typed processes are scoped at the ambient depth#✓fully proved
Every rule derives the EXISTING canonical process-scope predicate, including fresh service parameters and empty-capture replicated template bodies.
theorem HasType.closedAt {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc}
(h : HasType n Γ Δ p) : p.ClosedAt n
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
Uses 21
TheoremTyping rule for a replicated input on a shared name#✓fully proved
A literal shared-input replica is an admissible structural template, with its received BODY at the fresh singleton and replica BODY at EMPTY ownership.
theorem HasType.serve_input {n : Nat} {Γ : ServiceEnv} {Δ : Context} {s : Nat}
{sig : ServiceSignature} {p : Proc} (hs : Γ.lookup s = some sig)
(hp : HasType (n + 1) Γ (Finmap.singleton ⟨.var 0, sig.role⟩ sig.capability) p)
(hc : Δ.Completed) (hscope : ∀ e ∈ Δ, e.name.ClosedAt n) (hd : Separated Γ Δ) :
HasType n Γ Δ (.repl (.inp (.const s) p))
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
structure ServiceSignature where
priority : Nat
role : Role
capability : Capability
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:27
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 15 · Used by 2
TheoremInversion of runtime typing for the nil process#✓fully proved
Nil has only actual completed, scoped, separated ambient ownership.
theorem HasType.nil_inv {n : Nat} {Γ : ServiceEnv} {Δ : Context} (h : HasType n Γ Δ .nil) :
Δ.Completed ∧ (∀ e ∈ Δ, e.name.ClosedAt n) ∧ Separated Γ Δ
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 20 · Used by 2
TheoremInversion of runtime typing for parallel composition#✓fully proved
Parallel inversion derives the actual disjoint linear split at unchanged Γ.
theorem HasType.par_inv {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p q : Proc}
(h : HasType n Γ Δ (.par p q)) :
∃ Θ Ξ, Δ = Θ ∪ Ξ ∧ Finmap.Disjoint Θ Ξ ∧ HasType n Γ Θ p ∧ HasType n Γ Ξ q
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
Uses 20 · Used by 7
TheoremInversion of runtime typing for restriction#✓fully proved
Restriction inversion exposes a real literal-dual bound pair, not a representative.
theorem HasType.nu_inv {n : Nat} {Γ : ServiceEnv} {Δ : Context} {p : Proc}
(h : HasType n Γ Δ (.nu p)) : ∃ c, HasType (n + 1) Γ (Context.bind c Δ) p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def Context.bind (c : Capability) (Δ : Context) : Context :=
(lift 0 Δ).insert ⟨.var 0, .positive⟩ c |>
Finmap.insert ⟨.var 0, .negative⟩ c.dual
CSLibExt/Languages/SessionTypes/Endpoint/ContextTransport.lean:49
Uses 20 · Used by 5
TheoremOutput subjects are owned endpoints or declared shared names#✓fully proved
Actual output subjects are linear-owned or declared shared constants.
theorem HasType.output_subject {n : Nat} {Γ : ServiceEnv} {Δ : Context} {a b : Name} {p : Proc}
(h : HasType n Γ Δ (.out a b p)) :
(∃ e c, e.name = a ∧ Δ.lookup e = some c) ∨
∃ s sig, a = .const s ∧ Γ.lookup s = some sig
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
inductive Name where
| const (n : ℕ) : Name
| var (i : ℕ) : Name
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:45
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
Uses 20
TheoremOutput on a declared shared name is a service invocation#✓fully proved
A declared shared output is necessarily an actual endpoint-transfer invocation.
theorem HasType.invoke_inv {n : Nat} {Γ : ServiceEnv} {Δ : Context} {s : Nat}
{sig : ServiceSignature} {b : Name} {p : Proc}
(h : HasType n Γ Δ (.out (.const s) b p)) (hs : Γ.lookup s = some sig) :
∃ e v, e.name = b ∧ Δ.lookup e = some v ∧ e.role = sig.role ∧
v.Equivalent sig.capability ∧ InvocationPriority sig Δ ∧
HasType n Γ (Δ.erase e) p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
structure ServiceSignature where
priority : Nat
role : Role
capability : Capability
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:27
inductive Name where
| const (n : ℕ) : Name
| var (i : ℕ) : Name
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:45
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def InvocationPriority (sig : ServiceSignature) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → c.protocol.unfold ≠ .done → sig.priority < c.rank
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:40
Uses 20 · Used by 1
TheoremInversion of runtime typing for input on a shared name#✓fully proved
A declared shared input has completed ambient annotations and EXACT fresh singleton BODY ownership, not captured ambient capabilities.
theorem HasType.accept_inv {n : Nat} {Γ : ServiceEnv} {Δ : Context} {s : Nat}
{sig : ServiceSignature} {p : Proc}
(h : HasType n Γ Δ (.inp (.const s) p)) (hs : Γ.lookup s = some sig) :
Δ.Completed ∧ (∀ e ∈ Δ, e.name.ClosedAt n) ∧ Separated Γ Δ ∧
HasType (n + 1) Γ (Finmap.singleton ⟨.var 0, sig.role⟩ sig.capability) p
abbrev ServiceEnv := Finmap (fun _ : Nat => ServiceSignature)
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:33
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
structure ServiceSignature where
priority : Nat
role : Role
capability : Capability
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:27
inductive Proc where
| nil : Proc
| out (a b : Name) (p : Proc) : Proc
| inp (a : Name) (p : Proc) : Proc
| par (p q : Proc) : Proc
| nu (p : Proc) : Proc
| repl (p : Proc) : Proc
| sum (p q : Proc) : Proc
deriving DecidableEq, Repr
CSLibExt/Languages/PiCalculus/Basic.lean:52
inductive HasType : Nat → ServiceEnv → Context → Proc → Prop where
| nil {n : Nat} {Γ : ServiceEnv} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → Separated Γ Δ → HasType n Γ Δ .nil
| outName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .sendName s → e.name.ClosedAt n → b.ClosedAt n →
HasType n Γ (Δ.insert e ⟨c.rank, s⟩) p → HasType n Γ Δ (.out e.name b p)
| inpName {n : Nat} {Γ : ServiceEnv} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
GuardMin Δ e c.rank → Separated Γ Δ → Δ.lookup e = some c →
c.protocol.unfold = .recvName s → e.name.ClosedAt n →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/SharedServices.lean:32
def Separated (Γ : ServiceEnv) (Δ : Context) : Prop :=
∀ e c, Δ.lookup e = some c → ∀ s sig, Γ.lookup s = some sig → e.name ≠ .const s
CSLibExt/Languages/SessionTypes/Endpoint/SharedEnvironment.lean:36
Uses 20 · Used by 2
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.