Langlib

Langlib.Automata.LinearBounded.CertifiedRowSystem.Complement.CanonicalRows

Canonical fixed-width protocol rows #

This file packages the routine construction of a protocol row from its synchronous tracks. The function-indexed constructor is the primitive operation; the list-based wrapper is convenient when an action copies most tracks from an existing row.

Regard a list as a function on its canonical finite index type.

Equations
Instances For
    def CertifiedRowSystem.Complement.listToFixedCast {X : Type u_1} (xs : List X) {width : } (h : xs.length = width) :
    Fin widthX

    Reindex a list by any propositionally equal width.

    Equations
    Instances For
      @[simp]
      theorem CertifiedRowSystem.Complement.ofFn_listToFixedCast {X : Type u_1} (xs : List X) {width : } (h : xs.length = width) :
      def CertifiedRowSystem.Complement.canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :

      Build a protocol row of fixed width from all nine track functions and replicated found/phase values.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem CertifiedRowSystem.Complement.length_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        List.length (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = width
        @[simp]
        theorem CertifiedRowSystem.Complement.sourceTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        sourceTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn source
        @[simp]
        theorem CertifiedRowSystem.Complement.depthTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        depthTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn depth
        @[simp]
        theorem CertifiedRowSystem.Complement.outerTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        outerTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn outer
        @[simp]
        theorem CertifiedRowSystem.Complement.innerTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        innerTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn inner
        @[simp]
        theorem CertifiedRowSystem.Complement.pathTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        pathTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn path
        @[simp]
        theorem CertifiedRowSystem.Complement.fuelTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        fuelTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn fuel
        @[simp]
        theorem CertifiedRowSystem.Complement.oldCountTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        oldCountTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn oldCount
        @[simp]
        theorem CertifiedRowSystem.Complement.newCountTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        newCountTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn newCount
        @[simp]
        theorem CertifiedRowSystem.Complement.seenCountTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        seenCountTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.ofFn seenCount
        @[simp]
        theorem CertifiedRowSystem.Complement.foundTrack_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        foundTrack (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase) = List.replicate width found
        @[simp]
        theorem CertifiedRowSystem.Complement.hasFound_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        HasFound found (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase)
        @[simp]
        theorem CertifiedRowSystem.Complement.hasPhase_canonicalProtocolRow {A : Type u_1} [Fintype A] {width : } (source depth outer inner path fuel : Fin widthA) (oldCount newCount seenCount : Fin widthCountDigit A) (found : Bool) (phase : ProtocolPhase) :
        HasPhase phase (canonicalProtocolRow source depth outer inner path fuel oldCount newCount seenCount found phase)

        Nine concrete track lists sharing the source-list width.

        Instances For

          Build a canonical row directly from equal-width concrete track lists.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            @[simp]
            @[simp]
            @[simp]
            @[simp]
            @[simp]
            theorem CertifiedRowSystem.Complement.pathTrack_protocolRowOfTracks {A : Type u_1} [Fintype A] (tracks : ProtocolTrackLists A) (found : Bool) (phase : ProtocolPhase) :
            pathTrack (protocolRowOfTracks tracks found phase) = tracks.path
            @[simp]
            theorem CertifiedRowSystem.Complement.fuelTrack_protocolRowOfTracks {A : Type u_1} [Fintype A] (tracks : ProtocolTrackLists A) (found : Bool) (phase : ProtocolPhase) :
            fuelTrack (protocolRowOfTracks tracks found phase) = tracks.fuel
            @[simp]
            theorem CertifiedRowSystem.Complement.hasFound_protocolRowOfTracks {A : Type u_1} [Fintype A] (tracks : ProtocolTrackLists A) (found : Bool) (phase : ProtocolPhase) :
            HasFound found (protocolRowOfTracks tracks found phase)
            @[simp]
            theorem CertifiedRowSystem.Complement.hasPhase_protocolRowOfTracks {A : Type u_1} [Fintype A] (tracks : ProtocolTrackLists A) (found : Bool) (phase : ProtocolPhase) :
            HasPhase phase (protocolRowOfTracks tracks found phase)