Theory Struct_Cong

(* 
   Title: The Calculus of Communicating Systems   
   Author/Maintainer: Jesper Bengtson (jebe@itu.dk), 2012
*)
theory Struct_Cong
  imports Agent
begin

inductive structCong :: "ccs  ccs  bool" ("_ s _")
  where
  Refl: "P s P"
| Sym: "P s Q  Q s P"
| Trans: "P s Q; Q s R  P s R"

| ParComm: "P  Q s Q  P"
| ParAssoc: "(P  Q)  R s P  (Q  R)"
| ParId: "P  𝟬 s P"

| SumComm: "P  Q s Q  P"
| SumAssoc: "(P  Q)  R s P  (Q  R)"
| SumId: "P  𝟬 s P"

| ResNil: "⦇νx𝟬 s 𝟬"
| ScopeExtPar: "x  P  ⦇νx(P  Q) s P  ⦇νxQ"
| ScopeExtSum: "x  P  ⦇νx(P  Q) s P  ⦇νxQ"
| ScopeAct: "x  α  ⦇νx(α.(P)) s α.(⦇νxP)"
| ScopeCommAux: "x  y  ⦇νx(⦇νyP) s ⦇νy(⦇νxP)"

| BangUnfold: "!P s P  !P"
equivariance structCong
nominal_inductive structCong
by(auto simp add: abs_fresh)

lemma ScopeComm:
  fixes x :: name
  and   y :: name
  and   P :: ccs

  shows "⦇νx(⦇νyP) s ⦇νy(⦇νxP)"
by(cases "x=y") (auto intro: Refl ScopeCommAux)

end