Documentation

Complexitylib.Models.TuringMachine.Repetition.Internal.Votes

Vote bookkeeping for fixed-time repetition #

This file connects the finite-control vote vector of NTM.repeatAtTime to the block-event majority API and provides the update invariant used by the outer trial induction.

def Complexity.NTM.repeatTrialVote {n : } (tm : NTM n) (x : List Bool) (k T : ) (seed : Fin (k * T)Bool) (j : Fin k) :

Verdict of source trial j in a compact k * T repetition seed.

Equations
Instances For
    def Complexity.NTM.repeatVotes {n : } (tm : NTM n) (x : List Bool) (k T : ) (seed : Fin (k * T)Bool) :
    Fin kBool

    The vector of all source-trial verdicts in a compact repetition seed.

    Equations
    Instances For
      @[simp]
      theorem Complexity.NTM.repeatTrialVote_eq_true_iff {n k T : } (tm : NTM n) (x : List Bool) (seed : Fin (k * T)Bool) (j : Fin k) :
      tm.repeatTrialVote x k T seed j = true (blocksEquiv k T) seed j tm.repeatAcceptEvent x T
      theorem Complexity.NTM.popCount_repeatVotes {n k T : } (tm : NTM n) (x : List Bool) (seed : Fin (k * T)Bool) :

      Counting true machine votes is the generic block-event count.

      theorem Complexity.NTM.majority_repeatVotes {n k T : } (tm : NTM n) (x : List Bool) (seed : Fin (k * T)Bool) :
      majority (tm.repeatVotes x k T seed) = blockMajority (tm.repeatAcceptEvent x T) seed

      The strict majority of the machine's vote vector is exactly the generic block majority of the source accepting event.

      def Complexity.NTM.RepeatVotesThrough {k : } (expected votes : Fin kBool) (m : ) :

      votes contains the expected verdicts below m and false in every not-yet-completed trial slot.

      Equations
      Instances For
        theorem Complexity.NTM.RepeatVotesThrough.zero {k : } (expected : Fin kBool) :
        RepeatVotesThrough expected (fun (x : Fin k) => false) 0
        theorem Complexity.NTM.RepeatVotesThrough.update {k : } {expected votes : Fin kBool} {m : } (hm : m < k) (h : RepeatVotesThrough expected votes m) :
        RepeatVotesThrough expected (Function.update votes m, hm (expected m, hm)) (m + 1)

        Recording trial m advances the vote invariant by one slot.

        theorem Complexity.NTM.RepeatVotesThrough.eq_expected {k : } {expected votes : Fin kBool} (h : RepeatVotesThrough expected votes k) :
        votes = expected

        Once all k trials are recorded, the finite-control vector is the full expected vote vector.