Skip to content

[ refactor ] introduce revised notation for decidability of Lexicographic orderings, plus knock-ons#2963

Draft
jamesmckinna wants to merge 7 commits intoagda:masterfrom
jamesmckinna:decidable-lex
Draft

[ refactor ] introduce revised notation for decidability of Lexicographic orderings, plus knock-ons#2963
jamesmckinna wants to merge 7 commits intoagda:masterfrom
jamesmckinna:decidable-lex

Conversation

@jamesmckinna
Copy link
Copy Markdown
Collaborator

@jamesmckinna jamesmckinna commented Mar 9, 2026

Last item (for now!?) on the #2846 shopping list.

UPDATED: moved to DRAFT pending definitive resolution of #2865

Usual issues, with a twist:

  • global consistency of the R? notation, against the local of R-* style for all the other properties
  • inconsistency between List and Vec get reconciled here
  • Lex relations, and their proof of decidability, are ternary, so open question about what 'good'/'best' mixfix notations for such things should/could/might be deployed... suggestions below
  • a reminder that the Dec ordering relation structures/bundles have perhaps a sub-optimal inheritance graph?
  • clearly some non-trivial interaction with [ refactor ] name of Data.Product.Relation.Binary.Pointwise.NonDependent.×-decidable #2958 so there may be merge conflicts downstream?

@jamesmckinna jamesmckinna modified the milestone: v2.4 Mar 18, 2026
@jamesmckinna
Copy link
Copy Markdown
Collaborator Author

jamesmckinna commented Apr 7, 2026

Damn! Screwed up the merge conflict resolution... NOPE seems to have worked just fine!?


<-decidable : Decidable _≈_ → Decidable _≼_ → Decidable _<_
<-decidable _≟_ _≼?_ =
_<?_ : Decidable _≈_ → Decidable _≼_ → Decidable _<_
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it not perverse to have a binary infix notation that takes 4 arguments?
It'd be a lot easier to use if packaged in a Decision module parametrised by
Decidable _≈_ and Decidable _≼_ as that would allow you to open it applied
and then use the decision procedures in an infix manner.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm, perhaps you're right, except that two of the arguments are implicit?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think Decidable as the return type does mean we are taking two extra arguments

@MatthewDaggitt MatthewDaggitt removed this from the v2.4 milestone Apr 8, 2026
@jamesmckinna jamesmckinna marked this pull request as draft April 8, 2026 15:57
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.

4 participants