-
Couldn't load subscription status.
- Fork 259
[ refactor ] Data.Fin.Properties following #2746
#2782
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
Conversation
|
I'm fairly sure the reason for the error is that Agda eagerly inserts leading implicits but does not insert any past an explicit parameter. So 'indexed' cases such as this would possibly need its own version of 'indexed contradiction`. |
Well... maybe, but that's bad? (from a user/UX perspective? it might be tolerable from a developer perspective, but I don't think it should be...) |
|
The follow-ups on the Agda issue shed quite a lot of light on this (and confirm my rough guess). Andreas' latest message agrees that the UX is bad, but that there are non-trivial technical reasons for it. And a nifty work-around! |
|
|
|
Ha! I'll fix the merge conflict once #2784 has merged. DONE. |
UPDATED:
CHANGELOGrequired! Only existing proofs have been refactored.flip contradictioncf. [ add ] new name forflipped version ofRelation.Nullary.Negation.Core.contradiction#2784NB. I tried to simplify the proof of
injective⇒existsPivotto use<⇒notInjectiveinstead, but it causes a weird explicit/implicit type inference error when trying to obtain a contradiction fromf∘inject!-injectiveand<⇒notInjective...:injective⇒existsPivot {f = f} f-injective i with any? (λ j → j ≤? i ×-dec i ≤? f j) ... | yes result = result ... | no ¬result = contradiction f∘inject!-injective (<⇒notInjective {f = f∘inject! } (ℕ.n<1+n (toℕ i))) where ...yields
(this kind of thing really aggravates me: we have two sub-proofs of
a : Aand¬a : ¬ Ahere, withA = Injective _≡_ _≡_ f∘inject!, but (re-)typecheckingcontradiction a ¬acauses a type error... :-( See agda/agda#8026