/** * Substitution: the first cross-equation rule for systems. When one equation is * in SOLVED form `v = expr` (one side a bare variable not occurring in the * other), every occurrence of v in another equation is replaced by expr — the * "isolate, then substitute" move. Sound because, under `v = expr`, the target * and the substituted target are equivalent, so keeping the source and rewriting * the target preserves the system's (intersection) solution set. * * The same machinery serves calculus u-substitution later. Pure (no DOM); * rebuilds through the smart constructors and preserves the ids of v-free * subtrees (only paths touching v are rebuilt). */ import { type Equation, type Expr } from "./expr.js"; import type { System } from "./system.js"; /** If `eqn` is `v = expr` (or `expr = v`) with v a bare variable absent from * expr, the variable it's solved for and that value; else undefined. */ export declare function solvedVariable(eqn: Equation): { variable: string; value: Expr; } | undefined; /** Substitute the SOURCE's solved variable into TARGET. Returns the rewritten * target (the source's relation is irrelevant to the target's), or undefined * if source isn't in `v = expr` form. */ export declare function substitute(source: Equation, target: Equation): Equation | undefined; /** Substitute equation `sourceIndex` (in `v = expr` form) into `targetIndex`, * keeping the source, every other equation, and the assumptions unchanged. * Undefined if the indices coincide or the source isn't solved for a variable. */ export declare function substituteInSystem(system: System, sourceIndex: number, targetIndex: number): System | undefined; //# sourceMappingURL=substitution.d.ts.map