Rewrite patterns#
- unstarred-named-function
\operatorname{#1}\#1 - starred-named-operator
\operatorname*{#1}\#1
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
Unstarred arccos#
Rendering verified with the declared packages.
Unstarred arcsin#
Rendering verified with the declared packages.
Unstarred arctan#
Rendering verified with the declared packages.
Unstarred arg#
Rendering verified with the declared packages.
Unstarred cos#
Rendering verified with the declared packages.
Unstarred cosh#
Rendering verified with the declared packages.
Remaining 45 examples#
Listed as LaTeX source. Hover over, focus, or tap a row to preview the rendering before and after. Each renders the same as its input with the declared packages.
| Example | Before | After this rule |
|---|---|---|
| Unstarred cot | \operatorname{cot} x | \cot x |
| Unstarred coth | \operatorname{coth} x | \coth x |
| Unstarred csc | \operatorname{csc} x | \csc x |
| Unstarred deg | \operatorname{deg} x | \deg x |
| Unstarred dim | \operatorname{dim} x | \dim x |
| Unstarred exp | \operatorname{exp} x | \exp x |
| Unstarred hom | \operatorname{hom} x | \hom x |
| Unstarred ker | \operatorname{ker} x | \ker x |
| Unstarred lg | \operatorname{lg} x | \lg x |
| Unstarred ln | \operatorname{ln} x | \ln x |
| Unstarred log | \operatorname{log} x | \log x |
| Unstarred sec | \operatorname{sec} x | \sec x |
| Unstarred sin | \operatorname{sin} x | \sin x |
| Unstarred sinh | \operatorname{sinh} x | \sinh x |
| Unstarred tan | \operatorname{tan} x | \tan x |
| Unstarred tanh | \operatorname{tanh} x | \tanh x |
| Starred det | \operatorname*{det}_{x} | \det_{x} |
| Starred gcd | \operatorname*{gcd}_{x} | \gcd_{x} |
| Starred inf | \operatorname*{inf}_{x} | \inf_{x} |
| Starred lim | \operatorname*{lim}_{x} | \lim_{x} |
| Starred max | \operatorname*{max}_{x} | \max_{x} |
| Starred min | \operatorname*{min}_{x} | \min_{x} |
| Starred pr | \operatorname*{Pr}_{x} | \Pr_{x} |
| Starred sup | \operatorname*{sup}_{x} | \sup_{x} |
| Starred named function preserved | \operatorname*{ln}_{n} | \operatorname*{ln}_{n} |
| Unstarred named operator preserved | \operatorname{lim}_{n} | \operatorname{lim}_{n} |
| Unknown name preserved | \operatorname{rank} A | \operatorname{rank} A |
| Nested group preserved | \operatorname{{ln}} x | \operatorname{{ln}} x |
| Explicit spacing preserved | \operatorname{l\,n} x | \operatorname{l\,n} x |
| Non ascii preserved | \operatorname{λ} x | \operatorname{λ} x |
| Bare limits preserved | \operatorname{ln}\limits x | \operatorname{ln}\limits x |
| Scripted limits preserved | \operatorname{ln}\limits_{n} | \operatorname{ln}\limits_{n} |
| Unstarred nolimits rewritten | \operatorname{ln}\nolimits_{n} | \ln\nolimits_{n} |
| Starred limits rewritten | \operatorname*{lim}\limits_{n} | \lim\limits_{n} |
| Starred nolimits rewritten | \operatorname*{max}\nolimits_{n} | \max\nolimits_{n} |
| Spaced liminf preserved | \operatorname*{liminf}_{n} | \operatorname*{liminf}_{n} |
| Spaced limsup preserved | \operatorname*{limsup}_{n} | \operatorname*{limsup}_{n} |
| Spaced injlim preserved | \operatorname*{injlim}_{n} | \operatorname*{injlim}_{n} |
| Spaced projlim preserved | \operatorname*{projlim}_{n} | \operatorname*{projlim}_{n} |
| Physics optional argument collision preserved | \operatorname{sin}[2]x | \operatorname{sin}[2]x |
| Physics expression collision preserved | \operatorname{exp}(\frac12) | \operatorname{exp}(\frac12) |
| Physics base named function rewritten | \operatorname{arg}x | \arg x |
| Physics det collision preserved | \operatorname*{det}_{n} | \operatorname*{det}_{n} |
| Physics pr collision preserved | \operatorname*{Pr}_{n} | \operatorname*{Pr}_{n} |
| Physics base named operator rewritten | \operatorname*{lim}_{n} | \lim_{n} |
Related rules#
Upstream rules#
physics/named-fn-to-operatornameRewrite physics-only named functions to operatorname and expand their auto-sized arguments.physics/rank-to-operatorname-rankRewrite rank to an explicit operatorname form instead of a package-local alias.
Downstream rules#
physics/named-fn-paren-expandExpand physics power and auto-sized parenthesis arguments of standard named functions.physics/physics-operator-fence-expandExpand the physics auto-sized argument of exp, det, and Pr into an explicit fence.
Same family#
ams/idotsint-expandExpand idotsint to explicit repeated integral surfaces.base/limits-dropDrop explicit limits from an audited operator while preserving attached scripts.base/nolimits-dropDrop explicit nolimits from an audited operator while preserving attached scripts.physics/cosine-to-cosCollapse a bare cosine helper to the standard cos operator.physics/naturallogarithm-to-lnCollapse a bare natural logarithm helper to the standard ln operator.physics/probability-to-prCollapse a bare Probability helper to the standard Pr operator.physics/sine-to-sinCollapse a bare sine helper to the standard sin operator.physics/trace-capital-to-TrCollapse a bare Trace with no following argument group to the local Tr anchor.physics/trace-to-trCollapse a bare trace with no following argument group to the local tr anchor.physics/named-fn-paren-expandExpand physics power and auto-sized parenthesis arguments of standard named functions.physics/named-fn-to-operatornameRewrite physics-only named functions to operatorname and expand their auto-sized arguments.physics/physics-operator-fence-expandExpand the physics auto-sized argument of exp, det, and Pr into an explicit fence.physics/rank-to-operatorname-rankRewrite rank to an explicit operatorname form instead of a package-local alias.
Notes#
The unstarred lookup is the exact case-sensitive set arccos/arcsin/arctan/arg/cos/cosh/cot/coth/csc/deg/dim/exp/hom/ker/lg/ln/log/sec/sin/sinh/tan/tanh. The starred lookup is det/gcd/inf/lim/max/min/Pr/sup. Both branches require the AMS operatorname source record and an exact contiguous ASCII OperatorNameContent subtree with no groups, styles, spacing, or other nodes. Unstarred NamedOp names, starred NamedFn names, unknown or complex content, and liminf/limsup/injlim/projlim remain unchanged. An unstarred source followed by bare or scripted limits also remains unchanged. Before replacement, the active target record must retain base ownership; physics or runtime overrides fail closed, including the physics optional-argument functions and det/exp/Pr collisions. Every Applied result replaces one eligible cmd:operatorname node with a named function or operator command; all preserved branches return Skipped, so the number of eligible cmd:operatorname nodes strictly decreases. A following limits modifier is only an eligibility probe and stays unchanged.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["ams/operatorname-to-named-function"])new TransformEngine({ profile: 'corpus', disableRules: ['ams/operatorname-to-named-function'] })