Skip to content

Conversation

jamesmckinna
Copy link
Contributor

Revised version of the relevant code from #2744 incorporating:

  • MinimalCounterexample now a record
  • infix versions now as (duplicate) definitions of the verbose CamelCase versions, not as syntax
  • use of inject deprecated in favour of _<_; add inject-< as lemma to smooth the path

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.

I like all of this, except for the name μ. It's a cute pun, but caters to a rather small crowd.

How about calling the constructor least instead? If you want a pun, then μ⟨_⟩ can be called the-least. I don't think μ⟨¬_⟩ passes the Fairbairn threshold.

@jamesmckinna
Copy link
Contributor Author

jamesmckinna commented Oct 1, 2025

I like all of this, except for the name μ. It's a cute pun, but caters to a rather small crowd.

It was absolutely not intended as a pun:

  • for the 'small crowd' of recursion theorists/computer scientists who know or care about recursion theory, I regard μ as absolutely conventional usage denoting the Godel-Kleene minimisation operator, here specialised to the (much) easier case of Fin;
  • Relation.Unary defines a number of 'Greek' short form syntaxes/definitions ∃⟨_⟩, ∀[_] for things which otherwise would be more verbose, and I'm conscious that there are at least two schools of thought about their appropriateness for stdlib, viz. favouring ASCII/CamelCase or else 'Greek' forms, and this PR follows that model: long-form names, with short-form 'abbreviations'

How about calling the constructor least instead? If you want a pun, then μ⟨_⟩ can be called the-least. I don't think μ⟨¬_⟩ passes the Fairbairn threshold.

Well...

  • the use of μ as a constructor for the two records introduced here is, of course, both optional (no constructor required), and replaceable, so I'd be happy to change it for something, but 'least' seems itself to be working a bit too hard cognitively/semantically, and above all, I wanted something 'minimum ink' (following Wadler, whose taste in these matters usually seems reliable...)
  • the Fairbairn objection to μ⟨¬_⟩ I actively disagree with: because the types MinimalExample and MinimalCounterexample are subtly different, to try to (more) accurately reflect the computation irrelevance of fields/arguments. So if they are to have short-form abbreviation, then they each deserve one!
  • but again, maybe (short) ASCII alternative would be better, but then I'd be tempted simply to resort only to the existing camelCase : CamelCase idiomatics, but at the (quite high!) cost of adding some very long names... :-(

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