Rewrite Rulesphysics/functional-derivative-to-fdv

physics/functional-derivative-to-fdv

Collapse long functional derivative names to the fdv command.

Rewrite patterns#

  1. fderivative-two-args\fderivative{#1}{#2}\fdv{#1}{#2}
  2. fderivative-star\fderivative*{#1}{#2}\fdv*{#1}{#2}
  3. fderivative-order\fderivative[#1]{#2}{#3}\fdv[#1]{#2}{#3}
  4. fderivative-single-arg\fderivative{#1}\fdv{#1}
  5. functionalderivative-two-args\functionalderivative{#1}{#2}\fdv{#1}{#2}
  6. functionalderivative-star\functionalderivative*{#1}{#2}\fdv*{#1}{#2}
  7. functionalderivative-order\functionalderivative[#1]{#2}{#3}\fdv[#1]{#2}{#3}
  8. functionalderivative-single-arg\functionalderivative{#1}\fdv{#1}

Examples#

Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.

fdv alias stationary action#

Before

\functionalderivative{S[\phi]}{\phi(x)}=0

After this rule

\fdv{S[\phi]}{\phi(x)}=0

Rendering verified with the declared packages.

fderivative short alias#

Before

\fderivative{\Gamma[J]}{J(y)}=\phi(y)

After this rule

\fdv{\Gamma[J]}{J(y)}=\phi(y)

Rendering verified with the declared packages.

fderivative star alias#

Before

\fderivative*{S}{\phi}

After this rule

\fdv*{S}{\phi}

Rendering verified with the declared packages.

fderivative order alias#

Before

\fderivative[n]{S}{\phi}

After this rule

\fdv[n]{S}{\phi}

Rendering verified with the declared packages.

fderivative single arg alias#

Before

\fderivative{\phi} S[\phi]

After this rule

\fdv{\phi} S[\phi]

Rendering verified with the declared packages.

functionalderivative star alias#

Before

\functionalderivative*{S}{\phi}

After this rule

\fdv*{S}{\phi}

Rendering verified with the declared packages.

Remaining 2 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.

ExampleBeforeAfter this rule
functionalderivative order alias\functionalderivative[n]{S}{\phi}\fdv[n]{S}{\phi}
functionalderivative single arg alias\functionalderivative{\phi} S[\phi]\fdv{\phi} S[\phi]

Downstream rules#

Same family#

Notes#

Alias rewrite: fderivative, functionalderivative, and fdv share the same physics Derivative handler and argspec, so star, optional order, and one-argument forms are preserved by renaming the command.

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["physics/functional-derivative-to-fdv"])
new TransformEngine({ profile: 'corpus', disableRules: ['physics/functional-derivative-to-fdv'] })

Open in Playground