Skip to content

[ refactor ] weaken type of Relation.Nullary.Negation.Core.contradiction-irr #2785

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

Merged
merged 2 commits into from
Aug 2, 2025

Conversation

jamesmckinna
Copy link
Contributor

For justification, see CHANGELOG: this is really a consequence of #2199 and subsequent refactorings of Relation.Nullary.Recomputable{.Properties}. Cf. #2346 which might be worth re-opening?

Very little is affected, except that contradiction now needs to be eta-expanded because there is no subtyping between A → B and .A → B.

For candidate use, see the discussion in #2783 .

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.

Minor but important change. Well spotted.

@jamesmckinna
Copy link
Contributor Author

Minor but important change. Well spotted.

Thanks! But mostly I'm annoyed with myself that this kind of downstream consequence of my introduction and refactoring of Recomputable could/should have been done more or less straight after #2199 , but I was too tired/distracted to follow through, or remember to loop back to these things until now. Better late than never though!

contradiction-irr a ¬a = ⊥-elim-irr (¬a a)

contradiction : A → ¬ A → Whatever
contradiction a = contradiction-irr a
contradiction a ¬a = contradiction-irr a ¬a
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this changed forced? And if so, is this therefore a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Two good questions, to which my evasive, equivocating answers would be: "yes, but...; no, but..."

As in the CHANGELOG, I regard this as a minor improvement : non-breaking, but arguably better move the commentary to non-backwards compatible (at least for the downstream consequences, because the unfolding behaviour of the proposed revised function definitions changes subtly)?

While the suggestion been punted before, I might still argue that the type of contradiction itself should be changed to .A → .(¬ A) → Whatever, but I thought that would be a step too far here... but perhaps one way out is simply to agree here and now that that is what we will do for v3.0 (and get rid of contradiction-irr completely!), and I'll move the milestone on the downstream PRs, but I don't want to have to relitigate these things for a third time then... ;-)

@MatthewDaggitt MatthewDaggitt added this pull request to the merge queue Aug 2, 2025
Merged via the queue into agda:master with commit 35396e4 Aug 2, 2025
12 checks passed
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