Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Uni.SortU

The radix-sorting loop on tapes #

Structured run descriptions (Tape.Runs) for one distribution round (Uni.Dr, Uni.emDr), bucket collection (Uni.emCo), a complete radix-sort pass (Uni.Ps, Uni.emPs), and the final mark-dropping read (Uni.emFi).

From VP ≠ VNP over every field [Ant26], module Nc.Uni.SortU.

Main definitions #

Main results #

@[reducible, inline]

The list tape, read side (true).

@[reducible, inline]

The list tape, write side (false).

Encode a record on the list tape: flag, letters and rotation mark, then dot.

@[reducible, inline]

Tape letters other than the block-end separator bar.

One round of the bucket distribution: flag, leading key letter head, and remaining letters tail.

  • flag : Bool

    table entry (false) or lookup (true) flag

  • head : Bl K

    first key letter determining the target bucket

  • tail : List (Option (Bl K))

    remaining letters and rotation mark

theorem Cslib.Circuits.Arithmetic.Separation.Uni.Dr.ext {K : Type} {x y : Dr K} (flag : x.flag = y.flag) (head : x.head = y.head) (tail : x.tail = y.tail) :
x = y

All record key letters listed in some fixed order.

Emissions of a distribution round on the list tape and the target bucket tape.

theorem Cslib.Circuits.Arithmetic.Separation.Uni.runs_dr {A : Type u_1} [CommRing A] {M K : Type} [Fintype K] [DecidableEq K] [Finite M] :
Tape.Runs (Fintype.card (Bl K) * (10 + 3 + (Fintype.card (Option (Bl K)) * 5 + 1) + 7)) emDr fun (x : Dr K) => 1

Channels receiving the block-end separator bar during a distribution pass.

@[reducible, inline]

A full radix-sort pass: a list of distribution rounds and collected non-bar bucket words.

noncomputable def Cslib.Circuits.Arithmetic.Separation.Uni.emCo {M K : Type} [Fintype K] [DecidableEq K] (m : Bl K → List (NB M K)) :
Zc K → List (Sy M K)

Emissions of collecting all buckets in order bsl K.

theorem Cslib.Circuits.Arithmetic.Separation.Uni.runs_co {A : Type u_1} [CommRing A] {M K : Type} [Fintype K] [DecidableEq K] [Fintype M] :
Tape.Runs (Fintype.card (Bl K) * (Fintype.card (Sy M K) * 5 + 1 + 3) + 1 + 3) emCo fun (x : Bl K → List (NB M K)) => 1
noncomputable def Cslib.Circuits.Arithmetic.Separation.Uni.emPs {M K : Type} [Fintype K] [DecidableEq K] (p : Ps M K) :
Zc K → List (Sy M K)

Emissions of a complete radix-sort pass (distribution rounds, bar markers, then collection).

Dimension upper bound for one radix-sort pass with alphabet size m and bucket count k.

Emissions of the final reading: rotation marks have returned to the front and are dropped while copying records to both comparison tapes cm false and cm true.

theorem Cslib.Circuits.Arithmetic.Separation.Uni.runs_fi {A : Type u_1} [CommRing A] {M K : Type} [Fintype K] [DecidableEq K] [Finite M] :
Tape.Runs (14 + 3 + (Fintype.card (Bl K) * 7 + 1) + 7 + 1 + 3) emFi fun (x : List (Bool × List (Bl K))) => 1