Zulip Chat Archive

Stream: general

Topic: A newbie question and Is there a newbie friendly channel?


B YI (Jul 14 2024 at 07:28):

I have a question related to the lean game server.

My question is that why I can't apply hn at h in the screenshot?

Failed to find succ 0 = succ (succ nn) as the type of a parameter of succ 0 = succ nn  0 = nn.

screenshot-2024-07-14-15-24-44.png

Edward van de Meent (Jul 14 2024 at 07:43):

what would you expect to happen?

Edward van de Meent (Jul 14 2024 at 07:45):

also, to answer the question in the title: that's #new members

Kevin Buzzard (Jul 14 2024 at 08:00):

You can't apply hn because the hypothesis of hn doesn't match h, there's an extra succ in h.

B YI (Jul 14 2024 at 08:07):

The hypothesis of hn is more general than h. I thought I can still apply it (like apply a value of a subtype to a function).

Kevin Buzzard (Jul 14 2024 at 08:10):

No, both hn and h are statements about a specific number nn in your context. They do not say "for all numbers nn...".

B YI (Jul 14 2024 at 08:11):

Got it. Thanks.

Kevin Buzzard (Jul 14 2024 at 08:11):

If you had a number x in your context and also a proof hx : x = 37 then you would not be able to deduce that all numbers were equal to 37. It's the same phenomenon here.

Kevin Buzzard (Jul 14 2024 at 08:12):

Lean's logic can be brutal at times :-)


Last updated: May 02 2025 at 03:31 UTC