[Agda] Path to success with Agda?

Andrew Pitts Andrew.Pitts at cl.cam.ac.uk
Tue Aug 30 10:42:55 CEST 2022

> On 30 Aug 2022, at 09:29, Miëtek Bak <mietek at bak.io> wrote:
>> On 30 Aug 2022, at 09:58, Andrew Pitts <Andrew.Pitts at cl.cam.ac.uk> wrote:
>> So I wanted to mention the humble “case” expression, which functional programmers can more easily relate to, maybe. It’s less powerful that “with”, but sometimes works (wrt the not typechecking thing) when “with” won’t.
> It would be interesting to see an example in which `case` works and `with` does not.

I have some and will try to extract them from their context when I get a mo. However, I should qualify what I said:

  "but sometimes [case] works (wrt the not typechecking thing) when “with” won’t”

What I really meant was that, at the time, it was easier for me to use a “case" expression than to figure out how to still use “with” by moving lemmas to the top level, generalizing arguments a bit more, etc, etc. I expect there’s always a way with “with”. 

And if you are heavily in to using “rewrite” (“with” disguised), then I guess “case” is not helpful.


More information about the Agda mailing list