Cairn Docs Claims Blog Packages

Claim ยท cairn 0.5.2

cairn^903 UTF-16 offsets and scalar indices convert exactly

An assumption of cairn 0.5.2.

Id
cairn^903
Kind
assume
Reads as
assumed
Version
0.5.2

All of cairn 0.5.2's claims

What it says

TextIndex maps between AppKit's UTF-16 offsets and Lean's scalar indices exactly on boundaries, rounds offsets inside a surrogate pair to a whole scalar, and clamps AppKit ranges (NSNotFound, negative, past the end) to whole scalars.

Evidence

assumedStated, not proved. The proofs rely on it.
fuzzedNot shown yet: the trusted-base fuzzer's check text.index held. A CI step will publish it (#95).

Where it's defined

Declaration
Cairn.Fuzz.Trusted.Claims.textIndex
Module
Cairn.Fuzz.Trusted.Claims
Source
lean/Cairn/Fuzz/Trusted/Claims.lean:24 at v0.5.2
Statement hash
-

Ledger

cairn^903 is active in this version's claims.lock. An id never moves or changes meaning.