Skip to content

doc(1000): add the strong and weak perfect graph theorems - #43318

Open
wpegden wants to merge 1 commit into
leanprover-community:masterfrom
wpegdenplus:1000-perfect-graph-theorems
Open

wpegden wants to merge 1 commit into
leanprover-community:masterfrom
wpegdenplus:1000-perfect-graph-theorems

Conversation

@wpegden

@wpegden wpegden commented Sep 1, 2026 •

Copy link
Copy Markdown

Adds external-formalization entries for Q16680059 (strong perfect graph theorem) and Q2800071 (perfect graph theorem), both formalized in Lean 4 at https://github.com/wpegden/spgt with commit-pinned permalinks.


Open in Gitpod

Adds external-formalization entries for Q16680059 (strong perfect graph
theorem) and Q2800071 (perfect graph theorem), both formalized in Lean 4 at
https://github.com/wpegden/spgt with commit-pinned permalinks.
@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to Zulip and join the Lean community.
Thank you again for joining our community.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

PR summary ef4d6803fe

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit ef4d680).

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


No changes to strong technical debt.
No changes to weak technical debt.

Current commit ef4d6803fe
Reference commit 8acb872c31

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@wpegden wpegden changed the title doc(1000.yaml): add the strong and weak perfect graph theorems doc(1000): add the strong and weak perfect graph theorems Sep 1, 2026
@wwylele

wwylele commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

I am not an official reviewer, but as a mathlib follower, if I see this in the 1000 theorem list I would be disappointed for how unreadable the repo is (it has a folder with 1900 files that github can't even load)

@wpegden

wpegden commented Sep 1, 2026 •

Copy link
Copy Markdown
Author

There is a viewer for the formalization here, which I think is much more user friendly than trying to use github:
https://www.math.cmu.edu/~wes/trellis/spgt-viewer/

I would be very happy for any feedback on specific ways readability can be improved however!

Note that there is one way I think the formalizations produced by Trellis are unusually readable, which is that every part of every lean proof comes with a detailed natural language proof of a paired natural language statement, that you can compare side by side.

Of course I think it's fair to call an enormous formalization difficult to read no matter how it is presented.

EDIT: I just realized the viewer is not linked to in the README. I have corrected this!

@thorimur

thorimur commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Welcome! I'm not sure it's stated anywhere yet, but I believe the standard for "has this been formalized" where massive amounts of LLM-generated code are involved ought to at least require the use of leanprover/comparator in the repo with a simple, reviewable Challenge.lean file. (Note, though, this might not be sufficient if this is not the place for LLM code; see below)

As the README says, we need to trust the definitions to trust the formalization, so those ought to be reviewable in such a challenge file :) However, I see there are quite a few definitions. Do you think this is feasible?

I will also ping @grunweg on this, particularly on whether 1000 is a place for LLM-generated code at all. It is not clear to me what the list is trying to communicate. Do we want the signal of whether a human has formalized some theorem (and the various properties that come with it)? Or is the fact that it has been formalized at all still useful? (This may have been discussed before.)

@wpegden

wpegden commented Sep 2, 2026

Copy link
Copy Markdown
Author

Hi @thorirmur,
The definition surface to verify the main theorem is actually very small. Trellis computes this for you and, for example, if you go to the viewer I mentioned earlier:
https://www.math.cmu.edu/~wes/trellis/spgt-viewer/#SPGC

On the page for the SPGT node, the "semantic closure" is only four simple definitions.

I am happy to prepare a comparator file if someone clarifies whether that is the only issue.

@grunweg

grunweg commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The 1000.yaml file was created in the pre-AI days (when any formalization of such results was useful progress to track). These days, "X can be formalized" is not that interesting (but reusable results, curated definitions, etc. are). I think its purpose needs to be re-discussed in the age of AI; I'll start one.
I (personally) strongly feel that a comparator challenge file is a necessary condition, to make sure that a repository actually proves what it claims.

@grunweg grunweg added the awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there label Sep 2, 2026
@wpegden

wpegden commented Sep 2, 2026

Copy link
Copy Markdown
Author

I have added comparator files to the repo. If this is supposed to be a list of 1000+ theorems with human-authored formalizations then I 100% I agree this formalization doesn't belong here. That was not my impression from any of its documentation or from some of the accepted solutions:

Entry PR Disclosure (verbatim)
Gauss–Lucas (Q1008566) #29630 "The proof was found by Aristotle AI, then rewritten by me in Mathlib style." + Co-authored-by: Aristotle Harmonic
Niven's theorem (Q4116459) #26371 Co-authored-by: @Aristotle-Harmonic
Von Staudt–Clausen (Q3527230) #34906 labeled LLM-generated by maintainer
British flag theorem (Q4971339) #42518 "This contribution was developed with assistance from Claude Code."
Geometric mean theorem (Q2226868) #42674 "This PR was written with AI assistance (Claude Code)"

@SnirBroshi

SnirBroshi commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Those examples are very different than 500k of LLM generated code
Most importantly, they went through the Mathlib review process and made it in

@wpegden

wpegden commented Sep 3, 2026

Copy link
Copy Markdown
Author

The 1000.yaml file was created in the pre-AI days (when any formalization of such results was useful progress to track). These days, "X can be formalized" is not that interesting (but reusable results, curated definitions, etc. are). I think its purpose needs to be re-discussed in the age of AI; I'll start one. I (personally) strongly feel that a comparator challenge file is a necessary condition, to make sure that a repository actually proves what it claims.

Could you point me to where this Zulip conversation is? I searched a bit and couldn't find it. (As noted above, I have added comparator files to the repo.)

@wpegden

wpegden commented Sep 8, 2026

Copy link
Copy Markdown
Author

Any updates on this?

@grunweg

grunweg commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The Zulip conversation above is in the mathlib reviewers stream (i.e., only visible to mathlib reviewers). Discussion is making progress, but hasn't fully converged yet. It looks like the conclusion will be to clarify the intended meaning of the 1000 theorems page. We will post an update here once the discussion has concluded!

@wpegden

wpegden commented Sep 23, 2026

Copy link
Copy Markdown
Author

Any update on this discussion?

@SnirBroshi

Copy link
Copy Markdown
Collaborator

See #44115

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-zulip There is a Zulip discussion; the author should await and report/implement the decision reached there new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants