Skip to content

feat(Combinatorics): add Schreier graph definition and covering property#36320

Open
ZRTMRH wants to merge 8 commits intoleanprover-community:masterfrom
ZRTMRH:schreier-basics
Open

feat(Combinatorics): add Schreier graph definition and covering property#36320
ZRTMRH wants to merge 8 commits intoleanprover-community:masterfrom
ZRTMRH:schreier-basics

Conversation

@ZRTMRH
Copy link
Copy Markdown

@ZRTMRH ZRTMRH commented Mar 7, 2026

Defines Schreier graphs as quivers with labeled edges.

SchreierGraph V ι: type alias for vertices with quiver structure
schreierGraphLabelling: prefunctor extracting edge labels
schreierGraphLabelling_isCovering: the labelling is a covering for group actions
schreierGraph_action_commute: label-preserving maps commute with the action

Ported from Lean 3 PR #18693.

This PR was written with AI assistance (Claude). The code has been reviewed by the author and their advisor.


This is the first in a series of PRs splitting #35467 into smaller pieces, as suggested by reviewers. Upcoming PRs will add word evaluation, paths, connectivity, automorphisms, examples, and Cayley sum graphs.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

PR summary caa79c2e3c

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Combinatorics.Quiver.Schreier (new file) 295

Declarations diff

+ SchreierGraph
+ action_commute
+ equiv
+ instance : MulAction M (SchreierGraph V ι)
+ labelling
+ labelling_costarEquiv
+ labelling_isCovering
+ labelling_starEquiv
+ schreierGraphQuiver
+ schreierGraphSMul

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh 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 added t-combinatorics Combinatorics new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! labels Mar 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

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 https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@grunweg grunweg added the LLM-generated PRs with substantial input from LLMs - review accordingly label Mar 16, 2026
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Mar 24, 2026
Add informal mathematical definition to module docstring and change
SchreierGraph from a def type alias to a one-field structure per
mathlib convention.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't everything past the definition of SchreierGraph be moved to the SchreierGraph namespace?

…space

Move definitions and lemmas about `SchreierGraph` into the
`SchreierGraph` namespace.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ZRTMRH
Copy link
Copy Markdown
Author

ZRTMRH commented Mar 25, 2026

Shouldn't everything past the definition of SchreierGraph be moved to the SchreierGraph namespace?

Moved to the SchreierGraph namespace.

…raph

Name the structure constructor `ofVertex`, reword a docstring,
and rename `schreierGraphMulAction` to `instMulAction`.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ZRTMRH
Copy link
Copy Markdown
Author

ZRTMRH commented Mar 31, 2026

All suggestions other than V naming (explained in previous reply) are addressed. Ready for re-review.

@YaelDillies
Copy link
Copy Markdown
Contributor

in the future, please remove the awaiting-author label when the PR is ready for review by commenting

-awaiting-author

@github-actions github-actions bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I don't know the first thing about Schreier graphs. Could you please contact a more appropriate reviewer? Thanks!

@YaelDillies YaelDillies removed their assignment Apr 3, 2026
ZRTMRH and others added 2 commits April 3, 2026 10:21
…elling

Replace `labelling_star_bijective` and `labelling_costar_bijective` with
`labelling_starEquiv` and `labelling_costarEquiv`, providing explicit
equivalences. Golf tactic proofs per reviewer suggestions.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ZRTMRH
Copy link
Copy Markdown
Author

ZRTMRH commented Apr 3, 2026

Thanks a lot for the code review! I'll post on zulip.


## Main definitions

* `SchreierGraph V ι` - The Schreier graph of an action, with vertices of type `V` and edges
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is a quiver, maybe let's depart from terminology and call it a SchreierQuiver?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to leave as it is. Schreier graph by definition has a labeled directed structure, so it is inherently always a quiver (and should not be formalized in simple graph structure, for instance). Thus I don't think we need to save the name of SchreierGraph and this could make it more discoverable. Happy to change if you feel strongly though.

Copy link
Copy Markdown
Collaborator

@AntoineChambert-Loir AntoineChambert-Loir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- Add math literature reference (Vorobets 2012) to module docstring and references.bib
- Remove redundant hypotheses from `equiv` (use section variables)
- Move `instMulAction` to separate section with `Monoid M` instead of `Group M`
- Remove explicit name from `instMulAction` instance
- Make `V` implicit in GroupAction section

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LLM-generated PRs with substantial input from LLMs - review accordingly new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants