Typed Crossings: What Casts, Refinement Proofs and Chain-of-Thought Checks Carry Across a Boundary
A claim established in one structure is routinely reused in another: an identity on the natural numbers after a cast to the integers, a property of a specification after refinement to an implementation, the validity of a written chain of reasoning as a statement about the computation that produced it. Whether the claim survives is a property of the map that carries it, and it cannot be read off the symbol or the word that is reused. This position paper argues that such a crossing should be declared and typed: by its kind, which fixes what a failure of the crossing consists in, and by what it preserves, under which conditions. Three cases are examined. In Lean 4, Mathlib's bundled morphisms and cast lemmas type the crossing wherever cast automation works. In system verification, properties beyond functional correctness are carried across a refinement one preservation proof at a time. In machine learning, the validity of a model's written reasoning and its faithfulness to the model's computation are two different crossings. A judgement on the trace alone can agree with faithfulness exactly when faithfulness does not vary among the computations that write the same trace; where one trace is written by two computations and describes only one of them, no check on the trace tells the two apart. Verify the trace, and you have verified the trace. Each field already handles the problem locally. The contribution is a common vocabulary, taken from Layered Event Modelling, that states what the local solutions share, together with a Lean 4 mechanisation: the underlying graph model, a crossing with a declared kind and associated preservation proofs, with casts as the worked example, and the results on traces. The mechanised results are elementary, the mechanisation covers only part of the paper, no new experiments are reported, and the paper states where its claims stop.
Authors
- Bernhard Kreinz (ORCID: https://orcid.org/0009-0005-2148-9903)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-14
- DOI
- https://doi.org/10.5281/zenodo.24219768
- Primary Topic
- Logic, programming, and type systems
- Type
- preprint