# Aldol addition

## Status

specified-next: primitive mechanism is explicit; guarded v2 executable rule set is not yet promoted.

## Scope

- substrate: Enolate donor plus aldehyde/ketone carbonyl acceptor.
- product: Beta-hydroxy carbonyl after protonation.
- note: Specified as primitive HEG ownership moves; an older EFG/native-HEG formose aldol rule exists, but this v2 guarded primitive version is a next implementation target.

## HEG v2 State Sketches

These panels are rendered from ownership-structured HEG v2 objects. For `specified-next` examples they are state sketches, not yet products of executable v2 rules.

### Aldol substrate HEG sketch

![Aldol substrate HEG sketch](heg_states/aldol_start.png)

Carbanion/enolate-like donor plus aldehyde carbonyl acceptor.

### Aldol route step 1

![Aldol route step 1](heg_states/aldol_step1_cc_bond.png)

Primitive snapshot: donor lone-pair resource has become the new C-C shared pair.

### Aldol route step 2

![Aldol route step 2](heg_states/aldol_step2_alkoxide.png)

Carbonyl pi resource has moved to oxygen, giving the alkoxide state.

### Aldol route protonated product

![Aldol route protonated product](heg_states/aldol_step3_protonated.png)

Alkoxide lone pair has become an O-H shared pair in the protonated beta-hydroxy product sketch.

## DPO-like Step Panels

Each primitive snapshot is shown as `L/K/R`. Red marks the ownership edge removed from `L`, orange marks the halfedge whose owner changes, and green marks the ownership edge created in `R`. `K` keeps the common atoms, halfedges, pair objects, and unchanged ownership records. For `specified-next` examples this is an explanatory span derived from route snapshots, not yet a checked executable rule application.

### Aldol addition route step 1

Aldol substrate HEG sketch -> Aldol route step 1

Changed ownership: `h8: a1 -> a5`

| L | K | R |
|---|---|---|
| ![L](heg_steps/aldol_main_step1_left.png) | ![K](heg_steps/aldol_main_step1_interface.png) | ![R](heg_steps/aldol_main_step1_right.png) |

### Aldol addition route step 2

Aldol route step 1 -> Aldol route step 2

Changed ownership: `h9: a5 -> a6`

| L | K | R |
|---|---|---|
| ![L](heg_steps/aldol_main_step2_left.png) | ![K](heg_steps/aldol_main_step2_interface.png) | ![R](heg_steps/aldol_main_step2_right.png) |

### Aldol addition route step 3

Aldol route step 2 -> Aldol route protonated product

Changed ownership: `h16: a6 -> a8`

| L | K | R |
|---|---|---|
| ![L](heg_steps/aldol_main_step3_left.png) | ![K](heg_steps/aldol_main_step3_interface.png) | ![R](heg_steps/aldol_main_step3_right.png) |

## Reaction Sketch

![Aldol addition reaction sketch](reaction_scheme.png)

## Mechanism Flow

![Aldol addition mechanism flow](mechanism_flow.png)

## Primitive HEG Patterns Used

| pattern | invariant |
|---|---|
| lone pair to shared pair | Halfedge and pair identity are preserved; exactly one Ownership record changes. |
| shared pair to lone pair | Halfedge and pair identity are preserved; exactly one Ownership record changes. |

## Mechanism Steps

### enolate carbon lone pair forms C-C sigma pair

- group: C-C bond formation
- primitive: lone pair to shared pair
- resource move: `LP(C_alpha) -> sigma(C_alpha,C_carbonyl)`
- roles: donor: C_alpha; acceptor: C_carbonyl
- guard note: requires enolate/carbanion resource and no existing C_alpha-C_carbonyl shared pair
- executable note: -

### acceptor carbonyl pi pair becomes alkoxide lone pair

- group: C-C bond formation
- primitive: shared pair to lone pair
- resource move: `pi(C_carbonyl,O) -> LP(O)`
- roles: moved endpoint: C_carbonyl -> O
- guard note: requires acceptor C=O carbonyl resource
- executable note: -

### alkoxide lone pair becomes O-H sigma pair

- group: protonation
- primitive: lone pair to shared pair
- resource move: `LP(O) -> sigma(O,H)`
- roles: donor: O; acceptor: H
- guard note: requires proton donor and no existing O-H shared pair
- executable note: -

## Guard Checklist

- alpha donor must be an enolate/carbanion resource, not any carbon lone pair.
- acceptor must contain a real carbonyl pi resource.
- C-C bond must be absent before attack.
- product admissibility should be checked after each grouped rule.

## Alternative Route Probes

- Self-aldol vs crossed-aldol routes are chemically meaningful alternatives once donor and acceptor carbonyls are distinguishable.
- Unsymmetrical ketones add alpha-position regioselectivity; this requires role guards beyond atom labels.

## Expansion

No v2 expansion is run yet for this spec; older formose expansion covers an EFG/native-HEG aldol-like path.

## Interpretation

The chemical rule is treated as a guarded composite of primitive HEG moves. The primitive move tells us what is composable at the electron-resource level; the guards say when that move has the intended chemical meaning.
