openAI-math-dataset / lean /OAI /Computability /PerfectCompleteness /Machines /BinaryGapReduction.lean
Download lean/OAI/Computability/PerfectCompleteness/Machines/BinaryGapReduction.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Computability/PerfectCompleteness/Machines/BinaryGapReduction.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Computability/PerfectCompleteness/Machines/BinaryGapReduction.lean
-
curl -L -o BinaryGapReduction.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Computability/PerfectCompleteness/Machines/BinaryGapReduction.lean
1.36 kB
| import OAI.Computability.PerfectCompleteness.Machines.BinaryParsingLemmas | |
| import OAI.Computability.PerfectCompleteness.Machines.EncodingLemmas | |
| import OAI.Computability.PerfectCompleteness.Model | |
| import OAI.Computability.PerfectCompleteness.Reduction.Value | |
| import OAI.Computability.UniqueGames.Machines.MachineFiniteAlphabet | |
| namespace OAI | |
| section | |
| namespace PerfectCompleteness | |
| open Turing UniqueGamesTheorem.Foundations.Complexity | |
| namespace BinaryGapReduction | |
| variable {δ : ℚ} (reduction : BinaryGapReduction δ) | |
| theorem nonempty (input : List Bool) : (reduction.construct input).edges ≠ [] := | |
| (reduction.construct input).nonempty | |
| theorem exactly_two (input : List Bool) | |
| (edge : Fin (reduction.construct input).edges.length) (label : Fin reduction.alphabet) : | |
| ((List.finRange (2 * reduction.alphabet)).filter | |
| (fun a => decide ((reduction.construct input).edges[edge].projection.images[a] = label))).length = 2 := | |
| (reduction.construct input).edges[edge].projection.exactlyTwo label | |
| theorem malformed_soundness (input : List Bool) | |
| (malformed : BinaryEncoding.decodeFormula input = none) : | |
| (reduction.construct input).value ≤ (δ : ℝ) := by | |
| apply reduction.soundness input | |
| rintro ⟨formula, decoded, _⟩ | |
| rw [malformed] at decoded | |
| cases decoded | |
| end BinaryGapReduction | |
| end PerfectCompleteness | |
| end | |
| end OAI | |