Evaluation traces #
Def:eval_trace–Thm:deterministic_Trace (main.tex:1114–1157).
Trace, consistency, completeness (Def:eval_trace, main.tex:1114–1127) #
Def:eval_trace (main.tex:1114–1127).
Consistent: ∀ i ∈ [n], Nock(tᵢ, tᵢ₊₁) = 0.
Equations
- Nock.Verb.Consistent [] = True
- Nock.Verb.Consistent [head] = True
- Nock.Verb.Consistent (a :: b :: rest) = (a.Step b ∧ Nock.Verb.Consistent (b :: rest))
Instances For
Small list helpers (Lean core only) #
Lem:domain (main.tex:1141–1142) #
Lem:domain (main.tex:1141–1142).
Let c be a continuation not followed by a null operator in a consistent evaluation
trace. Then map(c, getIndex(c)) ∈ D(V).
lemma:equiv_continuations (main.tex:1150–1153) #
lemma:equiv_continuations (main.tex:1150–1153).
NockVM^Λ ≡ FiniteTransitions^Λ.
Thm:deterministic_Trace (main.tex:1156–1157) #
Inductive core of determinism: Step is functional, so equal heads and lengths force equality.
Thm:deterministic_Trace (main.tex:1156–1157).
If map enforces a strict ordering on finite verbs, then for every finite verb F and
integer n, there exists at most one consistent evaluation trace of size n for F.
Conditional deterministic-trace theorem (main.tex:1156–1157) #
Consistency of a trace with respect to an arbitrary transition relation R
(Consistent is the special case R = Step).
Equations
- Nock.Verb.ConsistentR R [] = True
- Nock.Verb.ConsistentR R [head] = True
- Nock.Verb.ConsistentR R (a :: b :: rest) = (R a b ∧ Nock.Verb.ConsistentR R (b :: rest))
Instances For
Trace uniqueness for any deterministic transition relation. Determinism of the relation is the only hypothesis; this is the inductive core shared by the functional and the strict-order forms.
Thm:deterministic_Trace (main.tex:1156–1157).
If map enforces a strict ordering on finite verbs, then for every finite verb F and
integer n, there exists at most one consistent evaluation trace of size n for F.
The concrete consistency (Consistent, via next) is exactly SelStep dfsLt
consistency, because next realizes the DFS selection step (next_eq_some_iff).
Thm:deterministic_Trace (main.tex:1156–1157).
If map enforces a strict ordering on finite verbs, then for every finite verb F and
integer n, there exists at most one consistent evaluation trace of size n for F.
Corollary: valid and invalid verbs are finite (main.tex:1137–1138) #
Corr (main.tex:1137–1138).
All valid and invalid verbs are finite.
Corr (main.tex:1137–1138).
All valid and invalid verbs are finite.
Size bound λ ≤ Λ on paper languages (main.tex:1130–1147) #
FiniteTransitions^Λ (main.tex:1147).
FiniteTransitions^Λ := {F | F is a continuation of a finite verb and λ ≤ Λ}.
Equations
- Nock.Verb.FiniteTransitionΛ Λ F = (F.FiniteTransition ∧ F.size ≤ Λ)
Instances For
lemma:equiv_continuations (main.tex:1150–1153).
NockVM^Λ ≡ FiniteTransitions^Λ.
NockProgram^Λ / NockValidProgram^Λ (main.tex:1090–1149) #
Def:NockProgram (main.tex:1090–1098).
F = *[subject, formula] with subject, formula terminal; NockProgram^Λ := {F | λ ≤ Λ}.
Equations
- One or more equations did not get rendered due to their size.
Instances For
F ∈ NockValidProgram^Λ (main.tex:1145): a Nock program that is a valid verb.
Equations
- Nock.Verb.NockValidProgramΛ Λ F = (Nock.Verb.IsNockProgram Λ F ∧ F.Valid)
Instances For
Subset of verb-languages (⊆): every verb in P is in Q.
Equations
- Nock.Verb.SubLang P Q = ∀ ⦃F : Nock.Verb⦄, P F → Q F
Instances For
A terminal leaf is finite: its one-element trace [leaf n] is complete.
Strict inclusion (main.tex:1145). NockValidProgram^Λ ⊊ NockVM^Λ: every valid program
is finite of length ≤ Λ (⊆, via finite_of_valid), and the containment is strict —
e.g. the terminal leaf 0 is a finite verb of length 1 ≤ Λ that is not a Nock program
(it is not of the form *[subject, formula]; main.tex:1145 "not all elements of NockVM^Λ
are actually programs"). The side condition 1 ≤ Λ is necessary: for Λ = 0 both
languages are empty (every verb has ≥ 1 leaf), so ∅ ⊊ ∅ fails; the paper's ⊊ is meant
for the non-degenerate range.
NockVMROM^Λ at the verb level (main.tex:1160) #
Every ROM step is a Nock step (nextROM ⊆ next; main.tex:1160).
T is a consistent ROM trace of F (uses StepROM for consistency).
Equations
- F.TraceOfROM T = (T.head? = some F ∧ Nock.Verb.ConsistentR Nock.Verb.StepROM T)
Instances For
Every consistent ROM trace is a consistent Nock trace (ROM steps are Nock steps).
Every ROM trace of F is a Nock trace of F.
ROM-valid ⇒ finite. A verb that terminates in a terminal state using only ROM steps
is Nock-finite: its ROM trace is a Nock trace (traceOf_of_traceOfROM), and its terminal
last verb has no Nock successor either (next_none_of_terminal), so the trace is
Nock-complete.
Nock checker ↔ trace consistency (Step) + crash. NockCheck a b = true (paper's
accept 0, main.tex:1118) iff b is a Step-successor of a (Step a v, i.e. a
consistent transition Nock(a,v)=0) or a crashes and b = ⊥ (b = none). This is the
genuine biconditional making the two-verb checker 1-1 with the forward semantics Step
plus the crash branch (defeq to Verb.nockCheck_eq_true_iff, since Step a v := next a = some v).
Verifiable crash ↔ the paper's ⊥ (Invalid, main.tex:1124) #
Nock.Verb.eval reports a three-way Outcome; a crash result is tied here to the paper's
program-level ⊥: the evaluated program v is Invalid — its trace is complete and ends at a
stuck, non-terminal state (main.tex:1124). Soundness (eval_crash_invalid), completeness
(eval_crash_complete), and their biconditional (eval_crash_iff_invalid) pin eval's crash to
exactly that object; eval_crash_checked further exhibits the reached ⊥ state and its
NockCheck-accepted crash edge.
If S is a consistent trace of u (head u, Consistent S) whose last state w is a stuck
non-terminal (next w = none, ¬terminal), then eval reports a crash at fuel
S.length.
Crash soundness (program-tied). A crash reported by eval for the program v means v
is Invalid: its evaluation trace is complete and ends at a stuck non-terminal — the paper's ⊥
(main.tex:1124). Unlike a bare "some crashing verb exists", the witness is the trace of
v.
The reported crash is a checked ⊥ (program-tied). A crash for v exhibits the trace of
v reaching a state w that genuinely Crashes and whose ⊥-edge is accepted by the two-verb
checker (NockCheck w none = true) — verifiability tied to the evaluated program.