« first day (8 days earlier)      last day (56 days later) » 

 
3 hours later…
04:54
Halp plz
I'm trying to do the naturnal number game
But I'm stuck on addition level 2
I have
induction b with d hd,
rw zero_add,
rw add_zero,
refl,
rw add_succ,
induction a with e hd,
rw zero_add,
rw zero_add,
refl,
if you're ever stuck with seemingly nowhere to go try picking a different induction condition
b is in brackets in both sides so it's probably the hardest one lol
Oof
Thx
Problem is, after:
induction a with d hd,
rw zero_add,
rw zero_add,
refl,
I get succ d + b + c = succ d + (b + c)
Which is the same case, except with d replaced with succ d, and I can't rw anything.
4 mins ago, by hyper-neutrino
if you're ever stuck with seemingly nowhere to go try picking a different induction condition
c then?
well, what else :P
05:05
Nah, c has the same problem. Induction again?
Wait no, nvm
what do you have right now
induction c with d hd,
rw add_zero,
rw add_zero,
refl,
rw add_succ,
Becomes succ (a + b + d) = a + (b + succ d)
you're on the right track
05:07
Got it!
induction c with d hd,
rw add_zero,
rw add_zero,
refl,
rw add_succ,
rw hd,
rw add_succ,
rw add_succ,
refl,
nice
i had the same thing but with rw hd right before the final refl
On to succ_add
Meanwhile, you should goto sleep
Does lean have anything like gotos?
rw sleep
That was a lot easier.
05:20
All I've managed to do for add_comm is to get right back to where I started.
05:31
what do you have so far
05:57
pinging @emanresuA for good measure
lol
06:19
hey could we have like a sync meeting or something to onboard new members? because there are many people who are new to lean and it would be hard to help over chat
maybe we can have a live coding session perhaps
and also it's somewhat hard to install lean so i'd like to help with that too
06:44
Did it!
And in only eight lines too
neat lol
congrats
 
1 hour later…
08:00
I somehow got a "type mismatch"
@emanresuA wait wait type mismatch? can you post your code and a screenshot of the Natural Number Game website
Oh wait
I forgot the rw
Big brain moment
lol
hey @emanresuA can you clear the goal now
hint: just spam rw add_comm, rw zero_add and rw succ_add. and then when the goal is rewritten to something similar to the induction hypothesis, just use the induction hypothesis to clear the goal
I'll try
08:09
Apparently with this one I'll at some point need to be more specific with rw so I'll do that when I get to it
remember that when you use lean with mathlib, you can use the nth_rewrite tactic to specify where you want to rewrite the equation. mathlib is not available here though, this is just fyi
and most of the time i use that tactic rather than the conv tactic
I'm going to try multiplication now
08:18
Hm, refl accepts 0 * 0 = 0...
It seems to accept any true statement with no variables
08:33
lol
actually thats incorrect
but then i don't fully understand lean either, like sometimes refl solves trivial goals
but sometimes it fails to do so
and you need more high powered tactics like norm_num or simp or rw or stuff
you don't need to fully understand what a tactic does
i just have an intuition of how "strong" a given tactic is
i don't quite remember the internal workings of the tactics
For mul_add, should I be doing induction with t, or one of a or b?
t seems like a dead end to me...
08:50
@emanresuA Nested induction has some strange behaviors, I believe you can get through the natural number game without using it.
09:21
Ah yes, I do love suc_mull.
lol
in the natural number game you don't need to do nested induction at all but you do need to generalize some variables
actually nested induction doesn't have any "strange behaviors" as long as you clear all the hypotheses that are like irrelevant
using the clear or the clear_except tactic
alternatively you can also use have instead of nested induction
@emanresuA can you solve the goal now?
hmm tbh resolving issues over chat is extremely hard
I'm p sure no one in here knows how to actually install lean
@HuỳnhTrầnKhanh Never mind, got it a while ago,.
Multiplication complete!
09:41
@HuỳnhTrầnKhanh Yes, but the natural number game doesn't cover this point.
10:34
ok so as the chat is relatively inactive i would like to bring the sync meeting idea up again
because on the xena project discord server people usually share their screen to get help
so we should do something similar
because lean errors are extremely tricky to debug over chat
this can cost you several days if you try to figure them out on your own
the natural number game is relatively simple. actual lean theorems are much more complicated
installing lean is also next to impossible if you're not familiar with lean, even if you are familiar with how to install software in general
I'm generally p helpful lol
so if you don't find this idea problematic then it might be easier for me to help people lol
@WheatWitch Even pow_pow?
I'll check.
But remember you can use lemmata
10:49
?
No idea
What's lemmata?
@emanresuA you're supposed to generalize variables
@emanresuA Things you have already proved.
@WheatWitch Oh, those
10:51
You can see what's available on the left hand bar.
Yes I use those a lot, I just didn't recongines the name
because they're not really called lemmata in the interface lol
Well iirc it sometimes declares them with lemma.
11:15
@emanresuA Yes. It's not only possible but it's probably easier than double induction.
@WheatWitch Oh well, that's how I did it
Induction on m works, idk if other inductions work that's the first one I guessed.
induction m,
rw pow_zero,
rw zero_mul,
rw one_pow,
rw pow_zero,
refl,
rw pow_succ,
rw mul_pow,
rw succ_mul,
rw pow_add,
rw m_ih,
refl,
in fact, I've never heard of "double induction" before. if you're not golfing, you're supposed to use have or generalize variables. and yeah use existing theorems as well
Sometimes you can't generalize the variables.
For example my rev_rev solution uses nested induction and you can't generalize on that one.
11:24
yeah normally you would use a have block
If you seem to need induction twice, you probably need a lemma for the inner one
lemmata are expensive though.
It doesn't help much with golfing but at least it helps a lot with finding a working answer
11:27
I find it pretty hard to de-saturate your lemmata once you've made them.
wdym by desaturate
It's easy to find a solution but it doesn't translate very easily into the case I actually want.
@HuỳnhTrầnKhanh Remove the lemma.
yeah yeah ITP is very, like, cumulative. for a lot of things you need to prove a lot of silly lemmas (or lemmata) and then maybe tag them with @[simp] before working on the actual proof
that's why mathlib is tremendously useful
Powers done!
The real game starts with the right side ;)
The powers sort of seemed like they were starting to get to be busy work. The right side is certainly more interesting.
But making you do a bunch of proofs twice was annoying.
tbh i find the inequality level somewhat difficult but other levels are like normal
but this is because I've read about peano arithmetic before doing the NNG
11:52
remember: if you're stuck on a level, you can always read the solutions.
can someone pin this link
Argh functions are confusing
@emanresuA use apply or have
hmm I'm still here, ping me if you have any questions
12:08
I should probably go to sleep now so o/
lol
good night
~~and this is the 4th time i post this message lol~~
6 hours ago, by Huỳnh Trần Khanh
hey could we have like a sync meeting or something to onboard new members? because there are many people who are new to lean and it would be hard to help over chat
I'm not being annoying or anything but lean is a very weird piece of software lol
12:22
just ignore the message i posted in tnb
and discuss it here lol
 
1 hour later…
13:27
so... when people on the western side of the earth wake up, please: pin the NNG solution link (posted above), and tell me whether its okay for me to hold sync meetings or not
thank you
actually you can star that message
that would be ok too
Wake up? It's like 15:32 here. I just forgot to pin.
I'll add you and bubbler as ROs
Now y'all can pin stuff when I'm not awake or not paying attention.
14:04
thanks
 
8 hours later…
22:15
@HuỳnhTrầnKhanh Really? elan was not terribly hard to set up (no Windows installer, but all you do is run some stuff in cmd/pwsh)

« first day (8 days earlier)      last day (56 days later) »