import { type Expr, type NodeId } from "../expr.js"; import { type Rule } from "../rule.js"; export interface SplitTermParams { /** A direct child of the Sum at `location` with an integer coefficient. */ readonly termId: NodeId; /** Coefficient of the first part; the second part gets (coeff − first). */ readonly first: bigint; } /** * A term read as coeff·body: the integer literal factor (sign folded in from * a wrapping Neg) and the remaining factors. A bare literal has empty body; * a term with no literal factor has coefficient 1. Shared with move * enumeration, which uses it to spot the a·B² + b·B + c trinomial pattern. */ export declare function coeffAndBody(term: Expr): { coeff: bigint; body: readonly Expr[]; }; /** * Signed integer coefficient and single variable of a simple linear term * (`v`, `−v`, `c·v`, `−c·v`, `(−c)(−v)`), or undefined if the term isn't that * shape. Linear ⟺ the body is a single variable; a second `coeffAndBody` peels * any residual sign a double-negative product (e.g. (−2)(−y)) leaves in it. */ export declare function linearTerm(t: Expr): { coeff: bigint; variable: string; } | undefined; /** coeff·body as a canonical term (Neg outside, no 1· prefix). */ export declare function termFromCoeff(coeff: bigint, body: readonly Expr[]): Expr; /** * Split one integer-coefficient term of a Sum into two adjacent parts — * the inverse of factor-out + combine-integers, and the step that unlocks * factoring by grouping: * −6x ~> −3x + −3x x ~> 3x + −2x 5x ~> 2x + 3x * An exact identity: emits nothing. The first part keeps the original body * nodes (and so their ids); the second part's body is a fresh clone. */ export declare const splitTerm: Rule; //# sourceMappingURL=splitTerm.d.ts.map