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
Irrelevance bug to prove false #610
Comments
Oh, and I built Agda a couple of weeks ago. I was also surprised that it didn't ask me to postulate an Original comment by |
Original comment by
|
There's a simpler to define .ack : A → Set
ack x = A.a x
Original comment by |
Thanks for reporting these bugs. I am currently fixing the first one (modules and irrelevance), but the second one is independent (with and irrelevance). Original comment by |
Fixed. The Original comment by
|
Sometimes they come back: open import Data.Unit
open import Data.Empty
open import Relation.Binary.PropositionalEquality
data A : Set₁ where
set : .Set -> A
module M .(x : Set) where
.out : Set
out = x
.ack : A → Set
ack (set x) = M.out x
hah : set ⊤ ≡ set ⊥
hah = refl
.moo : ⊥
moo with cong ack hah
moo | q = subst (λ x → x) q _
baa : .⊥ → ⊥
baa ()
yoink : ⊥
yoink = baa moo |
I guess we'll have to reset the counter again. Note that this time, it isn't necessary to use .moo : ⊥
moo = subst (λ x → x) (cong ack hah) tt Is the application |
I suspect that the problem is .out : .(x : Set) → Set
out x = x you get an error. Although I have to admit I'm not exactly sure what the rules are for irrelevant definitions. |
I'm not either. But it feels like the bodies of irrelevant definitions have to be protected by a |
But they have been parsed ok for a while...
When we were fooling around with irrelevance in #agda today, James Deikun found
that if you name your where modules in irrelevant contexts, you can make that
which is irrelevant relevant again, with some other trickery:
An odd aspect to this hack is that
cong ack hah
does not have type⊤ ≡ ⊥
,but rather has type
.(⊤) ≡ .(⊥)
which is actually considered distinct andwon't unify. Luckily, in the irrelevant moo function above,
.(⊤) ≡ .(⊥)
magically turns into
⊤ ≡ ⊥
again, and we can do great evil again.Original issue reported on code.google.com by
pumpkingod@gmail.com
on 16 Apr 2012 at 9:17The text was updated successfully, but these errors were encountered: