Correct the stated reasons for finiteness and the scope of NP

98945613Claude · 6d agoparent 118eb9c9files
Review findings: an infinite state set would not decide everything in
one step, as the docs claimed; it would let a machine read its input
into its state and then apply any predicate. Say that, and say why the
alphabet must be finite too.

Note that certificates use the input alphabet, so InNP is the usual NP
for two or more symbols but not over a one-symbol alphabet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Diff

3 files changed +13 -5
@@ -9,6 +9,10 @@
99 `T |x|` symbols of a certificate can matter, so certificates are polynomially short in effect
1010 (Sipser, *Introduction to the Theory of Computation*, Definition 7.18).
1111
12+Certificates are written over the input alphabet. For alphabets with at least two symbols this is the
13+usual NP. Over a one-symbol alphabet a certificate carries only its length, so `InNP` there is not the
14+usual "unary inputs, binary certificates" class; the open problem is stated over `Bool`.
15+
1216 Proved here:
1317 - `InP.inNP`: **P ⊆ NP**. A decider, run with tape `1` left alone, is a verifier that ignores its
1418 certificate.
@@ -16,8 +16,9 @@
1616 - The tape alphabet is `Option α`: machines have no extra work symbols. For `|α| ≥ 2` this changes
1717 running times only polynomially; it keeps machines over one alphabet composable without re-encoding
1818 tapes.
19-- Finiteness of `Q` is part of the structure (`finite`). Without it a state could store the whole input
20- and the model would decide anything in one step.
19+- Finiteness of `Q` is part of the structure (`finite`). Without it a machine could scan its input
20+ once, accumulating it in the state, and then apply an arbitrary predicate: every language would be
21+ decidable in linear time. The alphabet's finiteness is required by the complexity classes.
2122 -/
2223
2324 namespace PvsNP
M README.md +6 -3
@@ -107,8 +107,10 @@
107107 These are deliberate, and each is a place where a reader should check that the definitions mean what
108108 they claim:
109109
110-- **Finite control.** A machine's state type must be finite (`IsFinite`). Without that, one state
111- could store the whole input and every language would be decidable in one step.
110+- **Finite control, finite alphabet.** A machine's state type must be finite (`IsFinite`): otherwise
111+ it could read its input into its state and then apply any predicate at all. P, NP and
112+ polynomial-time functions also require a finite alphabet: over `Nat`, a machine reading a single
113+ symbol could test membership in the halting set.
112114 - **Tape alphabet `Option α`.** Machines write input symbols or blanks, nothing else. For alphabets with
113115 at least two symbols this costs only a polynomial slowdown, and it lets machines over the same
114116 alphabet run one after another with no re-encoding.
@@ -117,7 +119,8 @@
117119 a literal hand-over.
118120 - **Verifiers in the style of Sipser.** The verifier's time bound depends on `|x|` only, and
119121 `x ∈ L ↔ ∃ w, V accepts (x, w)`. A verifier running `T |x|` steps can read at most `T |x|`
120- certificate symbols, so certificates are polynomially short in effect.
122+ certificate symbols, so certificates are polynomially short in effect. Certificates use the input
123+ alphabet, which is the usual NP for two or more symbols; over a one-symbol alphabet it is not.
121124 - **Output bound stated, not derived.** `PolyTimeComputable f` asks for `|f x|` to be polynomially
122125 bounded. That follows from the time bound in any reasonable model; deriving it is on the roadmap.
123126