Markdown for LLMs
LDC-E1324 — Rational entry must be canonical
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1324 — Rational entry must be canonical ## What it means Assertions state ground facts: every argument must already be a value, and rational numbers have exactly one written shape — positive denominator, fully reduced. A fraction that could be reduced further is not that shape, and the compiler stops at the assertion instead of storing a value that matches nothing. The repair is to reduce the fraction: write the canonical pair the message names. A canonical entry folds into its value form and matches as stated. ## Example ```law language "law.core" version "0.2"; package demo.diagnostics version "0.1.0"; namespace "urn:law:demo:diagnostics"; relation ratio(v: Rational) kind institutional; assert ratio(2/4); ``` ## Fix ```law language "law.core" version "0.2"; package demo.diagnostics version "0.1.0"; namespace "urn:law:demo:diagnostics"; relation ratio(v: Rational) kind institutional; assert ratio(1/2); ``` ## Engine message The engine reports this in its own wording: ```text example.law:6:1: error LDC-E1324: Rational entry in a ground position must be canonical (§168.1, canon E-0005): 2 / 4 is reducible, canonical form is 1 / 2 ``` ## Related - [Expressions and quantities](/constructs/expressions-quantities/) — values, units, and their canonical shapes. - [LDC-E1325](/diagnostics/LDC-E1325/) — computable terms are refused in the same positions.