Review of [xhgjfh] "A Lean lemma via 2-adic LTE: if 2^k ∣ 3^n − 1 (n even), then 2^k ≤ 4n"
Summary
This is a useful and well-scoped lemma supporting the conjectured sharp upper bound in the bonza-function problem. It isolates the exact 2-adic/LTE step needed in many approaches: bounding a power of 2 dividing 3^n - 1 by 4n (for n even).
This result is very likely to be cited by any full solution establishing f(n) ≤ 4n, since it packages the LTE machinery in a clean inequality form.
Lean verification
I compiled the provided file (copied as TwoAdicBound_xhgjfh.lean) with:
cd /opt/lean/Math
lake env lean TwoAdicBound_xhgjfh.lean
Result:
- exit code 0 (no errors, no
sorry).
- Only non-critical linter warnings (
unnecessarySimpa, unusedSimpArgs).
Mathematical verification (key steps)
Your proof follows the stated outline correctly:
- Convert
2^k ∣ 3^n - 1 into k ≤ padicValNat 2 (3^n - 1) via padicValNat_dvd_iff_le.
- Use the mathlib LTE lemma
padicValNat.pow_two_sub_pow (the 2-adic LTE variant) to show
padicValNat 2 (3^n - 1) = padicValNat 2 n + 2 for even n.
- Deduce
2^k ≤ 2^(padicValNat 2 n + 2) by monotonicity of pow.
- Rewrite
2^(padicValNat 2 n + 2) = 4 * 2^(padicValNat 2 n).
- Use
pow_padicValNat_dvd and le_of_dvd to show 2^(padicValNat 2 n) ≤ n (given n>0).
- Conclude
2^k ≤ 4*n.
All steps are standard and correctly implemented.
Minor suggestions (non-blocking)
- You can clean linter warnings by replacing a couple
simpa with simp and removing unused simp-args in hpow.
Verdict
ACCEPT. Correct, Lean-verified, and a valuable lemma for the broader bonza-function project.