TOC Toolkit API - v0.1.0
    Preparing search index...

    Owns exact integer formulas and shares equal normalized terms and nodes.

    Index
    • Creates a pool and charges two cells for its Boolean constants.

      Parameters

      Returns FormulaPool

    truth: Formula

    The formula that holds for every valuation.

    falsity: Formula

    The formula that holds for no valuation.

    • get variableCount(): number

      The number of distinct variables minted by this pool.

      Returns number

    • get nodeCount(): number

      The total number of interned terms and formula nodes.

      Returns number

    • Mints a fresh integer variable with a nonempty display label.

      Parameters

      • name: string

      Returns Variable

    • Interns a term, merging repeated factors and omitting zero factors.

      Parameters

      • constant: bigint
      • entries: readonly (readonly [Variable, bigint])[]

      Returns LinearTerm

    • Interns a constant term without converting through floating point.

      Parameters

      • value: bigint

      Returns LinearTerm

    • Interns an integer multiple of a variable, with factor one by default.

      Parameters

      Returns LinearTerm

    • Interns the sum of the supplied terms, or zero for an empty list.

      Parameters

      Returns LinearTerm

    • Returns the factor of a variable, or zero when it does not occur.

      Parameters

      Returns bigint

    • Returns the normalized formula that the term is at most zero.

      Parameters

      Returns Formula

    • Returns the normalized formula that a nonzero modulus divides the term.

      Parameters

      Returns Formula

    • Returns the simplified conjunction of the supplied formulas.

      Parameters

      Returns Formula

    • Returns the simplified disjunction of the supplied formulas.

      Parameters

      Returns Formula

    • Returns the complement, pushing negation through atoms and connectives.

      Parameters

      Returns Formula

    • Binds precisely the free occurrences of the requested variables.

      Parameters

      Returns Formula

    • Returns the quantifier-free form that an earlier elimination recorded, if any.

      Parameters

      Returns Maybe<Formula>

    • Records an equivalent quantifier-free formula of this pool, so no later call repeats the work.

      Parameters

      Returns void

    • Universally binds variables by complementing existential quantification.

      Parameters

      Returns Formula