Documentation

Complexitylib.Classes.PPoly.Uniform.Unrolling.Generator.Transition.Next.Internal

Direct-unrolling next-atom generator -- proof internals #

Advances the generator's available-wire register by amount.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitOldCellValue_sound_internal (stateCount tapeCount tapeIndex symbolIndex : ) :
    (emitOldCellValue stateCount tapeCount tapeIndex symbolIndex).Sound
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitOldHeadValue_requires_internal (stateCount tapeIndex : ) (values : BinaryValues WorkCount) (hadd : values Work.addCounter = 0) (hmultiply : values Work.multiplyCounter = 0) (hemit : values Work.emitCounter = 0) :
    (emitOldHeadValue stateCount tapeIndex).requires values
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitOldCellValue_requires_internal (stateCount tapeCount tapeIndex symbolIndex : ) (values : BinaryValues WorkCount) (hcopy : values Work.copyCounter = 0) (hadd : values Work.addCounter = 0) (hmultiply : values Work.multiplyCounter = 0) (hemit : values Work.emitCounter = 0) :
    (emitOldCellValue stateCount tapeCount tapeIndex symbolIndex).requires values
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitOldHeadValue_effect_internal (stateCount tapeIndex : ) (values : BinaryValues WorkCount) (htape : values Work.tapeIndex = 0) (htemporary : values Work.temporary₀ = 0) (hreference : values Work.reference₀ = 0) :
    (emitOldHeadValue stateCount tapeIndex).effect values = Function.update values Work.available (values Work.available + 1)
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitOldCellValue_effect_internal (stateCount tapeCount tapeIndex symbolIndex : ) (values : BinaryValues WorkCount) (htape : values Work.tapeIndex = 0) (hsymbol : values Work.symbolIndex = 0) (htemporary₀ : values Work.temporary₀ = 0) (htemporary₁ : values Work.temporary₁ = 0) (htemporary₂ : values Work.temporary₂ = 0) (hreference : values Work.reference₀ = 0) :
    (emitOldCellValue stateCount tapeCount tapeIndex symbolIndex).effect values = Function.update values Work.available (values Work.available + 1)
    @[simp]
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitOldCellValue_emitted_internal (stateCount tapeCount tapeIndex symbolIndex : ) (values : BinaryValues WorkCount) :
    (emitOldCellValue stateCount tapeCount tapeIndex symbolIndex).emitted values = (CircuitCode.RawGate.copy (transitionCellRef stateCount tapeCount (values Work.horizon) (values Work.configBase) tapeIndex (values Work.position) symbolIndex)).encode
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextCellCopy_sound_internal (stateCount tapeCount tapeIndex symbolIndex : ) :
    (emitNextCellCopy stateCount tapeCount tapeIndex symbolIndex).Sound
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextCellCopy_requires_internal (stateCount tapeCount tapeIndex symbolIndex : ) (values : BinaryValues WorkCount) (hcopy : values Work.copyCounter = 0) (hadd : values Work.addCounter = 0) (hmultiply : values Work.multiplyCounter = 0) (hemit : values Work.emitCounter = 0) :
    (emitNextCellCopy stateCount tapeCount tapeIndex symbolIndex).requires values
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextCellCopy_effect_internal (stateCount tapeCount tapeIndex symbolIndex : ) (values : BinaryValues WorkCount) (htape : values Work.tapeIndex = 0) (hsymbol : values Work.symbolIndex = 0) (htemporary₀ : values Work.temporary₀ = 0) (htemporary₁ : values Work.temporary₁ = 0) (htemporary₂ : values Work.temporary₂ = 0) (hreference : values Work.reference₀ = 0) :
    (emitNextCellCopy stateCount tapeCount tapeIndex symbolIndex).effect values = Function.update values Work.available (values Work.available + 1)
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextCellCopy_emitted_internal (stateCount tapeCount tapeIndex symbolIndex : ) (values : BinaryValues WorkCount) :
    (emitNextCellCopy stateCount tapeCount tapeIndex symbolIndex).emitted values = List.flatMap CircuitCode.RawGate.encode (nextCellCopySchedule stateCount tapeCount (values Work.horizon) (values Work.configBase) tapeIndex (values Work.position) symbolIndex)
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextCellCopy_spaceBoundByWidth_internal (stateCount tapeCount tapeIndex symbolIndex : ) {initialSpace : } {values : BinaryValues WorkCount} {width : } (hvalues : ∀ (inputLength : ) (index : Fin WorkCount), values inputLength index width inputLength) (hcap : ∀ (inputLength : ), transitionCellRef stateCount tapeCount (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex (values inputLength Work.position) symbolIndex + (tapeIndex * (values inputLength Work.horizon + 2) + values inputLength Work.position) + (values inputLength Work.horizon + 2) + tapeCount + tapeIndex + 4 width inputLength) :
    (emitNextCellCopy stateCount tapeCount tapeIndex symbolIndex).SpaceBoundByWidthAt initialSpace values width
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitHaltedOrFormula_sound_internal (haltStateIndex : ) (childSize : Polynomial ) (oldValue nextValue : BinaryRoutine WorkCount) (hold : oldValue.Sound) (hnext : nextValue.Sound) :
    (emitHaltedOrFormula haltStateIndex childSize oldValue nextValue).Sound
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitHaltedOrFormula_requires_internal (haltStateIndex : ) (childSize : Polynomial ) (oldValue nextValue : BinaryRoutine WorkCount) (values : BinaryValues WorkCount) (hclean : HaltedOrFormulaClean values) (holdRequires : oldValue.requires (advanceAvailableValues values 1)) (holdEffect : oldValue.effect (advanceAvailableValues values 1) = advanceAvailableValues values 2) (hnextRequires : nextValue.requires (advanceAvailableValues values 5)) (hnextEffect : nextValue.effect (advanceAvailableValues values 5) = advanceAvailableValues values (5 + Polynomial.eval (values Work.horizon) childSize)) :
    (emitHaltedOrFormula haltStateIndex childSize oldValue nextValue).requires values
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitHaltedOrFormula_effect_internal (haltStateIndex : ) (childSize : Polynomial ) (oldValue nextValue : BinaryRoutine WorkCount) (values : BinaryValues WorkCount) (hclean : HaltedOrFormulaClean values) (holdEffect : oldValue.effect (advanceAvailableValues values 1) = advanceAvailableValues values 2) (hnextEffect : nextValue.effect (advanceAvailableValues values 5) = advanceAvailableValues values (5 + Polynomial.eval (values Work.horizon) childSize)) :
    (emitHaltedOrFormula haltStateIndex childSize oldValue nextValue).effect values = advanceAvailableValues values (Polynomial.eval (values Work.horizon) childSize + 7)
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitHaltedOrFormula_emitted_internal (haltStateIndex : ) (childSize : Polynomial ) (oldValue nextValue : BinaryRoutine WorkCount) (oldWire : ) (nextSchedule : CircuitCode.RawCircuit) (values : BinaryValues WorkCount) (hclean : HaltedOrFormulaClean values) (holdEffect : oldValue.effect (advanceAvailableValues values 1) = advanceAvailableValues values 2) (hnextEffect : nextValue.effect (advanceAvailableValues values 5) = advanceAvailableValues values (5 + Polynomial.eval (values Work.horizon) childSize)) (holdEmitted : oldValue.emitted (advanceAvailableValues values 1) = (CircuitCode.RawGate.copy oldWire).encode) (hnextEmitted : nextValue.emitted (advanceAvailableValues values 5) = List.flatMap CircuitCode.RawGate.encode nextSchedule) (hsize : List.length nextSchedule = Polynomial.eval (values Work.horizon) childSize) :
    (emitHaltedOrFormula haltStateIndex childSize oldValue nextValue).emitted values = List.flatMap CircuitCode.RawGate.encode (nextHaltedOrSchedule (transitionStateRef (values Work.configBase) haltStateIndex) (values Work.available) oldWire nextSchedule)
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextStateFormula_spaceBoundByWidth_internal {k : } (tm : NTM k) (state : tm.Q) {initialSpace : } {values : BinaryValues WorkCount} {width : } (hclean : ∀ (inputLength : ), CaseFormulaClean (values inputLength)) (hvalues : ∀ (inputLength : ) (index : Fin WorkCount), values inputLength index width inputLength) (hcap : ∀ (inputLength stateIndex tapeIndex symbolIndex position : ), stateIndex < Fintype.card tm.QtapeIndex k + 1symbolIndex < 4position values inputLength Work.horizonvalues inputLength Work.available + nextStateFormulaScheduleSize (transitionCases tm).length k (values inputLength Work.horizon) (effectCaseSelectedAt tm fun (effect : TransitionEffect tm) => decide (effect.nextState = state)) (effectCaseChoiceAt tm) + transitionStateRef (values inputLength Work.configBase) stateIndex + (transitionHeadRef (Fintype.card tm.Q) (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex position + tapeIndex + values inputLength Work.horizon + 1) + (transitionCellRef (Fintype.card tm.Q) (k + 2) (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex position symbolIndex + (tapeIndex * (values inputLength Work.horizon + 2) + position) + (values inputLength Work.horizon + 2) + (k + 2) + tapeIndex + 4) + caseReadSize (values inputLength Work.horizon) + values inputLength Work.horizon + 2 * TM.binaryPolynomialValueCap (stateNextChildPolynomial tm state) (values inputLength Work.horizon) width inputLength) :
    (emitNextStateFormula tm state).SpaceBoundByWidthAt initialSpace values width
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextHeadFormula_spaceBoundByWidth_internal {k : } (tm : NTM k) (tape : TapeSlot k) {initialSpace : } {values : BinaryValues WorkCount} {width : } (hclean : ∀ (inputLength : ), MovedHeadFormulaClean (values inputLength)) (hhorizon : ∀ (inputLength : ), 0 < values inputLength Work.horizon) (htarget : ∀ (inputLength : ), values inputLength Work.position values inputLength Work.horizon) (hvalues : ∀ (inputLength : ) (index : Fin WorkCount), values inputLength index width inputLength) (hcap : ∀ (inputLength stateIndex tapeIndex symbolIndex position : ), stateIndex < Fintype.card tm.QtapeIndex k + 1symbolIndex < 4position values inputLength Work.horizon + 1values inputLength Work.available + nextHeadFormulaScheduleSize (transitionCases tm).length k (values inputLength Work.horizon) (movedHeadCaseSelectedAt tm tape) (effectCaseChoiceAt tm) + transitionStateRef (values inputLength Work.configBase) stateIndex + (transitionHeadRef (Fintype.card tm.Q) (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex position + tapeIndex + values inputLength Work.horizon + 1) + (transitionCellRef (Fintype.card tm.Q) (k + 2) (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex position symbolIndex + (tapeIndex * (values inputLength Work.horizon + 2) + position) + (values inputLength Work.horizon + 2) + (k + 2) + tapeIndex + 4) + caseReadSize (values inputLength Work.horizon) + 2 * TM.binaryPolynomialValueCap predecessorHeadSchedulePolynomial (values inputLength Work.horizon) + 2 * (values inputLength Work.horizon + 2) + values inputLength Work.horizon + 2 * TM.binaryPolynomialValueCap (headNextChildPolynomial tm tape) (values inputLength Work.horizon) width inputLength) :
    (emitNextHeadFormula tm tape).SpaceBoundByWidthAt initialSpace values width
    theorem Complexity.CircuitUnrolling.Serializer.DirectGenerator.emitNextWrittenCellFormula_spaceBoundByWidth_internal {k : } (tm : NTM k) (tape : WritableSlot k) (symbol : Γ) {initialSpace : } {values : BinaryValues WorkCount} {width : } (hclean : ∀ (inputLength : ), WrittenCellFormulaClean (values inputLength)) (hposition : ∀ (inputLength : ), values inputLength Work.position values inputLength Work.horizon + 1) (hvalues : ∀ (inputLength : ) (index : Fin WorkCount), values inputLength index width inputLength) (hcap : ∀ (inputLength stateIndex tapeIndex symbolIndex position : ), stateIndex < Fintype.card tm.QtapeIndex k + 1symbolIndex < 4position values inputLength Work.horizon + 1values inputLength Work.available + nextWrittenCellFormulaScheduleSize (transitionCases tm).length k (values inputLength Work.horizon) (writtenCellEffectSelectedAt tm tape symbol) (effectCaseChoiceAt tm) + transitionStateRef (values inputLength Work.configBase) stateIndex + (transitionHeadRef (Fintype.card tm.Q) (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex position + tapeIndex + values inputLength Work.horizon + 1) + (transitionCellRef (Fintype.card tm.Q) (k + 2) (values inputLength Work.horizon) (values inputLength Work.configBase) tapeIndex position symbolIndex + (tapeIndex * (values inputLength Work.horizon + 2) + position) + (values inputLength Work.horizon + 2) + (k + 2) + tapeIndex + 4) + caseReadSize (values inputLength Work.horizon) + values inputLength Work.horizon + 2 * TM.binaryPolynomialValueCap (writtenNextChildPolynomial tm tape symbol) (values inputLength Work.horizon) width inputLength) :
    (emitNextWrittenCellFormula tm tape symbol).SpaceBoundByWidthAt initialSpace values width