semantic-explanation-integer-tutorial
repository URL pending
Scope
The semantic-explanation-integer-tutorial library is a worked Agda tutorial that applies the semantic-explanation framework to elementary integer-order reasoning. Its central module defines ordinary integer facts about transitivity, monotonicity under addition, mixed strict and non-strict order, antisymmetry, and bounds expressed through a local alias. A domain specification classifies integer entities and maps quoted order, equality, and addition heads to explanatory surfaces. A discourse profile organizes proof premises and conclusions so generated explanations can present domain evidence in declaration order. The tutorial also exercises explanation families, provenance for alias unfolding, and a deliberate unsupported-expression case for multiplication.
Most important results
It produces compile-time explanations for transitive order, offset-preserving order, strict-order propagation, equality from opposite bounds, and a reviewed-limit chain. Literal equality proofs pin the rendered wording for compact explanations and a domain-evidence explanation. The alias example records an auditable provenance sequence that includes both rule use and unfolding of WithinLimit. The candidate-family example fixes five explanation variants, while the multiplication example confirms an unregistered operator is classified as an unsupported expression.
Library modules
2 checked modules
Select a module to inspect its generated Agda source view.