/solve-maths-mem · exercises II

Recall and Archive

The two tiers outside the context: Recall, what happened, in order; Archive, what is known, by name [Packer et al., §2.1; Sumers et al.: episodic and semantic memory].

The two stores

Precise definitions: Recall and Archive on the design page. In short:

$$\mathrm{Recall}_t=(e_1,\dots,e_t)\ \ \text{append-only};\qquad \mathrm{Archive}=(V,E,\mathrm{rec}),\ \ E\subseteq V\times V\ \text{“is a parent of”, acyclic}.$$

Best practice

Practice from databases, retrieval and mathematical libraries, and what each asks of Recall and the Archive.
practicesourcehere
a log: append-only, totally ordered by timeKrepsRecall: correct by appending, never by editing
write-ahead: log the change before applying itMohan et al.an event in events.jsonl before tree.json changes
inverted index; precision and recall of a searchManning et al.recall_search, archive_search, and how to test them
stable labels that never change meaningStacks projectstep ids run/step, never reused
each result declares what it usesMassotparents in every record; the support is computable
prove in the smallest theory; reuse through an interpretationFarmer et al.; Rabe & Kohlhasestore \(\mathrm{hyp}(u)\) minimal; reuse needs \(\sigma_r\models\mathrm{hyp}(u)\) (M3)
a library grows only with verified lemmasWang et al. (LEGO-Prover)only audited steps enter \(L\) (M2)
retrieve only premises available at that pointYang et al. (LeanDojo)search filtered by setting and by time

Recall

(a wrong event) misconception

Recall holds {"time": "03:42", "actor": "A5", "kind": "return", "ids": ["A5-8"], "text": "A5-8 proved"}. At 06:16 the audit finds A5-8 wrong. What does the root write?

(replay) compute

The status of a step is a fold over Recall: start with nothing and apply the events in order. The events that touch A5-8:

03:42  A5     return      A5-8 proved
03:47  A7     objection   A7-24: "A5-8 holds"
06:16  audit  audit       A5-8 error (pair model, residue char. 2)
07:03  C      correction  C-4 proves the support bound for the pair model, every F

What did the record say about A5-8 at 04:00, and what does it say at 07:30?

(which first?) predict

The root must record the 06:16 audit in both events.jsonl and tree.json, and the session may end between the two writes. Which order loses nothing?

(did the search find it?) compute

Suppose archive_search("support bound, pair model") returns page 1 = A5-8, C-4, S3-2, A5-3, A5-10, and the relevant steps are A5-8, A7-24, C-4, S3-2, S3-4, S3-6. Compute precision and recall of page 1. Page 2 holds S3-4 and S3-6: what is recall after page 2?

Archive

(what an error reaches) compute

Parents, from the run's record (rounds 1–2 and the root):

A5-10 ← A5-8, A5-7, …      A7-24 ← A5-8, A5-10, …     A7-25 ← A7-24, …
R-3   ← A7-25, A5-7, A6-6   A7-32 ← A7-25, …           R-4   ← A7-32, …

A5-8 is found wrong. Which steps have A5-8 in their support, \(u\) with \(\text{A5-8}\in\supp(u)\)?

(may a later run cite it?) transfer

A5-8 was stored with setting “every non-archimedean local \(F\)”. Its proof needs input (a), which fails for the pair model of \(\mathrm{GL}_n/(\mathrm{GL}_p\times\mathrm{GL}_q)\) when the residue characteristic is 2. A later run \(r\) has \(\sigma_r\): pair model, \(F=\mathbb F_2(\!(t)\!)\). May \(r\) cite A5-8, and how should the record have been stored?

(what enters the library) classify

Under M2, which of these enter solve/library.jsonl? (a) A2-4, proved, audit correct; (b) A5-8 as returned at 03:42, before any audit; (c) A5-9, blocked, with the missing lemma stated; (d) a heuristic remark; (e) A5-8 after the audit, with its error and C-4.

(Recall or Archive?) misconception

A7's message “I suspect A5-8 is fine but I did not check (a)” — where does it belong?

Your turn: store a dead end

(exit task) construct

Write the library.jsonl line for A5-9: blocked, “\(E_6/F_4\) at function level: what is missing”. Which fields does a future run need in order to use it without reading the proof?

Previous: \(\mathrm{sys}\) and \(W\). Design: /solve-maths-mem.