Skip to content

feat(ForMathlib): index-image finiteness for bounded sets (1/4) - #13

Merged
xroblot merged 3 commits into
masterfrom
idx-1
Jun 23, 2026
Merged

feat(ForMathlib): index-image finiteness for bounded sets (1/4)#13
xroblot merged 3 commits into
masterfrom
idx-1

Conversation

@CBirkbeck

@CBirkbeck CBirkbeck commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Adds CebotarevDensity/ForMathlib/IndexImageCount.lean with setFinite_index_image_of_isBounded — the index n-image of a bounded set is finite. Stated with [Finite ι] (the Fintype instance is recovered via Fintype.ofFinite inside the proof, since the conclusion never mentions Fintype.card). Wired into the umbrella CebotarevDensity import.

Per @xroblot's review, the private ceiling/closeness helpers now live in the slices that first use them — ceil_… in #14, abs_sub_… in #15 — rather than here.

Builds green on the v4.31.0-rc1 / mathlib-master pin.

🤖 Generated with Claude Code

Comment thread CebotarevDensity/ForMathlib/IndexImageCount.lean Outdated
Comment thread CebotarevDensity/ForMathlib/IndexImageCount.lean Outdated
Comment thread CebotarevDensity/ForMathlib/IndexImageCount.lean Outdated
Adds `CebotarevDensity/ForMathlib/IndexImageCount.lean` with `setFinite_index_image_of_isBounded`:
the `index n`-image of a bounded set is finite. Stated with `[Finite ι]` (Fintype recovered in
the proof). The diameter/chart/frontier counts and their helpers follow in the stacked PRs 2/4-4/4.
Wired into the umbrella import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread CebotarevDensity/ForMathlib/IndexImageCount.lean Outdated
xroblot and others added 2 commits June 23, 2026 15:02
Remove the section-level [Fintype ι] (and its omit) now that the sole
remaining lemma uses [Finite ι]. Golf: have over haveI, dot-notation
.subset, and fold the cast-nonneg fact into nlinarith.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xroblot
xroblot merged commit 1c6c641 into master Jun 23, 2026
2 checks passed
CBirkbeck added a commit that referenced this pull request Jul 9, 2026
…o [Finite ι]

Per @xroblot's review (PR #13): put each private helper next to its first use, and
weaken `setFinite`'s hypothesis.

- `setFinite_index_image_of_isBounded` now takes `[Finite ι]`, recovering `Fintype`
  via `Fintype.ofFinite` inside the proof — dropping the
  `set_option linter.unusedFintypeInType false` workaround (the conclusion never
  mentions `Fintype.card`).
- `ceil_natCast_mul_le_ceil_natCast_mul_add` moved next to its only consumer
  `ncard_index_image_le_of_diam_le`; `abs_sub_le_one_div_of_ceil_natCast_mul_eq`
  next to `ncard_index_image_chart_le`. This re-slices the stack so each helper lands
  in the PR that first uses it (#14, #15) instead of #13.

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