Rewrite Rulesphysics/poisson-bracket-expand

physics/poisson-bracket-expand

Expand poisson brackets to explicit brace fences.

Rewrite patterns#

  1. poisson-bracket-auto-sized\pb{#1}{#2}\left\{#1,#2\right\}
  2. poisson-bracket-fixed-size\pb*{#1}{#2}\{#1,#2\}

Examples#

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

Poisson bracket canonical#

Before

\pb{q_i}{p_j}=\delta_{ij}

After this rule

\left\{q_i,p_j\right\}=\delta_{ij}

Rendering verified with the declared packages.

Poisson bracket star fixed size#

Before

\pb*{f}{g}=0

After this rule

\{f,g\}=0

Rendering verified with the declared packages.

Same family#

Notes#

Covers the star branch, where star suppresses automatic fence sizing. Explicit big-size control after the command follows the shared commutator parser and is outside this rule's scope.

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["physics/poisson-bracket-expand"])
new TransformEngine({ profile: 'corpus', disableRules: ['physics/poisson-bracket-expand'] })

Open in Playground