# physics/vu-to-hat-mathbf

Canonicalize vu to an explicit hat-wrapped mathbf form.

https://texform.dev/rules/physics/vu-to-hat-mathbf

## Metadata

| Field | Value |
| --- | --- |
| Key | physics/vu-to-hat-mathbf |
| Level | faithful |
| Fidelity | render |
| Enabled by packages | physics |
| Profiles | Faithful, Corpus, Equiv |

## Rewrite patterns

### vu

From:

```latex
\vu{#1}
```

To:

```latex
\hat{\mathbf{#1}}
```

### vu-star

From:

```latex
\vu*{#1}
```

To:

```latex
\hat{\boldsymbol{#1}}
```

## Examples

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

### vu boundary normal

Before:

```latex
\vu{n}\cdot\vb{E}=0
```

After this rule:

```latex
\hat{\mathbf{n}}\cdot\vb{E}=0
```

Packages: base, physics, boldsymbol.

Rendering verified with the declared packages.

### vu star bold italic

Before:

```latex
\vu*{p}\cdot\vu*{\alpha}
```

After this rule:

```latex
\hat{\boldsymbol{p}}\cdot\hat{\boldsymbol{\alpha}}
```

Packages: base, physics, boldsymbol.

Rendering verified with the declared packages.

## Triggers

- [\\vu](https://texform.dev/latex/commands/vu)

## Eliminates

- [\\vu](https://texform.dev/latex/commands/vu)

## Produces

- [\\hat](https://texform.dev/latex/commands/hat)
- [\\mathbf](https://texform.dev/latex/commands/mathbf)
- [\\boldsymbol](https://texform.dev/latex/commands/boldsymbol)

## Upstream

- [physics/vectorunit-to-vu](https://texform.dev/rules/physics/vectorunit-to-vu): Collapse vectorunit to the short vu helper.

## Same family

- [physics/derivative-to-dv](https://texform.dev/rules/physics/derivative-to-dv): Collapse derivative to the compact dv command.
- [physics/functional-derivative-to-fdv](https://texform.dev/rules/physics/functional-derivative-to-fdv): Collapse long functional derivative names to the fdv command.
- [physics/partial-derivative-to-pdv](https://texform.dev/rules/physics/partial-derivative-to-pdv): Collapse long partial derivative names to the pdv command.
- [physics/vectorarrow-to-va](https://texform.dev/rules/physics/vectorarrow-to-va): Collapse vectorarrow to the short va helper.
- [physics/vectorbold-to-vb](https://texform.dev/rules/physics/vectorbold-to-vb): Collapse vectorbold to the short vb helper.
- [physics/vectorunit-to-vu](https://texform.dev/rules/physics/vectorunit-to-vu): Collapse vectorunit to the short vu helper.
- [physics/dv-to-frac-d](https://texform.dev/rules/physics/dv-to-frac-d): Expand dv forms to explicit d-based derivative fractions.
- [physics/fdv-to-frac-delta](https://texform.dev/rules/physics/fdv-to-frac-delta): Expand fdv forms to explicit delta-based derivative fractions.
- [physics/pdv-to-frac-partial](https://texform.dev/rules/physics/pdv-to-frac-partial): Expand pdv forms to explicit partial-derivative fractions.
- [physics/va-to-vec-mathbf](https://texform.dev/rules/physics/va-to-vec-mathbf): Canonicalize va to an explicit vec-wrapped mathbf form.
- [physics/vb-to-mathbf](https://texform.dev/rules/physics/vb-to-mathbf): Canonicalize vb to an explicit mathbf wrapper.

## Notes

The star branch propagates into the nested vb under hat, so this rule maps it to hat over boldsymbol rather than hat over mathbf.

## Disable this rule

```python
TransformEngine(profile="corpus", disable_rules=["physics/vu-to-hat-mathbf"])
```

```javascript
new TransformEngine({ profile: 'corpus', disableRules: ['physics/vu-to-hat-mathbf'] })
```

[Open in Playground](https://play.texform.dev/?input=%5Cvu%7Bn%7D%5Ccdot%5Cvb%7BE%7D%3D0)
