a canonical form
The same idea can wear many disguises: 1/2, 2/4, and 3/6 are one number; x + x and 2x are one expression; (x + 1)(x - 1) and x^2 - 1 are one polynomial. If a computer is to recognize that two things are equal, it helps enormously to first rewrite each one into a single agreed-upon standard shape. A canonical form is exactly that: a unique representative chosen for each value, so that two objects are equal if and only if their canonical forms are identical, character for character.
The defining property is uniqueness: a canonical form maps every member of an equivalence class to one and the same representative. For fractions, the canonical form is lowest terms with a positive denominator, so 2/4, 3/6, and 1/2 all become 1/2. For polynomials, a canonical form might be 'expanded, terms sorted by descending degree', so both (x + 1)^2 and x^2 + 2x + 1 become the string x^2 + 2x + 1. Crucially, a canonical form makes the equality test trivial — just compare the representations directly. A weaker cousin, a normal form, only guarantees that anything equal to zero is rewritten to a literal 0 (enough to test for zero, but not to give every value a unique look); the words are often used loosely, but the distinction matters in theory.
Canonical forms are the quiet machinery that lets a computer-algebra system simplify, detect duplicates, and decide equality reliably. They reach beyond algebra: the Smith and Hermite normal forms are canonical shapes for integer matrices used in exact linear algebra. The honest limit is sobering: for rich enough classes of expressions (mixing exponentials, logs, and radicals) no computable canonical form exists at all, because deciding equality is undecidable in general. That impossibility is the zero-equivalence problem, and it is why automatic simplification can never be perfect.
Are (x + 1)^2 and x^2 + 2x + 1 the same polynomial? Put both into the canonical form 'fully expanded, terms in descending degree': the first expands to x^2 + 2x + 1, the second is already there. The two canonical forms are byte-for-byte identical, so the system reports equal — no guessing required.
Once both are in canonical form, equality is a literal string comparison.
Canonical and normal forms are often conflated, but differ: a canonical form gives every value a unique representative; a normal form only guarantees zero is sent to 0. And for general expressions a canonical form may be impossible, which is precisely the zero-equivalence problem.