VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

What Is Vocabulary | Can AI Rewrite a Sentence Without Changing Its Meaning? E-Graphs, Equality Saturation and Guarded Semantic Rewrites

An e-graph is a data structure for representing expressions and established equalities among them. Equality saturation repeatedly applies rewrite rules to build a collection of equivalent expressions, from which an extraction procedure can select a representation according to a chosen cost criterion. This approach supports important compiler optimisation and program synthesis techniques. However, the equality of two formal expressions under a specified semantics is not the same thing as the similarity of two English sentences, the equivalence of two institutional definitions or the truth of either statement.

Vocabulary Coding and Engineering (VCE) proposes an experimental extension: represent tightly bounded meaning objects with explicitly justified rewrite rules and guards, then test whether useful alternatives preserve the original requirements. Willsey and colleagues’ egg research provides established technical foundations for efficient equality saturation. Their 2026 Communications of the ACM article describes the technique and its applications. eduKate’s proposed guarded semantic rewrite layer is a research design, not a validated language-wide equivalence engine or an assertion that all paraphrases can be safely merged.

  • E-node: a function symbol with references to child equivalence classes in a term representation.
  • E-class: a collection of e-nodes representing expressions treated as equivalent under the specified rules.
  • Congruence: equivalence that is preserved by the permitted formal expression constructors.
  • Rewrite rule: a declared transformation between expressions.
  • Guard: a condition that must hold before an otherwise conditional rewrite is justified.
  • Equality saturation: building equivalent alternatives through repeated non-destructive rewrites, subject to stopping conditions.
  • Extraction: choosing a represented expression according to a declared cost function.
  • Frontier question: can a vocabulary engineer optimise a representation without erasing distinctions that matter to its recipient?

Chapter index

1. A shorter sentence can have a longer consequence

Imagine an invented library notice that says, ‘All approved members may enter the reading room on Saturday, provided their booking has been confirmed.’ A shorter version says, ‘All approved members may enter on Saturday.’ It looks like an efficient paraphrase, but it has omitted the booking condition. A different paraphrase could keep that condition while rearranging the wording.

A useful language transformation needs a preservation objective. It cannot be evaluated merely by counting removed words or detecting similarity to the original. The Fencing Method helps expose the difference by presenting nearby cases: a member with a confirmed booking, a member with approval but no confirmed booking and a person outside the relevant membership category. The shortened rule must not produce different answers unless a change was intentionally authorised.

2. Why an e-graph retains alternatives

In traditional rewriting, one expression may be replaced by another, after which the earlier form is no longer available in that intermediate representation. E-graphs can retain many alternatives compactly. Equality saturation adds expressions through selected rewrites and records the resulting equalities; extraction then selects an expression using a cost criterion. The procedure may stop because no further useful changes occur or because a resource limit is reached.

The technique is valuable because an early local choice does not need to erase every other alternative. In vocabulary work, this motivates keeping source expressions, alternative representations and the evidence for their relationship rather than replacing a definition simply because a newer sentence is shorter. The analogy is limited: natural-language paraphrases are not automatically mathematical equalities.

3. E-classes and the danger of merging the wrong concepts

An e-class represents terms that the system treats as equivalent. When expressions are merged, congruence may imply additional equalities. The resulting efficiency depends on the correctness of the equivalences asserted and the meaning of the expression constructors. A wrong rewrite can therefore contaminate the representation instead of merely producing one isolated bad sentence.

For example, the words eligible and approved can be related in a workflow while naming different states. Merging them as if they were equivalent could alter many downstream conclusions. A VCE system must distinguish equivalence from similarity, broader meaning, narrower meaning, correlation and unresolved relationship. Only the relation justified by the domain should be recorded. Do not treat every crosswalk link as a congruence.

4. Worked example: algebra with a missing condition

Under ordinary exact real arithmetic, x divided by x equals one when x is nonzero. The rewrite from x/x to 1 therefore requires the nonzero condition. If x can be zero, the original expression is undefined there while the replacement is defined. The unrestricted rewrite changes the mathematical behaviour. Machine arithmetic and exceptional values can impose additional considerations beyond this toy example.

Now consider a fictional rule in which approval is equivalent to permission only when the room is available and the authorising officer is acting within the specified scope. Removing those conditions does not preserve the intended institutional relation. The algebra example provides a small exact demonstration of why a guard matters; it does not make the policy automatically formal or establish that the proposed equivalence is legitimate.

5. Equality, implication and contextual paraphrase

In a Boolean model, A AND B is equivalent to B AND A. The formula A AND B entails A, but A does not entail A AND B. This asymmetry matters when an AI attempts to compress a condition. A sentence that follows from another sentence need not be a replacement that preserves its full meaning.

Context also matters for equivalence. A term may be interchangeable with another in one approved form while remaining different in a different institution, language or period. A guarded rewrite record could identify its domain, formal relation, assumptions and source. The record should distinguish a proved equality within a formal system from a reviewer-approved substitution for a limited language task. The second claim must not borrow the first claim’s mathematical guarantees.

6. Extraction is an optimisation decision

An e-graph extraction procedure selects a represented expression under a cost model. A compiler might seek a cheaper computation. A vocabulary interface might seek a readable explanation, a compact record or a representation suitable for a particular query. These objectives are different. An expression that is compact for storage may be difficult for a learner to understand.

eduKate’s proposed semantic extraction method would consider candidate outputs only after checking the required meaning properties. It would report when a short alternative is insufficient for the receiving task. Multiple alternatives may remain useful: a plain-language explanation, a formal expression and a source-linked record. The system should not declare that the shortest candidate is the best simply because length is easy to count.

7. The proposed guarded rewrite record

A candidate VCE rewrite record should include the original expression, candidate expression, relation type, relevant entities, context, required conditions, provenance, evaluation method and effective version. If the candidate is a formal transformation, it should record the semantics in which equivalence was established. If it is a natural-language proposal, it should state that it awaits or has undergone a bounded review.

The proposed system separates verified formal transformations from tentative paraphrases. An unverified suggestion must not enter an equivalence class merely because a model confidently proposes it. Where the required relation is not congruent under the expression constructors, store it as a separate typed relationship instead. This is essential if the representation is to support further automated inference. A later correction should invalidate dependent reuse rather than silently preserving a mistaken equality.

8. Text zoom TX0–TX6: an equivalence has a boundary

At TX0, a token or word can be substituted. At TX1, a phrase identifies a particular sense. At TX2, a proposition expresses a relationship. At TX3 and TX4, conditions and exceptions determine its scope. At TX5, a document supplies purpose and source authority. At TX6, the connected context may alter whether the substitution is appropriate.

The eduKate TX framework is a conceptual tool for identifying these boundaries. A valid term-level rewrite need not be valid at every wider level. For example, an accepted label substitution inside one formal vocabulary does not establish that two legal categories coincide across jurisdictions. The proposed research must explicitly identify what the equivalence relation covers.

9. Civilisation zoom Z0–Z2: rewriting as evidence of learning

At Z0, a learner can explain a definition using different wording and demonstrate which distinctions must remain. At Z1, two people compare interpretations and identify a missing condition. At Z2, a learning community can preserve examples and approved variants without requiring everyone to use identical language. The Fencing Method provides a useful way to organise these exercises.

A teacher should assess whether the learner can transfer the concept to an unfamiliar example. Repeating the original definition exactly is not sufficient evidence of understanding. Conversely, varying the wording is not sufficient evidence of loss. A reviewed task and its boundary cases help decide what the paraphrase actually preserves.

10. Civilisation zoom Z3–Z6: maintain alternatives without forced agreement

At Z3, institutions maintain representations of processes, requirements and evidence. At Z4, public systems need reliable distinctions and legitimate decision authority. At Z5, crosswalks connect different terminology and languages while preserving local scope. At Z6, later societies may need several historical forms of an expression to understand what earlier systems meant.

The Second Intelligence Pool and eduKate’s portable-civilisation research propose organising human and AI capability through dependable interfaces. A guarded rewrite system could support a bounded part of that work by maintaining alternative representations with documented relationships. It should also protect plural meanings and legitimate disagreement. Efficiency cannot justify merging concepts that are distinct under the applicable requirements.

11. Ztime: rewrite rules have versions

At T0, a source expression and its interpretation are established. At T1, a candidate rewrite is proposed and evaluated. At T2, an appropriate alternative may be used for a specified task. At T3, the definition, context or formal semantics may change. At T4 and beyond, dependent representations may need review. A new interpretation does not automatically invalidate every historical use of the earlier one.

Retain the source version, rewrite-rule version, guard, validation evidence and dates. A formally sound rule can remain sound under its original semantics while being inappropriate for a changed domain. The proposed Ztime approach helps keep these histories distinct; it does not supply an automatic proof that a rule is current.

12. Frontier experiment: guarded semantic rewriting

Construct a synthetic collection of fictional library and classroom rules, together with finite formal interpretations. Independently label valid rewrites, one-way implications, invalid near matches and cases with missing guards. Compare ordinary language-model paraphrasing, a bounded formal rewriting baseline and a proposed VCE workflow that uses independently checked guards and maintains source links. Restrict e-class merging to equalities established under the specified formal semantics.

Evaluate preservation of independently enumerated consequences, missed conditions, false equivalences, useful alternative representations, extraction cost, resource use and reviewer effort. Test changes in units, time, negation, authority and word sense. Hold out entire source families and report errors caused by false equivalence propagation. Record resource-limited stops separately from saturation. No experiment has been conducted for this article, and no benefit is claimed before independent evaluation.

13. Four-week research progression and EnDist

Week one: distinguish equality, implication, similarity and unrelatedness using toy formulas. Week two: identify the guard required for a set of proposed transformations. Week three: develop fictional alternative meaning records and check them against the same independently specified questions. Week four: design a comparison of useful output quality, representation cost and error propagation.

EnDist is eduKate’s conceptual approach to considering useful capability after losses from misunderstanding, rework and coordination. A specific experiment could measure correctly answered tasks per observed end-to-end resource budget, while reporting false equalities separately. EnDist is not a validated physical unit or universal metric. The frontier is to preserve meaningful distinctions while making their representations useful to different recipients.

Comparison table

TermMeaningDoes not establish
E-nodeTerm constructor and child class referencesNatural-language truth
E-classFormally treated equivalent expressionsAll similar words are interchangeable
CongruencePreservation of equality by specified constructorsUniversal contextual equivalence
GuardRequired condition for a rewriteProof of a missing premise
SaturationClosure reached under given rewrites when achievedEvery valid expression has been discovered
ExtractionSelection according to a cost criterionCorrect original interpretation
Guarded semantic rewriteProposed scope-aware validation procedureEstablished guarantee for arbitrary language

Conclusion

Equality saturation shows how a system can retain many formally equivalent expressions instead of prematurely choosing one. Vocabulary Coding and Engineering asks a related, but independently testable, question about human meaning: can alternative expressions remain useful without losing scope, conditions and evidence? The answer must be earned through appropriately bounded representations, justified rewrites and independent evaluation.

Frontier technology: companion articles

Research sources and further reading