[ refactor ] weaken type of Relation.Nullary.Negation.Core.contradiction-irr#2785
Conversation
JacquesCarette
left a comment
There was a problem hiding this comment.
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 |
|
|
||
| contradiction : A → ¬ A → Whatever | ||
| contradiction a = contradiction-irr a | ||
| contradiction a ¬a = contradiction-irr a ¬a |
There was a problem hiding this comment.
Was this changed forced? And if so, is this therefore a breaking change?
There was a problem hiding this comment.
Two good questions, to which my evasive, equivocating answers would be: "yes, but...; no, but..."
- re: the change itself: yes, the eta-expansion was forced because of the (lack of!) subtyping issue between
A → Band.A → B, BUT the original definition could have been written in eta-expanded form, with equivalent semantics, so it's really an artefact of the (my!) lazy choice not to have done so originally...; - re: is it
breaking: I would argue no, in terms of the behaviour of the exported definition ofcontradictionitself, as there is no difference to the type, or uses, or call-sites ofcontradiction; as tocontradiction-irr, yes, indeed so as to enable [ add ] new name forflipped version ofRelation.Nullary.Negation.Core.contradiction#2784 [ deprecate ]Data.Fin.Base.lower₁in favour ofData.Fin.Base.lower#2786 [ refactor ] makei ≢ jargument toData.Fin.Base.punchOutirrelevant #2790 downstream, BUT I would argue that it is abugthat we didn't follow through on the consequences of⊥isRecomputable#2199
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... ;-)
For justification, see
CHANGELOG: this is really a consequence of #2199 and subsequent refactorings ofRelation.Nullary.Recomputable{.Properties}. Cf. #2346 which might be worth re-opening?Very little is affected, except that
contradictionnow needs to be eta-expanded because there is no subtyping betweenA → Band.A → B.For candidate use, see the discussion in #2783 .