Correct the stated reasons for finiteness and the scope of NP
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 @@ | ||
| 9 | 9 | `T |x|` symbols of a certificate can matter, so certificates are polynomially short in effect |
| 10 | 10 | (Sipser, *Introduction to the Theory of Computation*, Definition 7.18). |
| 11 | 11 | |
| 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 | + | |
| 12 | 16 | Proved here: |
| 13 | 17 | - `InP.inNP`: **P ⊆ NP**. A decider, run with tape `1` left alone, is a verifier that ignores its |
| 14 | 18 | certificate. |
| @@ -16,8 +16,9 @@ | ||
| 16 | 16 | - The tape alphabet is `Option α`: machines have no extra work symbols. For `|α| ≥ 2` this changes |
| 17 | 17 | running times only polynomially; it keeps machines over one alphabet composable without re-encoding |
| 18 | 18 | 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. | |
| 21 | 22 | -/ |
| 22 | 23 | |
| 23 | 24 | namespace PvsNP |
| @@ -107,8 +107,10 @@ | ||
| 107 | 107 | These are deliberate, and each is a place where a reader should check that the definitions mean what |
| 108 | 108 | they claim: |
| 109 | 109 | |
| 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. | |
| 112 | 114 | - **Tape alphabet `Option α`.** Machines write input symbols or blanks, nothing else. For alphabets with |
| 113 | 115 | at least two symbols this costs only a polynomial slowdown, and it lets machines over the same |
| 114 | 116 | alphabet run one after another with no re-encoding. |
| @@ -117,7 +119,8 @@ | ||
| 117 | 119 | a literal hand-over. |
| 118 | 120 | - **Verifiers in the style of Sipser.** The verifier's time bound depends on `|x|` only, and |
| 119 | 121 | `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. | |
| 121 | 124 | - **Output bound stated, not derived.** `PolyTimeComputable f` asks for `|f x|` to be polynomially |
| 122 | 125 | bounded. That follows from the time bound in any reasonable model; deriving it is on the roadmap. |
| 123 | 126 | |