Zulip Chat Archive
Stream: general
Topic: freek.yaml
Johan Commelin (May 15 2020 at 07:59):
Given #2686 and our recent attempts at creating yaml lists that can be auto-nicified into websites. Should we start a freek.yaml
somewhere?
Johan Commelin (May 15 2020 at 07:59):
I think we already had a list somewhere of what was done
Bryan Gin-ge Chen (May 15 2020 at 08:00):
I made an issue earlier today: https://github.com/leanprover-community/leanprover-community.github.io/issues/14
Chris Hughes (May 15 2020 at 08:04):
There's a 100-thms
branch with the list. I don't think that's the best place for it.
Bryan Gin-ge Chen (May 15 2020 at 08:04):
Yeah, I should have copied the link to @Floris van Doorn's list from my issue: https://github.com/leanprover-community/mathlib/blob/100-thms/docs/100-theorems.md
Johan Commelin (May 15 2020 at 08:06):
Aah, right, the branch. Completely forgotten about that.
Bryan Gin-ge Chen (May 15 2020 at 08:09):
We recently moved all the other files like this to the website, so I agree that we should move the info there to the website. I don't much mind whether it's in YAML form or markdown.
Johan Commelin (May 15 2020 at 08:14):
I think it should something like
freek:
1:
- title: The Irrationality of the Square Root of 2
- decl: irr_sqrt_two
- author: mathlib
2:
- title: Fundamental Theorem of Algebra
- decl: analysis.complex.exists_root
- author: Chris Hughes
Johan Commelin (May 15 2020 at 08:14):
All the other stuff can be auto-generated, and kept up to date. If the name of a decl
changes, the check-broken-link script will notify us.
Johan Commelin (May 15 2020 at 08:47):
I've almost converted the list into a yaml
Johan Commelin (May 15 2020 at 08:54):
https://gist.github.com/jcommelin/61d3cc00744aa0b445c9f182d0044885
Johan Commelin (May 15 2020 at 08:54):
It will need a little bit of extra post-processing, I guess
Johan Commelin (May 15 2020 at 08:54):
But that is better discussed once we know exactly how we want to parse it
Patrick Massot (May 15 2020 at 09:08):
I'm not convinced this is a good idea, unless someone wants to push through this list.
Johan Commelin (May 15 2020 at 09:08):
What is the downside?
Yury G. Kudryashov (May 15 2020 at 09:08):
For No. 38 you can put real.am_gm_weighted
from analysis/mean_inequalities
Yury G. Kudryashov (May 15 2020 at 09:09):
No. 46 should be in quadratic_discriminant
Jalex Stark (May 15 2020 at 09:09):
"push through this list" = "prove the rest of the theorems"?
Patrick Massot (May 15 2020 at 09:09):
This list is 100% about communication, and we are not doing well on this (arguably not so interesting) target
Patrick Massot (May 15 2020 at 09:10):
I mean we can maintained this list, but displaying on the website seems like a bad idea
Yury G. Kudryashov (May 15 2020 at 09:10):
quadratic_eq_zero_iff_discrim_eq_square
Johan Commelin (May 15 2020 at 09:10):
Maintaining is important. Because the number on Freek's website is there.
Johan Commelin (May 15 2020 at 09:10):
It better go up
Yury G. Kudryashov (May 15 2020 at 09:11):
We miss many simple problems because we have no high school geometry.
Patrick Massot (May 15 2020 at 09:11):
I wouldn't display this list anywhere before we hit 75
Johan Commelin (May 15 2020 at 09:11):
Yury G. Kudryashov said:
quadratic_eq_zero_iff_discrim_eq_square
That's not about quartics, right?
Jalex Stark (May 15 2020 at 09:11):
Johan Commelin said:
It better go up
your point is that people are "grading" the Lean theorem prover by its score on this list?
Johan Commelin (May 15 2020 at 09:12):
Patrick Massot said:
I wouldn't display this list anywhere before we hit 75
That's fine. But let's keep a log. And let's tell Freek when he should bump the number on his site.
Patrick Massot (May 15 2020 at 09:12):
Only people who use proof assistants that are above 70
Johan Commelin (May 15 2020 at 09:12):
@Jalex Stark some people do. I think Freek's list get's quite a lot of hits.
Patrick Massot (May 15 2020 at 09:13):
I'm not a fan of this list, because it has not much mathematical meaning and is very poorly specified. But indeed people know about it, and I think it can be a nice project to work on it, especially since many easy things are missing
Rob Lewis (May 15 2020 at 09:13):
I don't think the list is particularly useful. But Freek's site does get a fair amount of traffic and right now it directs here: https://github.com/leanprover-community/mathlib/blob/100-thms/docs/100-theorems.md
I think it doesn't hurt to make a nicer landing page than that, since people will see it anyway. I don't care in the slightest if we link to that landing page from our site.
Johan Commelin (May 15 2020 at 09:13):
I agree, I'm not a fan either.
Patrick Massot (May 15 2020 at 09:14):
Jalex, I'm sure you can contribute a couple of them
Johan Commelin (May 15 2020 at 09:15):
Why don't we turn them into Kata? Outsource the problem (-;
Jalex Stark (May 15 2020 at 09:15):
that doesn't actually outsoruce the problem :P
Rob Lewis (May 15 2020 at 09:16):
For reference, cs.ru.nl (Freek's site) is the third biggest referrer to the mathlib repo over the last two weeks (I think). Second only to GitHub and Twitter.
Patrick Massot (May 15 2020 at 09:16):
For instance it seems we don't have 10:Euler's Generalization of Fermat's Little Theorem. If this is indeed missing then you can fill it in half an hour
Johan Commelin (May 15 2020 at 09:16):
I think we actually have it
Patrick Massot (May 15 2020 at 09:16):
People are crazy
Johan Commelin (May 15 2020 at 09:16):
git grep Euler
src/field_theory/finite.lean:/-- The Fermat-Euler totient theorem. `nat.modeq.pow_totient` is an alternative statement
src/field_theory/finite.lean:/-- The Fermat-Euler totient theorem. `zmod.pow_totient` is an alternative statement
src/number_theory/quadratic_reciprocity.lean:/-- Euler's Criterion: A unit `x` of `zmod p` is a square if and only if `x ^ (p / 2) = 1`. -/
src/number_theory/quadratic_reciprocity.lean:/-- Euler's Criterion: a nonzero `a : zmod p` is a square if and only if `x ^ (p / 2) = 1`. -/
Rob Lewis (May 15 2020 at 09:17):
Rob Lewis said:
For reference, cs.ru.nl (Freek's site) is the third biggest referrer to the mathlib repo over the last two weeks (I think). Second only to GitHub and Twitter.
Actually second by unique viewers, third by total viewers.
Reid Barton (May 15 2020 at 09:17):
I see Lean also isn't listed under Cramer's Rule (97) but I see a lot of stuff about cramer
--I think this one is recent?
Jalex Stark (May 15 2020 at 09:17):
I guess I care about "first impressions" of Lean, so I'll start working at it
Johan Commelin (May 15 2020 at 09:17):
Can we first decide if we want the yaml?
Johan Commelin (May 15 2020 at 09:18):
And where to put it?
Johan Commelin (May 15 2020 at 09:18):
Editing github gists is not the best UX (-;
Rob Lewis (May 15 2020 at 09:18):
I say yes, in the website repo.
Reid Barton (May 15 2020 at 09:19):
Also The Triangle Inequality (91)
Patrick Massot (May 15 2020 at 09:20):
Triangle inequality? Again what does that mean??
Patrick Massot (May 15 2020 at 09:20):
We defined metric spaces. Does that count as triangle inequality?
Reid Barton (May 15 2020 at 09:21):
Apparently in Isabelle it means the definition of class ordered_ab_group_add_abs
:upside_down:
Patrick Massot (May 15 2020 at 09:21):
Ridiculous indeed
Reid Barton (May 15 2020 at 09:21):
I think I would be more comfortable with something more like Coq's
Lemma triangle :
forall x0 y0 x1 y1 x2 y2:R,
dist_euc x0 y0 x1 y1 <= dist_euc x0 y0 x2 y2 + dist_euc x2 y2 x1 y1.
Yury G. Kudryashov (May 15 2020 at 09:23):
Then we have this for real_inner_product
spaces
Yury G. Kudryashov (May 15 2020 at 09:23):
(through an instance)
Patrick Massot (May 15 2020 at 09:23):
Should we also claim Pythagoras then?
Yury G. Kudryashov (May 15 2020 at 09:24):
The Mean Value Theorem: exists_deriv_eq_slope
Yury G. Kudryashov (May 15 2020 at 09:26):
It would be nice to add a real_inner_product
instance on [fintype ι] ι → real
.
Yury G. Kudryashov (May 15 2020 at 09:26):
May be under a type tag
Yury G. Kudryashov (May 15 2020 at 09:26):
Then claim Cauchy-Schwarz inequality
Reid Barton (May 15 2020 at 09:33):
Really, I wish we had a new list of 100 theorems (or fewer would be fine, if each one is more substantial).
Patrick Massot (May 15 2020 at 09:33):
I think that list that Rocky and Ryan are currently translating is already much better
Patrick Massot (May 15 2020 at 09:33):
But it covers only undergraduate math
Jalex Stark (May 15 2020 at 09:34):
seems like a good property for a list which is meant to appeal to non-experts?
Patrick Massot (May 15 2020 at 09:38):
Yes and no. There are a couple of things that are appealing to non-expert like Fermat-Wiles
Patrick Massot (May 15 2020 at 09:38):
But those tend not to be formalized
Johan Commelin (May 15 2020 at 09:43):
https://github.com/leanprover-community/leanprover-community.github.io/blob/newsite/data/100.yaml
Please add new data to this :up: file
Johan Commelin (May 15 2020 at 09:44):
Yury G. Kudryashov said:
The Mean Value Theorem:
exists_deriv_eq_slope
Added
Johan Commelin (May 15 2020 at 09:45):
@Bhavik Mehta Didn't you add something that was on this list?
Bryan Gin-ge Chen (May 15 2020 at 09:46):
The 3 backticks here look like a copy+paste error, possibly?
Johan Commelin (May 15 2020 at 09:47):
Yup, the data wasn't very structured. I turned it into yaml using vim command recordings. Sometimes something slipped through
Rob Lewis (May 15 2020 at 09:47):
For linkifying, you should try to make sure the declaration names have the full namespace.
Patrick Massot (May 15 2020 at 09:47):
I confirm this is what it looks like
Patrick Massot (May 15 2020 at 09:48):
And I also wanted to write Rob's message
Johan Commelin (May 15 2020 at 09:48):
Rob Lewis said:
For linkifying, you should try to make sure the declaration names have the full namespace.
Yup. I hoped to crowdsource that part (-;
Johan Commelin (May 15 2020 at 09:49):
Bryan Gin-ge Chen said:
The 3 backticks here look like a copy+paste error, possibly?
They are gone now
Jalex Stark (May 15 2020 at 09:49):
so we want to put links to the appropriate files in mathlib?
Johan Commelin (May 15 2020 at 09:49):
No... rather full declaration names
Johan Commelin (May 15 2020 at 09:49):
That is likely more stable
Johan Commelin (May 15 2020 at 09:50):
Currently we have only the last bit of the name, but not the namespace
Jalex Stark (May 15 2020 at 09:50):
so we want a string that if you are in a project that depends on mathlib, and you type this string, it will either tell you that you are missing imports or will show you the theorem?
Patrick Massot (May 15 2020 at 09:51):
I think the references in https://github.com/leanprover-community/leanprover-community.github.io/blob/newsite/data/overview.yaml are better: they are easy to transform to links to the dosc API, which contains links to code
Patrick Massot (May 15 2020 at 09:52):
And they are easy to check automatically
Johan Commelin (May 15 2020 at 09:52):
If you do
import all
#print some.cool.theorem_name
Then you should get a result.
Johan Commelin (May 15 2020 at 09:52):
Aah, ok. Let's do what @Patrick Massot suggests
Johan Commelin (May 15 2020 at 09:53):
Of course, if we move code and/or files, this breaks. But that shouldn't happen too often
Patrick Massot (May 15 2020 at 09:53):
This can be monitored by CI
Rob Lewis (May 15 2020 at 09:57):
The doc gen tool keeps a map from declaration name to file name (and line number). So from a full identifier you can predict its link in the html docs and the GH source. The map isn't exposed right now, but it can be if/when needed.
Jalex Stark (May 15 2020 at 09:59):
so is this the string we want to attach to #22?
data/real/cardinality.html#cardinal.not_countable_real
Johan Commelin (May 15 2020 at 10:00):
Lol, we should explain the linkifier about freek#22
Jalex Stark (May 15 2020 at 10:00):
(Johan, I'm not following what you just said; I don't know if I was meant to)
Patrick Massot (May 15 2020 at 10:01):
I would say yes to both questions
Johan Commelin (May 15 2020 at 10:01):
Johan Commelin (May 15 2020 at 10:01):
And then chop of the base URL
Patrick Massot (May 15 2020 at 10:01):
Johan meant you created a link to the 22nd issue of mathlib
Patrick Massot (May 15 2020 at 10:02):
Johan, this is what Jalex did
Jalex Stark (May 15 2020 at 10:02):
is the point that there's later some magic that will add back in the base url?
Jalex Stark (May 15 2020 at 10:02):
so someone could click it to go to the theorem statement?
Johan Commelin (May 15 2020 at 10:02):
Yup
Jalex Stark (May 15 2020 at 10:03):
Okay, I'll spend the next half hour or so putting the declarations that already exist into that format, and then submit as a PR
Patrick Massot (May 15 2020 at 10:03):
Thanks!
Johan Commelin (May 15 2020 at 10:03):
Great!
Johan Commelin (May 15 2020 at 10:04):
I don't know yaml that well
Johan Commelin (May 15 2020 at 10:04):
Sometimes we want multiple entries for a decl
, so I put them in what I thought was a list.
Johan Commelin (May 15 2020 at 10:04):
Maybe this means we have to put [...]
around every entry
Johan Commelin (May 15 2020 at 10:04):
But that's nothing a regex couldn't do
Patrick Massot (May 15 2020 at 10:04):
The magic of YaML is there is not much to know
Jalex Stark (May 15 2020 at 10:05):
"""
We couldn’t find any code matching 'sqrt_two' in leanprover-community/mathlib
"""
Jalex Stark (May 15 2020 at 10:06):
(I guess in my first pass I'll just PR the theorems for which the existing declaration can be found in mathlib by searching its name, which I suspect is most of them)
Jalex Stark (May 15 2020 at 10:07):
Johan Commelin said:
If you do
import all #print some.cool.theorem_name
Then you should get a result.
is there literally a thing called import all
?
Bryan Gin-ge Chen (May 15 2020 at 10:09):
You can generate src/all.lean
by running scripts/mk_all.sh
.
Yury G. Kudryashov (May 15 2020 at 10:10):
It's irrational_sqrt_two
Yury G. Kudryashov (May 15 2020 at 10:10):
in data.real.irrational
Jalex Stark (May 15 2020 at 11:05):
I think I made a PR
https://github.com/leanprover-community/leanprover-community.github.io/pull/16
Johan Commelin (May 15 2020 at 11:09):
@Jalex Stark Great! I left a little comment. Thanks for the effort!
Jalex Stark (May 15 2020 at 11:16):
so I'm at the PR page and I want to make further edits to the file, but i haven't figured out how yet
Johan Commelin (May 15 2020 at 11:18):
@Jalex Stark You have a branch?
Yury G. Kudryashov (May 15 2020 at 11:18):
Now it parses to this JSON (see below). Probably we should remove all "- ".
{
"100thms": {
"1": [
{
"title": "The Irrationality of the Square Root of 2"
},
{
"decl": "data/real/irrational.html#irrational_sqrt_two"
},
{
"author": "mathlib"
}
],
"2": [
{
"title": "Fundamental Theorem of Algebra"
},
{
"decl": "analysis/complex/polynomial.html#complex.exists_root"
},
{
"author": "Chris Hughes"
}
]
}
}
Jalex Stark (May 15 2020 at 11:19):
Johan Commelin said:
Jalex Stark You have a branch?
I don't know; i made the PR link by clicking buttons in the github web client
Johan Commelin (May 15 2020 at 11:19):
@Jalex Stark How did you create the PR? Completely on Github? Or did you work with a local git clone of the repo?
Johan Commelin (May 15 2020 at 11:19):
Aha
Johan Commelin (May 15 2020 at 11:20):
The easiest thing would be to git clone
the repo, and then git checkout khanh93:patch-1
Johan Commelin (May 15 2020 at 11:20):
That's the branch that github created for you
Johan Commelin (May 15 2020 at 11:20):
After that, just edit the file, git commit
, git push
, and you're done.
Jalex Stark (May 15 2020 at 11:20):
okay, i'll try that
Johan Commelin (May 15 2020 at 11:21):
@Yury G. Kudryashov Are you suggesting we switch to json?
Yury G. Kudryashov (May 15 2020 at 11:21):
No, I wanted to show the effect of using "- "
Yury G. Kudryashov (May 15 2020 at 11:22):
I suggest we use
---
100thms:
'1':
title: The Irrationality of the Square Root of 2
decl: data/real/irrational.html#irrational_sqrt_two
author: mathlib
'2':
title: Fundamental Theorem of Algebra
decl: analysis/complex/polynomial.html#complex.exists_root
author: Chris Hughes
Johan Commelin (May 15 2020 at 11:22):
/me doesn't know yaml
Johan Commelin (May 15 2020 at 11:23):
@Yury G. Kudryashov What should we do with multiple decls?
Johan Commelin (May 15 2020 at 11:23):
Put them in a list? What is the idiomatic yaml solution?
Yury G. Kudryashov (May 15 2020 at 11:24):
I don't know what is the idiomatic yaml solution.
Yury G. Kudryashov (May 15 2020 at 11:24):
I'd put then in a list
Yury G. Kudryashov (May 15 2020 at 11:24):
Either using
decl: [decl1, decl2]
or using
decl:
- decl1
- decl2
Johan Commelin (May 15 2020 at 11:25):
I think 2 is better, unless we like long lines
Yury G. Kudryashov (May 15 2020 at 11:25):
Both parse to the same data structure
Jalex Stark (May 15 2020 at 11:28):
Johan Commelin said:
The easiest thing would be to
git clone
the repo, and thengit checkout khanh93:patch-1
I did git clone <appropriate url>
and then cd leanprover-community.github.io/
but git checkout khanh93:patch-1
resulted in error error: pathspec 'khanh93:patch-1' did not match any file(s) known to git
Probably my confusion will dissolve if I leave this alone for a day and then do a close read of e.g. the tutorial we link to from the "contribute to mathlib" page
Johan Commelin (May 15 2020 at 11:28):
O.o.... now I'm confused
Johan Commelin (May 15 2020 at 11:29):
What does git branch
say?
Jalex Stark (May 15 2020 at 11:29):
* newsite
Johan Commelin (May 15 2020 at 11:29):
Hmm, so it didn't download your branch
Johan Commelin (May 15 2020 at 11:29):
git fetch origin
?
Patrick Massot (May 15 2020 at 11:30):
Why does this newsite branch still exist?
Jalex Stark (May 15 2020 at 11:30):
Johan Commelin said:
git fetch origin
?
gave no errors and no output
Johan Commelin (May 15 2020 at 11:30):
O.o... @Jalex Stark I gave bad advice
Johan Commelin (May 15 2020 at 11:30):
Apparently github forked the repo for you
Patrick Massot (May 15 2020 at 11:30):
Oh I see
Johan Commelin (May 15 2020 at 11:30):
https://github.com/khanh93/leanprover-community.github.io/tree/patch-1
Patrick Massot (May 15 2020 at 11:30):
This is because ofgithub pages requirements
Johan Commelin (May 15 2020 at 11:30):
So it is branch patch-1
in another repo
Jalex Stark (May 15 2020 at 11:31):
okay
Johan Commelin (May 15 2020 at 11:31):
So git remote -v
Jalex Stark (May 15 2020 at 11:31):
you made a comment that was also a suggested edit, how did you do that?
Johan Commelin (May 15 2020 at 11:31):
And then git remote add
where you change leanprover-community
into khanh93
Johan Commelin (May 15 2020 at 11:31):
Jalex Stark said:
you made a comment that was also a suggested edit, how did you do that?
Through the github interface
Jalex Stark (May 15 2020 at 11:32):
do you know which buttons you pressed?
Johan Commelin (May 15 2020 at 11:32):
If you go to "Changed files" on the PR page, you can click on a line, leave a comment, and there is a button for "Suggestions"
Johan Commelin (May 15 2020 at 11:33):
Johan Commelin (May 15 2020 at 11:33):
It's the first icon in the toolbar of the comment window
Jalex Stark (May 15 2020 at 11:33):
nice, thanks
Jalex Stark (May 15 2020 at 11:34):
it does in fact say "insert a suggestion" when you mouse over it, so I should have found it on my own... I just kind of enter a panic whenever I have to interact with github
Jalex Stark (May 15 2020 at 11:37):
Okay, I think it's in a state where if I walk away from it, it will soon either get accepted or someone will raise another issue?
Johan Commelin (May 15 2020 at 11:43):
@Jalex Stark I've merged it. We can convert to Yury's format in a next step.
Jalex Stark (May 15 2020 at 11:44):
Does "merged" imply that I should now treat the PR page as an archive?
Jalex Stark (May 15 2020 at 11:44):
like if I wanted to make more similar edits, I would open a new one?
Jalex Stark (May 15 2020 at 11:45):
(I don't have any similar edits right now, otherwise they would have made it into the one you just merged :slight_smile: )
Reid Barton (May 15 2020 at 11:45):
Yes
Johan Commelin (May 15 2020 at 12:10):
@Jalex Stark And next time, feel free to start a branch on the main repo. You should have the rights to do that (-;
It doesn't matter too much, unless it's collaborative, because then others can also push to the branch.
Ryan Lahfa (May 15 2020 at 12:57):
Johan Commelin said:
Yury G. Kudryashov Are you suggesting we switch to json?
YAML is a superset of JSON
so technically, a JSON file is a YAML, I have used this trick many times in my life
Bhavik Mehta (May 15 2020 at 13:33):
I added infinite ramsey, it's currently in the extras branch of my combi project
Bhavik Mehta (May 15 2020 at 13:35):
I haven't PR'd to mathlib because it depends on Reid's crec
Johan Commelin (May 15 2020 at 13:39):
Aha, I see
Mario Carneiro (May 15 2020 at 14:54):
crec
should be in mathlib
Bhavik Mehta (May 15 2020 at 14:54):
Okay, where should it go? And can someone help me document it?
Kevin Buzzard (May 15 2020 at 15:04):
Patrick Massot said:
Ridiculous indeed
Just reading this thread now, but I talked to Freek about the issue of the list being poorly-specified and he said that it was not poorly specified as far as a mathematician was concerned (we all know what the triangle inequality is, even if we all think it means different things). He made it clear that it was a design decision not to formally specify anything, because he did not want to put words into formalisers heads. This example with S-vK is perhaps a neat summary of the consequences of this.
Jalex Stark (May 15 2020 at 15:05):
I guess that means people should care about what the statements look like in different ITPs, and not just the number of statements proved
Reid Barton (May 15 2020 at 15:08):
Well, there's a difference between formally specifying things and writing an informal statement of what the theorem is supposed to be
Jalex Stark (May 15 2020 at 15:11):
well freek did that, it's just very informal. In particular, there are theorems which if proven in an ITP, one can go ahead and say "yeah that satisfies the description freek gave", and who cares if there are more than one such theorem.
Mario Carneiro (May 15 2020 at 15:11):
I'm actually impressed that he has managed to interact with so many theorem proving communities and still retain his connection to mathematical vaguery. I would absolutely be tempted to give something very close to formal statements for these if I were in his position
Kevin Buzzard (May 15 2020 at 15:27):
Yeah but the moment you say set or type you're making implicit foundational assumptions. I think Freek was very smart to stay out of this business and to write something which mathematicians could read
Jalex Stark (May 15 2020 at 17:10):
Johan Commelin said:
Jalex Stark And next time, feel free to start a branch on the main repo. You should have the rights to do that (-;
It doesn't matter too much, unless it's collaborative, because then others can also push to the branch.
I'm sorry I need so much handholding. What does it mean to start a branch on the main repo? As far as I can tell it means that I have to replace step 1 of this instruction set with something else. Will I then be able to follow the rest of it normally?
Johan Commelin (May 15 2020 at 17:11):
You can replace the first 3 bullet points with "Clone mathlib"
Johan Commelin (May 15 2020 at 17:13):
After that
cd mathlib/
git checkout -b my-cool-branch
# do some changes
git add foo bar quux more stuff
git commit
git push
# this will tell you that you need to set a tracking branch or something
# just execute the command that it gives you
Johan Commelin (May 15 2020 at 17:13):
After that, it will even give you back a URL to start the PR (-;
Johan Commelin (May 15 2020 at 17:14):
Maybe we should put this somewhere in a little doc
Johan Commelin (May 15 2020 at 17:15):
But the workflow only works after someone gave you write access to the repo. (Which you got somewhere last week, I think.)
Jalex Stark (May 15 2020 at 17:25):
okay so after cloning mathlib and checkout
ing my branch, I make a .lean file
VSCode complains about "leanpkg.path does not exist"
I'm obviously supposed to do something with the elan toolchain
Jalex Stark (May 15 2020 at 17:26):
VSCode is suggesting leanpkg configure
but I'm worried that's wrong
Bryan Gin-ge Chen (May 15 2020 at 17:26):
You should be using leanproject
for some of these steps.
Jalex Stark (May 15 2020 at 17:27):
Johan Commelin said:
You can replace the first 3 bullet points with "Clone mathlib"
okay, so I think I misinterpreted "clone mathlib" as "run git clone <url i get from visiting mathlib page>
"
Jalex Stark (May 15 2020 at 17:27):
does someone have a better interpretation of "clone mathlib"?
Bryan Gin-ge Chen (May 15 2020 at 17:27):
That works, but you'll still want to use leanproject
to get olean files, and I think leanproject
will also create a leanpkg.path
file.
Jalex Stark (May 15 2020 at 17:28):
okay, so let's say we're adding to the beginning of Johan's list of steps
Bryan Gin-ge Chen (May 15 2020 at 17:28):
From where you're at, leanpkg configure
should be fine, then leanproject get-mathlib-cache
will help you avoid having to build mathlib yourself.
Jalex Stark (May 15 2020 at 17:28):
is git clone blah
first?
Jalex Stark (May 15 2020 at 17:29):
I think it's probably more useful to forget where I'm at, especially since I'm likely to misreport it. We want a set of instructions that if exactly followed, allow one to do the "make a branch of mathlib" style of development
Johan Commelin (May 15 2020 at 17:29):
Maybe it should be leanproject get mathlib
Bryan Gin-ge Chen (May 15 2020 at 17:29):
Yeah, leanproject get mathlib
would replace "clone mathlib".
Johan Commelin (May 15 2020 at 17:29):
It's too long ago, since I did this...
Jalex Stark (May 15 2020 at 17:30):
does that mean you do this only once?
Jalex Stark (May 15 2020 at 17:30):
and then somehow keep your branch up-to-date or something?
Bryan Gin-ge Chen (May 15 2020 at 17:30):
Yeah, pretty much. We should add a "Working on mathlib" section to the project page.
Jalex Stark (May 15 2020 at 17:31):
sure, I think we are currently interactively writing part of it
Bryan Gin-ge Chen (May 15 2020 at 17:31):
git pull
, git fetch
, git merge
are all you need to keep your branch up-to-date (as well as git checkout
if you're switching between different branches). (Plus leanproject get-mathlib-cache
or the git hooks to fetch oleans all the time).
Johan Commelin (May 15 2020 at 17:31):
Right, once you have mathlib/
set up, you just create 1001 branches in it.
Jalex Stark (May 15 2020 at 17:32):
so i did leanproject get mathlib
Jalex Stark (May 15 2020 at 17:32):
do we think that I'm ready to check out a branch?
Johan Commelin (May 15 2020 at 17:32):
cd mathlib/
Johan Commelin (May 15 2020 at 17:33):
And then git checkout -b my-first-branch
Jalex Stark (May 15 2020 at 17:33):
right, thanks, I am mixing layers of abstraction
Johan Commelin (May 15 2020 at 17:33):
nvm
Jalex Stark (May 15 2020 at 17:33):
?
Johan Commelin (May 15 2020 at 17:33):
never mind. I understand the mixing
Johan Commelin (May 15 2020 at 17:33):
Anyway, you have a branch now?
Jalex Stark (May 15 2020 at 17:34):
oh okay, I still think it was bad of me to do such mixing, we will want to write a literally correct sequence of terminal commands in the article
Patrick Stevens (May 15 2020 at 17:34):
(Remember that one of the keys to git is liberal usage of git status
to see what state your repository is currently in and what branch you're on)
Patrick Stevens (May 15 2020 at 17:34):
(easy to get confused if you don't keep on making the computer tell you what state you're in)
Jalex Stark (May 15 2020 at 17:34):
git status
told me this
On branch freek-42
nothing to commit, working tree clean
how should I interpret it?
Jalex Stark (May 15 2020 at 17:35):
that I have a clean copy of mathlib
waiting for edits to be made to it?
Patrick Stevens (May 15 2020 at 17:35):
That means you're successfully switched to the branch freek-42
and that your repo contains no diffs
Johan Commelin (May 15 2020 at 17:36):
So now mkdir -p archive/100/42
Johan Commelin (May 15 2020 at 17:36):
And then add your files in that folder
Johan Commelin (May 15 2020 at 17:36):
Then git add archive/100/42/*
Johan Commelin (May 15 2020 at 17:37):
@Jalex Stark One important thing: do you like editors in the terminal, like vim, nano, or emacs?
Jalex Stark (May 15 2020 at 17:37):
i am passably competent with emacs but prefer using Sublime and VSCode
Bryan Gin-ge Chen (May 15 2020 at 17:38):
I know it's a bit daunting to read a whole book, but I really recommend the git book for wrapping your head around git
.
Patrick Stevens (May 15 2020 at 17:38):
A nontrivial proportion of my day job is handholding quant-finance researchers through git, I'm happy to answer large numbers of stupid questions if you have them
Johan Commelin (May 15 2020 at 17:38):
Because git commit
might open vim for you, and then https://stackoverflow.com/questions/11828270/how-do-i-exit-the-vim-editor will contain a wealth of information on just how to get out of it.
Johan Commelin (May 15 2020 at 17:39):
git config --global core.editor "emacs"
Bryan Gin-ge Chen (May 15 2020 at 17:39):
The git interface in VS Code is pretty intuitive, though sometimes you still have to push from the command line.
Johan Commelin (May 15 2020 at 17:39):
It's only for writing < 10 lines of commit message, usually only 1 line.
Johan Commelin (May 15 2020 at 17:40):
So if you know emacs, you'll probably want that as your editor on the command line
Jalex Stark (May 15 2020 at 17:41):
Patrick Stevens said:
A nontrivial proportion of my day job is handholding quant-finance researchers through git, I'm happy to answer large numbers of stupid questions if you have them
amazing, in my job as a quant-finance researcher we use mercurial, and i've had people handhold me through how to use it enough times that I'm now just thoroughly embarrassed to ask for more help
so i don't write work code that ends up in repos anymore
Johan Commelin (May 15 2020 at 17:41):
and here you are... adding freek-42 to a repo...
Alex J. Best (May 15 2020 at 17:45):
I just made https://github.com/leanprover-community/leanprover-community.github.io/pull/19 to try and display the data in a more pretty way, comments(/help) welcome, especially with respect to how we format lists of links and decls, and how to automatically find the doc link from a decl like "inclusion_exclusion"
Alex J. Best (May 15 2020 at 17:52):
Also I feel we should add more attribution of the form mathlib (Person who committed the theorem)
rather than simply mathlib
Jalex Stark (May 15 2020 at 18:17):
(i forked the conversation about developing on a branch of mathlib to https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/learning.20to.20branch/near/197731335)
Mario Carneiro (May 15 2020 at 18:17):
I think mathlib
attribution means "lost to time"
Reid Barton (May 15 2020 at 18:21):
From 1 to 3 levels of nesting might be excessive; how about freek-100/82_cubing_a_cube.lean?
Reid Barton (May 15 2020 at 18:21):
If we actually want multiple files, we could then create a directory (same way we do in mathlib itself)
Mario Carneiro (May 15 2020 at 18:23):
BTW I don't think freek gets the credit for the list of theorems, as his page will tell you
Mario Carneiro (May 15 2020 at 18:25):
Where is there three levels of nesting? I proposed archive/100/thm.lean
naming
Jalex Stark (May 15 2020 at 18:25):
Reid Barton said:
If we actually want multiple files, we could then create a directory (same way we do in mathlib itself)
thanks, I think this is the convention i was missing
Jalex Stark (May 15 2020 at 18:25):
Mario Carneiro said:
Where is there three levels of nesting? I proposed
archive/100/thm.lean
naming
I proposed something worse in my git status
messages
Jalex Stark (May 15 2020 at 18:26):
I think it's nice to have the theorem number
Mario Carneiro (May 15 2020 at 18:27):
Those can show up in the yaml file, md docs and in the module doc for the file
Jalex Stark (May 15 2020 at 18:27):
Mario Carneiro said:
BTW I don't think freek gets the credit for the list of theorems, as his page will tell you
hmm okay, but from a sociological point of view, the only reason we care about writing up proofs of these theorems is because freek has a popular webpage about them, and he puts in maintenance work
Mario Carneiro (May 15 2020 at 18:27):
but I expect this folder is not going to contain 100 files because many of them are in mathlib proper
Jalex Stark (May 15 2020 at 18:27):
i'd be happy with any folder name that is significantly more informative than "100"
Mario Carneiro (May 15 2020 at 18:28):
at least based on what I have seen elsewhere this is usually called the "100 theorems list"
Reid Barton (May 15 2020 at 18:28):
100theorems
seems fine to me
Mario Carneiro (May 15 2020 at 18:29):
You probably won't need more than one file per theorem. If the proof is large enough to require multiple files then the supporting work should probably be in mathlib
Jalex Stark (May 15 2020 at 18:29):
yeah that seems true
Reid Barton (May 15 2020 at 18:29):
Agreed, I just wanted to leave an out for odd cases (e.g., imagine the cube dissection proof was a lot bigger, or something)
Jalex Stark (May 15 2020 at 18:30):
so i guess i should not call my thing 42_dumb_name
but instead think harder and call it smart_name
?
Mario Carneiro (May 15 2020 at 18:31):
All the theorems in Freek's list have actual names
Mario Carneiro (May 15 2020 at 18:32):
I suspect that's part of the eligibility criterion to be frank
Jalex Stark (May 15 2020 at 18:32):
ah, nice
I'll go with sum_of_the_reciprocals_of_the_triangular_numbers.lean
for now
Reid Barton (May 15 2020 at 18:32):
I kind of like including the number, but I think it's also fine without given that we're maintaining that list (which also includes entries for the ones in mathlib proper). Was that the question?
Jalex Stark (May 15 2020 at 18:34):
i want consistency across files in whether they're numbered or not
Jalex Stark (May 15 2020 at 18:34):
so since we think not-numbering is okay, and there is already a not-numbered contribution, I think we should not-number
Jalex Stark (May 15 2020 at 18:35):
(but I like numbering and wish that there wasn't an argument against it)
Reid Barton (May 15 2020 at 18:35):
Well you're moving the file anyways
Bryan Gin-ge Chen (May 15 2020 at 18:35):
What's the argument against numbering? I also think numbers in the filenames would be useful.
Bryan Gin-ge Chen (May 15 2020 at 18:37):
(side thought: 2 digits should be fine, since 100 is Descartes's rule of signs which presumably would be in mathlib proper)
Mario Carneiro (May 15 2020 at 18:37):
I think numbers would be okay but I don't want to imply that all numbers should exist
Mario Carneiro (May 15 2020 at 18:38):
because the folder is actually only for "orphaned" 100 theorems
Jalex Stark (May 15 2020 at 18:38):
if all the numbers existed (and many of them were just one import and one theorem statement whose proof was a reference to mathlib), then instead of a separately-maintained yaml, we could just have the docs page
Reid Barton (May 15 2020 at 18:39):
We should probably also add to that directory a readme pointing at the list in the docs though, otherwise people might think these are all we have.
Mario Carneiro (May 15 2020 at 18:39):
You could do that with a single file, with mod comments for description, but if it's a folder then the organization in mathlib docs will not be great
Jalex Stark (May 15 2020 at 18:40):
that makes sense
Jalex Stark (May 15 2020 at 18:40):
and at that point there's no sense having files for theorems-already-in-mathlib
Mario Carneiro (May 15 2020 at 18:40):
I thought that the readme in the directory was the index?
Jalex Stark (May 15 2020 at 18:41):
the readme in which directory?
Mario Carneiro (May 15 2020 at 18:41):
I'm not sure exactly how the yaml turns into something human readable
Mario Carneiro (May 15 2020 at 18:41):
the archive/100theorems
directory
Mario Carneiro (May 15 2020 at 18:42):
it seems reasonable to put the yaml file there
Jalex Stark (May 15 2020 at 18:42):
that makes sense
Jalex Stark (May 15 2020 at 18:42):
where is it living now?
Mario Carneiro (May 15 2020 at 18:42):
and then there is documentation overlap with the readme.md file
Bryan Gin-ge Chen (May 15 2020 at 18:42):
There's a PR to build an HTML file from the YAML here.
Mario Carneiro (May 15 2020 at 18:43):
could the PR also build the readme.md file?
Mario Carneiro (May 15 2020 at 18:44):
I don't know if I want to write markdown in a yaml file though
Bryan Gin-ge Chen (May 15 2020 at 18:44):
It could, we should settle on one place for it though. Either the community website with all the other former "extra" docs, or in mathlib where it might be a bit out of place.
Mario Carneiro (May 15 2020 at 18:44):
I suppose it could be a template like 100.html
Mario Carneiro (May 15 2020 at 18:45):
Maybe the simpler solution would be to have the readme.md just be a link to 100.html
Alex J. Best (May 15 2020 at 18:47):
Mario Carneiro said:
I think
mathlib
attribution means "lost to time"
That's not true in the current file though, some things such as MVT were added very recently but only say mathlib rather than Yury! AM-GM is also recent
Yury G. Kudryashov (May 15 2020 at 21:53):
AM-GM is also recent
And is also contributed by me.
Yury G. Kudryashov (May 18 2020 at 15:29):
Do we have a page that displays information from 100.yaml
?
Johan Commelin (May 18 2020 at 15:30):
Not yet, I think
Bryan Gin-ge Chen (May 18 2020 at 15:31):
See https://github.com/leanprover-community/leanprover-community.github.io/pull/19
Yury G. Kudryashov (May 18 2020 at 18:25):
Fixed some issues with this PR. I'm going to merge it and fix the rest later. I think this is OK because we have no links pointing to the new page.
Alex J. Best (May 18 2020 at 18:39):
Cool thanks, that sounds good.
Yury G. Kudryashov (May 18 2020 at 18:42):
Merged, fixing compile.
Yury G. Kudryashov (May 18 2020 at 18:42):
It seems that we shouldn't use import markdown
Rob Lewis (May 18 2020 at 18:43):
Oh, I noticed that the other day, sorry I forgot to comment. markdown
is a new dependency. Should probably use whatever markdown compiler the rest of the site generator is using.
Alex J. Best (May 18 2020 at 18:44):
Ah mistletoe, I missed that thanks
Alex J. Best (May 18 2020 at 18:46):
I can push the fix now
Yury G. Kudryashov (May 18 2020 at 18:47):
https://leanprover-community.github.io/100.html
Yury G. Kudryashov (May 18 2020 at 18:48):
Already fixed
Yury G. Kudryashov (May 18 2020 at 18:50):
Who will tell Freek about the update?
Rob Lewis (May 18 2020 at 18:50):
It would be nice if we went through the items on this list and made sure the declarations had nice doc strings. I just clicked on the quadratic reciprocity link. It leads to a page in the docs where the interesting result looks completely unremarkable, heh.
Yury G. Kudryashov (May 18 2020 at 18:51):
And our old list had all the statements.
Rob Lewis (May 18 2020 at 18:54):
The inception version of this project: give the current yaml file to the doc gen tool. It can find the theorem statements and doc strings and create a new yaml for the website generator.
Alex J. Best (May 18 2020 at 18:55):
Yeah for quadratic reciprocity its probably better to link to the file rather than the specific theorem, but maybe linking to the file under links and leave the decl as it is.
Yury G. Kudryashov (May 18 2020 at 19:07):
Do we have jinja+markdown on this website?
Yury G. Kudryashov (May 18 2020 at 19:07):
I mean, can I write a template in markdown with jinja?
Yury G. Kudryashov (May 18 2020 at 19:28):
I had I added https://leanprover-community.github.io/100-missing.html
Kevin Buzzard (May 18 2020 at 19:30):
The Prime Number Theorem might be feasible if someone figures how to make Mario's translation from MetaMath be about Lean reals and Lean primes...
Alex J. Best (May 18 2020 at 19:36):
Triangle inequality is a little ill defined but clearly there to some extent, possibly we should link to the definition of metric space and the fact that with the 2-norm is a metric space?
Kevin Buzzard (May 18 2020 at 19:39):
Many are all a bit ill-defined -- did you see the discussion about other formalisations of this in the other provers? At least one just links to the definition of an ordered abelian group or something :-)
Alex J. Best (May 18 2020 at 19:40):
Ah I missed that discussion, but yeah I noticed that the other provers interpret this in wildly different ways.
Yury G. Kudryashov (May 18 2020 at 19:46):
We don't have an instance [fintype n] inner_product_space (n → real)
Yury G. Kudryashov (May 18 2020 at 19:47):
It should be very easy to add this, probably under some type tag because we already have a normed_space
instance.
Mario Carneiro (May 18 2020 at 20:12):
Kevin Buzzard said:
The Prime Number Theorem might be feasible if someone figures how to make Mario's translation from MetaMath be about Lean reals and Lean primes...
What is actually needed is a proof that the reals are unique up to isomorphism. I already have a proof that primes are primes, this is how Dirichlet works
Mario Carneiro (May 18 2020 at 20:13):
that is, this is library work, it has nothing to do with metamath or interacting with the translated metamath library
Jalex Stark (May 18 2020 at 20:18):
What properties are we starting from to characterize the reals? This wikpedia page gives a few different paths
https://en.wikipedia.org/wiki/Real_closed_field
Alex J. Best (May 18 2020 at 20:25):
Mario Carneiro said:
In this case, the reals are plenty overdetermined
@Jalex Stark see this discussion
Jalex Stark (May 18 2020 at 20:28):
okay, thanks. I guess the answer is "assume whatever you want, and then we can pare down the assumptions if necessary but we probably won't need to"
Alex J. Best (May 18 2020 at 20:30):
Yeah, complete ordered archimidean field seems a reasonable triple of conditions though.
Joseph Myers (May 18 2020 at 20:30):
I have that instance (actually in the form inner_product_space (fin n → ℝ)
rather than for a general fintype) in my definition of Euclidean spaces (along with versions of 4: Pythagorean Theorem, 65: Isosceles Triangle Theorem and 94: The Law of Cosines, as none of those require building up any nontrivial geometry beyond the inner product). It will take a few more PRs after #2720 to get that into mathlib.
Jalex Stark (May 18 2020 at 20:32):
Joseph, you can probably also knock out 27:sum of the angles of a triangle with the same technology
Alex J. Best (May 18 2020 at 20:35):
@Joseph Myers You should totally add these to https://github.com/leanprover-community/leanprover-community.github.io/blob/newsite/data/100.yaml even if they aren't yet in mathlib, several results there already are on different repos.
Yury G. Kudryashov (May 18 2020 at 20:50):
Just use links:
instead of decl:
Yury G. Kudryashov (May 18 2020 at 20:58):
Another low hanging fruit is "55: Product of Segments of Chords". E.g.,
theorem product_of_chords {E : Type*} [inner_product_space E] (x y z : E) (c r : real) (hc : y + c \bu z ∈ sphere x r) :
∃ c' : real, y + c' \bu z ∈ sphere x r ∧ c * c' * (norm z)^2 = (dist y x)^2 - r^2 := sorry
almost immediately follows from Vieta_formula_quadratic
. Probably you'll want to reformulate it for an affine space over E
.
Patrick Massot (May 18 2020 at 21:25):
Basically this list is full of elementary geometry theorems that are all low hanging fruits if you start from linear algebra instead of starting with a version of Euclid's axioms.
Kevin Buzzard (May 18 2020 at 21:28):
@Joseph Myers how far are we from Olympiad geometry?
Joseph Myers (May 18 2020 at 23:35):
I think we're a long way from being able to do formal versions of most synthetic Euclidean olympiad geometry proofs. (My formalisation of Euclidean spaces comes from trying to formalise a paper with one problem in each of the four olympiad subject areas - algebra, combinatorics, geometry, number theory - but the geometry problem on that paper doesn't actually involve that much synthetic geometry.)
There's no written IMO syllabus, but the IMO Compendium has a list of 171 "Basic Concepts and Facts" that probably includes many of the results and definitions most likely to be used in solving olympiad problems. 66 of those are geometry (and of those 66, mathlib only has a few trigonometric identities right now). (Another 23 are graph theory, so also missing from mathlib. I think mathlib is doing better on the results and definitions from that list that are neither geometry nor graph theory, though it certainly doesn't have full coverage of them.) There are of course many more geometry results that might sometimes be useful (see e.g. Evan Chen's book Euclidean Geometry in Mathematical Olympiads).
But there must also be hundreds of trivial lemmas that don't even get mentioned in olympiad proofs but are needed when formalising them, whenever you need to prove something that's obvious from a diagram (these two lines can't be parallel, these two points can't be the same, this point must be between these other two points, etc.). I'm not sure there's any good way to find those lemmas other than for someone (not me!) to try formalising synthetic solutions to a large number of problems, adding any such lemmas to mathlib along the way.
Kevin Buzzard (May 18 2020 at 23:40):
Yes, I agree that getting someone to formalise a bunch of geometry problems might be the way forward. Of course I have all Chris Bradley's old geometry example sheets and handourts -- unfortunately they're all in my office, which is inaccessible currently. I might try and get undergrads doing this. Is there some online resource for the basic stuff?
Jalex Stark (May 18 2020 at 23:42):
I think i have heard that groebner basis methods are a useful tool in automating synthetic geometry proofs? but i don't know anything about the algebraic geometry required to make the link
Joseph Myers (May 18 2020 at 23:45):
They're good for coordinate proofs. I suspect for many problems you'll run into fiddly configuration-dependence issues (need to prove that lines intersect rather than being parallel, need to prove something is an internal rather than an external bisector, etc.) before a reduction to proving a polynomial is in an ideal actually solves the original problem statement.
Joseph Myers (May 18 2020 at 23:46):
There must be plenty of online resources for basic olympiad geometry, but I don't know which are good.
Jalex Stark (May 18 2020 at 23:46):
okay, so the many small synthetic geometry lemmas we're talking about are required even for the reduction to coordinate geometry?
Joseph Myers (May 18 2020 at 23:55):
Reduction to coordinate geometry probably doesn't need them. But the coordinate statement of the problem will typically involve inequalities (when a problem says "triangle" it doesn't include degenerate triangles, when it says "circle" radius 0 isn't valid, when it says "intersect" it doesn't mean at infinity, when it says "incentre" it doesn't mean "excentre", etc.). And while Tarski's theorem says a coordinate formulation with inequalities is decidable (the first-order theory of real-closed fields is complete), deciding problems with inequalities is much harder in practice than deciding polynomial membership of an ideal using Gröbner bases. (You could get lucky if the conclusion you're asked to prove doesn't implicitly involve any inequalities and doesn't depend on any inequalities from the hypotheses. In theory even then things might not work, because it's possible the polynomial equations might only imply the polynomial result over the reals but not the complex numbers and the Nullstellensatz requires an algebraically closed field, but in practice that's unlikely to be a problem.)
Kevin Buzzard (May 19 2020 at 00:00):
My impression is that in Coq several of these things have been tried, the most successful in practice being the "area method", which is fast but isn't guaranteed to solve everything. On the other hand the Tarski algorithm is very slow
Yury G. Kudryashov (May 19 2020 at 01:42):
If someone will write definition/proofs for basic theorems about points, lines, angles, and circles, then I can participate in building advanced theorems from them using olympiad geometry style proofs.
Yury G. Kudryashov (May 19 2020 at 01:43):
I think that the basics should be done based on linear algebra because this way they're not completely useless for the rest of the library.
Yury G. Kudryashov (May 19 2020 at 01:45):
Then someone can separately prove that some sort of Euclid's axioms imply equivalence to .
ROCKY KAMEN-RUBIO (May 19 2020 at 03:17):
Kevin Buzzard said:
Yes, I agree that getting someone to formalise a bunch of geometry problems might be the way forward. Of course I have all Chris Bradley's old geometry example sheets and handourts -- unfortunately they're all in my office, which is inaccessible currently. I might try and get undergrads doing this. Is there some online resource for the basic stuff?
Yury G. Kudryashov said:
If someone will write definition/proofs for basic theorems about points, lines, angles, and circles, then I can participate in building advanced theorems from them using olympiad geometry style proofs.
I've been Leaning for a few months and am happy to slog through and formalize foundational geometry. Let me know if you find materials that would be applicable, or if anyone else also wants to work on this!
Jalex Stark (May 19 2020 at 03:20):
materials? like idk euclid's elements? or the book of problems by evan chen linked earlier in the thread?
Jalex Stark (May 19 2020 at 03:21):
are you looking for a body of desired applications that tells you what the API should be?
Jalex Stark (May 19 2020 at 03:26):
the first ten lines of code are worth a lot more than a few paragraphs saying you want to work on the problem :P
ROCKY KAMEN-RUBIO (May 19 2020 at 03:28):
Jalex Stark said:
are you looking for a body of desired applications that tells you what the API should be?
My impression was @Kevin Buzzard was suggesting that following a set of class problems could be a good starting place for the API.
Jalex Stark said:
the first ten lines of code are worth a lot more than a few paragraphs saying you want to work on the problem :P
You're right that I don't need that to actually start doing this haha
Jalex Stark (May 19 2020 at 03:29):
Here's something close to a formally-specified problem:
define the "angle" for an ordered triple of points via the cosine / dot-product formula,
then prove that the following two definitions of "triangle ABC is isoceles" are equivalent:
angle A B C = angle A C B
distance A B = distance A C
Jalex Stark (May 19 2020 at 03:30):
you should consider it a success if (after trying for 5 or 20 minutes) you realize that adding more basic definitions or doing some easier exercise first would be better
Jalex Stark (May 19 2020 at 03:31):
ROCKY KAMEN-RUBIO said:
My impression was Kevin Buzzard was suggesting that following a set of class problems could be a good starting place for the API.
oops I sure am good at ignoring quoted text
Yury G. Kudryashov (May 19 2020 at 03:36):
Note that @Joseph Myers already started coding this, see https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/freek.2Eyaml/near/197991545
Yury G. Kudryashov (May 19 2020 at 03:37):
So @ROCKY KAMEN-RUBIO if you want to participate, then coordinate with Joseph, please.
Yury G. Kudryashov (May 19 2020 at 03:38):
I know a few very good sources of geometry problems but they're in Russian.
Aaron Anderson (May 19 2020 at 04:34):
Are Hilbert's or Tarski's axioms of Euclidean geometry enough to practically prove Olympiad problems if you define some higher-level concepts on top of them?
Jalex Stark (May 19 2020 at 04:37):
I think the answer has to be yes if the problems are definable from such axioms
Reid Barton (May 19 2020 at 04:38):
The key word is "practically", I think, and I don't know the answer. It seems to be a lot of work to get to that point.
Jalex Stark (May 19 2020 at 04:39):
I think the roadmap we're suggesting here is to start by showing that the real plane (together with its affine subspaces) is a model of those axioms, and then build a library of stuff that is in principle provable from those axioms, but letting yourself shortcut with coordinate-y / linear algebraic proofs of stuff where convenient
Jalex Stark (May 19 2020 at 04:40):
and the hope is to build the library that people in practice use to solve these problems
Reid Barton (May 19 2020 at 04:41):
Yes, this is a good approach, but even with such a library, there is a lot of configuration information to contend with.
Reid Barton (May 19 2020 at 04:41):
A good milestone is just to prove that every triangle has an orthocenter.
Kevin Buzzard (May 19 2020 at 08:29):
An imperial undergrad went through some textbook in 2018 which started with Tarski's axioms and built up a huge amount of theory
Kevin Buzzard (May 19 2020 at 08:30):
It is completely undocumented but it closely follows a book which IIRC is in German
Kevin Buzzard (May 19 2020 at 08:33):
https://github.com/ImperialCollegeLondon/xena-UROP-2018/blob/master/src/Geometry/README.md
Kevin Buzzard (May 19 2020 at 08:34):
Rocky, it would be an interesting task to work out what the heck is going on in that repo. My impression is that @Ali Sever proved a lot of stuff
Ali Sever (May 19 2020 at 09:00):
I've almost finished my detailed walkthrough of my code. It'll be up today.
Kevin Buzzard (May 19 2020 at 09:08):
I had no idea you were working on it Ali! That's great news! Euclid comes up again and again here
Joseph Myers (May 19 2020 at 10:34):
If I complete formalising the problem I'm aiming for, that will probably get the circumcentre and orthocentre (and the fact that the reflections of the circumcircle in the sides of the triangle pass through the orthocentre, or equivalently that the reflections of the orthocentre in the sides lie on the circumcircle).
Joseph Myers (May 19 2020 at 10:36):
@Jalex Stark I have the forward direction of pons asinorum, which is true for any three points. The converse requires defining "triangle" first (= 2-simplex = 3 affine-independent points, since we want definitions to be valid in n dimensions where that's sensible), it's not true for all degenerate triangles.
Johan Commelin (May 20 2020 at 13:18):
Has anyone pinged Freek so far? I think that by now we can.
Johan Commelin (Jun 05 2020 at 12:17):
Freek's page is still pointing to the old list. The new list https://leanprover-community.github.io/100.html has 9 items that are not on Freek's page.
Johan Commelin (Jun 05 2020 at 12:31):
New statements in lean: 10, 19, 31, 38, 42, 75, 78, 85, 91
Yury G. Kudryashov (Jun 05 2020 at 13:22):
Can we add statements to the new page?
Johan Commelin (Jun 05 2020 at 13:27):
What do you mean?
Alex J. Best (Jun 05 2020 at 13:50):
Yury G. Kudryashov said:
Can we add statements to the new page?
That sounds good to me, what were you thinking?
Formal or informal statements? Lean ones only for the completed ones in Lean?
Yury G. Kudryashov (Jun 05 2020 at 16:55):
I mean quoting parts of apidocs with theorem statement.
Yury G. Kudryashov (Jun 05 2020 at 16:55):
This would require support from doc generator
Johan Commelin (Jun 05 2020 at 16:57):
Ah, I see what you mean. Your not talking about adding extra entries, but improving the html file generated from the yaml.
Yury G. Kudryashov (Jun 05 2020 at 17:01):
Yes, the old page has formal theorem statement right there.
Floris van Doorn (Jun 06 2020 at 03:18):
I sent Freek an email to update the links on his page, and add the 9 new entries.
Johan Commelin (Jun 06 2020 at 03:36):
@Floris van Doorn Thanks
Rob Lewis (Jun 06 2020 at 11:06):
Yury G. Kudryashov said:
Can we add statements to the new page?
See https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/mathlib.20map/near/199969108 . The doc gen tool can export a json file with this info but there are (minor) complications right now.
Yury G. Kudryashov (Jun 17 2020 at 23:49):
@Floris van Doorn Freek's page still says 29, and we already have (The Answer to the Great Question Of Life, the Universe and Everything).
Yury G. Kudryashov (Jun 17 2020 at 23:49):
Did he answer your email?
Kevin Buzzard (Jun 18 2020 at 08:30):
I just prodded him
Kevin Buzzard (Jun 18 2020 at 08:31):
I wonder whether in future the canonical thing to do is to prod him every time we go one position higher in the all time list
Patrick Massot (Jun 18 2020 at 08:55):
What about doing it only every ten items?
Mario Carneiro (Jun 18 2020 at 09:01):
Over in metamath land we usually report one after every one or maybe two items (depending on how hard the problem is or how much we care about getting the word out). I expect Freek just missed the email; there are often long delays but nothing malicious seeming, I think he is just a typical busy academic
Kevin Buzzard (Jun 18 2020 at 10:32):
He replied -- indeed he's worrying about a talk
Floris van Doorn (Jun 18 2020 at 19:18):
He indeed didn't reply to my email yet. My experience is that he will get to it eventually.
Floris van Doorn (Jun 18 2020 at 22:33):
Freek replied and updated his webpage today. I will reply with the 4 new additions since last time :)
Alex J. Best (Aug 19 2020 at 20:41):
@Jujian Zhang do you want to add a link to your is transcendental proof to our Freek 100 theorems list ? https://github.com/leanprover-community/leanprover-community.github.io/blob/newsite/data/100.yaml#L206 number 67
Jujian Zhang (Aug 19 2020 at 20:47):
Yes, I will do that when I am home. Thank you for the link.
Alex J. Best (Aug 19 2020 at 20:49):
Thank you for proving it!
Patrick Massot (Aug 19 2020 at 20:53):
And don't forget to bring it to mathlib! This is much more important than this list.
Joseph Myers (Aug 20 2020 at 01:18):
Reid Barton said:
A good milestone is just to prove that every triangle has an orthocenter.
It took a while, and we're not really any closer to being able to do synthetic geometry proofs, but #3872 defines orthocenter
for a triangle (in terms of the n-dimensional generalization, monge_point
for a simplex), and proves basic properties (lies in the altitudes, is the unique point in any two of the altitudes, position on the Euler line in relation to O and G).
Now that I can state the answer to the geometry problem on the olympiad paper I'm formalizing (which required orthocenter
), I can get onto formalizing the solution to that problem (having formalized the solutions to all the non-geometry problems on that paper some time ago).
Johan Commelin (Aug 20 2020 at 02:46):
@Joseph Myers Wow! Thanks a lot for your continuous stream of PRs on this topic.
Bhavik Mehta (Sep 25 2020 at 20:15):
For anyone interested, @Aaron Anderson and I have got a sorry-free proof of Freek 45 in a branch of mathlib, and we're in the process of making PRs
Oliver Nash (Oct 19 2020 at 16:59):
I was surfing our list of the Freek 100 and was a bit surprised to see we don't officially have Cramer's rule, number 97, since I know we essentially do.
Oliver Nash (Oct 19 2020 at 17:00):
Looking more closely though, I see all the hard work has been done but the actual statement of Cramer's rule isn't there so I guess I'll PR it. Just mentioning it unless somebody else is already on it!
Oliver Nash (Oct 19 2020 at 17:00):
(in which case I will refrain)
Johan Commelin (Oct 19 2020 at 17:28):
Go go go go go!!!
Last updated: Dec 20 2023 at 11:08 UTC