Skip to content
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

Adds Relation.Nullary.Recomputable plus consequences #2243

Merged
merged 46 commits into from
Jun 5, 2024

Conversation

jamesmckinna
Copy link
Contributor

@jamesmckinna jamesmckinna commented Jan 2, 2024

Fixes #2199 , and the Recomputable and Irrelevant instances of #2091 .
Cherry-picks some of the lower-hanging fruit from #2149 .

Outstanding issues:

  • names of things: recompute vs. recomputable vs. ...⇒recomputable in all the various places; also the various additions to Relation.Nullary.Negation.Core; UPDATED sticking with recompute for now
  • deprecations: module Data.Empty.Irrelevant could now be deprecated entirely, but I have not (yet) done so; similarly, there may be knock-on deprecations arising from name choices above; UPDATED no deprecations!
  • where things should live/be (re-)exported from. UPDATED see @JacquesCarette 's comments and my revised commits

(DefiniteProbably) Won't do in relation to issues raised as a result of #2199 :

  • "induction on the negative fragment": a separate (relativised!) Data.Universe construction for the 'Harrop' universe, as Relation.Nullary.Recomputable.Universe, with a view to generalising Harrop's results to ones of the form "if everything in 𝕌 = (U, El) is Recomputable/Irrelevant/Decidable... then so too is everything in Harrop 𝕌 etc. (UPDATED: downstream PR, but only once I've figured it out)
  • relationship with the 'Irrelevance Axiom' or @nad 's developments mentioned there. (Ditto.)

@jamesmckinna
Copy link
Contributor Author

jamesmckinna commented Mar 19, 2024

Converting to DRAFT for the time being as I haven't had the brain space to revisit the questions above. UPDATED: punting those downstream!

@jamesmckinna jamesmckinna marked this pull request as draft March 19, 2024 08:25
src/Relation/Nullary.agda Outdated Show resolved Hide resolved
src/Relation/Nullary/Recomputable.agda Outdated Show resolved Hide resolved
src/Relation/Nullary/Recomputable.agda Show resolved Hide resolved
src/Relation/Nullary/Recomputable.agda Outdated Show resolved Hide resolved
src/Relation/Nullary/Negation/Core.agda Outdated Show resolved Hide resolved
src/Relation/Nullary/Negation/Core.agda Outdated Show resolved Hide resolved
src/Relation/Nullary/Reflects.agda Outdated Show resolved Hide resolved
@jamesmckinna
Copy link
Contributor Author

jamesmckinna commented Apr 8, 2024

Now : proofs computed using recompute are irrelevant, so UIP follows immediately from DecidableEquality.
I've added these in as further low-hanging-fruit cherry-picked from #2149
UPDATED: but this construction (recomputable implies constant) should be pulled back as far as Recomputable itself... Now DONE. That's it!

@jamesmckinna
Copy link
Contributor Author

@MatthewDaggitt are you happy with this not being a breaking change now?

@jamesmckinna
Copy link
Contributor Author

As I understand things, there are (now!) two outstanding issues:

  • is this PR breaking or not? I claim it is not, because specifically: in the top-level stdlib API, the public export of recompute (and now, additionally, recompute-constant}) from Relation.Nullary is still that from Relation.Nullary.Decidable (and hence from Relation.Nullary.Decidable.Core), and not that of the newly introduced Relation.Nullary.Reflects.recompute{-constant}.
  • does Agda always has irrelevant projections agda#7193 affect the 'safety' of this PR? From my (limited) understanding of @dolio 's reply to my question there, the answer is also that it does not.

Hope this helps! (And removes any further obstruction to merging...)

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.

After review of the latest stuff: it continues to look good and, this time, does look backwards compatible as well.

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

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

(Reviewing the irrelevance parts): To me, these look like mainstream uses of irrelevance, not affected by agda/agda#7193

@JacquesCarette
Copy link
Contributor

Just need @gallais to re-review.

@jamesmckinna
Copy link
Contributor Author

Just need ... to re-review.

And @MatthewDaggitt ?

@MatthewDaggitt MatthewDaggitt added this pull request to the merge queue Jun 5, 2024
Merged via the queue into agda:master with commit b13a032 Jun 5, 2024
2 checks passed
@jamesmckinna jamesmckinna deleted the recomputable-empty branch June 7, 2024 13:47
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.

is Recomputable
5 participants