Skip to content

feat(Dehn function): define Dehn functions#42005

Draft
homeowmorphism wants to merge 7 commits into
leanprover-community:masterfrom
homeowmorphism:Group.Presentation.Dehn
Draft

feat(Dehn function): define Dehn functions#42005
homeowmorphism wants to merge 7 commits into
leanprover-community:masterfrom
homeowmorphism:Group.Presentation.Dehn

Conversation

@homeowmorphism

@homeowmorphism homeowmorphism commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

For a presentation P of a group G and a word w : FreeGroup α that evaluates to
the identity in G, the area of w is the least number of conjugates of relators and of
inverse relators whose product is w. The Dehn function of P is given by
n ↦ max {area w | w = 1 in G, ‖w‖ ≤ n}, where ‖w‖ is the length of w.

Notes:

  • area takes values in ℕ∞; it is exactly when w does not evaluate to the identity in G
    (there is then no product of conjugates equal to w), and finite otherwise. This mirrors
    SimpleGraph.edist, and keeps area w = 0 ↔ w = 1 rather than colliding with the junk value.
  • FreeGroup.norm needs [DecidableEq α], so kerBall and dehn do too.

The definitions were discussed by humans, but Claude Fable was used to write a lot of the API lemmas.

Open in Gitpod

homeowmorphism and others added 6 commits July 20, 2026 16:37
…f a lemma

Reword the `Group.Presentation` structure and `ker_eq_normalClosure`
docstrings for clarity, simplify the `isFinitelyPresented_iff` docstring,
and change `presentedGroupEquiv_of` from `theorem` to `lemma`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@homeowmorphism
homeowmorphism marked this pull request as draft July 22, 2026 11:00
@mathlib-bors

mathlib-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

PR summary c36365a63b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.GroupTheory.Presentation (new file) 1204
Mathlib.Geometry.Group.DehnFunction (new file) 1209

Declarations diff (regex)

+ FreeGroup.finite_setOf_norm_le
+ Group.Generators
+ Group.Presentation
+ Group.fg_iff_nonempty_finite_generators
+ Group.isFinitelyPresented_iff_exists_finite_presentation
+ IsConjRelDecomp
+ IsConjRelDecomp.append
+ IsConjRelDecomp.area_le
+ IsConjRelDecomp.conj
+ IsConjRelDecomp.inv
+ IsConjRelDecomp.lift_eq_one
+ area
+ area_conj
+ area_conj_le
+ area_eq_iInf
+ area_eq_top_iff
+ area_eq_zero_iff
+ area_inv
+ area_inv_le
+ area_le_dehn
+ area_le_dehn_norm
+ area_le_one_of_mem_conjugatesOfSet_symmRel
+ area_le_one_of_mem_rel
+ area_le_one_of_mem_symmRel
+ area_mul_le
+ area_ne_top_iff
+ area_ne_top_of_mem_kerBall
+ area_one_eq_zero
+ dehn
+ dehn_le_iff
+ dehn_mono
+ dehn_zero
+ exists_isConjRelDecomp_iff_mem_ker
+ exists_isConjRelDecomp_length_eq_area
+ fg
+ inv_mem_conjugatesOfSet_symmRel
+ inv_mem_kerBall
+ inv_mem_symmRel
+ isConjRelDecomp_one_nil
+ isConjRelDecomp_singleton
+ isFinitelyPresented
+ kerBall
+ kerBall_finite
+ kerBall_mono
+ kerBall_nonempty
+ kerBall_subset_ker
+ kerBall_zero
+ ker_lift
+ lift
+ lift_eq_one_of_mem_conjugatesOfSet_symmRel
+ lift_eq_one_of_mem_rel
+ lift_eq_one_of_mem_symmRel
+ lift_of
+ lift_surjective
+ lift_surjective'
+ mem_kerBall
+ mem_kerBall_norm
+ mul_mem_kerBall
+ natCast_dehn
+ ofLiftSurjective
+ one_mem_kerBall
+ presentedGroupEquiv
+ presentedGroupEquiv_of
+ rel_subset_symmRel
+ sSup_area_image_kerBall_ne_top
+ self
+ symmRel
+ val_ofLiftSurjective
+ val_self
++ range_lift_eq_top

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 -- pending)

Computed after the build finishes.


No changes to strong technical debt.

Increase in weak tech debt: (relative, absolute) = (2.00, 0.00)
Current number Change Type (weak)
5016 2 exposed public sections

Current commit c36365a63b
Reference commit 4608056c77

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

Copy link
Copy Markdown

🚨 PR Title Needs Formatting

Please update the title to match our commit style conventions.

Errors from script:

labels are []
error: a PR's scope must not contain spaces
Details on the required title format

The title should fit the following format:

<kind>(<optional-scope>): <subject>

<kind> is:

  • feat (feature)
  • fix (bug fix)
  • doc (documentation)
  • style (formatting, missing semicolons, ...)
  • refactor
  • test (when adding missing tests)
  • chore (maintain)
  • perf (performance improvement, optimization, ...)
  • ci (changes to continuous integration, repo automation, ...)

<optional-scope> is a name of module or a directory which contains changed modules.
This is not necessary to include, but may be useful if the <subject> is insufficient.
The Mathlib directory prefix is always omitted.
For instance, it could be

  • Data/Nat/Basic
  • Algebra/Group/Defs
  • Topology/Constructions

<subject> has the following constraints:

  • do not capitalize the first letter
  • no dot(.) at the end
  • use imperative, present tense: "change" not "changed" nor "changes"

For a presentation `P` of a group `G` and a word `w : FreeGroup α` that
evaluates to the identity in `G`, the *area* of `w` is the least number of
conjugates of relators and of inverse relators whose product is `w`. The
*Dehn function* of `P` is given by `n ↦ max {area w | w = 1 in G, ‖w‖ ≤ n}`,
where `‖w‖` is the length of `w`.

Also adds `Group.Presentation.symmRel`, the relators together with their
inverses, and its basic API; both signs are needed because the conjugates of
`rel` alone generate only a submonoid of `FreeGroup α`, whereas they must
exhaust the subgroup `Subgroup.normalClosure P.rel`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@homeowmorphism
homeowmorphism force-pushed the Group.Presentation.Dehn branch from eda8501 to c36365a Compare July 22, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant