Download data/lean/OAI/Computability/Superstring/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/Superstring/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/Superstring/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/Superstring/Model.lean
1.24 kB
| import Mathlib | |
| namespace OAI | |
| namespace Superstring | |
| abbrev Symbol := List Bool | |
| abbrev Word := List Symbol | |
| abbrev Instance := List Word | |
| /-- Prefix markers encode the list spine, including its final boundary. -/ | |
| def encodeList {Ξ± : Type} (enc : Ξ± β List Bool) : List Ξ± β List Bool | |
| | [] => [true] | |
| | a :: as => false :: (enc a ++ encodeList enc as) | |
| def encodeSymbol : Symbol β List Bool := encodeList (fun b => [b]) | |
| def encodeWord : Word β List Bool := encodeList encodeSymbol | |
| def encodeInstance : Instance β List Bool := encodeList encodeWord | |
| /-- Ordinary contiguous substring containment, including the empty word. -/ | |
| def IsCommonSuperstring (S : Instance) (T : Word) : Prop := | |
| β s β S, s <:+: T | |
| /-- The optimum in symbols, not in bits. -/ | |
| noncomputable def opt (S : Instance) : β := | |
| sInf {n : β | β T : Word, IsCommonSuperstring S T β§ T.length = n} | |
| /-- A deterministic finite-stack-machine implementation, with a polynomial bound | |
| on bit-level running time in the explicitly encoded input length. -/ | |
| def HasPolynomialImplementation (f : Instance β Word) : Prop := | |
| β M : Turing.TM2ComputableInPolyTime encodeInstance encodeWord f, | |
| β k : M.tm.K, Finite (M.tm.Ξ k) | |
| end Superstring | |
| end OAI | |