Zulip Chat Archive

Stream: new members

Topic: rw fails lin alg game


Andrea Bourque (Nov 19 2025 at 09:15):

Hi, I'm doing the linear algebra game and I get this rw failure
image.png

Andrea Bourque (Nov 19 2025 at 09:15):

I tried specifying (0:K) and it still fails

Riccardo Brasca (Nov 19 2025 at 09:20):

Can you give a link to the game? VectorSpace is not a mathlib thing, so it's a little bit difficult to answer without being able to modify the code

Andrea Bourque (Nov 19 2025 at 09:21):

https://adam.math.hhu.de/#/g/zrtmrh/linearalgebragame/world/VectorSpaceWorld/level/1

Riccardo Brasca (Nov 19 2025 at 09:22):

Can you also provide the code you used to get to your goal?

Andrea Bourque (Nov 19 2025 at 09:25):

apply add_right_cancel (b := 0•w)
rw [zero_add]

Riccardo Brasca (Nov 19 2025 at 09:33):

The problem is the line add_right_cancel (b := 0•w)

Riccardo Brasca (Nov 19 2025 at 09:33):

Lean thinks that 0 is the natural number 0

Riccardo Brasca (Nov 19 2025 at 09:35):

So after apply add_right_cancel (b := 0•w) the goal is

0  w + 0  w = 0 + 0  w

but the first 0 is in K and the second one is in , and now Lean is confused.

Riccardo Brasca (Nov 19 2025 at 09:40):

If you write

  apply add_right_cancel (b := (0 : K)w)
  rw [zero_add,  smul_add]

it works

Andrea Bourque (Nov 19 2025 at 16:17):

thanks!


Last updated: Dec 20 2025 at 21:32 UTC