Zulip Chat Archive

Stream: maths

Topic: 0!


Johan Commelin (May 22 2021 at 15:05):

Is this intentional? (docs#nat.factorial_zero)

@[simp] theorem factorial_zero : 0! = 1! := rfl

Adam Topaz (May 22 2021 at 15:11):

example : 1 = 1 * 1 := rfl

Kevin Buzzard (May 22 2021 at 15:12):

7*8=56 is rfl, it doesn't mean it's helpful :-)

Adam Topaz (May 22 2021 at 15:12):

I guess it's helpful for the simp?

Kevin Buzzard (May 22 2021 at 15:13):

Four lines later we have

@[simp] theorem factorial_one : 1! = 1 := rfl

so in fact factorial_zero as it stands makes simp take more time, not less.

Floris van Doorn (May 22 2021 at 19:23):

@Anatole Dedecker wrote this originally. I think it makes more sense to change the RHS of factorial_zero to 1, but honestly it doesn't matter much.

Johan Commelin (May 22 2021 at 19:32):

I was just surprised that I needed two lemmas in my simp only

Anatole Dedecker (May 22 2021 at 21:12):

I don't think I wrote this lemma, but I did the change from fact to factorial so git blame probably tells it's me

Floris van Doorn (May 23 2021 at 05:11):

#7697


Last updated: Dec 20 2023 at 11:08 UTC