-
-
Student written or typed proof upload page
-
Uploaded Proof
-
GLM-OCR model runs to convert handwriting to text
-
qwen3:8b converts text into Lean code
-
Lean code errors are used to inform student of errors in their logical reasoning
-
Student attempts to fix the error
-
Student is incorrect again, and uses hints to independently resolve their issue
-
Student can send messages to TAs for further assistance
-
If student is offline, messages are queued and sent when connection is restored
-
TAs will receive student messages in their inbox. They would be notified via email that there are unread messages to answer
-
TA can either Approve that the student was right and the checker was wrong, or Deny it and provide targeted advice / hints
-
Student can view response from TA
Inspiration
First-year STEM students hand-write proofs every week, and usually the only person who can say which line went wrong is a tutor shared with a whole class. A chatbot will write the entire proof instead, which short-circuits the thinking the exercise was set for. We wanted every student to get line-by-line feedback on their own laptop, including those who cannot reach office hours or pay for a private tutor.
What it does
You photograph your handwritten proof and tell Proofread what you were asked to prove. It reads the page into numbered lines for you to confirm, then checks each line with Lean, a proof assistant used by research mathematicians. A line that fails comes back with a counterexample and up to three hints that never give the corrected line away. If you disagree with a verdict, a teaching assistant can inspect that line and overrule it. Everything stays on your device, so it works with the Wi-Fi off and your coursework is never uploaded.
How we built it
Lean 4 with mathlib does the checking, so the verdicts need no AI at all. Two small open models run locally through Ollama so that students do not have to write Lean: glm-ocr reads the handwriting and qwen3:8b translates each line. A supervisor in plain Python runs six specialised agents in a plan, act and observe loop with a step budget and a decision log. Guardrails are enforced in code, so nothing is checked before the student confirms the lines. We wrote most of the code with Claude Code, with FastAPI behind a React interface.
Challenges we ran into
Everything runs on a laptop CPU, which means translating a short proof takes one to two minutes. The language model sometimes corrected the student's mistake while translating it, so we added a check that rejects translations which change the line.
Accomplishments that we're proud of
On a first-year induction proof, Proofread reports that line 5 only holds when n ≥ 3 and gives n = 2 as the counterexample. It also takes a photographed proof with nothing stored from image to verdict in under three minutes offline.
What we learned
A small local model is enough when it is never asked to judge the mathematics, which is what lets Proofread run on an ordinary laptop with no subscription.
What's next for Proofread
We want to read the question from a photo of the problem sheet and to support proofs by cases. Proofread currently needs 16 GB of memory, so making it lighter would bring it to the students most likely to be left out.
Built With
- claude
- fastapi
- glm-ocr
- lean
- pytest
- python
- qwen
- react
- typescript
- vite