Zulip Chat Archive

Stream: batteries

Topic: reorganization for `omega`


Kim Morrison (Jan 16 2024 at 03:41):

It's been suggested that I try a reorganization in Std to make it possible to use omega earlier, e.g. in Std.Data.Int.Lemmas, or even earlier. Because omega needs various lemmas about Nat and Int, this would involve some annoying reorganization.

I just did a little experiment, and determined that I currently need about 1/4 of Std.Data.Int.Lemmas in omega (presumably this could be shrunk: this is just the fraction that can't be deleted with breaking something).

I worried it would be pretty unsatisfactory to split Std.Data.Int.Lemmas into two files solely on the criterion "does omega want this"...

An alternative would be to copy and paste that 1/4 of Std.Data.Int.Lemmas into a private namespace inside omega, and not worry about the duplication. Not ideal either!

Kim Morrison (Jan 16 2024 at 03:42):

@Mario Carneiro, any thoughts?

Mario Carneiro (Jan 16 2024 at 03:44):

I think splitting big files is a good idea, big files (especially if there is a significant difference in prerequisites between the top half and the bottom half) are a major contributing factor to unnecessary imports, and even if all the theorems are independent it's a good idea to split files for additional parallelism

Kim Morrison (Jan 16 2024 at 03:45):

Okay, maybe I will hack at Std.Data.Int.Lemmas for a bit more.

Mario Carneiro (Jan 16 2024 at 03:46):

although one can conversely argue that this would add Omega as a big additional dependency of half of Std.Data.Int.Lemmas

Kim Morrison (Jan 16 2024 at 03:46):

Yes...

Mario Carneiro (Jan 16 2024 at 03:47):

I can't wait for us to be able to ship precompiled omega just like we ship precompiled simp

Kim Morrison (Jan 16 2024 at 03:47):

For now I will just see if I can find any reasonable splits, without actually importing omega anywhere new.

Kim Morrison (Jan 16 2024 at 03:48):

If you want that then I would be copy-pasting what I need out of Std into omega.

Mario Carneiro (Jan 16 2024 at 03:48):

what is "that"?

Mario Carneiro (Jan 16 2024 at 03:49):

oh you mean that if we precompiled omega in a separate library then half of Std.Data.Int.Lemmas would also be in that lib

Kim Morrison (Jan 16 2024 at 03:49):

Yes.

Mario Carneiro (Jan 16 2024 at 03:49):

ultimately I think we want to just precompile all of std

Kim Morrison (Jan 16 2024 at 03:50):

Definitely.

Mario Carneiro (Jan 16 2024 at 03:50):

so I won't make a big fuss about using omega in std

Kim Morrison (Jan 16 2024 at 04:57):

std4#534 is my initial attempt at a split of Std.Data.Int.Lemmas, but doesn't involve omega at all yet.

Kim Morrison (Jan 16 2024 at 05:00):

(ooh, great milestone, 534 is the best siteswap)

Mario Carneiro (Jan 16 2024 at 05:01):

what's this reference?

Kim Morrison (Jan 16 2024 at 05:02):

https://juggle.fandom.com/wiki/534

Kim Morrison (Jan 16 2024 at 05:03):

"siteswaps" is the bijection between (certain) juggling patterns and S_n x N^n.

Kim Morrison (Jan 16 2024 at 05:05):

And 534 is "the best" because it is fairly difficult but learnable by mortals, but possibly no one would have ever thought to try it without knowing this bijection first. :-)

Eric Rodriguez (Jan 17 2024 at 08:33):

What's the situation with precompiled tactics etc at the current moment?

Eric Wieser (Jan 18 2024 at 01:17):

Mario Carneiro said:

I can't wait for us to be able to ship precompiled omega just like we ship precompiled simp

Does this affect dependency considerations, or is it just a really-nice-to-have tangent?

Mario Carneiro (Jan 18 2024 at 03:26):

It lowers the cost of having dependencies. Lean itself is a pretty big dependency and the only reason we can use it (mostly) freely is because it is precompiled


Last updated: May 02 2025 at 03:31 UTC