Skip to content

feat: define the category of LTSs#391

Open
ayberkt wants to merge 55 commits intoleanprover:mainfrom
ayberkt:main
Open

feat: define the category of LTSs#391
ayberkt wants to merge 55 commits intoleanprover:mainfrom
ayberkt:main

Conversation

@ayberkt
Copy link
Copy Markdown

@ayberkt ayberkt commented Mar 2, 2026

This PR resolves #387.

@fmontesi
Copy link
Copy Markdown
Collaborator

fmontesi commented Mar 3, 2026

Not urgent, but please fix the title of the PR at some point to start with the required feat: prefix, or CI won't let us merge this.

Copy link
Copy Markdown
Collaborator

@chenson2018 chenson2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks much better! The theory now all lines up, there are some additional small style/technical issues I have pointed out below. Please also see the failures in CI now that it has made it to the linting step.

@chenson2018 chenson2018 self-assigned this Mar 17, 2026
@ayberkt ayberkt requested a review from chenson2018 March 20, 2026 11:58
We first define what is denoted Tran* in [WinskelNielsen1995]: the extension of
a transition relation with idle transitions.
-/
def lift (trans : State → Label → State → Prop) : State → (Option Label) → State → Prop :=
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently named Cslib.lift, which still isn't a great name/location combo. I'd say LTS.lift, except this is unbundled which makes that an odd name. Deferring to @fmontesi on this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should namespace it under LTS. But lift looks too generic a name to me, this is doing something very specific, i.e., adding so-called 'idle' self-transitions. I'd also suggest to make it transform an LTS, so to enable stating properties about it without relying on knowledge of how LTS is defined.

How about LTS.withIdle or LTS.withSelfLoops or something like that?

In general, it would also make sense to move such operations on unbundled LTSs to other files, outside of category theory -- but we don't necessarily need to do this now. I see some operations in Winskel and Nielsen (like relabelling) that make sense to offer even to developments not interested in category theory.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withIdle seems fine, but it is maybe a bit odd for this to be in the LTS namespace when it doesn't actually include an LTS in the signature.

Copy link
Copy Markdown
Collaborator

@chenson2018 chenson2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my naming comment above, but otherwise things look in pretty good shape to me.

(I pushed a few small commits, the most important of which is probably using some API from Mathlib.Control instead of breaking down notation with change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define the category of LTSs

4 participants