Zulip Chat Archive

Stream: general

Topic: mathzoo


Daniel Selsam (Feb 17 2022 at 23:26):

We are excited to announce a new repository for recreational mathematics in Lean: mathzoo. Mathzoo is organized as a collection of "gems" that are both standalone (a short file that depends only on mathlib) and deadend (nothing will ever depend on it). The two main goals of the project are to be fun for students (& others) all over the world and to support AI research in mathematical problem solving.

To get started, we seeded mathzoo with the IMO problems in mathlib and with all of miniF2F. Please submit your favorite gems and spread the word.

Jason Rute (Feb 17 2022 at 23:35):

Is mathzoo going to stay up to date with mathlib?

Junyan Xu (Feb 17 2022 at 23:37):

Minimal maintainance. Gems need not be kept up-to-date with mathlib. Instead, every file must begin with a comment -- #mathlib YYYY-MM-DD <commit> indicating the last known commit against which the file will build.

Daniel Selsam (Feb 17 2022 at 23:39):

Jason Rute said:

Is mathzoo going to stay up to date with mathlib?

The official policy (discussed in the README) is that each gem must start with a "-- #mathlib YYYY-MM-DD <commit>" line indicating a commit that it is known to compile against, and that gems need not necessarily be kept-up-to-date. We will try to keep everything up-to-date but will not be able to guarantee this (depending on the number and diversity of submissions).

Adam Topaz (Feb 17 2022 at 23:41):

I guess one more thing to note is that there seems to be no CI in this repo. I suppose the honor code applies for those who want to submit something?

Daniel Selsam (Feb 17 2022 at 23:45):

Adam Topaz said:

I guess one more thing to note is that there seems to be no CI in this repo. I suppose the honor code applies for those who want to submit something?

We will add CI as soon as we can -- depending on the rate of submissions in the meantime, I may just manually check them.

Jason Rute (Feb 17 2022 at 23:49):

So you won’t allow sorrys? That can definitely mess with AI training.

Daniel Selsam (Feb 17 2022 at 23:53):

Jason Rute said:

So you won’t allow sorrys? That can definitely mess with AI training.

The plan is to allow axiom for statements without proof, but not allow "half-proofs" with sorries in them. Can you please explain your concern?

Jason Rute (Feb 18 2022 at 00:54):

Just that if you mine training data from proofs, you have to be careful to avoid training on proofs with sorry or your model might start to predict it. It is true there are a number of points that you can catch sorries and if it is literally sorry it is easy to filter. The synonyms can be harder to find and account for.

Jason Rute (Feb 18 2022 at 00:55):

I explain some more of the difficulties here: https://github.com/openai/lean-gym/issues/7

Reid Barton (Feb 18 2022 at 01:01):

For axioms you don't have this credit attribution problem at least, right? Because if the model tries to use an axiom that isn't there, it will fail immediately and not at the final kernel check.
Another perspective is that mathlib changes all the time anyways, and an axiom is just a lemma that we imported from a future version of mathlib.

Reid Barton (Feb 18 2022 at 01:02):

The rule could be something like "only allow axioms that are actually true" (e.g. definitely not axiom f : False).

Eric Rodriguez (Feb 18 2022 at 01:04):

axiom iutt : abc_conjecture? ;b I feel like this can easily fall into traps if we're not careful, such as binder-order nonsense

Daniel Selsam (Feb 18 2022 at 01:04):

@Bhavik Mehta suggested encoding statements as def ... : Prop := ... rather than axiom, which would let us avoid axioms but they are more cumbersome to change into theorems since you end up with all variables on the right of the colon.

Daniel Selsam (Feb 18 2022 at 01:05):

@Reid Barton This is not explicit in the README but I was assuming any axiom would be a deadend, i.e. just encode a yet-to-be-proven statement, and would not be allowed to be used in a later proof in the gem. Using def would preempt this issue entirely.

Daniel Selsam (Feb 18 2022 at 01:07):

Jason Rute said:

Just that if you mine training data from proofs, you have to be careful to avoid training on proofs with sorry or your model might start to predict it.

Isn't this an argument for not allowing sorrys in the zoo?

Reid Barton (Feb 18 2022 at 01:09):

Yeah I hadn't read the whole README yet, I thought this was about using axioms in proofs. If axiom is being used to formalize conjectures rather than prove things then maybe that should be explicit metadata somewhere, or maybe we just say that axiom is self-describing as being for this purpose.

Reid Barton (Feb 18 2022 at 01:10):

I guess once upon a time there was conjecture, right?

Daniel Selsam (Feb 18 2022 at 01:17):

A conjecture command that is sugar for def ... : Prop := ... might work. Another option is to just go back to not allowing statements without proofs.

Reid Barton (Feb 18 2022 at 01:27):

I think the status quo is fine--I assume it's easy enough for anyone processing Lean input to just ignore axiom declarations

Reid Barton (Feb 18 2022 at 01:28):

From what I understand, implementing a def-like command is not that trivial.

Reid Barton (Feb 18 2022 at 01:29):

Might be worth clarifying whether "sorry-free" also means without adding axioms.

Reid Barton (Feb 18 2022 at 01:33):

BTW, I'm a fan of the boldly incongruous terminology "zoo" and "gem".

Daniel Selsam (Feb 18 2022 at 01:56):

Reid Barton said:

BTW, I'm a fan of the boldly incongruous terminology "zoo" and "gem".

:laughing: @Rob Lewis commented on this as well -- if anyone has a candidate for a good, congruent pair of names (one for the repo, one for the individual problems) it isn't too late to change. I personally like "mathzoo" and "gem" so much individually that I am willing to overlook the incongruity.

Jason Rute (Feb 18 2022 at 01:59):

@Daniel Selsam sorry my original statement was ambiguous of where the negative was. Sorry can mess things up and removing them is good. I think you are doing it correctly. Sorry for the confusion.

Matthew Ballard (Feb 18 2022 at 02:03):

mathagerie/specimath ?

Daniel Selsam (Feb 18 2022 at 02:07):

MathGems could work but mathgems looks "phlegmy" to me.

Rob Lewis (Feb 18 2022 at 02:31):

I had suggested MathMine, but the metaphor is backwards, you don't put gems into a mine. It also has echoes of bitcoin

Rob Lewis (Feb 18 2022 at 02:31):

And it's fun to imagine Daniel as a zookeeper with a diamond-studded zookeeper's hat

Mario Carneiro (Feb 18 2022 at 02:31):

if it's a zoo, then wouldn't the files be exhibits?

Adam Topaz (Feb 18 2022 at 02:34):

(deleted)

Adam Topaz (Feb 18 2022 at 02:34):

(I'm not insinuating anything about the actual content of the gems.)

Mario Carneiro (Feb 18 2022 at 02:35):

Oh my, is it a backhanded compliment for high-schooler proofs?

Adam Topaz (Feb 18 2022 at 02:40):

Mario Carneiro said:

Oh my, is it a backhanded compliment for high-schooler proofs?

Sorry... too much potential for that joke to be taken the wrong way...

Adam Topaz (Feb 18 2022 at 02:45):

In any case, do you think the word "gem" might confuse some ruby folks?

Adam Topaz (Feb 18 2022 at 02:46):

I don't know anything about ruby except for the fact that they use "gems"

Yakov Pechersky (Feb 18 2022 at 02:47):

Gems remind of "functional pearls" from Haskell and other places

Adam Topaz (Feb 18 2022 at 02:48):

Oh yeah!

Kyle Miller (Feb 18 2022 at 02:49):

I thought of Ruby gems, too, but then it reminded me of functional pearls as well, and in any case it's not a library of libraries in the same way as ruby gems.

Kyle Miller (Feb 18 2022 at 02:50):

I like how at https://complexityzoo.net/Complexity_Zoo they have a zookeeper, a veterinarian, and a conservationist.

Rob Lewis (Feb 18 2022 at 02:51):

ITP uses "proof pearl" in its call for papers: "concise and elegant worked examples of formalizations (proof pearls)"

Kyle Miller (Feb 18 2022 at 03:06):

Mario Carneiro said:

if it's a zoo, then wouldn't the files be exhibits?

GEMs Exhibit Mathematics


Last updated: Dec 20 2023 at 11:08 UTC