feat(Combinatorics/Quiver/Schreier): word evaluation and reachability#38310
feat(Combinatorics/Quiver/Schreier): word evaluation and reachability#38310ZRTMRH wants to merge 4 commits intoleanprover-community:masterfrom
Conversation
Add `SchreierGraph.evalWord` — a list-based evaluation of words (generators tagged with a forward/inverse bit) as elements of the ambient group — together with basic rewriting lemmas, the link to `FreeGroup.lift`, and membership in the subgroup generated by `ι`. This is preparation for the path-from-word and reachability results that follow in a subsequent PR.
Build on the word-evaluation API to construct paths in the symmetrified Schreier graph from Bool-tagged words, and use this to characterise reachability: * `SchreierGraph.pathFromWord` — a word of generators/inverses gives a path in `Symmetrify (SchreierGraph V ι)` from `x` to `evalWord ι w • x`. * `SchreierGraph.nonempty_path_of_mem_closure` — every element of the subgroup generated by `ι` is realised by such a path. * `SchreierGraph.exists_mem_closure_of_path` — conversely, a path witnesses a closure element. * `SchreierGraph.reachable_iff` — the iff packaging the two directions.
…struction * Tag `evalWord_cons_true`/`evalWord_cons_false` as `@[simp]` and drop the now-redundant `evalWord_singleton_*` lemmas. * Simplify `evalWord_append` using `cases b <;> simp`. * Rewrite `pathFromWord` in term mode via `Path.cast`.
…oofs * Tighten the section docstring for Reachability. * Use `rcases` instead of `match ... with` inside the cons case of `exists_mem_closure_of_path`.
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 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. |
PR summary 79540a76d4Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Combinatorics.Quiver.Schreier | 295 | 446 | +151 (+51.19%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.Combinatorics.Quiver.Schreier |
151 |
Declarations diff
+ evalWord
+ evalWord_append
+ evalWord_cons_false
+ evalWord_cons_true
+ evalWord_eq_lift
+ evalWord_mem_closure
+ evalWord_nil
+ exists_mem_closure_of_path
+ nonempty_path_of_mem_closure
+ pathFromWord
+ reachable_iff
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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
Adds word evaluation and reachability results to the Schreier graph API.
SchreierGraph.evalWord: evaluates a wordList (S × Bool)as an element of the ambient group, where(s, true)contributesι sand(s, false)contributes(ι s)⁻¹.SchreierGraph.evalWord_eq_lift: agreement withFreeGroup.lift.SchreierGraph.evalWord_mem_closure: every word evaluates into the subgroup generated byι.SchreierGraph.pathFromWord: a Bool-tagged word yields a path inSymmetrify (SchreierGraph V ι)fromxtoevalWord ι w • x.SchreierGraph.reachable_iff: two vertices are connected by a path in the symmetrification iff some element of the subgroup closure carries one to the other.Follow-up to #36320.
This PR was written with AI assistance (Claude). The code has been reviewed by the author.