AFTD Auto-Formalizing Theoretical Domains

polynomial_tanh_bounded

theoremverifiedformalizationimported Lean

For a polynomial P, show that P (tanh x) is bounded on the real line

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Real in
open NNReal in
open Field in
open scoped ContDiff in
lemma polynomial_tanh_bounded (P : Polynomial ℝ) :
    ∃ C : ℝ, ∀ x : ℝ, |P.eval (Real.tanh x)| ≤ C
Formalizes
Physlib, `polynomial_tanh_bounded`
Lean proof
By Afiq Hatta, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Afiq Hatta. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
09 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 1

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Real inopen NNReal inopen Field inopen scoped ContDiff in/-- For a polynomial P, show that P (tanh x) is bounded on the real line -/lemma polynomial_tanh_bounded (P : Polynomial ℝ) :    ∃ C : ℝ, ∀ x : ℝ, |P.eval (Real.tanh x)| ≤ C := by  -- Since tanh maps to (-1, 1), it maps to [-1+ε, 1-ε] for any ε > 0  -- But more directly, tanh maps to (-1, 1) ⊆ [-1, 1]  have h_range : ∀ x : ℝ, Real.tanh x ∈ Set.Icc (-1) 1 := by    intro x    constructor    · exact le_of_lt (neg_one_lt_tanh x)    · exact le_of_lt (tanh_lt_one x)  -- Apply polynomial boundedness on [-1, 1]  obtain ⟨M, hM⟩ := polynomial_bounded_on_interval P (-1) 1  use M  intro x  exact hM (Real.tanh x) (h_range x)
See it in the graphDiscuss this resultChallenge it