Zulip Chat Archive

Stream: new members

Topic: natural numbers world ... advanced addition world


Robert Watson (Feb 24 2022 at 16:54):

Hi there, I'm working through the natural numbers game and am stuck on advanced addition world 13 that asks for a tactics proof of n \ne succ n. I think I'm stuck because I keep thinking of it in terms of recursion, and I'm pretty sure I can't do recursive proofs with tactics. Some pointers would be great. (also I'm doing something wrong with the code formatting here, where I tried to use backticks but it didn't display \ne correctly?)

Daniel Packer (Feb 24 2022 at 17:24):

I'm not sure what you mean by recursion, but at least when I did this proof I didn't use induction. That said, the main idea was to reduce the problem to a state where I could use zero_ne_succ. I'm happy to give more hints if you'd like--I don't want to ruin your fun, though!
Re: code formatting, I generally just copy and paste the unicode into the backticks: n ≠ succ n. Maybe someone else has a better way?

Robert Watson (Feb 24 2022 at 17:29):

Yeah, I need one more hint. I was already doing that. The trouble is I was ending up with a sort of loop as I was using induction.

Daniel Packer (Feb 24 2022 at 17:32):

Ahh, the other lemma that was "key" was rw add_right_cancel_iff at g,

Robert Watson (Feb 24 2022 at 17:32):

great thanks.

Arthur Paulino (Feb 24 2022 at 17:41):

Daniel Packer said:

Re: code formatting, I generally just copy and paste the unicode into the backticks: n ≠ succ n. Maybe someone else has a better way?

Robert Watson (Feb 25 2022 at 09:08):

´
intro g,
rw succ_eq_add_one at g,
rw (add_right_cancel_iff 0 n (n + 1)).1 at g,
rw add_assoc at g,
rw (add_left_cancel n 1 2) at g,
´

I don't think my problem here is which tactic to use in principle. It's something more fundamental to do with the hidden details of the tactics. In the above code when I apply cancel the number of required goals increases. But the idea of the cancelation is to decrease the number of goals! I just end up increasing the number of goals with each cancelation. This is essentially what I was also doing before when I was trying to solve it with the induction tactic.

Kevin Buzzard (Feb 25 2022 at 09:11):

#backticks

Robert Watson (Feb 25 2022 at 09:13):

I have an italian keyboard. It has no backticks!

Kevin Buzzard (Feb 25 2022 at 09:14):

Oh no!

If I do what you did above, I end up with three goals, two of which look fine, and one of which is to prove that n + 2 ≠ n + 4, which seems harder than the original question, making me think that you're going in the wrong direction.

Kevin Buzzard (Feb 25 2022 at 09:21):

Sure the number of goals you get increases with your method: you are rewriting a theorem of the form X -> (a = b) so it will rewrite the a's to b's but it won't forget the promise that you're making, namely that X is true; it will add it as a new goal.

Robert Watson (Feb 25 2022 at 09:21):

intro g, rw succ_eq_add_one at g, rw (add_right_cancel_iff 0 n (n + 1)).1 at g, rw (add_right_cancel n 1 (n + 1)) at g,

Kevin Buzzard (Feb 25 2022 at 09:21):

#backticks

Robert Watson (Feb 25 2022 at 09:22):

This is worse of course. (By the way the above is formatted with alt-96,. backtick...it isn't working for me)

Kevin Buzzard (Feb 25 2022 at 09:22):

As the link explains, you need to use three backticks on a single line by itself. Click on the three dots for this message and then "view source":

intro g,
rw succ_eq_add_one at g,
rw (add_right_cancel_iff 0 n (n + 1)).1 at g,
rw (add_right_cancel n 1 (n + 1)) at g,

Robert Watson (Feb 25 2022 at 09:24):

Ah, sorry, thought it wasthe same link! Got it. Thanks.


Last updated: Dec 20 2023 at 11:08 UTC