← All papers
First page of Topological Semantics for Scoped Computational Paths

Topological Semantics for Scoped Computational Paths

Arthur Freitas Ramos, Ruy J. G. B. de Queiroz, Anjolina Grisi de Oliveira, Tiago M. L. de Veras

cs.LO Aug 4, 2026 · v3 math.AT
Constructions are supported by a Lean 4 development; a focused Lean 4.32.0 result covers the topology comparison, circle/torus classifications, and Hawaiian-earring obstruction transfer.
Computational paths record the steps of an equality derivation. We give them a topological semantics that distinguishes derivable rewrites from arbitrary homotopies. Coherent representatives pair traces with paths homotopic to their realizations. We compare a topology retaining the entire trace with one observing only endpoints, length, and paths. Quotienting by the declared rewrites gives a groupoid. Multiplication is continuous when composable pairs carry the quotient topology inherited from composable representatives. This topology can differ from the usual subspace topology on pairs of quotient arrows. We characterize when they agree, give compact-Hausdorff and discrete sufficient conditions, and use the Hawaiian earring to exhibit a failure of agreement. The comparison with geometric homotopy classes is injective exactly when the presentation is geometrically complete. Normal-form certificates give a criterion for completeness. In the universal presentation, all paths are primitive steps and all endpoint-fixed homotopies are allowed rewrites; its quotient recovers the quotient-topologized fundamental groupoid. Circle and torus examples recover the classical based-loop classifications by $\mathbb Z$ and $\mathbb Z^2$. A Lean development supports the construction. A focused Lean 4.32.0 result registered in Palomar covers the topology comparison, additive circle and torus classifications, and a conditional Hawaiian-earring obstruction transfer. We distinguish that result from the earlier Lean 4.24.0 development and from the mathematical exposition.

Computational paths record equality derivations as finite traces of rewrite steps. A topological semantics for them should distinguish derivable rewrites from arbitrary homotopies, and multiplication on the quotient groupoid should be continuous.

Scoped rewrite presentations are defined: primitive geometric steps and named rewrites, each carrying an endpoint-fixed homotopy. Coherent traces are quotiented by scoped rewrite equality to form a groupoid. Composable pairs carry the final quotient topology, and this is compared with the ordinary subspace topology on pairs of quotient arrows. Key results are formalized in Lean 4, including a focused Lean 4.32.0 result registered in Palomar that is distinguished from an earlier Lean 4.24.0 development.

The quotient is a topological groupoid with continuous final-domain multiplication. The final and ordinary topologies agree exactly under product-quotient compatibility, which holds under compact-Hausdorff or discrete conditions and fails for the Hawaiian earring. The comparison with geometric homotopy classes is injective exactly for geometrically complete presentations. The universal presentation recovers the quotient-topologized fundamental groupoid, and the circle and torus examples recover based-loop classifications by Z and Z^2.