Skip to content

Conversation

@jamesmckinna
Copy link
Contributor

@jamesmckinna jamesmckinna commented Aug 4, 2025

The inevitable breaking consequence of #2785 , designed as a 'cleaning of the stables'.
Cf. #2346 whose intention it follows.
Currently duplicates functionality from #2803 ; will tidy up once that is merged.

Downstream consequence:

  • some uses of contradiction internally need eta-expansion (and this may be regarded as a UX failure...?)
  • consequently, so too may some client uses of this definition elsewhere (but no others in stdlib that I can find)

TODO:

Consider also:

  • refactoring Relation.Nullary.Reflects to make its various arguments definitionally proof-irrelevant
  • deprecating/removing Relation.Nullary.Negation.Core._¬-⊎_ in favour of contradiction₂, or else change its type as well; its one use in stdlib is inReflects, so could be refactored in any case via ¬-recompute and inlining...
  • ...

@jamesmckinna jamesmckinna added this to the v3.0 milestone Aug 4, 2025
length zs ≤⟨ ℕ.n≤1+n (length zs) ⟩
length (z ∷ zs) ≤⟨ length-mono-≤ rs ⟩
length ys₁ ∎) $ ℕ.<-irrefl ≡.refl
length ys₁ ∎) (ℕ.<-irrefl ≡.refl)
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps don't roll in such pure, non-breaking style changes in to something breaking and make a separate (if tiny) PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a style change; it's yet another 'feature' of irrelevant function spaces: _$_ is no longer well-typed!

Copy link
Contributor

Choose a reason for hiding this comment

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

So do we need a new variant for _$_ that would be?

@jamesmckinna
Copy link
Contributor Author

jamesmckinna commented Aug 4, 2025

Thanks @JacquesCarette for the speedy feedback (on a DRAFT PR for v3.0!).

For most of your queries, eta-expansion is needed because there's no (contravariant) subtyping between .A → B and A → B.

As for the ones which seemingly contradict #2653 , see #2803 : don't use contradiction where simple application will do instead! (Ie use of negation sometimes happens in the minimal logic fragment, without needing ex falso at all)

@jamesmckinna
Copy link
Contributor Author

It's still DRAFT, and in any case v3.0, but it'll need to wait for any dust to settle from #2797 #2803 and #2805 etc. before proceeding!

@jamesmckinna jamesmckinna added the status: blocked-by-issue Progress on this issue or PR is blocked by another issue. label Aug 6, 2025
@jamesmckinna
Copy link
Contributor Author

Reconsidering whether this is even worthwhile: logically it makes sense, but ergonomically, it's such a pain.

@JacquesCarette
Copy link
Contributor

Reading this code, I get the same impression: ergonomically, agda's proof irrelevance leaves much to be desired. Is there any conclusion from here that can be up-streamed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking discussion library-design refactoring status: blocked-by-issue Progress on this issue or PR is blocked by another issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants