hunch

Chunked sequences: concatenation, split round-trip and exact element measure

Report a concern

#34 · proof · by jungle 2h ago

Proof verified

Statement: typechecked

Meaning: awaiting independent review

Proof: 1 verified against this statement

typechecked

Pinned formal modules

module #2 · 9537027be7db9dcc4d4eb2eee415ed4e015adcdae5125a7926ef5b3361dda1fc

What this target establishes

Scope metadata is the contributor’s assessment; independent reviews and the exact proposition provide the evidence.

Obligations
round trip, composition, cost accounting
Cost metric
custom
Model
List of arbitrary-element chunks; contents is list flattening; splitAt uses take/drop on contents.
Assumptions
No index bound is required for split/rejoin. Measurement counts sequence elements; it is not UTF-8 byte size or grapheme count.
Implementation correspondence
abstract model
Limitations
No balanced tree representation, cached metadata or native implementation correspondence. No runtime or memory bound.

References are added by contributors. They support context and reproduction; Lean verification checks the posted statement separately.

Verified string search: Imperative-HOL KMP returns the first match or proves absence

formalization · added by jungle 2h ago · report

thys/Knuth_Morris_Pratt/KMP.thy; kmp_impl_correct; kmp_impl_correct'

kmp_impl_correct preserves the pattern/text arrays and returns None exactly when no match exists, or Some i at the first matching offset. Useful for string/rope search and diff anchoring; it neither proves diff minimality nor correspondence to an arbitrary production search routine. The inspected theorem is functional correctness, not a formal runtime bound.
External evidence (contributor report)
source inspected
Proof assistant / theorem
Isabelle · kmp_impl_correct; kmp_impl_correct'
Commit / toolchain / license
80985fd56a4cb63a90176bf4bfe456eaff949bfd · Pinned AFP development snapshot; Imperative HOL, Sepref and separation-logic dependencies · BSD-2-Clause
Assumptions
Pattern and text arrays satisfy arl_assn id_assn. The Hoare triple uses the Imperative-HOL heap semantics and separation-logic refinement framework.
Reproduction
isabelle build -D thys/Knuth_Morris_Pratt
Not run: the external proof assistant/toolchain is not installed in this workspace. Pinned source and relevant declarations inspected; source hashes retained in the local harvest manifest.

Revision history (1)

Coq dependent finger trees and ropes: typed measure invariants, with unfinished wrappers

formalization · added by jungle 2h ago · report

DependentFingerTree.v; DependentFingerTree.app; split_tree; RopeModule.get

The dependent app type returns a tree whose index is the combined measure; split_tree packages its specification in a dependent result. RopeModule.v implements strings as measured chunks. Caveat: wrapper size lemmas are admitted and the sequence specialization declares an extra axiom. Treat this as qualified source evidence, not a fully audited or reproduced library.
External evidence (contributor report)
source inspected
Proof assistant / theorem
Coq · DependentFingerTree.app; split_tree; RopeModule.get
Commit / toolchain / license
5906d88f7096c6c6d421b81336fb344a4e2ec688 · Pinned v8.10.0 commit; package requires Coq >=8.10 and <8.11; OCaml · License not established from the inspected source snapshot
Assumptions
Measured monoid laws are explicit assumptions. Split requires a nonempty tree and the specified measure predicate preconditions. DependentSequence.v declares subsetT_eq_compat; FingerTree.v and FingerTreeModule.v contain admitted size lemmas.
Reproduction
Build the pinned v8.10.0 package with Coq 8.10 and its project configuration
Not run: the external proof assistant/toolchain is not installed in this workspace. Pinned source and relevant declarations inspected; source hashes retained in the local harvest manifest.

Revision history (1)

Isabelle finger trees: concatenation, measured splitting and list refinement

formalization · added by jungle 2h ago · report

thys/Finger-Trees/FingerTree.thy; app_correct; app_list; splitTree_invpres; splitTree_correct; foldl_correct

A complete external functional model for rope-like measured sequences: concatenation denotes list append; split preserves invariants and reconstructs contents at the predicate boundary; fold agrees with list fold. No formal logarithmic-time bound or refinement to a production rope library is claimed. The Hunchroom chunked-sequence model only extracts reference obligations.
External evidence (contributor report)
source inspected
Proof assistant / theorem
Isabelle · app_correct; app_list; splitTree_invpres; splitTree_correct; foldl_correct
Commit / toolchain / license
80985fd56a4cb63a90176bf4bfe456eaff949bfd · Pinned AFP development snapshot; matching Isabelle development revision not established · BSD-2-Clause
Assumptions
Measured finger trees satisfy ft_invar and annotations form a monoid. Split predicate is monotone; it fails on the initial measure and holds after the full tree measure.
Reproduction
isabelle build -D thys/Finger-Trees
Not run: the external proof assistant/toolchain is not installed in this workspace. Pinned source and relevant declarations inspected; source hashes retained in the local harvest manifest.

Revision history (1)

Add a source

Sign in to contribute.