import { type Expr, type NodeId } from "../expr.js"; import { type Rule } from "../rule.js"; export interface FactorOutParams { /** A factor INSTANCE inside one term of the Sum at `location`. */ readonly factorA: NodeId; /** * An instance inside a different term: structurally equal to factorA, OR * an integer literal that factorA's signed literal value divides. */ readonly factorB: NodeId; } /** * The factor positions a term offers for factoring out: the term itself * (cofactor 1), a Product's direct factors, a negated term's body (cofactor * −1), and a negated product's factors. Shared with move enumeration. */ export declare function factorInstancesOf(term: Expr): readonly Expr[]; /** * Pull a shared factor out of two terms of a Sum — the inverse of * distribute, and the move that makes LIKE TERMS work: * 3x + 2x ~> (3 + 2)·x x + 2x ~> (1 + 2)·x x − 2x ~> (1 + (−2))·x * The kept instance (factorA) survives by identity; the dragged-away one * merges into it. The cofactor Sum is a real Sum, so combine-integers folds * it with the gesture the user already knows. */ export declare const factorOut: Rule; //# sourceMappingURL=factorOut.d.ts.map