-
Notifications
You must be signed in to change notification settings - Fork 238
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
Are Irrelevant
types Recomputable
?
#2495
Labels
Comments
I wouldn't call it trivial, since the version using the record constructor rather than a copattern doesn't work, but it's certainly short: lemma : .(Irrelevant A) → Irrelevant A
irrelevant (lemma [ a ]) = a |
@fredrikNordvallForsberg astonishing! Thanks very much, you've lightened my darkness today. Mind you, these things still baffle me: irrelevant (irrelevant-recomputable [a]) = irrelevant [a] fails, with the dreaded warning Projection irrelevant is irrelevant.
Turn on option --irrelevant-projections to use it (unsafe)
when checking that the expression irrelevant [a] has type A so back to school for me for the interaction of copatterns with irrelevance :-( |
jamesmckinna
added a commit
to jamesmckinna/agda-stdlib
that referenced
this issue
Oct 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue #2493 (and related upstream ones) arose when trying to extend
Relation.Nullary.Recomputable
to include a proof that for anyA
,Recomputable (Irrelevant A)
is provable, i.e.Perhaps this is trivial, but I'm not seeing it (and if it's not provable, then perhaps we need to reconsider the relationship between
Data.Irrelevant
and the dot modality? Never mind the recent extensions to Agda with@0
etc.)Given the definitions (not in
stdlib
)it's clear that
Irrelevant A
is somehow equivalent to.A
, but unfortunately, I can't seem to find a way to provelemma
.NB. If
Irrelevant
were a monad (but it's not: as the type_>>=_ : Irrelevant A → (.A → Irrelevant B) → Irrelevant B
betrays, it's only a 'monad up to irrelevance'), thenlemma
would reduce/be equivalent to the diagonaljoin
...The text was updated successfully, but these errors were encountered: