Skip to content

refactor(Encoding): hoist the pair projections out of the Cobham internals - #30

Merged
BoltonBailey merged 1 commit into
SamuelSchlesinger:devfrom
BoltonBailey:refactor/pair-projections
Aug 29, 2026
Merged

refactor(Encoding): hoist the pair projections out of the Cobham internals#30
BoltonBailey merged 1 commit into
SamuelSchlesinger:devfrom
BoltonBailey:refactor/pair-projections

Conversation

@BoltonBailey

Copy link
Copy Markdown
Collaborator

Summary

Cobham.fstBlock / Cobham.sndBlock — the total decoders of the pairing codec — lived in the Cobham proof internals, so anything wanting to decode a pair had to import those internals. This moves them to Complexitylib.Encoding.Pairing, next to pair / unpair?, as pairFst / pairSnd, with the simp lemmas pairFst_pair / pairSnd_pair and pairSnd_eq_unpair?, and renames every use (~270 sites, all inside the Cobham internals). Scanner machines and their lemmas (fstBlockTM, fstBlock_mem_FP, …) keep their names.

Pure relocation + rename; no new theorems beyond pairSnd_eq_unpair?. #18 will be stacked on this.

Verification

  • lake build --wfail plus both Validation executables
  • python3 scripts/lint_style.py clean
  • lake exe runLinter clean on every touched module
  • lake env lean scripts/AxiomGuard.lean: 42,974 declarations on standard axioms only

🤖 Generated with Claude Code

…rnals

`Cobham.fstBlock` / `Cobham.sndBlock` are the total decoders of the pairing
codec, but they were defined in the Cobham proof internals, so any file wanting
to decode a pair had to import those internals. Move them to
`Complexitylib.Encoding.Pairing` next to `pair` / `unpair?` as `pairFst` /
`pairSnd`, with `pairFst_pair` / `pairSnd_pair` and `pairSnd_eq_unpair?`, and
rename every use. The scanner machines and their lemmas (`fstBlockTM`,
`fstBlock_mem_FP`, …) keep their names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BoltonBailey
BoltonBailey merged commit 58198f3 into SamuelSchlesinger:dev Aug 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants