(*<*) theory Real_Asymp_Doc imports"HOL-Real_Asymp.Real_Asymp" begin
ML_file ‹~~/src/Doc/antiquote_setup.ML› (*>*)
section‹Introduction›
text‹
This document describes the 🍋‹real_asymp› package that provides a number of tools
related to the asymptotics of real-valued functions. These tools are:
▪ The @{method real_asymp} method to prove limits, statements involving Landau symbols
(`Big-O' etc.), and asymptotic equivalence (‹∼›)
▪ The @{command real_limit} command to compute the limit of a real-valued function at a
certain point
▪ The @{command real_expansion} command to compute the asymptotic expansion of a
real-valued function at a certain point
These three tools will be described in the following sections. ›
section‹Supported Operations›
text‹
The 🍋‹real_asymp› package fully supports the following operations:
▪ term‹sin›, term‹cos›, term‹tan› at finite points
▪ term‹sinh›, term‹cosh›, term‹tanh›
▪ term‹min›, term‹max›, term‹abs›
Additionally, the following operations are supported in a `best effort' fashion using asymptotic
upper/lower bounds:
▪ Powers with variable natural exponent
▪ term‹sin› and term‹cos› at ‹±∞›
▪ term‹floor›, term‹ceiling›, term‹frac›, and ‹mod›
Additionally, the term‹arctan› function is partially supported. The method may fail when
the argument to term‹arctan› contains functions of different order of growth. ›
text‹
The @{method real_asymp} method is a semi-automatic proof method for proving certain statements
related to the asymptotic behaviour of real-valued functions. In the following, let ‹f› and ‹g›
be functions of type 🍋‹real ==> real› and ‹F› and ‹G› real filters.
The functions ‹f› and ‹g› can be built from the operations mentioned before and may contain free
variables. The filters ‹F› and ‹G› can be either ‹±∞› or a finite point in ‹ℝ›, possibly
with approach from the left or from the right.
The class of statements that is supported by @{method real_asymp} then consists of:
▪ Limits, i.\,e.\ prop‹filterlim f F G›
▪ Landau symbols, i.\,e.\ prop‹f ∈ O[F](g)› and analogously for 🪙‹o›, ‹Ω›, ‹ψ›, ‹Θ›
▪ Asymptotic equivalence, i.\,e.\ prop‹f ∼[F] g›
▪ Asymptotic inequalities, i.\,e.\ prop‹eventually (λx. f x ≤ g x) F›
For typical problems arising in practice that do not contain free variables, @{method real_asymp}
tends to succeed fully automatically within fractions of seconds, e.\,g.: ›
text‹
What makes the method 🪙‹semi-automatic› is the fact that it has to internally determine the
sign of real-valued constants and identical zeroness of real-valued functions, and while the
internal heuristics for this work very well most of the time, there are situations where the
method fails to determine the sign of a constant, in which case the user needs to go back and
supply more information about the sign of that constant in order to get a result.
A simple example is the following: › (*<*)
experiment fixes a :: real begin (*>*) lemma‹filterlim (λx::real. exp (a * x)) at_top at_top› oops
text‹
Here, @{method real_asymp} outputs an error message stating that it could not determine the
sign of the free variable term‹a :: real›. In this case, the user must add the assumption ‹a > 0› and give it to @{method real_asymp}. › lemma assumes‹a > 0› shows‹filterlim (λx::real. exp (a * x)) at_top at_top› using assms by real_asymp (*<*) end (*>*) text‹
Additional modifications to the simpset that is used for determining signs can also be made
with ‹simp add:› modifiers etc.\ in the same way as when using the @{method simp} method directly.
The same situation can also occur without free variables if the constant in question is a
complicated expression that the simplifier does not know enough ebout,
e.\,g.\ term‹pi - exp 1›.
In order to trace problems with sign determination, the ‹(verbose)› option can be passed to
@{method real_asymp}. It will then print a detailed error message whenever it encounters
a sign determination problem that it cannot solve.
The ‹(fallback)› flag causes the method not to use asymptotic interval arithmetic, but only
the much simpler core mechanism of computing a single Multiseries expansion for the input
function. There should normally be no need to use this flag; however, the core part of the
code has been tested much more rigorously than the asymptotic interval part. In case there
is some implementation problem with it for a problem that can be solved without it, the ‹(fallback)› option can be used until that problem is resolved. ›
🪙@{command real_limit} computes the limit of the given function‹f(x)› for as ‹x› tends tothespecifiedlimitpoint.Additionalfactscanbeprovidedwiththe\<open>facts\<close>option, similarlytothe@{commandusing}commandwith@{methodreal_asymp}.Thelimitpointgiven bythe\<open>limit\<close>optionmustbeoneofthefilters\<^term>\<open>at_top\<close>,\<^term>\<open>at_bot\<close>, \<^term>\<open>at_left\<close>,or\<^term>\<open>at_right\<close>.Ifnolimitpointisgiven,\<^term>\<open>at_top\<close>isused bydefault. \<^medskip> Theoutputof@{commandreal_limit}canbe\<open>\<infinity>\<close>,\<open>-\<infinity>\<close>,\<open>\<plusminus>\<infinity>\<close>,\<open>c\<close>(forsomerealconstant\<open>c\<close>), \<open>0\<^sup>+\<close>,or\<open>0\<^sup>-\<close>.The\<open>+\<close>and\<open>-\<close>inthelastcaseindicatewhethertheapproachisfromabove orfrombelow(correspondingto\<^term>\<open>at_right(0::real)\<close>and\<^term>\<open>at_left(0::real)\<close>); fortechnicalreasons,thisinformationiscurrentlynotdisplayedifthelimitisnot0. \<^medskip> Ifthegivenfunctiondoesnottendtoadefinitelimit(e.\,g.\\<^term>\<open>sinx\<close>for\<open>x\<rightarrow>\<infinity>\<close>), thecommandmightneverthelesssucceedtocomputeanasymptoticupperand/orlowerboundand displaythelimitsoftheseboundsinstead.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.