Zulip Chat Archive

Stream: lean4

Topic: choose neg


oishi (Nov 08 2024 at 13:58):

how can i proof this? since (0-1) is Nat, in lean4, this will be 0-1 = 0. how can i proof this right?

lemma choose_neg (n:) : n.choose (0 - 1) = (0:) := by sorry

Julian Berman (Nov 08 2024 at 14:17):

Have a look at #backticks which will help you format your message for Zulip.

As for your question, it's false -- n choose 0 is 1, not 0:

lemma choose_neg (n:) : n.choose (0 - 1) = (1:) := by norm_num

oishi (Nov 09 2024 at 07:35):

Julian Berman said:

Have a look at #backticks which will help you format your message for Zulip.

As for your question, it's false -- n choose 0 is 1, not 0:

lemma choose_neg (n:) : n.choose (0 - 1) = (1:) := by norm_num

Thanks. However, I want to proof n.choose (-1) actually.
The "choose" is defined on the set of natural numbers, and I would like to know how it can be extended to integers. Should choosing a negative number be equal to 0?

Johan Commelin (Nov 09 2024 at 09:40):

This discussion seems relevant: #Is there code for X? > Choose on integer

oishi (Nov 09 2024 at 16:18):

That's helpful. Thanks a lot!!!


Last updated: May 02 2025 at 03:31 UTC