-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-worked CCS with alpha-conversion over recursion operator #1176
Conversation
Previous, to define new terms from
The theorem |
Once CCS got alpha-conversion, it's possible to define the I combinator and prove their alpha-equivalence:
It's interesting that the existing SOS rules for
to (adding
This should be considered as a small bug in the textbook definition of SOS rules for CCS. With this change, all existing theorems can still be proved, but then I'm able to prove that
When doing induction on |
…s of Ian Shillito
Today Ian Shillito provided me a method to solve the proof difficulty in "I_NO_TRANS" (
By induction it's simple to prove that
Meanwhile by induction on the "proof depth" I can prove that "I" combinator has no labelled transitions: (because there's no infinite descending proofs of
Combining the above two theorems we get |
Awesome! |
Hi,
This huge PR modifies the existing CCS example with alpha-conversion over recursion operator, using the nominal generic terms from the
examples/lambda/basics
.Recall in Milner's Calculus of Communicating Systems (CCS) [1], there are totally 8 operators (nil, var, prefix, sum, par, restr, relab and rec), which is usually defined by the following Datatype:
The structural operational semantics (SOS) of CCS defines how a CCS process transits to another one under certain action. For example, the term
prefix u E
can transit toE
under actionu
, denoted by|- TRANS (prefix u E) u E
.One may think that any process represented by finite term can only make finite number of transitions as the term size reduces. But this is not true: the recursion operator
rec
, together withvar
, can be used to define CCS processes with infinite transition. For example, the CCS process given byrec X (prefix u (var X))
have infinite transition under the actionu
. In the previous CCS term, the leadingrec X ...
can be consider as a "constant" definition:X := prefix u (var X)
, and once the SOS reachesvar X
, it will replacevar X
by the body ofrec X ...
, thus become anotherprefix u (var X)
and so on. Clearly, substituting the name "X" to any other name, does not change the transition behavior at all.By using the
nomsetTheory
andgeneric_termsTheory
from the λ-calculus example, now I've successfully redefined CCS terms with alpha-conversion built into the recursion operator, thus now we haverec X (var X) = rec Y (var Y)
holds literally.Previously the type CCS has two arguments:
:(α, β) CCS
, whereα
is the type of recursion variable names, whileβ
is the type of actions. Now the first type argument becomes just:string
, and thus it remains:α CCS
where 'α᾽ is the previous type argumentβ
(of actions).The first big benefit (of α-conversion) is the avoiding of discussions on bound variables of CCS terms, previously defined by
BV
and is needed in the proofs of some advanced theorems. This reduced the overall proof size. The new CCS induction theorem, with the ability to exclude a set of names, which I still call it "nc_INDUCTION2", is the following:Term substitutions and simultaneous substitutions are also defined like the way of λ-calculus but look more tedious due to more operators of CCS:
But more substitution theorems have both the same name and same statements as in λ-calculus, e.g.
On the other hand, some new theorems about substitutions, like the above [lemma14b_ext1], is also added back to the λ-calculus example (in
termTheory
) for potential future uses.All existing (major) CCS theorems (except for those small utilities) still hold with minor fix-ups. I think the present work has opened new opportunities for further developments of the theory of CCS, and one such work from me is still in process.
--Chun
[1] Milner, Robin. Communication and concurrency. Prentice hall, 1989.