theorem
proved
tactic proof
ode_neg_zero_uniqueness
show as:
view Lean formalization →
formal statement (Lean)
288private theorem ode_neg_zero_uniqueness (f : ℝ → ℝ)
289 (h_diff2 : ContDiff ℝ 2 f)
290 (h_ode : ∀ t, deriv (deriv f) t = -(f t))
291 (h_f0 : f 0 = 0) (h_f'0 : deriv f 0 = 0) :
292 ∀ t, f t = 0 := by
proof body
Tactic-mode proof.
293 have h_d1 : Differentiable ℝ f := h_diff2.differentiable (by decide : (2 : WithTop ℕ∞) ≠ 0)
294 have hCD1 : ContDiff ℝ 1 (deriv f) := by
295 rw [show (2 : WithTop ℕ∞) = 1 + 1 from rfl] at h_diff2
296 rw [contDiff_succ_iff_deriv] at h_diff2; exact h_diff2.2.2
297 have h_dd : Differentiable ℝ (deriv f) :=
298 hCD1.differentiable (by decide : (1 : WithTop ℕ∞) ≠ 0)
299 have hE_deriv_zero : ∀ s, deriv (fun t => f t ^ 2 + deriv f t ^ 2) s = 0 := by
300 intro s
301 have h1 : HasDerivAt (fun x => f x ^ 2 + deriv f x ^ 2)
302 (↑2 * f s ^ (2 - 1) * deriv f s + ↑2 * deriv f s ^ (2 - 1) * deriv (deriv f) s) s :=
303 ((h_d1 s).hasDerivAt.pow 2).add ((h_dd s).hasDerivAt.pow 2)
304 have h2 := h1.deriv; rw [h_ode s] at h2; push_cast at h2; simp only [pow_one] at h2
305 linarith
306 have hE_eq := is_const_of_deriv_eq_zero
307 (show Differentiable ℝ (fun t => f t ^ 2 + deriv f t ^ 2) from
308 (h_d1.pow 2).add (h_dd.pow 2))
309 hE_deriv_zero
310 intro t
311 have hE0 : f 0 ^ 2 + deriv f 0 ^ 2 = 0 := by rw [h_f0, h_f'0]; ring
312 have hEt := hE_eq t 0; simp only [hE0] at hEt
313 nlinarith [sq_nonneg (f t), sq_nonneg (deriv f t)]
314