Computability of guarded option decoding and padding composition
ProvedHGASUndecidable.Main.guardedPaddingMap_computablecomputabilityguarded-decoderhgasundecidablestoc-2027theorem-21
Given computable code validity, computable padding, and a computable lift , the total guarded map guardedPaddingMap is computable. This is the finite computability composition principle for nested Option.bind, decidable format tests, canonical encoding/decoding, and a constant invalid fallback. The statement keeps validity and padding as independent inputs so it tests only the guarded composition.
Preamble
import Definitions.Def_HGASUndecidable_Main_PaddingCodes
Formal statement
theorem HGASUndecidable.Main.guardedPaddingMap_computable
(n₀ k₀ n j : ℕ) [DecidablePred HGASUndecidable.Main.ValidCode]
(hn : Nat.choose (n₀+k₀-1) k₀ ≤ n) (f : ℕ → ℕ)
(hv : ComputablePred HGASUndecidable.Main.ValidCode)
(hp : Computable (HGASUndecidable.Main.paddingCode hn j)) (hf : Computable f) :
Computable (HGASUndecidable.Main.guardedPaddingMap n₀ k₀ n j hn f) := by sorrySource
Paper #1477, Theorem 2.1 (printed pp. 11–12/PDF 13–14), where step (i) applies a computable lift and step (ii) pads; the explicitly guarded version ensures totality while excluding malformed and wrong-format data.