Skip to content

Conversation

@BoltonBailey
Copy link
Contributor

@BoltonBailey BoltonBailey commented Jan 17, 2026

This PR adds Reduction.relates{In,Within}Steps, functions that communicate whether a relation forms a directed path of length (at most) n between two elements.

Specifically, it includes:

  • Definitions of these functions
  • Theorems about reflexivity and transitivity
  • Theorems that track the growth of ancillary functions with respect to the relation

These are a prerequisite to defining time bounds, perhaps for multiple models of computation, but in particular for Turing machines, see PR #269.

@BoltonBailey BoltonBailey changed the title feat: add contents on time bounds for reduction systems. feat: add time bounds for ReductionSystems Jan 17, 2026
@chenson2018
Copy link
Collaborator

This looks great to have, thanks for working on this! I am wondering though if we should at least initially put this in Cslib.Foundations.Data.Relation instead (or make an appropriate subdirectory) and work with just unbundled relations. My reasoning is:

  • there is some overlap there, for instance the definition Relation.Reducible and Relation.Normal could be reused
  • I am a bit unsure about fully committing to using ReductionSystem as an API because of the duplication of proofs about relations that would be required

What do you think?

@BoltonBailey BoltonBailey changed the title feat: add time bounds for ReductionSystems feat: add time step counting for relations Jan 22, 2026
@BoltonBailey
Copy link
Contributor Author

What do you think?

Sounds fine to me! I have moved this content to the Relation file and made some name changes that might make more sense in this context.

Copy link
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.

Thanks for moving this over to this module. I left some additional style/naming comments.

Copy link
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.

LGTM, thank you!

@BoltonBailey
Copy link
Contributor Author

With the additional lemmas this is getting longer, and there is more ReflTransGen content from Mathlib.Logic.Relation that could be replicated. Would you like me to move this to a new file?

@chenson2018
Copy link
Collaborator

With the additional lemmas this is getting longer, and there is more ReflTransGen content from Mathlib.Logic.Relation that could be replicated. Would you like me to move this to a new file?

Sure, feel free. Another file in this same directory seems appropriate for now?

@chenson2018
Copy link
Collaborator

I think you need to run lake exe mk_all --module

@chenson2018 chenson2018 enabled auto-merge January 23, 2026 02:22
@chenson2018 chenson2018 added this pull request to the merge queue Jan 23, 2026
Merged via the queue into leanprover:main with commit d8ca51b Jan 23, 2026
2 checks passed
@BoltonBailey BoltonBailey deleted the step-counting-reduction branch January 23, 2026 03:23
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.

2 participants