Structural laws under π-calculus observers
InductiveOne-hole lexical process contexts#✓fully proved
One-hole lexical contexts, including guards, choice and replication.
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
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
Uses 2 · Used by 11
DefinitionLexical filling of a process context#✓fully proved
Fill the lexical hole. Free constants are never captured; locally closed hole processes have no references into surrounding binders.
def Context.fill : Context → Proc → Proc
| .hole, p => p
| .out a b c, p => .out a b (c.fill p)
| .inp a c, p => .inp a (c.fill p)
| .parL c q, p => .par (c.fill p) q
| .parR q c, p => .par q (c.fill p)
| .nu c, p => .nu (c.fill p)
| .repl c, p => .repl (c.fill p)
| .sumL c q, p => .sum (c.fill p) q
| .sumR q c, p => .sum q (c.fill p)
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
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
Uses 3 · Used by 7
TheoremStructural congruence is closed under contexts#✓fully proved
Structural congruence survives every one-hole lexical context.
theorem Cong.fill {p q : Proc} (h : Cong p q) (c : Context) :
Cong (c.fill p) (c.fill q)
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 Cong : Proc → Proc → Prop
| refl (p : Proc) : Cong p p
| symm {p q : Proc} : Cong p q → Cong q p
| trans {p q r : Proc} : Cong p q → Cong q r → Cong p r
| par_comm (p q : Proc) : Cong (.par p q) (.par q p)
| par_assoc (p q r : Proc) : Cong (.par (.par p q) r) (.par p (.par q r))
| par_nil (p : Proc) : Cong (.par p .nil) p
| par_cong {p p' q q' : Proc} : Cong p p' → Cong q q' →
Cong (.par p q) (.par p' q')
| nu_cong {p p' : Proc} : Cong p p' → Cong (.nu p) (.nu p')
| scope (p q : Proc) :
Cong (.par (.nu p) q) (.nu (.par p (liftProc 0 q)))
⋯
CSLibExt/Languages/PiCalculus/Basic.lean:137
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
Uses 5 · Used by 1
DefinitionComposition of process contexts#✓fully proved
Substitute a context into the hole of another context.
def Context.comp : Context → Context → Context
| .hole, d => d
| .out a b c, d => .out a b (c.comp d)
| .inp a c, d => .inp a (c.comp d)
| .parL c p, d => .parL (c.comp d) p
| .parR p c, d => .parR p (c.comp d)
| .nu c, d => .nu (c.comp d)
| .repl c, d => .repl (c.comp d)
| .sumL c p, d => .sumL (c.comp d) p
| .sumR p c, d => .sumR p (c.comp d)
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
Uses 3 · Used by 2
TheoremFilling a composed context is iterated filling#✓fully proved
Context composition agrees with iterated filling.
@[simp] theorem Context.fill_comp (c d : Context) (p : Proc) :
(c.comp d).fill p = c.fill (d.fill p)
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
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
Uses 5 · Used by 1
DefinitionContextual strong barbed equivalence#✓fully proved
Strong barbed equivalence in every lexical process context. For
capture-avoiding use, both hole processes must satisfy Proc.ClosedAt 0.
def ContextualBarbedEquiv (p q : Proc) : Prop :=
∀ c : Context, BarbedBisimilar (c.fill p) (c.fill q)
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 Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
def BarbedBisimilar : Proc → Proc → Prop :=
LTS.HomBisimilarity observedLTS
CSLibExt/Languages/PiCalculus/Behavioural.lean:75
Uses 4 · Used by 3
TheoremStructural congruence implies contextual barbed equivalence#✓fully proved
Structural congruence is sound under every observer context, with one-for-one reduction matching and immediate input/output barbs.
theorem Cong.contextualBarbedEquiv {p q : Proc} (h : Cong p q) :
ContextualBarbedEquiv p q
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 Cong : Proc → Proc → Prop
| refl (p : Proc) : Cong p p
| symm {p q : Proc} : Cong p q → Cong q p
| trans {p q r : Proc} : Cong p q → Cong q r → Cong p r
| par_comm (p q : Proc) : Cong (.par p q) (.par q p)
| par_assoc (p q r : Proc) : Cong (.par (.par p q) r) (.par p (.par q r))
| par_nil (p : Proc) : Cong (.par p .nil) p
| par_cong {p p' q q' : Proc} : Cong p p' → Cong q q' →
Cong (.par p q) (.par p' q')
| nu_cong {p p' : Proc} : Cong p p' → Cong (.nu p) (.nu p')
| scope (p q : Proc) :
Cong (.par (.nu p) q) (.nu (.par p (liftProc 0 q)))
⋯
CSLibExt/Languages/PiCalculus/Basic.lean:137
def ContextualBarbedEquiv (p q : Proc) : Prop :=
∀ c : Context, BarbedBisimilar (c.fill p) (c.fill q)
CSLibExt/Languages/PiCalculus/Contextual.lean:97
Uses 7 · Used by 1
TheoremContextual barbed equivalence is closed under contexts#✓fully proved
Contextual barbed equivalence survives filling a context.
theorem ContextualBarbedEquiv.fill {p q : Proc}
(h : ContextualBarbedEquiv p q) (d : Context) :
ContextualBarbedEquiv (d.fill p) (d.fill q)
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 ContextualBarbedEquiv (p q : Proc) : Prop :=
∀ c : Context, BarbedBisimilar (c.fill p) (c.fill q)
CSLibExt/Languages/PiCalculus/Contextual.lean:97
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
TheoremContextual barbed equivalence implies barbed bisimilarity#✓fully proved
Contextual barbed equivalence implies standalone barbed bisimilarity.
theorem ContextualBarbedEquiv.barbedBisimilar {p q : Proc}
(h : ContextualBarbedEquiv p q) : BarbedBisimilar p q
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 ContextualBarbedEquiv (p q : Proc) : Prop :=
∀ c : Context, BarbedBisimilar (c.fill p) (c.fill q)
CSLibExt/Languages/PiCalculus/Contextual.lean:97
def BarbedBisimilar : Proc → Proc → Prop :=
LTS.HomBisimilarity observedLTS
CSLibExt/Languages/PiCalculus/Behavioural.lean:75
Uses 4
DefinitionCapture-avoiding filling of a process context#✓fully proved
Capture-avoiding filling: each context binder shifts dangling names of the hole, while binders internal to the hole remain untouched.
def Context.fillAvoiding : Context → Proc → Proc
| .hole, p => p
| .out a b c, p => .out a b (c.fillAvoiding p)
| .inp a c, p => .inp a (c.fillAvoiding (liftProc 0 p))
| .parL c q, p => .par (c.fillAvoiding p) q
| .parR q c, p => .par q (c.fillAvoiding p)
| .nu c, p => .nu (c.fillAvoiding (liftProc 0 p))
| .repl c, p => .repl (c.fillAvoiding p)
| .sumL c q, p => .sum (c.fillAvoiding p) q
| .sumR q c, p => .sum q (c.fillAvoiding p)
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
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 liftProc (cutoff : ℕ) : Proc → Proc
| .nil => .nil
| .out a b p => .out (liftName cutoff a) (liftName cutoff b) (liftProc cutoff p)
| .inp a p => .inp (liftName cutoff a) (liftProc (cutoff + 1) p)
| .par p q => .par (liftProc cutoff p) (liftProc cutoff q)
| .nu p => .nu (liftProc (cutoff + 1) p)
| .repl p => .repl (liftProc cutoff p)
| .sum p q => .sum (liftProc cutoff p) (liftProc cutoff q)
CSLibExt/Languages/PiCalculus/Basic.lean:70
Uses 4 · Used by 2
TheoremCapture-avoiding and lexical filling agree on locally closed holes#✓fully proved
Lexical and capture-avoiding filling agree for locally closed holes. This is the explicit admissibility condition for the contextual theorem.
theorem Context.fillAvoiding_eq {p : Proc} (h : Proc.ClosedAt 0 p)
(c : Context) : c.fillAvoiding p = c.fill p
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 Proc.ClosedAt (depth : ℕ) : Proc → Prop
| .nil => True
| .out a b p =>
a.ClosedAt depth ∧ b.ClosedAt depth ∧ Proc.ClosedAt depth p
| .inp a p => a.ClosedAt depth ∧ Proc.ClosedAt (depth + 1) p
| .par p q => Proc.ClosedAt depth p ∧ Proc.ClosedAt depth q
| .nu p => Proc.ClosedAt (depth + 1) p
| .repl p => Proc.ClosedAt depth p
| .sum p q => Proc.ClosedAt depth p ∧ Proc.ClosedAt depth q
CSLibExt/Languages/PiCalculus/Scoping.lean:46
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
Uses 8 · Used by 1
TheoremStructural laws are barbed sound in capture-avoiding contexts#✓fully proved
Every structural law is strongly barbed sound under capture-avoiding contexts, for locally closed hole processes.
theorem Cong.fillAvoiding_barbedBisimilar {p q : Proc} (h : Cong p q)
(hp : Proc.ClosedAt 0 p) (hq : Proc.ClosedAt 0 q) (c : Context) :
BarbedBisimilar (c.fillAvoiding p) (c.fillAvoiding q)
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 Cong : Proc → Proc → Prop
| refl (p : Proc) : Cong p p
| symm {p q : Proc} : Cong p q → Cong q p
| trans {p q r : Proc} : Cong p q → Cong q r → Cong p r
| par_comm (p q : Proc) : Cong (.par p q) (.par q p)
| par_assoc (p q r : Proc) : Cong (.par (.par p q) r) (.par p (.par q r))
| par_nil (p : Proc) : Cong (.par p .nil) p
| par_cong {p p' q q' : Proc} : Cong p p' → Cong q q' →
Cong (.par p q) (.par p' q')
| nu_cong {p p' : Proc} : Cong p p' → Cong (.nu p) (.nu p')
| scope (p q : Proc) :
Cong (.par (.nu p) q) (.nu (.par p (liftProc 0 q)))
⋯
CSLibExt/Languages/PiCalculus/Basic.lean:137
def Proc.ClosedAt (depth : ℕ) : Proc → Prop
| .nil => True
| .out a b p =>
a.ClosedAt depth ∧ b.ClosedAt depth ∧ Proc.ClosedAt depth p
| .inp a p => a.ClosedAt depth ∧ Proc.ClosedAt (depth + 1) p
| .par p q => Proc.ClosedAt depth p ∧ Proc.ClosedAt depth q
| .nu p => Proc.ClosedAt (depth + 1) p
| .repl p => Proc.ClosedAt depth p
| .sum p q => Proc.ClosedAt depth p ∧ Proc.ClosedAt depth q
CSLibExt/Languages/PiCalculus/Scoping.lean:46
inductive Context where
| hole
| out (a b : Name) (c : Context)
| inp (a : Name) (c : Context)
| parL (c : Context) (p : Proc)
| parR (p : Proc) (c : Context)
| nu (c : Context)
| repl (c : Context)
| sumL (c : Context) (p : Proc)
| sumR (p : Proc) (c : Context)
CSLibExt/Languages/PiCalculus/Contextual.lean:36
def BarbedBisimilar : Proc → Proc → Prop :=
LTS.HomBisimilarity observedLTS
CSLibExt/Languages/PiCalculus/Behavioural.lean:75
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.