Polynomial binary arithmetic on self-delimiting number fields
ProvedBinaryTM2.self_delimiting_arithmetic_codecsbin-packingcomputational-complexityfixed-parameter-tractabilityinteger-programming
There are polynomial-time finite bit-stack procedures converting natural, signed integer, and rational fields, with an arbitrary suffix, in both directions between the published self-delimiting encoding and the binary arithmetic library. Every binary rational operation verified on the library representation therefore has a single ordinary Boolean TM2 computing it on concatenated self-delimiting rational fields in polynomial time.
Preamble
import Mathlib import Definitions.Def_HMBinPacking_Encoding import Definitions.Def_HMBinPacking_OutputsWithin import Definitions.Def_OAILP_QF_BitStackRationals open ExponomialAssortment.FPTAS OAI.ExactQuantumFactoring.BitStackProgram
Formal statement
namespace BinaryTM2
theorem self_delimiting_arithmetic_codecs :
(Nonempty (Procedure (fun p : ℕ × List Bool => encodeNat p.1 ++ p.2)
(prodCode Nat.bits (id : List Bool → List Bool)) id) ∧
Nonempty (Procedure (prodCode Nat.bits (id : List Bool → List Bool))
(fun p : ℕ × List Bool => encodeNat p.1 ++ p.2) id)) ∧
(Nonempty (Procedure (fun p : ℤ × List Bool => encodeInt p.1 ++ p.2)
(prodCode intCode (id : List Bool → List Bool)) id) ∧
Nonempty (Procedure (prodCode intCode (id : List Bool → List Bool))
(fun p : ℤ × List Bool => encodeInt p.1 ++ p.2) id)) ∧
(Nonempty (Procedure (fun p : ℚ × List Bool => encodeRat p.1 ++ p.2)
(prodCode ratCode (id : List Bool → List Bool)) id) ∧
Nonempty (Procedure (prodCode ratCode (id : List Bool → List Bool))
(fun p : ℚ × List Bool => encodeRat p.1 ++ p.2) id)) ∧
(∀ (f : ℚ × ℚ → ℚ), Procedure (prodCode ratCode ratCode) ratCode f →
∃ (M : Turing.TM2ComputableAux Bool Bool) (p : Polynomial ℕ), ∀ a b : ℚ,
HMBinPacking.OutputsWithin M (encodeRat a ++ encodeRat b) (encodeRat (f (a,b)))
(p.eval (encodeRat a ++ encodeRat b).length + 1)) := by sorry
end BinaryTM2Source
Binary tape implementation for HMBinPacking, Lemmas 7 and 8; OAI/Computability/QuantumFactoring bit-stack arithmetic, Apache-2.0.