Skip to content

[ refactor ] (more) decidable Data.Fin.Properties #2744

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

jamesmckinna
Copy link
Contributor

@jamesmckinna jamesmckinna commented Jun 23, 2025

This PR refactors some proofs about Decidable predicates on Fin n, to clarify some, and to add others, including some additional syntax, around a independently interesting minimisation principle from which certain others follow.

A downstream refactoring might reconsider these things in terms of specialisation of lemmas in Induction.InfiniteDescent.

Outstanding issue: could be more systematic about use of variables to clean the whole module up?

@jamesmckinna jamesmckinna added this to the v2.3 milestone Jun 23, 2025
@jamesmckinna jamesmckinna changed the title [ refactor ] decidable Data.Fin.Properties [ refactor ] (more) decidable Data.Fin.Properties Jun 24, 2025
@jamesmckinna
Copy link
Contributor Author

Thanks @MatthewDaggitt for the feedback:

  • regarding lifting out these properties to a new module, that does seem like a good idea
  • regarding naming/(use of) syntax, indeed there are lots of stylistic questions about the current version.

I'll move to DRAFT for the time being, and remove from v2.3, while I reconsider things.

@jamesmckinna jamesmckinna marked this pull request as draft June 25, 2025 11:21
@MatthewDaggitt MatthewDaggitt removed this from the v2.3 milestone Jun 25, 2025
Copy link
Contributor

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

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

All the code seems fine. Only issues are that things seem to have moved without a good reason to.

@jamesmckinna
Copy link
Contributor Author

Hmmm... @JacquesCarette the code motion was in response to earlier review comments from @MatthewDaggitt , but maybe I misunderstood his intention. Nevertheless, the Quantification section is necessary for the subsequent decFinSubset and all?/any? definitions... so it seemed cognate to keep them together (esp. given the public re-export in Data.Fin.Properties...)

@JacquesCarette
Copy link
Contributor

I had seen some of the conversation. This is why maybe a larger break up (Data.Fin.Properties.Quantification too?) might make more sense. Same with the Effectful stuff, it most definitely does not belong in .Properties.Decidable. The main code motion does make a lot of sense, it just has knock-on consequences.

@jamesmckinna
Copy link
Contributor Author

Last addition: dual version of searchMin so that client use doesn't have to figure out the DNE...

@jamesmckinna jamesmckinna marked this pull request as ready for review June 27, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants