Skip to content

fix(LTS): define acyclicity by well-founded termination - #748

Open
SamuelSchlesinger wants to merge 1 commit into
leanprover:mainfrom
SamuelSchlesinger:samuelschlesinger/lts-acyclic-well-founded
Open

fix(LTS): define acyclicity by well-founded termination#748
SamuelSchlesinger wants to merge 1 commit into
leanprover:mainfrom
SamuelSchlesinger:samuelschlesinger/lts-acyclic-well-founded

Conversation

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator

The current definition requires a global bound, which seems wrong. At least it is misleading as a reader of the documentation, perhaps it is intended and the documentation simply confused me.

@ctchou

ctchou commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

I don't know @fmontesi's original intention when he made this definition. But, prima facie, shouldn't Acyclic be defined by something like this?

class Acyclic (lts : LTS State Label) where
  acyclic : ¬ ∃ s μs, lts.MTr s μs s ∧ 0 < μs.length

It seems to me that the current definition should be called "Bounded" (perhaps with n as an explicit parameter) and the new definition that @SamuelSchlesinger proposes should be called "WellFounded".

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Yes, your proposal makes the most semantic sense to me.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

I think the bounded definition also can choose to order the quantifiers differently and those are different types of Bounded. GloballyBounded vs LocallyBounded or something.

@thomaskwaring

thomaskwaring commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

i agree both that the name is confusing (it should be more like @ctchou's suggestion) and that the docs don't match the code — fwiw in Sangiorgi's book "acyclic" is only ever applied to finite-state lts's for which all of these notions agree

also given the swapping of arguments, perhaps WellFounded could be replaced by cslib's Terminating?

@ctchou

ctchou commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Indeed, since transition labels don't really matter in these definitions, perhaps they should be defined on Relation rather than LTS?

@fmontesi

Copy link
Copy Markdown
Collaborator

i agree both that the name is confusing (it should be more like @ctchou's suggestion) and that the docs don't match the code — fwiw in Sangiorgi's book "acyclic" is only ever applied to finite-state lts's for which all of these notions agree

Formalising that book is where the def came from, but indeed we should improve this.

Summarising the thoughts expressed so far and my own, I'd suggest:

  • Rename the current Acyclic to Bounded (we can later separate globally from locally, but I think Bounded would make sense as interim since it is the obvious global one that says 'the lts has a bound to the length of all possible executions').
  • Rename @SamuelSchlesinger's proposal into WellFounded.
  • Make a new Acyclic that actually checks that there are no loops (as in graphs). We can do this in another PR, if you prefer.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

I think that makes sense. I'll reform this PR into what I believe is the synthesis of this discussion, and we can do another round of discussion.

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.

4 participants