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
@[simp]
def
CertifiedRowSystem.Complement.canonicalProtocolRow
{A : Type u_1}
[Fintype A]
{width : ℕ}
(source depth outer inner path fuel : Fin width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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 width → A)
(oldCount newCount seenCount : Fin width → CountDigit 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.
- source : List A
- depth : List A
- outer : List A
- inner : List A
- path : List A
- fuel : List A
- oldCount : List (CountDigit A)
- newCount : List (CountDigit A)
- seenCount : List (CountDigit A)
Instances For
def
CertifiedRowSystem.Complement.protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
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]
theorem
CertifiedRowSystem.Complement.length_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.sourceTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.depthTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.outerTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.innerTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.pathTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.fuelTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.oldCountTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.newCountTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.seenCountTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[simp]
theorem
CertifiedRowSystem.Complement.foundTrack_protocolRowOfTracks
{A : Type u_1}
[Fintype A]
(tracks : ProtocolTrackLists A)
(found : Bool)
(phase : ProtocolPhase)
:
@[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)