Agda: Case splitting generates invalid syntax when there's a `rewrite`

Created on 13 Nov 2017  Â·  3Comments  Â·  Source: agda/agda

Like, if I have:

  a-b=a+-b : ∀ a b → a ⊖ b ≡ + a - + b
  a-b=a+-b zero  zero    = refl
  a-b=a+-b zero (nsuc _) = refl
  a-b=a+-b (nsuc a) b
    rewrite nat-add-comm a 0 = {!!}

And I type C-c C-c b RET in the hole, then I get:

  a-b=a+-b : ∀ a b → a ⊖ b ≡ + a - + b
  a-b=a+-b zero  zero    = refl
  a-b=a+-b zero (nsuc _) = refl
  a-b=a+-b (nsuc a) b
    a-b=a+-b (nsuc a) zero | .a | refl = ?
    a-b=a+-b (nsuc a) (nsuc b) | .a | refl = ?

Which is invalid.

is this a bug?

case-splitting rewrite duplicate bug

All 3 comments

This is a combination of bugs #2340 and and #2087.

Thanks for reporting, I close this as duplicate.

Glad to hear that!

I really appreciate your quick reply! :+1: :smiley:

Unfortunately, the bugs require some extra work to fix, thus, I am a bit pessimistic that they will be attacked soon.

I hope you can work around them!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chirsz-ever picture chirsz-ever  Â·  3Comments

satnam6502 picture satnam6502  Â·  3Comments

nad picture nad  Â·  3Comments

ice1000 picture ice1000  Â·  3Comments

GoogleCodeExporter picture GoogleCodeExporter  Â·  4Comments