5.3. Reduction and reaction
Every reduction is a reaction of the encodings: for every X and \rho
with \mathrm{fn}_\rho(P) \subseteq X,
P \to Q \;\Longrightarrow\; \llbracket P \rrbracket_{X,\rho} \longrightarrow_{\mathcal{R}_\pi} \llbracket Q \rrbracket_{X,\rho} .
Lean code for Theorem5.3.1●1 theorem
Associated Lean declarations
-
red_soundπ[complete]
-
red_soundπ[complete]
-
theoremdefined in Pi/Sound.leancomplete
theorem red_soundπ {p q : Proc} (h : p ⟶ q) (X : NameSet Nat) (ρ : Nat → Nat) (hp : NamesIn X.names ρ p) : ⟦p⟧ ⟶[piRules] ⟦q⟧
theorem red_soundπ {p q : Proc} (h : p ⟶ q) (X : NameSet Nat) (ρ : Nat → Nat) (hp : NamesIn X.names ρ p) : ⟦p⟧ ⟶[piRules] ⟦q⟧
**Soundness of the π encoding: every reduction of every process is a reaction of the encodings** under the two name-passing rules, for every name set and environment.
For closed processes, reaction of the encoding is exactly reduction: for
P closed, \mathrm{fn}_\rho(P) \subseteq X, and every abstract bigraph
b,
\llbracket P \rrbracket_{X,\rho} \longrightarrow_{\mathcal{R}_\pi} b \;\iff\; \exists Q.\; P \to Q \;\wedge\; b = \llbracket Q \rrbracket_{X,\rho} .
For open processes the direction from left to right is OPEN.
Rests on NEW: Closed.
Lean code for Theorem5.3.2●1 theorem
Associated Lean declarations
-
react_iffπ[complete]
-
react_iffπ[complete]
-
theoremdefined in Pi/Iff.leancomplete
theorem react_iffπ (X : NameSet Nat) (ρ : Nat → Nat) {p : Proc} (hcl : Closed p) (hp : NamesIn X.names ρ p) (b : Bg.Abstract sig Nat) : ⟦p⟧ ⟶[piRules] b ↔ ∃ q hr, b = ⟦q⟧
theorem react_iffπ (X : NameSet Nat) (ρ : Nat → Nat) {p : Proc} (hcl : Closed p) (hp : NamesIn X.names ρ p) (b : Bg.Abstract sig Nat) : ⟦p⟧ ⟶[piRules] b ↔ ∃ q hr, b = ⟦q⟧
**The π encoding agrees with the π-calculus**: on every closed process, the reactions of its agent are exactly the agents of its reducts.
Mobility: a private name is sent, then used. In the calculus the two steps
below are reductions, and with X = \{x, y\} and \rho constant their
encodings react:
\llbracket \nu z\,(\bar{x}z.\bar{z}y.0) \mid x(u).u(v).0 \rrbracket_{X,\rho} \;\longrightarrow_{\mathcal{R}_\pi}\; \llbracket \nu z\,(\bar{z}y.0 \mid z(v).0) \rrbracket_{X,\rho} \;\longrightarrow_{\mathcal{R}_\pi}\; \llbracket \nu z\,(0 \mid 0) \rrbracket_{X,\rho} .
Rests on NEW: X01, pMob, qMob, rMob; not audited: ρ01.
Lean code for Theorem5.3.3●3 theorems
-
theoremdefined in Pi/Examples.leancomplete
theorem mob_react : ⟦pMob⟧ ⟶[piRules] ⟦qMob⟧ ∧ ⟦qMob⟧ ⟶[piRules] ⟦rMob⟧
theorem mob_react : ⟦pMob⟧ ⟶[piRules] ⟦qMob⟧ ∧ ⟦qMob⟧ ⟶[piRules] ⟦rMob⟧
**Mobility in the agents**: the first reaction links the receiver to the private edge, and the second reacts on it.
-
theoremdefined in Pi/Examples.leancomplete
theorem red_mob₁ : pMob ⟶ qMob
theorem red_mob₁ : pMob ⟶ qMob
**Scope extrusion by name passing**: `z` is sent along `x`, and its scope grows to hold the receiver.
-
theoremdefined in Pi/Examples.leancomplete
theorem red_mob₂ : qMob ⟶ rMob
theorem red_mob₂ : qMob ⟶ rMob
**…and the received name is used**: the two ends now meet on `z`.