Zulip Chat Archive

Stream: new members

Topic: unexpected pattern match fail


Shi Zhengyu (Oct 14 2021 at 03:48):

(deleted)

Shi Zhengyu (Oct 14 2021 at 03:51):

(deleted)

Shi Zhengyu (Oct 14 2021 at 04:04):

Sorry for the previous deletes, I just figured out the previous problem was due to my poor understanding! But this one frustrates me:
I have
image.png
but rw what at funny2 throws error that says
image.png
It's right there ... Why does pattern matching fail to detect it? Or am I somewhere wrong?
Thanks!

Scott Morrison (Oct 14 2021 at 04:37):

Screenshots are not super useful: if you can post a #mwe, we're much more likely to be able to help.

Scott Morrison (Oct 14 2021 at 04:37):

I think we're going to need to have a reproducible context to debug.

Scott Morrison (Oct 14 2021 at 04:38):

Do you by chance have more than one N hypothesis?

Scott Morrison (Oct 14 2021 at 04:39):

(The fact that N appears below funny2 in the hypothesis list makes me suspicious.)

Shi Zhengyu (Oct 14 2021 at 06:48):

Scott Morrison said:

(The fact that N appears below funny2 in the hypothesis list makes me suspicious.)

Yes That is correct! I accidentally added another N into environment .. ! Hope lean have some warnings on variable shadowing in local environment though ...

Shi Zhengyu (Oct 14 2021 at 06:48):

Scott Morrison said:

Screenshots are not super useful: if you can post a #mwe, we're much more likely to be able to help.

I see. Thanks for reminder :D

Scott Morrison (Oct 14 2021 at 07:02):

Hopefully we can be more helpful about shadowing in Lean 4. In Lean 3 it has been hard to avoid.

Mario Carneiro (Oct 14 2021 at 07:13):

Lean 4 should never display shadowed variables in a confusable way, because it puts the dagger on shadowed variables even if that's not in the actual name of the variable


Last updated: Dec 20 2023 at 11:08 UTC