Tree equivalence is a congruence for endpoint receiving to Conversion-typed processes are well scoped
TheoremTree equivalence is a congruence for endpoint receiving#✓fully proved
Endpoint receive congruence preserves literal role/rank metadata.
theorem Protocol.TreeEquiv.recvEndpoint {p q s t : Protocol} (hp : p.TreeEquiv q)
(hs : s.TreeEquiv t) (r : Role) (k : Nat) :
(Protocol.recvEndpoint r k p s).TreeEquiv (.recvEndpoint r k q t)
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
inductive Role where
| positive
| negative
deriving DecidableEq, Repr
CSLibExt/Languages/SessionTypes/Endpoint/Identity.lean:24
Uses 6 · Used by 1
TheoremHead matching transfers to dual protocols#✓fully proved
Dualizing a head changes subject direction and continuation orientation, but leaves payload orientation and role/rank metadata untouched.
theorem HeadMatch.dual {R S : Protocol → Protocol → Prop} {p q : Protocol}
(h : HeadMatch R p q) (hpayload : ∀ a b, R a b → S a b)
(hnext : ∀ a b, R a b → S a.dual b.dual) : HeadMatch S p.dual q.dual
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
inductive HeadMatch (R : Protocol → Protocol → Prop) : Protocol → Protocol → Prop where
| done : HeadMatch R .done .done
| sendName {s t : Protocol} : R s t → HeadMatch R (.sendName s) (.sendName t)
| recvName {s t : Protocol} : R s t → HeadMatch R (.recvName s) (.recvName t)
| sendEndpoint {r : Role} {k : Nat} {p q s t : Protocol} :
R p q → R s t → HeadMatch R (.sendEndpoint r k p s) (.sendEndpoint r k q t)
| recvEndpoint {r : Role} {k : Nat} {p q s t : Protocol} :
R p q → R s t → HeadMatch R (.recvEndpoint r k p s) (.recvEndpoint r k q t)
CSLibExt/Languages/SessionTypes/Endpoint/TypeEquivalence.lean:93
Uses 4 · Used by 1
TheoremDuality preserves protocol tree equivalence#✓fully proved
Semantic equivalence is preserved by actual protocol duality, including recursive payloads with independently chosen orientation.
theorem Protocol.TreeEquiv.dual {p q : Protocol} (h : p.TreeEquiv q) :
p.dual.TreeEquiv q.dual
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
Uses 10 · Used by 2
TheoremDuality preserves and reflects protocol tree equivalence#✓fully proved
Duality both preserves and reflects equivalence, not only one direction.
theorem Protocol.treeEquiv_dual_iff {p q : Protocol} :
p.dual.TreeEquiv q.dual ↔ p.TreeEquiv q
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
TheoremProtocol tree equivalence is an equivalence relation#✓fully proved
The semantic type relation is a genuine equivalence relation.
theorem Protocol.treeEquiv_equivalence : Equivalence Protocol.TreeEquiv
def Protocol.TreeEquiv : Protocol → Protocol → Prop := Cslib.LTS.HomBisimilarity protocolTree
CSLibExt/Languages/SessionTypes/Endpoint/TypeEquivalence.lean:58
TheoremTree equivalence of endpoint sends, componentwise#✓fully proved
Exact endpoint-send characterization exposes literal metadata equality and separate semantic payload/continuation equivalences for conversion.
theorem Protocol.treeEquiv_sendEndpoint_iff {r r' : Role} {k k' : Nat}
{p q s t : Protocol} :
(Protocol.sendEndpoint r k p s).TreeEquiv (.sendEndpoint r' k' q t) ↔
r = r' ∧ k = k' ∧ p.TreeEquiv q ∧ s.TreeEquiv t
inductive Role where
| positive
| negative
deriving DecidableEq, Repr
CSLibExt/Languages/SessionTypes/Endpoint/Identity.lean:24
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
TheoremTree equivalence of endpoint receives, componentwise#✓fully proved
Receive characterization preserves the same independent payload metadata.
theorem Protocol.treeEquiv_recvEndpoint_iff {r r' : Role} {k k' : Nat}
{p q s t : Protocol} :
(Protocol.recvEndpoint r k p s).TreeEquiv (.recvEndpoint r' k' q t) ↔
r = r' ∧ k = k' ∧ p.TreeEquiv q ∧ s.TreeEquiv t
inductive Role where
| positive
| negative
deriving DecidableEq, Repr
CSLibExt/Languages/SessionTypes/Endpoint/Identity.lean:24
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
TheoremTree equivalence preserves completion of a protocol#✓fully proved
Activity/completion is invariant under semantic type equivalence.
theorem Protocol.TreeEquiv.done_iff {p q : Protocol} (h : p.TreeEquiv q) :
p.unfold = .done ↔ q.unfold = .done
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
Uses 8 · Used by 8
DefinitionEquivalence of endpoint capabilities#✓fully proved
Capability equivalence explicitly retains the enclosing capability rank, which is not an observation of Protocol.TreeEquiv.
def Capability.Equivalent (c d : Capability) : Prop :=
c.rank = d.rank ∧ c.protocol.TreeEquiv d.protocol
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
Uses 3 · Used by 136
TheoremReflexivity of capability equivalence#✓fully proved
Reflexivity retains rank and the exact protocol tree.
theorem Capability.Equivalent.refl (c : Capability) : c.Equivalent c
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
Uses 5 · Used by 14
TheoremSymmetry of capability equivalence#✓fully proved
Symmetry preserves the separately required rank equality.
theorem Capability.Equivalent.symm {c d : Capability} (h : c.Equivalent d) :
d.Equivalent c
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
Uses 5 · Used by 12
TheoremTransitivity of capability equivalence#✓fully proved
Transitivity composes rank equality and regular-tree equivalence.
theorem Capability.Equivalent.trans {c d e : Capability} (h : c.Equivalent d)
(h' : d.Equivalent e) : c.Equivalent e
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
Uses 5 · Used by 9
TheoremDuality preserves capability equivalence#✓fully proved
Duality retains the separate rank and preserves protocol-tree equivalence.
theorem Capability.Equivalent.dual {c d : Capability} (h : c.Equivalent d) :
c.dual.Equivalent d.dual
structure Capability where
rank : Nat
protocol : Protocol
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:27
Uses 6 · Used by 7
DefinitionSemantic peer compatibility of an ownership map#✓fully proved
Semantic peer compatibility keeps actual capability ranks equal and compares dual protocol trees, not merely their direction or payload metadata.
def Compatible (Δ : Context) : Prop :=
∀ e c d, Δ.lookup e = some c → Δ.lookup e.opposite = some d → d.Equivalent c.dual
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
Uses 8 · Used by 39
TheoremSyntactic compatibility implies semantic compatibility#✓fully proved
Old syntactic peer compatibility implies the semantic condition.
theorem compatible_of_raw {Δ : Context} (h : Endpoint.Compatible Δ) : Compatible Δ
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
def Compatible (Δ : Context) : Prop :=
∀ e c d, Δ.lookup e = some c → Δ.lookup e.opposite = some d → d = c.dual
CSLibExt/Languages/SessionTypes/Endpoint/Balance.lean:64
def Compatible (Δ : Context) : Prop :=
∀ e c d, Δ.lookup e = some c → Δ.lookup e.opposite = some d → d.Equivalent c.dual
CSLibExt/Languages/SessionTypes/Endpoint/ConversionTyping.lean:57
InductiveConversion-enabled endpoint typing judgement#✓fully proved
Seven syntax-directed rules. No readiness, Step, retyping, preservation or consistent raw representative is a typing premise. Endpoint input installs its actual advertised code; endpoint output transfers the actual owned slot.
Cslib.SessionTypes.Endpoint.Conversion.HasType · 32 lines
inductive HasType : Nat → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → HasType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e d : Key} {c v : Capability}
{k : Nat} {t s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{r : Role} {k : Nat} {t s : Protocol} {p : Proc} :
Δ.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)
| par {n : Nat} {Δ Θ : Context} {p q : Proc} :
Finmap.Disjoint Δ Θ → HasType n Δ p → HasType n Θ q →
HasType n (Δ ∪ Θ) (.par p q)
| nu {n : Nat} {Δ : Context} {c : Capability} {p : Proc} :
HasType (n + 1) (Context.bind c Δ) p → HasType n Δ (.nu p)
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
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 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
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 50
TheoremBase endpoint typing embeds into conversion typing#✓fully proved
Actual seven-rule induction embeds the raw judgement. This does not transport the raw judgement's substitution or progress theorem to new terms.
theorem HasType.of_raw {n : Nat} {Δ : Context} {p : Proc}
(h : Endpoint.HasType n Δ p) : HasType n Δ p
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 → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → HasType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
Δ.lookup e = some c → c.protocol.unfold = .recvName s →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/Typing.lean:31
inductive HasType : Nat → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → HasType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
Δ.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 →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/ConversionTyping.lean:69
Uses 16
TheoremOutput typing at a code equivalent to one send then end#✓fully proved
Local finite-tail conversion: replacing a one-send-then-end protocol by an equivalent code yields a usable output subject, retaining its actual next code and rank. This is not arbitrary context retyping.
theorem one_action_tail {n k : Nat} {Γ : Context} {d : Key} {b : Name} {t : Protocol}
(hc : Γ.Completed) (hscope : ∀ e ∈ Γ, e.name.ClosedAt n)
(hd : d.name.ClosedAt n) (hb : b.ClosedAt n)
(ht : (Protocol.sendName .done).TreeEquiv t) :
HasType n (Γ.insert d ⟨k, t⟩) (.out d.name b .nil)
abbrev Context := Finmap (fun _ : Key => Capability)
CSLibExt/Languages/SessionTypes/Endpoint/Context.lean:32
structure Key where
name : PiCalculus.Name
role : Role
deriving DecidableEq, Repr
CSLibExt/Languages/SessionTypes/Endpoint/Identity.lean:30
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
inductive HasType : Nat → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → HasType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
Δ.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 →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/ConversionTyping.lean:69
Uses 17
TheoremOutput inversion for conversion typing#✓fully proved
Conversion output inversion exposes actual owned payload metadata and semantic comparison, never a supplied retyping result.
theorem HasType.out_inv {n : Nat} {Δ : Context} {a b : Name} {p : Proc}
(h : HasType n Δ (.out a b p)) :
∃ e c, e.name = a ∧ Δ.lookup e = some c ∧
((∃ s, c.protocol.unfold = .sendName s) ∨
∃ d v k t s, d.name = b ∧ Δ.lookup d = some v ∧
c.protocol.unfold = .sendEndpoint d.role k t s ∧ v.Equivalent ⟨k, t⟩)
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 → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → HasType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
Δ.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 →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/ConversionTyping.lean:69
Uses 14 · Used by 1
TheoremConversion-typed processes are well scoped#✓fully proved
Canonical scope follows from the seven conversion rules.
theorem HasType.closedAt {n : Nat} {Δ : Context} {p : Proc} (h : HasType n Δ p) : p.ClosedAt n
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 → Context → Proc → Prop where
| nil {n : Nat} {Δ : Context} :
Δ.Completed → (∀ e ∈ Δ, e.name.ClosedAt n) → HasType n Δ .nil
| outName {n : Nat} {Δ : Context} {e : Key} {c : Capability}
{b : Name} {s : Protocol} {p : Proc} :
Δ.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} {Δ : Context} {e : Key} {c : Capability}
{s : Protocol} {p : Proc} :
Δ.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 →
⋯
CSLibExt/Languages/SessionTypes/Endpoint/ConversionTyping.lean:69
Uses 15
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.