Strict modular paper oracle #
evalPaperMod q: the paper's OP₀–OP₁₀ fragment (main.tex:1054–1076) over
Nat-atom nouns, with the OP₄ increment taken modulo q, exactly as the paper
specifies +(n) = (1+n) mod p (main.tex:1531–1534).
It is the strict-language counterpart of evalPaper:
evalPaper= OP₀–OP₁₀ fragment with the unbounded Nat incrementn ↦ n+1;evalPaperMod q= the same fragment with the modular incrementn ↦ (n+1) mod q.
Two facts must not be conflated:
evalPaperMod qrefines the full modular evaluatorFieldEmbedding.evalFBy q(evalPaperMod_le_evalFBy): they agree on the whole OP₀–OP₁₀ fragment and differ only whereevalFBywould fire OP₁₁, which the paper fragment crashes on.evalPaperMod qis notevalPaper: at the top atomq−1the modular OP₄ wraps to0while the unboundedevalPaperproducesq(evalPaperMod_ne_evalPaper_at_top). This is the compiled no-overflow distinction, not a claim that the two coincide.
*[subject formula], fuel-indexed, strict paper fragment (OP₀–OP₁₀ + cons) with the
paper's modular OP₄ increment +(n) = (1+n) mod q (main.tex:1531–1534).
Identical to FieldEmbedding.evalFBy q except an OP₁₁ head (op = 11) is an unknown opcode
and crashes (none), matching the paper's opHeadOk (op < 11) and the small-step machine
runProgram.
Equations
- One or more equations did not get rendered due to their size.
- Nock.evalPaperMod q 0 x✝¹ x✝ = none
- Nock.evalPaperMod q n.succ x✝ (Nock.Noun.atom a) = none
- Nock.evalPaperMod q fuel.succ x✝ ((b.cell c).cell d) = match Nock.evalPaperMod q fuel x✝ (b.cell c), Nock.evalPaperMod q fuel x✝ d with | some l, some r => some (l.cell r) | x, x_1 => none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 0).cell (Nock.Noun.atom ax)) = Nock.Noun.slot ax x✝
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 0).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 1).cell tail) = some tail
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 2).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 3).cell tail) = Option.map Nock.Noun.wut (Nock.evalPaperMod q fuel x✝ tail)
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 4).cell tail) = (Nock.evalPaperMod q fuel x✝ tail).bind (Nock.FieldEmbedding.lusFBy q)
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 5).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 6).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 7).cell (b.cell c)) = match Nock.evalPaperMod q fuel x✝ b with | some sb => Nock.evalPaperMod q fuel sb c | none => none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 7).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 8).cell (b.cell c)) = match Nock.evalPaperMod q fuel x✝ b with | some sb => Nock.evalPaperMod q fuel (sb.cell x✝) c | none => none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 8).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 9).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom 10).cell tail) = none
- Nock.evalPaperMod q fuel.succ x✝ ((Nock.Noun.atom op).cell tail) = none
Instances For
Convenience wrapper with a large fuel budget, for #eval sanity checks.
Equations
- Nock.evalPaperModTop q subj formula = Nock.evalPaperMod q 100000 subj formula
Instances For
Fuel monotonicity (single step) for evalPaperMod.
Fuel monotonicity for evalPaperMod.
evalPaperMod q refines evalFBy q. Every strict-paper modular evaluation is a full
modular evaluation with the same result: they differ only where evalFBy fires OP₁₁, which
evalPaperMod crashes on.
evalPaperMod q preserves q-boundedness (unconditionally). On canonical field-noun
inputs (BoundedBy q), every successful modular run returns a canonical field noun — the
modular oracle maps 𝒩(𝔽) into 𝒩(𝔽), handling the wrap exactly (no guard needed).
Modular OP₄ differs from the unbounded increment at the top atom. On +(2) at q = 3
the modular oracle wraps ((2+1) mod 3 = 0) while the unbounded evalPaper produces 3.
This is the compiled distinction: the strict paper language is the modular one, not the
unbounded evalPaper.