Repository navigation
Conversation
Adding $4^n$, where we already have it as lower bound in
`four_pow_le_two_mul_add_one_mul_central_binom`.
Having both provides the standard two-sided bounds for the
central binomial coefficient: $$\frac{4^n}{2n+1} \le \binom{2n}{n} \le 4^n$$
Even though there already is `choose_middle_le_pow`, anyone needing
the bound on the central binomial coefficient has to manually discover
and apply choose_le_succ
PR summary 36fc23ef3dImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
two_mul_choose_self_le_powfour_pow_le_two_mul_add_one_mul_central_binom
joneugster
left a comment
There was a problem hiding this comment.
Thanks!
maintainer delegate
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
Co-authored-by: Jon Eugster <[email protected]>
Co-authored-by: Jon Eugster <[email protected]>
…ul_add_one_mul_central_binom` (#42606) Move `four_pow_le_two_mul_add_one_mul_central_binom` from [`Mathlib.Data.Nat.Choose.Sum`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Sum.lean) to [`Mathlib.Data.Nat.Choose.Central`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean) and adjust it to fit the file's API: * **Rename**: `four_pow_le_two_mul_add_one_mul_central_binom` → [`four_pow_le_two_mul_add_one_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L123-L128) (aligning with `centralBinom` casing convention). * **Statement**: Stated using `centralBinom n` rather than `(2 * n).choose n`. * **Proof**: Simplified by using [`four_pow_le_two_mul_self_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L110-L122) directly, avoiding an import dependency on `Choose.Sum`. * **Deprecation**: Added a deprecation alias for the old name.
|
Build failed (retrying...): |
…ul_add_one_mul_central_binom` (#42606) Move `four_pow_le_two_mul_add_one_mul_central_binom` from [`Mathlib.Data.Nat.Choose.Sum`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Sum.lean) to [`Mathlib.Data.Nat.Choose.Central`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean) and adjust it to fit the file's API: * **Rename**: `four_pow_le_two_mul_add_one_mul_central_binom` → [`four_pow_le_two_mul_add_one_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L123-L128) (aligning with `centralBinom` casing convention). * **Statement**: Stated using `centralBinom n` rather than `(2 * n).choose n`. * **Proof**: Simplified by using [`four_pow_le_two_mul_self_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L110-L122) directly, avoiding an import dependency on `Choose.Sum`. * **Deprecation**: Added a deprecation alias for the old name.
|
Build failed (retrying...): |
…ul_add_one_mul_central_binom` (#42606) Move `four_pow_le_two_mul_add_one_mul_central_binom` from [`Mathlib.Data.Nat.Choose.Sum`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Sum.lean) to [`Mathlib.Data.Nat.Choose.Central`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean) and adjust it to fit the file's API: * **Rename**: `four_pow_le_two_mul_add_one_mul_central_binom` → [`four_pow_le_two_mul_add_one_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L123-L128) (aligning with `centralBinom` casing convention). * **Statement**: Stated using `centralBinom n` rather than `(2 * n).choose n`. * **Proof**: Simplified by using [`four_pow_le_two_mul_self_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L110-L122) directly, avoiding an import dependency on `Choose.Sum`. * **Deprecation**: Added a deprecation alias for the old name.
|
Build failed (retrying...): |
…ul_add_one_mul_central_binom` (#42606) Move `four_pow_le_two_mul_add_one_mul_central_binom` from [`Mathlib.Data.Nat.Choose.Sum`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Sum.lean) to [`Mathlib.Data.Nat.Choose.Central`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean) and adjust it to fit the file's API: * **Rename**: `four_pow_le_two_mul_add_one_mul_central_binom` → [`four_pow_le_two_mul_add_one_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L123-L128) (aligning with `centralBinom` casing convention). * **Statement**: Stated using `centralBinom n` rather than `(2 * n).choose n`. * **Proof**: Simplified by using [`four_pow_le_two_mul_self_mul_centralBinom`](file:///usr/local/google/home/firsching/mathlib4/Mathlib/Data/Nat/Choose/Central.lean#L110-L122) directly, avoiding an import dependency on `Choose.Sum`. * **Deprecation**: Added a deprecation alias for the old name.
|
Pull request successfully merged into master. Build succeeded:
|
four_pow_le_two_mul_add_one_mul_central_binomfour_pow_le_two_mul_add_one_mul_central_binom
* origin/master: (958 commits) chore(Combinatorics/SimpleGraph/Trails): golf and cleanup (leanprover-community#41447) refactor(Probability/Kernel): remove redundant case split in Invariant.comp (leanprover-community#43805) chore: bump toolchain to v4.34.0 (leanprover-community#43798) feat(Data/List/SignVariations): add List.signVariations (leanprover-community#43783) feat(LinearAlgebra/Span/Basic): add Submodule.prodEquiv (leanprover-community#43664) feat(cache): put with native Azure and S3 backends (leanprover-community#43378) feat(Combinatorics/SimpleGraph/Walk): more `transfer` API (leanprover-community#41717) feat(SimpleGraph): girth-diameter inequality (leanprover-community#25834) feat: make `simps?` and `to_dual?`/`to_additive?` more concise (leanprover-community#43775) feat(Basic/IsEmpty/Defs): add Fin.isEmpty_iff (leanprover-community#43763) feat(Data/ENNReal/Inv): add ENNReal.div_mul_div_cancel (leanprover-community#37954) chore(Tactic/Simproc/ExistsAndEq): fix two typos (leanprover-community#43797) feat(LinearAlgebra/Matrix/GeneralLinearGroup/Defs): add the proof of the range of toGL to be the ker of the determinant and the induced equivalence (leanprover-community#41786) chore(Data/Num/Lemmas): golf `transfer` tactic (leanprover-community#41167) refactor(Data/Nat/Choose/Central): move and rename `four_pow_le_two_mul_add_one_mul_central_binom` (leanprover-community#42606) feat(Combinatorics/Graph): edge cut of `Graph` (leanprover-community#37865) feat(Algebra/QuadraticAlgebra): classify quadratic algebras by their discriminant (leanprover-community#42708) fix: use the PR number in the deprecation reminder message (leanprover-community#43786) feat(Data/Fintype/Defs): add DecidableLE (∀ a, β a) (leanprover-community#43425) chore: redefine `Finsupp.indicator` using `Finsupp.onFinset` (leanprover-community#33434) ... # Conflicts: # Mathlib/Tactic/Linter/DirectoryDependency.lean
…bound (#76) Fixes the red [run 34921296164](https://github.com/leanprover/downstream-lean4/actions/runs/34921296164) on `master` (`nightly-2026-09-14`, commit d7f4adb `downstream: update repo mathlib4`). ## mathlib4 **Root cause.** The merge with mathlib master brought in [mathlib4#42606](leanprover-community/mathlib4#42606), which renames `Nat.four_pow_le_two_mul_add_one_mul_central_binom` to `Nat.four_pow_le_two_mul_add_one_mul_centralBinom` and restates it as ``` 4 ^ n ≤ (2 * n + 1) * n.centralBinom ``` while the deprecated alias it leaves behind still says ``` 4 ^ n ≤ (2 * n + 1) * (2 * n).choose n ``` The two are defeq but not syntactically equal, so lean4#14600's inexact-deprecation check warns at `Mathlib/Data/Nat/Choose/Central.lean:131`. `mathlib4` builds with `--wfail`, so the warning is the failure; `Mathlib.Data.Nat.Choose.Central` was the only logged target. mathlib's own CI builds on a release toolchain, which does not have this check, so markers like this one only ever exist downstream and every mathlib merge can add another. **Fix.** Added `+typeChanged` to the `@[deprecated]` attribute, as the warning's own hint suggests. The marker is not recorded in the environment, so no dependent `.olean` changes and everything downstream of the module replays from cache. **Verified locally** on `nightly-2026-09-14`: - `mathlib4`: `lake build --wfail Mathlib Archive Counterexamples Wanted`, `lake test --iofail`, `lake lint` — all pass. Only `Mathlib.Data.Nat.Choose.Central` rebuilt; the rest replayed. - `cslib`: `lake build --wfail --iofail`, `lake test --wfail --iofail`, `lake lint` — all pass with no changes. It was red in the run only because it was skipped behind `mathlib4`. Nothing was left unfinished: those two were the entire red set. <!-- downstream-watch: unattended -->
Move
four_pow_le_two_mul_add_one_mul_central_binomfromMathlib.Data.Nat.Choose.SumtoMathlib.Data.Nat.Choose.Centraland adjust it to fit the file's API:four_pow_le_two_mul_add_one_mul_central_binom→four_pow_le_two_mul_add_one_mul_centralBinom(aligning withcentralBinomcasing convention).centralBinom nrather than(2 * n).choose n.four_pow_le_two_mul_self_mul_centralBinomdirectly, avoiding an import dependency onChoose.Sum.