Skip to content

feat: add automorphisms of the infinite regular rooted tree - #46052

Open
EzequielS2 wants to merge 5 commits into
leanprover-community:masterfrom
EzequielS2:regular-tree-fin-n
Open

EzequielS2 wants to merge 5 commits into
leanprover-community:masterfrom
EzequielS2:regular-tree-fin-n

Conversation

@EzequielS2

Copy link
Copy Markdown
Contributor

Add InfiniteRegularTree n and the root decomposition of TreeAut n.

@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 Nov 15, 2026
@github-actions

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 Nov 15, 2026 •

Copy link
Copy Markdown

PR summary c17e4f46a9

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Geometry.Group.InfiniteRegularTree (new file) 1023

Declarations diff (regex)

+ InfiniteRegularTree
+ TreeAut
+ apply_cons
+ apply_cons_ne_nil
+ apply_cons_rootPerm
+ apply_singleton
+ apply_singleton_rootPerm
+ combine
+ combineFun
+ combineFun_left_inv
+ combineHom
+ combineHom_apply
+ combineHom_compat
+ combine_cons
+ combine_mul
+ combine_one
+ equivSemidirect
+ equivSemidirect_apply
+ equivSemidirect_symm_apply
+ firstLetter
+ firstLetter_symm
+ length_lt_of_prefix_ne
+ length_map_take_ge
+ map_isPrefix_iff
+ map_length
+ map_root
+ ofRootPerm
+ ofRootPermHom
+ ofRootPermHom_apply
+ ofRootPerm_cons
+ ofRootPerm_mul
+ ofRootPerm_mul_combine
+ ofRootPerm_one
+ ofRootPerm_root
+ permAction
+ permAction_apply
+ permMulAut
+ restrict
+ restrictFun
+ restrict_apply
+ restrict_combine
+ restrict_combine_mul_ofRootPerm
+ rootPerm
+ rootPerm_combine
+ rootPerm_combine_mul_ofRootPerm
+ rootPerm_eq_firstLetter
++ inv_eq_symm

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 c17e4f4).

  • +40 new declarations
  • −0 removed declarations
+InfiniteRegularTree
+InfiniteRegularTree.TreeAut
+InfiniteRegularTree.TreeAut.apply_cons_ne_nil
+InfiniteRegularTree.TreeAut.apply_cons_rootPerm
+InfiniteRegularTree.TreeAut.apply_singleton_rootPerm
+InfiniteRegularTree.TreeAut.combine
+InfiniteRegularTree.TreeAut.combineHom
+InfiniteRegularTree.TreeAut.combineHom_apply
+InfiniteRegularTree.TreeAut.combineHom_compat
+InfiniteRegularTree.TreeAut.combine_cons
+InfiniteRegularTree.TreeAut.combine_mul
+InfiniteRegularTree.TreeAut.combine_one
+InfiniteRegularTree.TreeAut.equivSemidirect
+InfiniteRegularTree.TreeAut.equivSemidirect_apply
+InfiniteRegularTree.TreeAut.equivSemidirect_symm_apply
+InfiniteRegularTree.TreeAut.inv_eq_symm
+InfiniteRegularTree.TreeAut.length_map_take_ge
+InfiniteRegularTree.TreeAut.map_isPrefix_iff
+InfiniteRegularTree.TreeAut.map_length
+InfiniteRegularTree.TreeAut.map_root
+InfiniteRegularTree.TreeAut.ofRootPerm
+InfiniteRegularTree.TreeAut.ofRootPermHom
+InfiniteRegularTree.TreeAut.ofRootPermHom_apply
+InfiniteRegularTree.TreeAut.ofRootPerm_cons
+InfiniteRegularTree.TreeAut.ofRootPerm_mul
+InfiniteRegularTree.TreeAut.ofRootPerm_mul_combine
+InfiniteRegularTree.TreeAut.ofRootPerm_one
+InfiniteRegularTree.TreeAut.ofRootPerm_root
+InfiniteRegularTree.TreeAut.permAction
+InfiniteRegularTree.TreeAut.permAction_apply
+InfiniteRegularTree.TreeAut.permMulAut
+InfiniteRegularTree.TreeAut.restrict
+InfiniteRegularTree.TreeAut.restrict_apply
+InfiniteRegularTree.TreeAut.restrict_combine
+InfiniteRegularTree.TreeAut.restrict_combine_mul_ofRootPerm
+InfiniteRegularTree.TreeAut.rootPerm
+InfiniteRegularTree.TreeAut.rootPerm_combine
+InfiniteRegularTree.TreeAut.rootPerm_combine_mul_ofRootPerm
+List.length_lt_of_prefix_ne
+RelIso.inv_eq_symm

Increase in strong tech debt: (relative, absolute) = (11.57, 0.09)
Current number Change Type (strong)
472 13 backward.privateInPublic
188 11 backward.privateInPublic.warn
Increase in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5153 1 exposed public sections

Current commit c17e4f46a9
Reference commit a906e4e0c0

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 added the t-geometric-group-theory Geometric group theory label Nov 15, 2026
These commands made the changes in this commit.
To make the same fixes yourself, run them in your mathlib4 checkout.
@tb65536 tb65536 added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 18, 2026
@EzequielS2

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 18, 2026
@[expose] public section

/-- The infinite regular rooted tree on the alphabet `α`: vertices are finite words. -/
abbrev InfiniteRegularTree (α : Type*) := List α

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be a one-field structure rather than an abbrev? For instance, right now if you use ext on TreeAut, it will go straight through and use the ext lemma for lists which is quite undesirable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(maybe that would make the rest of the file too painful)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(there's also the option of def rather than abbrev)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kept as an abbrev, same pattern as OrderIso and SimpleGraph.Iso. I tried a one-field structure and a def: the structure needs extra FunLike/Group boilerplate, and with FunLike the ext tactic still continues into List.ext_getElem?. A def loses the inherited FunLike/Group instances from RelIso. So abbrev seems the best fit here, and we use RelIso.ext explicitly when proving equalities..

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.

On the contrary, I think we should get rid of this alias and use List directly.

@tb65536 tb65536 added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 20, 2026
@github-actions github-actions Bot added the increases-technical-debt Automatically added label for PRs which increase "strong" technical debts label Nov 21, 2026
l₁.Nodup :=
hn.sublist h.sublist

/-- A proper prefix is strictly shorter. -/

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.

Suggested change
/-- A proper prefix is strictly shorter. -/

@[expose] public section

/-- The infinite regular rooted tree on the alphabet `α`: vertices are finite words. -/
abbrev InfiniteRegularTree (α : Type*) := List α

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.

On the contrary, I think we should get rid of this alias and use List directly.

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-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. increases-technical-debt Automatically added label for PRs which increase "strong" technical debts new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-geometric-group-theory Geometric group theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants