OAI/Computability/MaxCut/Games/FinalCNFStream.lean
86 declarations, 0 contain sorry, 0 declared as axioms
Exact row enumeration and input/output stream identities for the concrete final-CNF machine. Rows occur in stored order, including repeated rows.
- def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.remainingEventsline 16Source documentation
The actual unprocessed suffix of the finite table's stored row indices.
def remainingEvents (table : GraphTables.Table) (r : Nat) : List (Fin table.darts) := …
- def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.processedEventsline 19 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStreamline 22 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStreamline 25 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.remainingEvents_zeroline 30 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.remainingEvents_lengthline 34 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.remainingEvents_doneline 38 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.remainingEvents_consline 42 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.processedEvents_zeroline 49 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.processedEvents_doneline 52 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.processedEvents_succline 56 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.processed_append_remainingline 63 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_nilline 67 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_consline 69 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_appendline 74 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_nilline 79 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_consline 82 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_appendline 88 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_remaining_consline 94 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_remaining_consline 101 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_processed_succline 109 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_splitline 118 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_splitline 124 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.encodeWords_flatMap_rows_inline_FinalCNFStreamline 130 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowList_eq_finRange_mapline 136 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_allline 143Source documentation
The stream starts at exactly the row suffix left by the checked header phase.
theorem inputStream_all (table : GraphTables.Table) : inputStream table (List.finRange table.darts) = tableRowsBits (genericTable table) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.tableRowsBits
- theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.inputStream_remaining_zeroline 154 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream_accumulator_succline 159Source documentation
Pushing a row's reversed emission realizes extension of the forward prefix.
theorem outputStream_accumulator_succ (plan : Plan) (table : GraphTables.Table) (r : Nat) (h : r < table.darts) (header : List Bool) : (plan.flatMap (Emitter.commandBits (rowOperands table ⟨r, h⟩) (rowRelation table ⟨r, h⟩))).reverse ++ (header ++ outputStream plan table (processedEvents table r)).reverse = (header ++ outputStream plan table (processedEvents table (r + 1))).reverse := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Plan, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowOperands, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowRelation, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.outputStream, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.processedEvents
- structure
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.LoopInvariantline 176 - structure
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.LoopRunline 187 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowInvariant_succline 199 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowWords_nonemptyline 219 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.loopInTimeline 225Source documentation
Induction follows the actual unary row counter and the actual unconsumed input suffix. Every iteration invokes the checked row program.
noncomputable def loopInTime (headerPlan plan : Plan) (table : GraphTables.Table) (remaining : Nat) : ∀ (r : Nat) (_hcount : r + remaining = table.darts) (base : Tape → List Bool) (ambient : Ambient), LoopInvariant table r base → LoopRun headerPlan plan table r remaining base ambient := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.headerPlan, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Plan, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Tape, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Ambient, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.LoopInvariant, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.LoopRun
- def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.emittedBytesline 292 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rawBudgetline 296 - structure
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.RawRunline 301 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.header_loopInvariantline 309 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rawRunline 326Source documentation
The input is read from the genuine
initListconfiguration. Header, every row, final guard, and reversal are all actual transitions of this one program.noncomputable def rawRun (plan : Plan) (table : GraphTables.Table) : RawRun plan table := by …
Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Plan, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.RawRun
- inductive
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.Referenceline 383 - structure
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.LiteralTemplateline 388 - abbrev
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.ClauseTemplateline 393 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.queryLiteralline 395 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.auxiliaryLiteralline 398 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.tautologyTemplateline 401 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.chainTemplatesline 405Source documentation
The same prefix-chain clauses used by
splitLong, in their output order.def chainTemplates (bits : Fin 12 → Bool) : Vector ClauseTemplate 10 := …
Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.ClauseTemplate
- def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.blockTemplatesline 418 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.templatesline 421 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.literalAtline 425Source documentation
Fixed clause/slot indexing for the machine's finite emission plan.
def literalAt (accepted : Bool) (bits : Fin 12 → Bool) (clause : Fin 10) (slot : Fin 3) : LiteralTemplate := …Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.LiteralTemplate
- theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.templates_lengthline 429 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.templates_trueline 432 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.templates_falseline 435 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.literalTemplatesline 438 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.literalTemplates_lengthline 441 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.literalWordsline 446 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.clauseWordsline 449 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.wordsline 452 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.words_lengthline 455 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.resolveline 464 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.resolve_query_valueline 468 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.resolve_auxiliary_valueline 472 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.instantiateLiteralline 480 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.instantiateClauseline 483 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.splitLong_twelveline 488Source documentation
A symbolic twelve-input chain expands to exactly these ten clauses.
theorem splitLong_twelve {n : Nat} (ls : Fin 12 → Literal n) (ys : Fin 9 → Fin n) : VerifierToCNF.splitLong (List.ofFn ls) (List.ofFn ys) = [#v[ls 0, ls 1, ⟨ys 0, true⟩], #v[⟨ys 0, false⟩, ls 2, ⟨ys 1, true⟩], #v[⟨ys 1, false⟩, ls 3, ⟨ys 2, true⟩], #v[⟨ys 2, false⟩, ls 4, ⟨ys 3, true⟩], #v[⟨ys 3, false⟩, ls 5, ⟨ys 4, true⟩], #v[⟨ys 4, false⟩, ls 6, ⟨ys 5, true⟩], #v[⟨ys 5, false⟩, ls 7, ⟨ys 6, true⟩], #v[⟨ys 6, false⟩, ls 8, ⟨ys 7, true⟩], #v[⟨ys 7, false⟩, ls 9, ⟨ys 8, true⟩], #v[⟨ys 8, false⟩, ls 10, ls 11]] := by … - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.instantiate_templatesline 504Source documentation
Instantiating the fixed plan reproduces the actual converter's entire block.
theorem instantiate_templates : (templates (V.accepts e (VerifierToCNF.patternAt 12 p)) (VerifierToCNF.patternAt 12 p)).map (instantiateClause V e p) = VerifierToCNF.block V (by decide) e p := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.templates, OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.instantiateClause
- theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.instantiate_templates_of_acceptanceline 518 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.instantiateClause_wordsline 525 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.words_eq_blockline 530Source documentation
The finite plan's sixty natural fields are the converter's actual row words.
theorem words_eq_block : words (V.accepts e (VerifierToCNF.patternAt 12 p)) (VerifierToCNF.patternAt 12 p) (fun r => (resolve V e p r).val) = (VerifierToCNF.block V (by decide) e p).flatMap Complexity.clauseWords := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.words, OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.resolve, OAI.MaxCutGames.Foundations.Complexity.clauseWords
- theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFTemplate.block_words_lengthline 538 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.referenceValueline 555 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.auxiliaryFlagline 559 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.tailFlagline 563 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.headFlagline 567 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.pattern_ltline 571 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.referenceOffsetline 575 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.literalPlanline 580Source documentation
Seven real commands for the two unary fields of a literal.
def literalPlan (p : VerifierToCNF.PatternIndex 12) (literal : Ambient → LiteralTemplate) : Plan := …
Mentions: OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Ambient, OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.Plan
- theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.literalPlan_lengthline 589 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.literalPlan_bitsline 592 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.patternLiteralline 620 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.patternPlanline 625 - def
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowPlanline 629 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.patternPlan_lengthline 632 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowPlan_lengthline 643 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.encodeWords_flatMapline 650 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.patternPlan_bitsline 656 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.referenceValue_eq_resolveline 687 - theorem
OAI.MaxCutGames.Foundations.Complexity.FinalCNFMachine.Program.rowPlan_bitsline 713