Strong free-channel barbed bisimilarity

InductiveFree-channel guard offered without reduction#✓fully proved

A selected free-channel guard exposed without reduction. Restrictions hide bound subjects but do not hide free constants.

inductive Offer : Proc → Observable → Prop where
  | input {p q : Proc} {a : ℕ} :
      Select p (.inp (.const a) q) → Offer p (.input a)
  | output {p q : Proc} {a : ℕ} {b : Name} :
      Select p (.out (.const a) b q) → Offer p (.output a)
  | parL {p q : Proc} {o : Observable} :
      Offer p o → Offer (.par p q) o
  | parR {p q : Proc} {o : Observable} :
      Offer q o → Offer (.par p q) o
  | nu {p : Proc} {o : Observable} : Offer p o → Offer (.nu p) o
Uses 4 · Used by 8

DefinitionImmediate free-channel barb#✓fully proved

Immediate free-channel readiness, up to the existing structural congruence. A witness performs no Step.

def Barb (p : Proc) (o : Observable) : Prop :=
  ∃ q, Cong p q ∧ Offer q o
Uses 4 · Used by 14

InductiveLabels for reductions and barb observations#✓fully proved

Labels for reductions and observation-only self-loops.

inductive BehaviourLabel where
  | reduce
  | observe (o : Observable)
  deriving DecidableEq, Repr
Uses 1 · Used by 8

DefinitionReduction LTS decorated with barb observations#✓fully proved

The existing reduction semantics decorated with barb tests. The observation transitions do not consume a prefix or transmit a name.

def observedLTS : LTS Proc BehaviourLabel where
  Tr p label q := match label with
    | .reduce => Step p q
    | .observe o => p = q ∧ Barb p o
Uses 5 · Used by 7

DefinitionStrong barbed bisimilarity#✓fully proved

Strong barbed bisimilarity, using the canonical CSLib bisimulation API. No context closure is built into this relation.

def BarbedBisimilar : Proc → Proc → Prop :=
  LTS.HomBisimilarity observedLTS
Uses 3 · Used by 10

TheoremDecorated-LTS bisimulations are exactly strong barbed bisimulations#✓fully proved

The decorated LTS has precisely the strong reduction-matching and immediate-barb-preservation clauses of a strong barbed bisimulation.

theorem isBisimulation_observedLTS_iff (r : Proc → Proc → Prop) :
    LTS.IsHomBisimulation observedLTS r ↔
      ∀ ⦃p q⦄, r p q →
        (∀ p', Step p p' → ∃ q', Step q q' ∧ r p' q') ∧
        (∀ q', Step q q' → ∃ p', Step p p' ∧ r p' q') ∧
        (∀ o, Barb p o ↔ Barb q o)
Uses 6 · Used by 3

TheoremStructural congruence preserves immediate barbs#✓fully proved

Structural congruence preserves immediate barbs.

theorem Cong.barb_iff {p q : Proc} (h : Cong p q) (o : Observable) :
    Barb p o ↔ Barb q o
Uses 5 · Used by 1

TheoremStructural congruence is a strong barbed bisimulation#✓fully proved

Structural congruence is a strong barbed bisimulation: reductions match one for one, while free-channel observations match immediately.

theorem cong_isBarbedBisimulation :
    LTS.IsHomBisimulation observedLTS Cong
Uses 9 · Used by 1

TheoremStructurally congruent processes are barbed bisimilar#✓fully proved

Every structural law of Basic is sound for strong barbed bisimilarity, including scope extrusion and replication unfolding.

theorem Cong.barbedBisimilar {p q : Proc} (h : Cong p q) :
    BarbedBisimilar p q
Uses 6 · Used by 1

DefinitionUnguarded output in a process#✓fully proved

An output not behind a prefix, on any subject (including bound names). This is an overapproximation for arbitrary unguarded sums, not a barb.

def HasUnguardedOutput : Proc → Prop
  | .nil => False
  | .out _ _ _ => True
  | .inp _ _ => False
  | .par p q => HasUnguardedOutput p ∨ HasUnguardedOutput q
  | .nu p => HasUnguardedOutput p
  | .repl p => HasUnguardedOutput p
  | .sum p q => HasUnguardedOutput p ∨ HasUnguardedOutput q
Uses 2 · Used by 6

TheoremStructural congruence preserves unguarded outputs#✓fully proved

Structural rearrangement cannot expose an output from an input-guarded process. This includes arbitrary uses of replication and scope laws.

theorem Cong.hasUnguardedOutput_iff {p q : Proc} (h : Cong p q) :
    HasUnguardedOutput p ↔ HasUnguardedOutput q
Uses 8 · Used by 1

TheoremEvery reduction source has an unguarded output#✓fully proved

Every reduction needs an unguarded output in its source, even when communication is private or structural congruence is used arbitrarily.

theorem Step.hasUnguardedOutput {p q : Proc} (h : Step p q) :
    HasUnguardedOutput p
Uses 8 · Used by 2

TheoremProcesses without unguarded output cannot reduce#✓fully proved

Outputless processes cannot reduce. Input guards may still have observable input barbs; this theorem does not identify them with nil.

theorem not_step_of_no_output {p : Proc}
    (h : ¬ HasUnguardedOutput p) (q : Proc) : ¬ Step p q
Uses 4

TheoremExposed guards are barbs#✓fully proved

A directly exposed guard is a barb, with the reflexive structural representative as witness.

theorem Barb.of_offer {p : Proc} {o : Observable} (h : Offer p o) :
    Barb p o
Uses 5 · Used by 4

TheoremThe inactive process has no barbs#✓fully proved

The inactive process has no barb, even after structural rearrangement.

@[simp] theorem barb_nil (o : Observable) : ¬ Barb .nil o
Uses 11 · Used by 1

TheoremBarbs of an output prefix#✓fully proved

Output readiness sees only its free subject and direction, not its object or guarded continuation.

@[simp] theorem barb_out_iff (a b : Name) (p : Proc) (o : Observable) :
    Barb (.out a b p) o ↔ ∃ n, a = .const n ∧ o = .output n
Uses 12

TheoremBarbs of an input prefix#✓fully proved

Waiting inputs are observable, despite being unable to reduce alone.

@[simp] theorem barb_inp_iff (a : Name) (p : Proc) (o : Observable) :
    Barb (.inp a p) o ↔ ∃ n, a = .const n ∧ o = .input n
Uses 12

TheoremBarbs of a restricted output prefix#✓fully proved

A restricted output is visible exactly when its subject is free. Sending the private name on a free subject remains observable.

@[simp] theorem barb_nu_out_iff (a b : Name) (p : Proc) (o : Observable) :
    Barb (.nu (.out a b p)) o ↔ ∃ n, a = .const n ∧ o = .output n
Uses 12

TheoremBarbed bisimilar processes have the same barbs#✓fully proved

Bisimilar processes have the same immediate free-channel barbs.

theorem BarbedBisimilar.barb_iff {p q : Proc}
    (h : BarbedBisimilar p q) (o : Observable) : Barb p o ↔ Barb q o
Uses 8 · Used by 2

TheoremBarbed bisimilarity matches each reduction by one reduction#✓fully proved

A reduction from the first process is matched by one reduction, with strong barbed bisimilar derivatives.

theorem BarbedBisimilar.step {p q p' : Proc}
    (h : BarbedBisimilar p q) (hs : Step p p') :
    ∃ q', Step q q' ∧ BarbedBisimilar p' q'
Uses 8 · Used by 1

TheoremFree-channel input is not barbed bisimilar to nil#✓fully proved

Waiting for input is not equivalent to doing nothing. Reduction-only bisimilarity would miss this distinction.

theorem input_not_barbedBisimilar_nil (a : ℕ) (p : Proc) :
    ¬ BarbedBisimilar (.inp (.const a) p) .nil
Uses 10

DefinitionMay-barb after finitely many reductions#✓fully proved

A free-channel barb reachable by finitely many existing reductions, possibly zero. This is a may observation, not a weak equivalence.

def MayBarb (p : Proc) (o : Observable) : Prop :=
  ∃ p', Relation.ReflTransGen Step p p' ∧ Barb p' o
Uses 4 · Used by 1

TheoremBarbed bisimilarity transfers finite reduction paths#✓fully proved

A finite reduction path transfers across strong barbed bisimilarity.

theorem BarbedBisimilar.reductionPath {p q p' : Proc}
    (h : BarbedBisimilar p q) (hs : Relation.ReflTransGen Step p p') :
    ∃ q', Relation.ReflTransGen Step q q' ∧ BarbedBisimilar p' q'
Uses 4 · Used by 1

TheoremBarbed bisimilarity preserves may-barbs#✓fully proved

Strong barbed bisimilarity preserves finite may observations.

theorem BarbedBisimilar.mayBarb_iff {p q : Proc}
    (h : BarbedBisimilar p q) (o : Observable) :
    MayBarb p o ↔ MayBarb q o
Uses 10
25 fully proved

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.