Unit 9 / 11

Hallucination, Common Mathematical Errors, and the Discipline of Verification

Gains:

  • Be able to recognize why artificial intelligence makes mistakes in mathematics (being a language model, not checking logic) and the seven main types of errors
  • Ability to explain why it is imperative to verify each step by understanding that error is propagated and accuracy is binary in mathematics.
  • Ability to apply a multi-layered verification discipline through common sense testing, order of magnitude checking, checksums, cross-checking and independent methods

This unit deepens the idea at the heart of the module: why and how does AI make mistakes in mathematics, what are the types of these mistakes and how do we systematically catch them? In previous units, we have seen verification methods for each topic; Here we gather the anatomy of errors under one roof. The point is, when you look at an AI output you wonder "what could be a mistake here?" It is to gain a validation mentality that reflexively thinks.

Reminder: a hallucination is when an AI confidently produces information that is not actually true. In mathematics, hallucination often appears in the form of "persuasive but false." Why does AI make mistakes? Because it is a language model, not a logic engine — that is, it produces text with statistical patterns, it does not check the logical validity of the steps. A "3-digit multiplication" and a "valid proof" are for him the task of producing the same kind of text; It has no internal mechanism to guarantee accuracy.

Anatomy of mathematical errors: seven types

The following list of types summarizes the most common errors you will encounter in AI output and the antidote for each.

Error type

What does it look like

antidote

arithmetic error

Number error like 7×8=54

Calculator/SymPy

sign error

−(a−b)=−a−b

Open my name manually

Made-up theorem

non-existent theorem name

Confirmation from source

Rule misapplication

Don't forget the chain rule

"Which rule?" question

Skipped status

Ignore the negative root

List all statuses

gap of proof

"Therefore" without justification

Questioning every pass

Old/incorrect data

outdated information

sourcing

Why does mathematics require special attention?

In most areas, a small mistake has a small consequence. In mathematics, error spreads and grows. A sign error in the first line of an equation makes the next ten lines and the final result completely wrong. A gap in the middle of a proof makes the entire proof invalid. This “fragility” makes it necessary to verify each step in mathematics — “generally speaking seems true” is not enough.

Moreover, truth in mathematics is binary: a result is either true or false, there is no in between. "Eighty percent accurate" may be considered acceptable in a text summary; There is no such thing as "eighty percent correct" in an integral—either it is the correct result or it is not. This dual nature makes verification both more critical and (fortunately) more possible: the result either passes verification or it does not.

Step by step: the discipline of systematic verification

1. Confirm each numerical result with a tool. Never leave arithmetic to rely on AI; SymPy, calculator or by hand.

2. Check each symbolic result with SymPy. Integral, derivative, simplify, equation—all can be verified with SymPy.

3. Confirm each theorem/formula from the source. Are the name and expression correct? Made-up theorems are the most insidious trap.

4. Question every occurrence in every proof. “Does this really follow from the previous step?” Base case, implicit assumption, gap check.

5. Check and countercheck. Inverse operation, substitution, limit states, dimensional analysis.

6. Put it to the common sense test. Is the result reasonable? If a probability is greater than 1, there is an error if a length is negative.

Hint: The quickest common sense test is the "order of magnitude" check. Is the result roughly within the expected range? If a class average is 250 (out of 100), or a probability is 3.5, you'll know there's an error without looking at the details. This 5-second check eliminates many ridiculous results in the bud.

three mini cases

Case 1 — Chain sign error. One student found that in an 8-line algebraic simplification, a sign error the AI ​​made in line 2 propagated to the next 6 lines. The final result was completely wrong, but the AI ​​presented it with complete confidence. When the student simplified it from scratch with SymPy, the correct result was obtained and allowed the AI ​​to find the error in the 2nd line. A single sign refuted 6 lines.

Case 2 — Common sense saved the test. A teacher had an AI solve a probability problem; The result was 1.4. Without looking at the details, the teacher said "the probability cannot be greater than 1" and looked for the error: the AI ​​had collected non-discrete events as if they were discrete. A common sense test pointed out the error within seconds.

Case 3 — Made-up formula. An engineer asked the AI ​​for a "closed formula" for a series sum. AI has given a convincing formula. The engineer tested the formula for a small value of n (n=3) both by formula and by hand addition; The results did not match. The formula was made up. A little tweaking prevented hours of misuse.

Four copyable templates

1) Multi-layer verification request:

You found: [result]. Now verify this THREE different ways: (1) hashing it in reverse, (2) testing a simple custom value, (3) some code to check with SymPy (I'll see the output). Tell me if all three ways are consistent; If not, show which step has an error.

2) Common sense/rank test:

You found: [result]. Put it to the common sense test to see if this result is REASONABLE: what is the expected order of magnitude, is the sign correct, is it within limits (e.g. probability 0-1)? If it is not reasonable, investigate where there might be a mistake.

3) Theorem/formula confirmation:

Is the [theorem/formula] you are using really standard and correct? Write its standard expression and conditions. Show an account that tests this with a small sample (e.g. n=3). If it's a made-up formula or something you're not sure about, say it clearly.

4) Error mode diagnosis:

I know there is a bug in the solution below. Check these error types one by one: arithmetic, sign, wrong rule, skipped condition, domain. Tell me what type of error it is and at which step. Solution: [here]

Weak prompt / Strong prompt

Weak: "Is this conclusion correct?" [paste the result]
Result: AI often says “yeah right” (tendency to confirm its own output); unreliable because there is no independent audit.
Strong: "CHECK this result in an independent way: use a different workaround or check with SymPy code (I'll run the code). Don't just say 'true/false'; show which check you did and the result. If the checksum fails, find the error."
Result: An independent control method is challenged; The AI ​​is prevented from blindly approving its own output.

Common mistakes

  • Getting the AI to validate its own output. "Is this true?" AI often confirms its own mistake; Independent method is required.
  • Skipping the common sense test. Nonsense like probability greater than 1 and length being negative can be caught without looking at the details.
  • Relying on a single verification. Use multiple independent paths (hashes + SymPy + custom value) on critical results.
  • Not testing formulas with small samples. Made-up formulas collapse immediately at small values ​​such as n=2, n=3.
  • Forgetting that the bug is propagated. An error in the first line corrupts the entire result; If you find an error, check it from the beginning.
Caution: There is no correlation between the AI's confidence and its accuracy. The sentence that seems the most determined, the most fluent, the most "sure" may very well be completely wrong. Trust independent verification, not tone. Only consider a result “true” when you confirm it by hand or with a deterministic tool — not because the AI ​​says “sure.”

In summary

AI makes mistakes in mathematics because it is a language model that statistically produces text, not an engine that controls logic. Errors fall into seven main types: arithmetic, sign, made-up theorem, rule misapplication, omitted case, proof gap, stale data. In mathematics, error spreads and grows, truth is binary — so every step must be verified. Systematic discipline: verify every numerical tool, every symbolic result with SymPy, every theorem from the source, every proof pass by questioning; Apply check, counter-check and common sense testing. AI's confidence is not evidence of accuracy.

Application task

Choose a problem with a solution of medium length (at least 6-8 steps) and have the AI solve it. Then do multi-layer verification using patterns 1 and 4 from this unit: (a) common sense/rank testing, (b) checking with SymPy, (c) testing on a special value. Then go through the solution line by line with a deliberate “bug hunt” eye and check which of the seven types of errors might occur. Record each error you find along with its type.

checklist

  • [ ] I confirmed each numerical result with a deterministic tool.
  • [ ] I checked each symbolic result with SymPy.
  • [ ] I verified the theorem/formula used from the source or with small example.
  • [ ] I applied the common sense/order of magnitude test.
  • [ ] I audited it in an independent manner (without relying on the AI's own approval).
  • [ ] When I found an error, I re-checked the solution from the beginning.