Zulip Chat Archive
Stream: mathlib4
Topic: Siegel's Lemma
Fabrizio Barroero (May 31 2024 at 16:56):
Hi everyone!
During the Lean workshop which took place last January in Roma Tor Vergata, me and some colleagues (@Amos Turchet and @Laura Capuano ), encouraged by @Riccardo Brasca and @Filippo A. E. Nuccio , started a project aiming to prove Siegel's lemma. The first sorry-free proof goes back to the end of last February. During the LFTCM 2024 event I showed some parts of the proof to Riccardo, Filippo and @Floris van Doorn and got some very useful tips that improved the proof quite a lot. Thanks guys! I think it is now time to try to add this to Mathlib. For that I need GitHub permission, my GitHub username is fbarroero
.
Actually, the original long-term plan was to prove some Diophantine Approximation result (e.g. Thue's Theorem or maybe even Roth's Theorem). This is a much more ambitious project which we might start working on during the summer.
Floris van Doorn (May 31 2024 at 17:23):
invite sent
Fabrizio Barroero (May 31 2024 at 17:24):
Floris van Doorn said:
invite sent
Thanks!
Michael Stoll (May 31 2024 at 18:50):
It would be great to have Roth's Theorem!
Fabrizio Barroero (Jun 02 2024 at 16:26):
Michael Stoll said:
It would be great to have Roth's Theorem!
It would surely be great! We will see how far we get...
Yaël Dillies (Jun 02 2024 at 16:43):
Funnily enough, mathlib acquired Roth's theorem yesterday (the other Roth's theorem)
Fabrizio Barroero (Jun 02 2024 at 16:45):
Cool!
Filippo A. E. Nuccio (Jun 02 2024 at 21:29):
Fabrizio Barroero said:
Hi everyone!
During the Lean workshop which took place last January in Roma Tor Vergata, me and some colleagues (Amos Turchet and Laura Capuano ), encouraged by Riccardo Brasca and Filippo A. E. Nuccio , started a project aiming to prove Siegel's lemma. The first sorry-free proof goes back to the end of last February. During the LFTCM 2024 event I showed some parts of the proof to Riccardo, Filippo and Floris van Doorn and got some very useful tips that improved the proof quite a lot. Thanks guys! I think it is now time to try to add this to Mathlib. For that I need GitHub permission, my GitHub username isfbarroero
.
Actually, the original long-term plan was to prove some Diophantine Approximation result (e.g. Thue's Theorem or maybe even Roth's Theorem). This is a much more ambitious project which we might start working on during the summer.
Congratulations! Do not hesitate to tell us the PR numbers as soon as you open them.
Fabrizio Barroero (Jun 02 2024 at 21:43):
Thanks! At the moment I have a problem. I am sure you guys can help me figure it out. I have created a file SiegelsLemma.lean
in the NumberTheory
folder with the first part of the proof. I need a lemma called mulVec_def
which unfolds the definition of mulVec
and I added it to the file Mathlib.Data.Matrix.Basic
. I imported this in my SiegelsLemma.lean
and run lake build Mathlib.Data.Matrix.Basic
. Still, when I call the lemma I get unknown identifier 'mulVec_def'
.
Richard Osborn (Jun 02 2024 at 21:59):
This error happens when you do lake build Mathlib.NumberTheory.SiegelsLemma
?
Kevin Buzzard (Jun 02 2024 at 22:01):
Is it a namespace issue? What happens if you hit ctrl-space after mulVec_def
?
Filippo A. E. Nuccio (Jun 02 2024 at 22:01):
Are you sure that mulVec
is not inside a namespace that you need to open?
Fabrizio Barroero (Jun 02 2024 at 22:01):
Richard Osborn said:
This error happens when you do
lake build Mathlib.NumberTheory.SiegelsLemma
?
No, when the file is open, lean gives me that error
Ruben Van de Velde (Jun 02 2024 at 22:02):
I think the question is - if you try the lake command, does it also happen?
Ruben Van de Velde (Jun 02 2024 at 22:02):
But yes, check the namespace first
Fabrizio Barroero (Jun 02 2024 at 22:04):
It's inside a namespace Matrix, which is opened. In any case I get the same error with Matrix.mulVec_def
.
If I run lake build Mathlib.NumberTheory.SiegelsLemma
I get:
⚠ [1683/1683] Built Mathlib.NumberTheory.SiegelsLemma
warning: ././././Mathlib/NumberTheory/SiegelsLemma.lean:103:22: unused variable i_1
note: this linter can be disabled with set_option linter.unusedVariables false
Build completed successfully.
Filippo A. E. Nuccio (Jun 02 2024 at 22:05):
It would be easier to help you if you can push
this to a PR (that you can mark help wanted
and/or WIP
). Since at any rate you are planning to PR these things, it is perhaps the right moment to open it :smile:
Fabrizio Barroero (Jun 02 2024 at 22:14):
Done! It's #13470
Filippo A. E. Nuccio (Jun 02 2024 at 22:16):
OK, I'm having a look.
Fabrizio Barroero (Jun 02 2024 at 22:18):
Thanks Filippo!
Filippo A. E. Nuccio (Jun 02 2024 at 22:55):
No problem! I have started the review, will finish tomorrow :night:
Richard Osborn (Jun 02 2024 at 23:01):
btw, I believe the reason vscode gave you that error unknown identifier 'mulVec_def'
is because it doesn't always see that an import has changed, and the file needs to be rebuilt. Clicking Restart File
at the bottom of the infoview will fix this (or you can just build the file via the command line)
Filippo A. E. Nuccio (Jun 03 2024 at 07:46):
Yes, @Richard Osborn is right and if you restart the file everything works nicely. I have also started the review to you PR, please feel free to ask questions whenever some of my comments were unclear.
Fabrizio Barroero (Jun 03 2024 at 08:28):
Thanks but I restarted the file... it's still not working...
Fabrizio Barroero (Jun 03 2024 at 08:28):
Thanks for the help, Filippo. It's very useful
Filippo A. E. Nuccio (Jun 03 2024 at 08:44):
Let's advance little by little:
- Is
Mathlib.Data.Matrix.Basic
compiling? - Can you close everything (including VSCode), do a
lake exe cache get
and thenlake build
?
Riccardo Brasca (Jun 03 2024 at 09:32):
You can try lake exe cache get!
to be sure to download everything
Riccardo Brasca (Jun 03 2024 at 09:32):
(note the !
)
Fabrizio Barroero (Jun 03 2024 at 14:48):
Thanks for the help. Unfortunately it still does not work. I have tried on 3 computers and get the same result
Ruben Van de Velde (Jun 03 2024 at 15:05):
So the code builds in our continuous integration but not on any of the three computers you tried? That sounds very surprising
Fabrizio Barroero (Jun 03 2024 at 15:10):
I must be doing something wrong... Also, since today, every time Mathlib is updated, even if I run lake exe cache get
, it builds the imports and it takes forever. I apologise but I am really a Github beginner.
Richard Osborn (Jun 03 2024 at 15:11):
Have you tried lake exe cache get!
?
Fabrizio Barroero (Jun 03 2024 at 15:11):
I did
Richard Osborn (Jun 03 2024 at 15:15):
Ok, when you say "every time Mathlib is updated", what commands/actions are you doing to update mathlib?
Fabrizio Barroero (Jun 03 2024 at 15:16):
I just press Commit in the source control panel of VS code
Richard Osborn (Jun 03 2024 at 15:24):
So until you push your changes to github and let CI build your code, the cache won't make your local builds any faster. If you modify a file in mathlib, all of the files that import it will have to be rebuilt (or if you are building a single file, all the files "between" the modified file and the file you are building will be rebuilt).
Fabrizio Barroero (Jun 03 2024 at 15:27):
I think I understand. Thanks!
Fabrizio Barroero (Jun 03 2024 at 22:35):
I just created the second PR #13487
Last updated: May 02 2025 at 03:31 UTC