How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Counting Complexity and Sharp-P
1 · Prerequisites
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Linear Recurrences and Rational Generating Functions
- P, NP, coNP, and Polynomial Reductions
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- Sequences and Limits
- The ZFC Axioms and the Basic Set Constructions
- Turing Machines, Configurations, and Computation
2 · Summary
This draft page develops the assigned conventions and keeps every resource, type, and quantifier explicit.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Sharp-P and Gap-P functions
Definition
A #P function maps each input to the number of accepting paths of a binary-branching polynomial-time nondeterministic machine. A GapP function is accepting paths minus rejecting paths of such a machine. Function values are represented in binary.
NumberSAT
Definition
An input to is well formed when it encodes a Boolean formula together with an ordered list of distinct variables and every variable occurring in appears in that list. Its value is the exact number of assignments that satisfy . Declared variables count even when unused, so the count ranges over all assignments to the list. Every input not having this form is malformed and has value zero.
NumberSAT belongs to Sharp-P
Statement
belongs to .
Facts & Assumptions
Given: an encoded formula with its ordered declared-variable list.
#P counts accepting paths of a binary nondeterministic polynomial-time machine. by Sharp-P and Gap-P functions.
Proof
First check the formula syntax and declared-variable list deterministically; on malformed input reject without making a nondeterministic choice. On a valid input with declared variables, make exactly binary choices, interpret them in the declared order as an assignment, evaluate the formula, and accept exactly when it is true.
The computation paths are in bijection with the declared assignments, and a path accepts exactly when its assignment satisfies the formula. At there is one path, corresponding to the empty assignment; malformed input has no accepting path. Thus the accepting-path count is exactly .
The machine runs in polynomial time, so its counting function belongs to by [L1].
Parsimonious reductions between counting functions
Definition
A parsimonious reduction f to g is a polynomial-time map r with f(x)=g(r(x)) for every input x. This exact count equality is stronger than a decision many-one reduction, which preserves only nonzeroness.
The Cook--Levin construction can be made parsimonious
Statement
For every fixed polynomial-time nondeterministic machine , one can compute in polynomial time a formula together with an ordered list of all its declared variables, whose satisfying assignments are in bijection with the accepting computation paths of on . Consequently is a parsimonious reduction from the accepting-path count of to .
Facts & Assumptions
Given: a fixed nondeterministic polynomial-time machine .
A bounded tableau records one computation branch, including the unique state-tagged head position in each row, by A bounded computation tableau for a nondeterministic Turing-machine run.
The standard local tableau constraints are satisfiable exactly when an accepting bounded tableau exists, by The Cook-Levin formula is satisfiable if and only if an accepting bounded tableau exists.
The Cook--Levin formula is computable in polynomial time for fixed , by The Cook-Levin reduction map is computable in polynomial time.
NumberSAT counts assignments to the complete ordered declared-variable list, including unused variables, by NumberSAT.
A parsimonious reduction preserves the exact numerical count, by Parsimonious reductions between counting functions.
Proof
Replace by a fixed one-tape simulator . Between two transitions of , the simulator's sweeps are deterministic; at an original nondeterministic transition it makes exactly the same tagged choice as . Each such choice first enters a distinct intermediate state labelled by its transition tag, before deterministically executing that transition; these states are part of the recorded configuration. Even choices with the same eventual successor therefore give different tableau rows. Erasing the deterministic simulation steps and reading these tags is a bijection between accepting paths. The standard multitape-to-one-tape simulation has polynomial slowdown. Choose a polynomial bounding both its running time and every tape position it can visit, and pad every halted branch to time . This supplies all hypotheses of [L1]--[L3].
Use one-hot tableau variables for the symbol (including the tagged state) in every time-cell position. The initial-row, exactly-one-symbol, local-transition, and accepting constraints use only those variables. Take their conjunction as without introducing auxiliary variables. Let list every cell variable once, in lexicographic order of time, cell, and a fixed order on the simulator alphabet. Output the encoded pair , which is well formed for NumberSAT.
An accepting path fixes every cell of its padded tableau and therefore one truth value for every tableau variable. Every declared variable is such a cell variable, so none contributes a free choice. Conversely, any satisfying assignment gives exactly one legal accepting tableau by [L2], and the retained choice tags recover exactly one accepting path of , hence exactly one accepting path of by step 1.1. These maps are inverse, so
The tableau has polynomial dimensions, its local constraints have polynomial total size, and [L3] supplies the polynomial-time construction. Enumerating the polynomially many declared variable names in the specified order also takes polynomial time. Together with the exact equality in step 3.1, [L4] proves parsimony.
NumberSAT is Sharp-P-complete under parsimonious reductions
Statement
is -complete under parsimonious reductions.
Facts & Assumptions
Given: an arbitrary function .
Such an is the accepting-path count of a fixed polynomial-time nondeterministic machine, by Sharp-P and Gap-P functions.
The Cook--Levin construction can preserve accepting paths in a bijection with satisfying assignments, by The Cook--Levin construction can be made parsimonious.
Parsimony means exact count equality under a polynomial-time map, by Parsimonious reductions between counting functions.
Proof
Choose a machine with as supplied by [L1]. Apply [L3] to compute the formula in polynomial time.
For every input , the bijection in [L3] gives the exact chain Thus is a parsimonious reduction by [L4].
Since was arbitrary, step 2.1 proves -hardness, and [L2] proves membership.
The nonnegative function class FP
Definition
On this page FP is the class of total nonnegative integer-valued functions whose binary outputs are computable in deterministic polynomial time.
FP is contained in Sharp-P
Statement
for the page's nonnegative integer-valued function convention.
Facts & Assumptions
Given: .
An FP function is total, nonnegative, binary-valued, and computable in polynomial time, by The nonnegative function class FP.
A function counts accepting paths of a binary-branching polynomial-time nondeterministic machine, by Sharp-P and Gap-P functions.
Proof
On input , compute using [L1] and let . Make exactly binary nondeterministic choices, producing one path for every integer . Accept iff .
Exactly the values accept; all power-of-two padding values reject. This remains correct at , when no path accepts. The output length and hence are polynomially bounded by the running time in [L1].
The constructed machine runs in polynomial time and has accepting-path count , so by [L2].
Sharp-P is closed under sum and product
Statement
If , then and belong to .
Facts & Assumptions
Given: polynomial-time nondeterministic machines whose accepting-path counts are .
#P functions are accepting-path counts. by Sharp-P and Gap-P functions.
Proof
For the sum, make one initial binary choice. On its branch simulate and on its branch simulate . The accepting paths are a disjoint tagged union, so their number is .
For the product, simulate ; after each accepting path, independently simulate , while every rejecting path rejects. Each of the accepting first-stage paths has exactly accepting continuations, so the total is . This also covers either count being zero.
Both composite machines run in polynomial time, so [L1] puts their two counting functions in .
MajoritySAT
Definition
MajoritySAT asks whether NumberSAT(phi)>2^(n-1), where n is the declared-variable count. At n=0 this is equivalent to the empty assignment satisfying phi.
PP is strict sign testing for Gap-P
Statement
A language lies in if and only if there is a such that
Facts & Assumptions
Given: the and conventions.
A GapP value is the difference between accepting and rejecting path counts, by Sharp-P and Gap-P functions.
PP uses a strict acceptance-probability threshold of , by The classes RP, coRP, ZPP, BPP, and PP.
Proof
Let a PP machine use exactly random bits, padding unused bits if necessary, and let and be its accepting and rejecting choice- string counts. Then is in GapP by [L1], and exactly when , the strict PP condition in [L2].
Conversely write with . Normalize their machines to guess the same -bit string, rejecting invalid encodings, so each has exactly total paths. Construct a machine with one leading choice: on branch run the machine for with its labels unchanged; on branch run the machine for with accept and reject exchanged. It has accepting paths out of , a strict majority exactly when .
Steps 1.1 and 1.2 prove the two implications, including the strict zero boundary.
MajoritySAT is PP-complete
Statement
is PP-complete under polynomial-time many-one reductions.
Facts & Assumptions
Given: the declared-variable convention for formulas.
MajoritySAT uses the strict threshold , including its interpretation, by MajoritySAT.
PP is strict sign testing for GapP, by PP is strict sign testing for Gap-P.
Cook--Levin can preserve accepting paths exactly, by The Cook--Levin construction can be made parsimonious.
Proof
On a well-formed formula with declared variables, a probabilistic machine chooses the assignment bits uniformly and accepts exactly on a satisfying assignment. Its acceptance probability is , so [L1] gives membership in PP; for the unique random string is the empty assignment.
For hardness, normalize a PP machine to paths with , of them accepting. By [L3] obtain a formula with exactly satisfying assignments. Add uniquely forced variables until its declared count obeys , preserving its count. For let ; exactly assignments satisfy . With a fresh selector , put Then The formula and its declared list are produced in polynomial time.
Step 1.2 is a membership-preserving reduction from every PP language to MajoritySAT, and step 1.1 gives membership; hence MajoritySAT is PP-complete.
PP is closed under complement
Statement
If , then its complement belongs to .
Facts & Assumptions
Given: .
GapP values are integer differences of accepting and rejecting path counts, by Sharp-P and Gap-P functions.
A language is in PP exactly when membership is strict positivity of a GapP function, by PP is strict sign testing for Gap-P.
Proof
By [L2], choose with . Since is integer-valued,
If is witnessed by a machine, exchanging its accepting and rejecting labels witnesses in GapP. A deterministic accepting machine witnesses the constant-one gap, and a leading tagged branch adds two gap functions. Hence by [L1].
Applying [L2] to shows that . The added is exactly what turns the non-strict condition into strict positivity, including .
Polynomial time with a Sharp-P oracle
Definition
is deterministic polynomial time with oracle access to the fixed -complete function of NumberSAT is Sharp-P-complete under parsimonious reductions. The machine may make polynomially many adaptive queries of polynomial length, each answered by the binary expansion of the integer value rather than by a membership bit. Equivalently, one may use any fixed function complete under polynomial-time parsimonious reductions; completeness makes the resulting class independent of that choice.
NP is contained in P with a Sharp-P oracle
Statement
.
Facts & Assumptions
Given: with polynomial-time verifier and a polynomial witness-length bound .
A oracle returns the exact binary integer value of its counting function, by Polynomial time with a Sharp-P oracle.
functions count accepting paths, by Sharp-P and Gap-P functions.
Proof
Define . A nondeterministic machine guesses the bits and accepts exactly when does, so by [L2].
A deterministic polynomial-time oracle machine makes the single query and accepts iff the returned binary integer is nonzero. The answer has at most bits, and exactly when an NP witness exists.
This oracle machine decides , proving the containment.
5 · Examples, counterexamples and false statements
Sharp-P is a language class
Statement
is a class of languages, so every member has only a Boolean yes/no value on each input.
Facts & Assumptions
Given: formulas and , each with declared list .
#P is defined as a class of numerical functions. by Sharp-P and Gap-P functions.
Refutation
By direct enumeration, and . NumberSAT is a function, while neither nor is a Boolean membership value.
The associated decision language SAT retains only the predicate ; it answers yes on both displayed formulas and forgets their distinct counts.
Thus, under [L1], is a numerical function class rather than a language class.
Every decision many-one reduction is parsimonious
Statement
Every polynomial-time many-one reduction between decision problems preserves the exact number of witnesses.
Facts & Assumptions
Given: a formula with declared variables and a fresh variable .
A decision many-one reduction need preserve only membership, by Polynomial-time many-one reductions.
A parsimonious reduction preserves exact counts, by Parsimonious reductions between counting functions.
NumberSAT counts assignments to every declared variable, including an unused one, by NumberSAT.
Refutation
Define and declare in addition to the original variables. The map is polynomial time, and is satisfiable iff is satisfiable, so it is a SAT-to-SAT many-one reduction by [L1].
Each satisfying assignment of has exactly two extensions, one for each value of . Hence [L3] gives . For the concrete input , the counts are and , so the map is not parsimonious under [L2].
This one polynomial-time decision reduction refutes the universal claim.