Documentation

LeanPool.GapCVP.Part03A

GapCVP proof, part 03 #

Decide whether a complete phase window satisfies stack, head, and acceptance coherence.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Compute the padded acceptance condition for a complete phase window.

    Equations
    Instances For

      GapCVP reduction support.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        GapCVP reduction support.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem GapCVP.CLPaddedAcceptanceCompiler.paddedAcceptanceValidTraceFirstAcceptanceTrueHalt (bound : Polynomial ℕ) {verifier : List Bool × List Bool → Bool} (machine : VerifierTM verifier) (x : List Bool) (trace : CLWholeTraceSoundness.AnchoredPhaseTrace bound machine x) (htrace : CL.ValidTrace (paddedAcceptancePhaseSpecification bound machine x) trace = true) :
          ∃ (time : Fin (CLCellRowBounds.rowWidth bound machine x)) (position : CL.Position (CLCellRowBounds.rowWidth bound machine x)) (certificate : List Bool), have first := CLPhaseCompleteness.decodeCorrectedPhaseRow machine (trace time.castSucc); have next := CLPhaseCompleteness.decodeCorrectedPhaseRow machine (trace time.succ); CLPhaseTableauSimulation.AnchoredAcceptanceAllowed machine (CLPhaseGlobalSimulation.anchoredVerifierWindowAt machine.tm (CLCellRowBounds.rowWidth bound machine x) first next position) = true ∧ (∀ (other : CL.Position (CLCellRowBounds.rowWidth bound machine x)), (first other).mode = CLBoundedStates.PhaseTag.verifying) ∧ (∀ (other : CL.Position (CLCellRowBounds.rowWidth bound machine x)), CLWholeTraceSoundness.AnchoredPhaseMasks bound machine x other (first other) = true) ∧ (∀ (stack : machine.tm.K), CLCompactWindowSoundness.NoInteriorPaddingHoles machine.tm (CLBoundedRowInduction.fullPackedPhaseStackAtoms machine (CLCellRowBounds.rowWidth bound machine x) first stack) = true) ∧ certificate.length ≤ Polynomial.eval x.length bound ∧ CLAcceptanceAnchor.TrueOutputMachineHead machine (first 0) = true ∧ verifier (x, certificate) = true ∧ CLFullStackStepSoundness.decodedFullPackedPhaseConfiguration machine (CLCellRowBounds.rowWidth bound machine x) first = Turing.haltList machine.tm (CLVerifier.verifierOutput machine true) ∧ Nonempty (CLNondeterminism.FiniteRun (CLNondeterminism.GuessStep bound machine x) (CLNondeterminism.GuessState.guessing []) (CLNondeterminism.GuessState.verifying certificate (Turing.haltList machine.tm (CLVerifier.verifierOutput machine true))) ↑time) ∧ ↑time ≤ Polynomial.eval x.length (CLNondeterminism.guessTimePolynomial bound machine) ∧ ∀ (earlier : CL.Time (CLCellRowBounds.rowWidth bound machine x)), ↑earlier ≤ ↑time → ∀ (other : CL.Position (CLCellRowBounds.rowWidth bound machine x)), (CLPhaseCompleteness.decodeCorrectedPhaseRow machine (trace earlier) other).mode ≠ CLBoundedStates.PhaseTag.accepting

          Extract an accepting guessing execution from a valid padded tableau trace.

          Equations
          Instances For

            Internal support shared across GapCVP continuation modules.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def GapCVP.CLStructuralPrefixWriter.prefixWriterPeek (stack : Fin 4) (present absent : Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)) :
              Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)

              Branch according to whether the selected stack has a top symbol.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def GapCVP.CLStructuralPrefixWriter.prefixWriterPop (stack : Fin 4) (continuation : Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)) :
                Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)

                Remove the top symbol of a stack, then continue.

                Equations
                Instances For
                  def GapCVP.CLStructuralPrefixWriter.prefixWriterPushBit (stack : Fin 4) (continuation : Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)) :
                  Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)

                  Push the current bit onto a stack, defaulting to false when no bit is loaded.

                  Equations
                  Instances For
                    def GapCVP.CLStructuralPrefixWriter.prefixWriterPushMarker (stack : Fin 4) (continuation : Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)) :
                    Turing.TM2.Stmt (fun (x : Fin 4) => Bool) (Fin 3) (Option Bool)

                    Push a true delimiter marker onto a stack.

                    Equations
                    Instances For

                      Clear the current symbol and enter the specified phase.

                      Equations
                      Instances For

                        Move input bits to scratch while counting them with markers.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Restore the saved input bits to output and append a false separator.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Transfer one true marker per input bit to output, then halt.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[reducible, inline]

                              Four-stack machine that writes the length prefix before the input word.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Configuration of the prefix writer in a chosen phase with four stack contents.

                                Equations
                                Instances For

                                  Executes the prefixWriterStepTac machine-step simplifier.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    theorem GapCVP.CLStructuralPrefixWriter.prefixWriterScanStep (bit : Bool) (input scratch markers output : List Bool) :
                                    structuralPrefixWriter.step (prefixWriterConfiguration 0 (bit :: input) scratch markers output) = some (prefixWriterConfiguration 0 input (bit :: scratch) (true :: markers) output)
                                    theorem GapCVP.CLStructuralPrefixWriter.prefixWriterRestoreStep (bit : Bool) (scratch markers output : List Bool) :
                                    structuralPrefixWriter.step (prefixWriterConfiguration 1 [] (bit :: scratch) markers output) = some (prefixWriterConfiguration 1 [] scratch markers (bit :: output))
                                    def GapCVP.CLStructuralPrefixWriter.prefixWriterScanTrace (input scratch markers output : List Bool) :
                                    StateTransition.EvalsToInTime structuralPrefixWriter.step (prefixWriterConfiguration 0 input scratch markers output) (some (prefixWriterConfiguration 1 [] (input.reverse ++ scratch) (List.replicate input.length true ++ markers) output)) (input.length + 1)

                                    The scan phase reverses the input onto scratch and records its length in markers.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      The restore phase copies scratch back to output after a false separator.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        The marker phase writes the unary length prefix and halts.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          The three phases write the complete length-prefixed word within linear time.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            GapCVP reduction support.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For

                                              Single-step machine that prepends a fixed bit to its input.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                noncomputable def GapCVP.SourceMachineCert.prependBitComputable (bit : Bool) :
                                                BitTM fun (input : List Bool) => bit :: input

                                                GapCVP reduction support.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  noncomputable def GapCVP.SourceMachineCert.prependWordComputable (word : List Bool) :
                                                  BitTM fun (input : List Bool) => word ++ input

                                                  GapCVP reduction support.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For

                                                    GapCVP reduction support.

                                                    Equations
                                                    Instances For
                                                      theorem GapCVP.SourceMachineCert.mem_formulaVariables (formula : ThreeCNF) (clause : ThreeClause) (hclause : clause ∈ formula) (i : Fin 3) :
                                                      (clause i).1 ∈ formulaVariables formula

                                                      GapCVP reduction support.

                                                      Equations
                                                      Instances For

                                                        GapCVP reduction support.

                                                        Equations
                                                        Instances For
                                                          @[reducible, inline]

                                                          Machine that pops every input bit and returns an empty word.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For

                                                            Polynomial-time realization of the constant empty-word function.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              noncomputable def GapCVP.SourceUniformTuringTM.constantWordComputable (word : List Bool) :
                                                              BitTM fun (x : List Bool) => word

                                                              GapCVP reduction support.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                @[reducible, inline]

                                                                Two-stack machine that reads a unary prefix and writes its decoded payload.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For

                                                                  GapCVP reduction support.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For

                                                                    GapCVP reduction support.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      @[reducible, inline]

                                                                      Internal support shared across GapCVP continuation modules.

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For

                                                                        Internal support shared across GapCVP continuation modules.

                                                                        Equations
                                                                        Instances For
                                                                          theorem GapCVP.SourceStructuralDecoder.payload_prefix_true (input counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 0 (true :: input) counter reversed output) = some (payloadConfiguration 0 input (true :: counter) reversed output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payloadPrefixDelimiter (input counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 0 (false :: input) counter reversed output) = some (payloadConfiguration 1 input counter reversed output)
                                                                          theorem GapCVP.SourceStructuralDecoder.payload_prefix_missing_delimiter (counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 0 [] counter reversed output) = some (payloadConfiguration 4 [] counter reversed output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payload_copy_step (bit : Bool) (input counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 1 (bit :: input) (true :: counter) reversed output) = some (payloadConfiguration 1 input counter (bit :: reversed) output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payload_insufficient (counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 1 [] (true :: counter) reversed output) = some (payloadConfiguration 4 [] (true :: counter) reversed output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payload_counter_complete (input reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 1 input [] reversed output) = some (payloadConfiguration 2 input [] reversed output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payloadReverseStep (bit : Bool) (input reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 2 input [] (bit :: reversed) output) = some (payloadConfiguration 2 input [] reversed (bit :: output))

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payload_failure_drop_input (bit : Bool) (input counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 4 (bit :: input) counter reversed output) = some (payloadConfiguration 4 input counter reversed output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          theorem GapCVP.SourceStructuralDecoder.payload_failure_drop_counter (bit : Bool) (counter reversed output : List Bool) :
                                                                          payloadDecoderMachine.step (payloadConfiguration 4 [] (bit :: counter) reversed output) = some (payloadConfiguration 4 [] counter reversed output)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          def GapCVP.SourceStructuralDecoder.payloadPrefixTrace (count : ℕ) (tail counter reversed output : List Bool) :
                                                                          StateTransition.EvalsToInTime payloadDecoderMachine.step (payloadConfiguration 0 (List.replicate count true ++ false :: tail) counter reversed output) (some (payloadConfiguration 1 tail (List.replicate count true ++ counter) reversed output)) (count + 1)

                                                                          Internal support shared across GapCVP continuation modules.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            def GapCVP.SourceStructuralDecoder.payloadCopyTrace (payload suffix reversed output : List Bool) :
                                                                            StateTransition.EvalsToInTime payloadDecoderMachine.step (payloadConfiguration 1 (payload ++ suffix) (List.replicate payload.length true) reversed output) (some (payloadConfiguration 1 suffix [] (payload.reverse ++ reversed) output)) payload.length

                                                                            Internal support shared across GapCVP continuation modules.

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For

                                                                              Internal support shared across GapCVP continuation modules.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For

                                                                                Internal support shared across GapCVP continuation modules.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For

                                                                                  Internal support shared across GapCVP continuation modules.