Skip to content

Check a derivation in the sandbox ​

This walk-through follows a student who wants a derivation and proof that it holds numerically. It uses the Academic style and the code sandbox. It was run with qwen/qwen3.6-35b-a3b on an RTX 5090, in the Space from Revise a book chapter for an exam: Hartley and Zisserman, sections 9.1 to 9.6, with Running code set to Run it.

1. Ask for the derivation and the check ​

Choose Academic in the style menu and ask:

Derive E = [t]× R from the epipolar constraint for calibrated cameras, then check numerically with a random rotation, translation and 3D point that the normalised image points satisfy x′ᵀEx̂ = 0 and that E has two equal singular values and one zero.

The answer took 135 seconds and nine model calls. It has the Academic shape:

  • Notation: a table of the 13 symbols used.
  • Assumptions: calibrated cameras, the canonical camera pair, normalised points.
  • Derivation: 13 numbered steps, each cited, from the projections to E = [t]×R = R[Rᵀt]× and the singular-value condition.
  • Numerical Verification Algorithm: the check, as a numbered box.
  • Pitfalls: scale ambiguity, the non-unique SVD, using E on pixel coordinates, pure translation.

2. Watch the code steps run ​

The answer graph took two extra steps, shown lit in the Flow tab:

  • code: the plan asked for a computation, so the model wrote a Python cell and the sandbox ran it in this chat's kernel. Its output became evidence, cited as "Python (sandbox)".
  • math: because the answer is Academic, has equations and code may run without asking, the model wrote SymPy and NumPy checks of the answer's own equations, and the sandbox ran them.

The answer's references, including Python (sandbox), and the Flow tab with the code and math steps lit

Figure 1. Reference 3 is the computation. The Flow shows code and math ran, and verify ran twice because the answer was revised once.

3. Read the checks ​

Under the answer, Computation (ran in the sandbox, after 3 failed attempts) opens the final cell and its output. The model's first three cells failed; each time the error went back to the model, which fixed the code. The fourth ran in 265 ms.

A Python cell in the Code tab: a Purpose, Answer and Method header, one import block, highlighted Python, and three equation checks shown as passed

Figure 2. How equation checks appear in a cell: each one prints as passed or failed under the code. In this run all five passed: det(E) = 0, x′ᵀEx = 0, σ₁ = σ₂, σ₃ = 0 and E(Rᵀt) = 0.

Earlier attempts keeps the failed cells. Each cell can be edited and run again with the buttons on its header. The Code tab of the run panel lists every cell in the chat, and you can type your own below them: the kernel still has this answer's variables.

4. Judge the result ​

The badge read High confidence, with these reasons:

  • 22 of 24 claims verified against the cited text,
  • 1 of 1 search questions covered by the sources,
  • best passage relevance 1.00,
  • 5 of 5 equation checks passed on the draft before its last revision,
  • 1 sentence cites no source.

The last two reasons matter. The checks ran on a draft, and the answer was revised after them. And a check proves the equations it tested, not every sentence.

This run shows why you still read the answer:

WARNING

Step 11 says the matrix Z is diag(1, 1, 0). In the book, Z is the skew-symmetric matrix and diag(1, 1, 0) comes from ZW. The quote behind the step is real, so the claim check passed, and the equation checks didn't test this step. The notation table repeats the slip.

The revision also left two clumsy sentences, such as "This configuration (not established by the sources).", where it cut an unsupported half sentence. And one "[S1-S9]" marker was not turned into a citation.

What this shows ​

  • A computation becomes evidence like a page of the book, with its own citation.
  • The model writes and fixes the code. The sandbox runs it without network or file access.
  • Equation checks catch wrong formulas, but only the ones they test. They raise confidence; they don't replace reading.