Skip to content

feat(ForMathlib): clampUnit cube retraction (1/10) - #19

Open
CBirkbeck wants to merge 2 commits into
masterfrom
normle-1
Open

feat(ForMathlib): clampUnit cube retraction (1/10)#19
CBirkbeck wants to merge 2 commits into
masterfrom
normle-1

Conversation

@CBirkbeck

@CBirkbeck CBirkbeck commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Part 1 of 10 — the former whole-file PR #9 (NormLeOneLipschitz.lean, ~670 lines), split into ~50-LOC stacked slices per review that PRs should be ~50 lines of Lean code. Each slice is anchored by a public result and builds green.

The file gives a Lipschitz cover of the frontier of the normLeOne fundamental region of a number field's mixed embedding — the geometric input the effective lattice-point count consumes. mathlib has the region NumberField.mixedEmbedding.normLeOne (imported here) but not the Lipschitz structure of its frontier. Independent of the IndexImageCount/LatticePointCount stacks (mathlib-only imports), so this stacks directly on master.

This slice adds the generic clampUnit retraction onto [0,1]^ι and its 1-Lipschitz API (clampUnit, clampUnit_mem_Icc, clampUnit_eq_self, lipschitzWith_clampUnit, exists_lipschitzWith_comp_clampUnit). Stated for an arbitrary Fintype ι. Wired into the umbrella CebotarevDensity import.

The remaining slices: face charts (2) → boundary-in-faces (3–4) → realSpace cover (5) → phase bounds (6) → mixed-space lift (7–8) → bounded/fibre cover (9) → mixed-space headline + index variant (10).

Builds green on the v4.31.0-rc1 / mathlib-master pin (identical to master's pin).

🤖 Generated with Claude Code

First slice of the normLeOne frontier Lipschitz cover (formerly the whole-file
PR #9, split into ~50-LOC stacked PRs). Adds `NormLeOneLipschitz.lean` with the
generic `clampUnit` retraction onto the unit cube `[0,1]^ι` and its Lipschitz API:

* `clampUnit`, `clampUnit_mem_Icc`, `clampUnit_eq_self` — the coordinatewise
  retraction and its fixed-point characterisation.
* `lipschitzWith_clampUnit` (1-Lipschitz) and `exists_lipschitzWith_comp_clampUnit`.

Stated for an arbitrary `Fintype ι` (no number field yet). The face charts and the
frontier cover follow in the stacked slices 2/10–10/10. Wired into the umbrella import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

/-- The coordinatewise retraction of `ι → ℝ` onto the unit cube `Set.Icc 0 1`, given by
`Set.projIcc` in each coordinate. -/
def clampUnit (ι : Type*) (c : ι → ℝ) : ι → ℝ := fun i ↦ (Set.projIcc 0 1 zero_le_one (c i) : ℝ)

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.

Use a variable (ι : Type*) {c : ι → ℝ} line in this file. You may need variable (c) in for the def.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Done in 46a0903 — added variable (ι : Type*) {c : ι → ℝ} and used variable (c) in so c stays explicit for the clampUnit def, dropping the repeated binders from the lemmas. Module builds.

…iew)

Per riccardobrasca's review on PR #19: declare `variable (ι : Type*)
{c : ι → ℝ}` once instead of repeating the binders in every signature,
with `variable (c) in` to keep `c` explicit for the `clampUnit` def.
`c` becomes implicit in the lemmas (recoverable from the goal); the one
internal use passes it by name. No statement content changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants