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
- Countability and Uncountability
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Linear Recurrences and Rational Generating Functions
- P, NP, coNP, and Polynomial Reductions
- Randomized Complexity and Amplification
- Relations, Functions, and Quotients
- Resource Bounds and Machine Invariance
- The Cook--Levin Theorem
- The ZFC Axioms and the Basic Set Constructions
- Turing Machines, Configurations, and Computation
2 · Summary
This 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
A Boolean formula is a finite expression built from variables, the constants , and the connectives . Under an assignment of zeros and ones to its variables, evaluate constants as one and zero, negation as complementation, conjunction as minimum, and disjunction as maximum. An assignment satisfies the formula when its value is one. Fix an effective binary encoding of these expression trees and finite lists of variable names.
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 fixed nondeterministic multitape machine has a finite transition table and finitely many tape heads (Multitape and nondeterministic Turing machine variants).
A parsimonious reduction preserves the exact numerical count, by Parsimonious reductions between counting functions.
Proof
Replace by a fixed one-tape simulator . Encode the finitely many simulated tapes as delimiter-separated blocks with marked head cells. To simulate one step, make a deterministic sweep to collect the finitely many scanned symbols, choose exactly one transition of nondeterministically, record its transition tag in a distinct intermediate state, and make deterministic sweeps to update marked cells and shift blocks if a head enters a new blank cell. The finite transition table from [F1] makes all sweep-control states fixed. After simulated steps on an input of length , at most cells are represented, so each sweep costs and the full simulation costs ; the tag step adds constant overhead. Even choices with the same eventual successor yield different tagged tableau rows. Erasing deterministic sweeps and reading tags is a bijection between accepting paths. Choose a polynomial bounding the running time and every visited tape position on all bounded branches, then deterministically pad every halted branch to time . This supplies [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
On a well-formed NumberSAT input consisting of a formula and a declared list of distinct variables, MajoritySAT asks whether . Every malformed input is a no-instance. At the inequality is equivalent to the empty assignment satisfying .
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 take a GapP machine for , let count its accepting paths, and let count its rejecting paths (the latter is a #P count after exchanging final labels), so . Choose a common polynomial bound on the number of binary choices. Encode each original path by its actual choice bits followed by only zeroes to length ; reject a nonzero unused suffix. This gives exactly one full-length encoding per original path and does not multiply either count when a branch halts early. Each normalized machine has total full-length 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 , so witnesses may have any length at most (The class NP via polynomial-time verifiers).
uses a fixed oracle returning its exact binary integer value, by Polynomial time with a Sharp-P oracle.
functions count accepting paths, by Sharp-P and Gap-P functions.
Every function has a polynomial-time parsimonious reduction to , by NumberSAT is Sharp-P-complete under parsimonious reductions.
Proof
Enlarge if needed to a nonnegative integer-valued polynomial bound, and put . Define . A binary-branching polynomial-time machine guesses a word of length . It rejects if has no zero; otherwise it writes using the first zero, and accepts exactly when . This encoding is a bijection between words of length at most and guessed words with a zero. Thus the accepting-path count is exactly , so .
By [L3], compute in polynomial time a formula with . A deterministic oracle machine queries and accepts iff the returned binary integer is nonzero. Since , the answer has at most bits. By the verifier definition, exactly when .
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: On binary inputs , let count the sole witness and let count the two witnesses and . These are counting functions with and for every ; their associated decision languages, defined by positive count, are both .
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.
Refutation
Let for every binary word . This is a total linear-time map. The two positive-count decision languages are both , so is a many-one reduction between them by [L1].
For every , the source has exactly one accepting witness , whereas the target has exactly the two accepting witnesses . Hence , so is not parsimonious under [L2]. Both witness relations are decidable in constant time once their witness is read.
This one polynomial-time decision reduction refutes the universal claim.