Documentation

Complexity.Logics.FirstOrder.Ordered.Multiplication

The native TIMES formula #

Multiplication is defined over canonical order and BIT by counting each binary multiplication column and checking its carries. Eight global words store the block-boundary carries, and sixteen local words store each block. Both ends of every block agree with the global words. The first and last carries are zero; exact PLUS and shifts prohibit modular overflow.

One fixed finite formula covers small inputs. The packed branch has witnesses for every universe of size at least 257, including sizes between powers of two. Neither branch uses multiplication in its syntax: only fixed literal scales, PLUS, exact shifts, and the proved native Bit Sum.

Main definitions #

Main results #

References #

Native TIMES over canonical order and BIT, with ordinary, nonmodular product semantics.

Instances For
    @[simp]
    theorem Cslib.Logic.FO.Ordered.realize_multiplication {L : FirstOrder.Language} {n : ℕ} [Fact (2 ≤ n)] [L.Structure (Fin n)] (v : Fin 3 → Fin n) :
    (multiplication L).Realize v ↔ ↑(v 0) * ↑(v 1) = ↑(v 2)

    The single native formula realizes exactly natural-number multiplication. In particular, no candidate output satisfies it when the product is outside Fin n.

    theorem Cslib.Logic.FO.Ordered.not_realize_multiplication_of_le {L : FirstOrder.Language} {n : ℕ} [Fact (2 ≤ n)] [L.Structure (Fin n)] (v : Fin 3 → Fin n) (h : n ≤ ↑(v 0) * ↑(v 1)) :

    No element represents a product outside the universe; truncation is not accepted.

    theorem Cslib.Logic.FO.Ordered.existsUnique_multiplication {L : FirstOrder.Language} {n : ℕ} [Fact (2 ≤ n)] [L.Structure (Fin n)] (x y : Fin n) (hxy : ↑x * ↑y < n) :

    Every representable ordinary product has exactly one output.