# base/prime-to-prime-node

Convert the prime control sequence to the Prime AST node.

https://texform.dev/rules/base/prime-to-prime-node

## Metadata

| Field | Value |
| --- | --- |
| Key | base/prime-to-prime-node |
| Level | authoring |
| Fidelity | reading |
| Enabled by packages | base |
| Profiles | Authoring, Faithful, Corpus, Equiv |

## Rewrite patterns

### ordinary-symbol

From:

```latex
\prime
```

To:

```latex
\prime
```

### pure-superscript

From:

```latex
f^\prime
```

To:

```latex
f'
```

## Examples

Examples show the rule in isolation, not a complete normalization profile.

### Script superscript shorthand

Before:

```latex
f^\prime
```

After this rule:

```latex
f'
```

Packages: base.

Rendering verified with the declared packages.

### Subscripted symbol prime

Before:

```latex
F_\nu^\prime
```

After this rule:

```latex
F_\nu'
```

Packages: base.

Rendering verified with the declared packages.

### Ordinary prime symbol

Before:

```latex
\prime
```

After this rule:

```latex
\prime
```

Packages: base.

Rendering verified with the declared packages.

### prime after superscript

Before:

```latex
x^2\prime
```

After this rule:

```latex
x ^ { 2 } \prime
```

Packages: base.

Rendering verified with the declared packages.

### Mixed superscript symbol

Before:

```latex
f^{\prime 2}
```

After this rule:

```latex
f ^ { \prime 2 }
```

Packages: base.

Rendering verified with the declared packages.

## Triggers

- [\\prime](https://texform.dev/latex/symbols/prime)

## Eliminates

- [\\prime](https://texform.dev/latex/symbols/prime)

## Same family

- [ams/Doteq-to-doteqdot](https://texform.dev/rules/ams/Doteq-to-doteqdot): Collapse Doteq to the descriptive doteqdot character.
- [ams/doublecap-to-Cap](https://texform.dev/rules/ams/doublecap-to-Cap): Collapse doublecap to the more common Cap character.
- [ams/gggtr-to-ggg](https://texform.dev/rules/ams/gggtr-to-ggg): Collapse gggtr to the shorter ggg character.
- [ams/llless-to-lll](https://texform.dev/rules/ams/llless-to-lll): Collapse llless to the shorter lll character.
- [ams/trianglerighteq-to-unrhd](https://texform.dev/rules/ams/trianglerighteq-to-unrhd): Collapse trianglerighteq to the more common unrhd character.
- [ams/unlhd-to-trianglelefteq](https://texform.dev/rules/ams/unlhd-to-trianglelefteq): Collapse unlhd to the descriptive trianglelefteq character.
- [ams/vartriangleleft-to-lhd](https://texform.dev/rules/ams/vartriangleleft-to-lhd): Collapse vartriangleleft to the more common lhd character.
- [ams/vartriangleright-to-rhd](https://texform.dev/rules/ams/vartriangleright-to-rhd): Collapse vartriangleright to the more common rhd character.
- [ams/impliedby-to-Longleftarrow](https://texform.dev/rules/ams/impliedby-to-Longleftarrow): Collapse impliedby to the explicit AMS long-left-arrow spelling with source-backed spacing.
- [ams/implies-to-Longrightarrow](https://texform.dev/rules/ams/implies-to-Longrightarrow): Collapse implies to the explicit AMS long-right-arrow spelling with source-backed spacing.
- [ams/Join-to-bowtie](https://texform.dev/rules/ams/Join-to-bowtie): Normalize Join to bowtie for corpus form.
- [ams/centerdot-to-cdot](https://texform.dev/rules/ams/centerdot-to-cdot): Normalize AMS centerdot to the base cdot character for corpus form.
- [ams/doublecup-to-Cup](https://texform.dev/rules/ams/doublecup-to-Cup): Normalize doublecup to Cup for corpus form.
- [ams/leadsto-to-rightsquigarrow](https://texform.dev/rules/ams/leadsto-to-rightsquigarrow): Normalize leadsto to the more common rightsquigarrow corpus form.
- [ams/lozenge-to-Diamond](https://texform.dev/rules/ams/lozenge-to-Diamond): Normalize lozenge to Diamond for corpus form.
- [ams/restriction-to-upharpoonright](https://texform.dev/rules/ams/restriction-to-upharpoonright): Normalize restriction to upharpoonright for corpus form.
- [ams/square-to-Box](https://texform.dev/rules/ams/square-to-Box): Normalize square to Box for corpus form.
- [ams/vartriangle-to-bigtriangleup](https://texform.dev/rules/ams/vartriangle-to-bigtriangleup): Normalize vartriangle to bigtriangleup for corpus form.
- [base/ast-to-asterisk](https://texform.dev/rules/base/ast-to-asterisk): Canonicalize the math binary operator \ast to the pixel-identical literal asterisk form.
- [base/ge-to-geq](https://texform.dev/rules/base/ge-to-geq): Collapse ge to the explicit geq relation character.
- [base/le-to-leq](https://texform.dev/rules/base/le-to-leq): Collapse le to the explicit leq relation character.
- [base/lnot-to-neg](https://texform.dev/rules/base/lnot-to-neg): Collapse lnot to the standard neg character.
- [base/ne-to-neq](https://texform.dev/rules/base/ne-to-neq): Collapse ne to the explicit neq relation character.
- [base/owns-to-ni](https://texform.dev/rules/base/owns-to-ni): Collapse owns to the shorter ni character.
- [base/not-equals-to-neq](https://texform.dev/rules/base/not-equals-to-neq): Rewrite \not followed by an equals sign to the canonical \neq character.
- [base/not-exists-to-nexists](https://texform.dev/rules/base/not-exists-to-nexists): Rewrite \not\exists to the canonical AMS \nexists character when the target is available.
- [base/not-in-to-notin](https://texform.dev/rules/base/not-in-to-notin): Rewrite \not\in to the canonical \notin character.
- [base/not-right-arrow-to-nrightarrow](https://texform.dev/rules/base/not-right-arrow-to-nrightarrow): Rewrite not followed by a U+2192 right arrow to the canonical AMS nrightarrow character.
- [base/dots-to-ldots-or-cdots](https://texform.dev/rules/base/dots-to-ldots-or-cdots): Resolve plain \dots to an explicit ellipsis only when the following math atom class determines MathJax's choice.
- [base/gets-to-leftarrow](https://texform.dev/rules/base/gets-to-leftarrow): Normalize gets to leftarrow for corpus form.
- [base/land-to-wedge](https://texform.dev/rules/base/land-to-wedge): Normalize land to wedge for corpus form.
- [base/lor-to-vee](https://texform.dev/rules/base/lor-to-vee): Normalize lor to vee for corpus form.
- [base/rightarrow-to-to](https://texform.dev/rules/base/rightarrow-to-to): Normalize rightarrow to the shorter to arrow character for corpus form.
- [base/semantic-dots-to-cdots](https://texform.dev/rules/base/semantic-dots-to-cdots): Normalize semantic centered-dot ellipsis aliases to cdots for corpus form.
- [base/semantic-dots-to-ldots](https://texform.dev/rules/base/semantic-dots-to-ldots): Normalize semantic baseline ellipsis aliases to ldots for corpus form.
- [physics/divsymbol-to-divisionsymbol](https://texform.dev/rules/physics/divsymbol-to-divisionsymbol): Collapse divsymbol to the documented divisionsymbol character alias.
- [physics/dotproduct-to-vdot](https://texform.dev/rules/physics/dotproduct-to-vdot): Collapse dotproduct to the shorter vdot character alias.
- [physics/cross-aliases-to-times](https://texform.dev/rules/physics/cross-aliases-to-times): Normalize physics cross-product glyph aliases to times for corpus form.

## Notes

The rewrite changes Command("prime") to Prime(1) in any math position; the source text may stay unchanged for ordinary symbols. produces is empty because Prime is an AST node, not a builtin command or character target. Authoring preserves script binding; Reading remains the conservative fidelity floor because subsequent multi-prime serialization can select a different glyph than separate prime symbols.

## Disable this rule

```python
TransformEngine(profile="corpus", disable_rules=["base/prime-to-prime-node"])
```

```javascript
new TransformEngine({ profile: 'corpus', disableRules: ['base/prime-to-prime-node'] })
```

[Open in Playground](https://play.texform.dev/?input=f%5E%5Cprime)
