Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Dealing.Tables

The values of the dealing program and the tables of its steps #

The dealing program of [Ant26] (the program G in the proof of Theorem J.3) guesses the states between the blocks, the row data, the numbers of units and the outcomes of the moves of a plan, computes from them by a straight-line program what the plan does, checks the guesses, and writes the script of every group. Its values have names (Name), which an injective code turns into paths (Codes). The numbers of units and the outcomes (PlanInput) are the inputs of the straight-line program (SlpTab), whose steps compute, as digits, which units are current, cut or given at a slot, how many units every move uses, whether the outcomes are good and the numbers of units valid, and the group of every party. The operations on digits are steps of the interpreter that look their results up in tries (Codes.unaryStep, Codes.binaryStep, Codes.constStep).

This file also has the trees of the values that the scripts of the groups read: the flags of a row (flagsTree), the keys of the units of the strings between two base parties (Codes.writeKeysTree, Codes.readKeysTree), the comparisons of the two copies of the units from a base party to itself (Codes.selfAgreeTree), and the keys of the new units of a channel (Codes.newKeysTree).

Main definitions #

Main results #

References #

From VP ≠ VNP over every field [Ant26], Appendix J.3: the program G in the proof of Theorem J.3 (p. 54). Ported from the source module Nc.Dl.Tab and the values of Nc.Dl.Run.

The names of the values of the dealing program, for K blocks on the tapes S, E moves with the channels N and the units U, and a straight-line program of pS steps.

  • empty {K E pS : ℕ} {S N U : Type} : Name K E pS S N U

    The empty value, which the tables of the operations start from.

  • part {K E pS : ℕ} {S N U : Type} (κ : Fin K) : Name K E pS S N U

    The part κ of the input.

  • state {K E pS : ℕ} {S N U : Type} (a : Fin (K + 1)) : Name K E pS S N U

    The state a between the blocks.

  • flags {K E pS : ℕ} {S N U : Type} (s : Option S) (p : Fin (K + K)) : Name K E pS S N U

    The flags of the partners of the party p in its row on the tape s.

  • rowData {K E pS : ℕ} {S N U : Type} (s : Option S) (p : Fin (K + K)) : Name K E pS S N U

    The row data of the party p on the tape s.

  • rowValid {K E pS : ℕ} {S N U : Type} (s : Option S) (p : Fin (K + K)) : Name K E pS S N U

    Whether the row data of p on s are those of a staircase.

  • writeKeys {K E pS : ℕ} {S N U : Type} (a b : Fin (K + K)) : Name K E pS S N U

    The keys of the copies at a of the units from a to b.

  • readKeys {K E pS : ℕ} {S N U : Type} (a b : Fin (K + K)) : Name K E pS S N U

    The keys of the copies at b of the units from a to b.

  • selfAgree {K E pS : ℕ} {S N U : Type} (a : Fin (K + K)) : Name K E pS S N U

    The comparisons of the two copies of the units from a to itself.

  • countDigit {K E pS : ℕ} {S N U : Type} (a b : Fin (K + K)) : Name K E pS S N U

    The number of units from a to b, as a digit.

  • outcomeDigit {K E pS : ℕ} {S N U : Type} (ν : N) : Name K E pS S N U

    The outcome of the channel ν, as a digit.

  • newKeys {K E pS : ℕ} {S N U : Type} (ν : N) (d : Bool) : Name K E pS S N U

    The keys of the copies of the new units of ν at its end d.

  • gate {K E pS : ℕ} {S N U : Type} (k : Fin pS) : Name K E pS S N U

    The value of step k of the straight-line program.

  • count {K E pS : ℕ} {S N U : Type} (x : Fin E) : Name K E pS S N U

    The number of units that the move x uses.

  • condition {K E pS : ℕ} {S N U : Type} (c : Option (Fin E)) : Name K E pS S N U

    A condition: the numbers of units are valid (none), or the outcome of a move is good.

  • isCut {K E pS : ℕ} {S N U : Type} (u : U) : Name K E pS S N U

    Whether the unit u is cut.

  • content {K E pS : ℕ} {S N U : Type} (u : U) : Name K E pS S N U

    The contents of the unit u.

Instances For
    def Cslib.Circuits.Arithmetic.Separation.Dealing.instDecidableEqName.decEq {K✝ E✝ pS✝ : ℕ} {S✝ N✝ U✝ : Type} [DecidableEq S✝] [DecidableEq N✝] [DecidableEq U✝] (x✝ x✝¹ : Name K✝ E✝ pS✝ S✝ N✝ U✝) :
    Decidable (x✝ = x✝¹)
    @[instance_reducible]
    instance Cslib.Circuits.Arithmetic.Separation.Dealing.instDecidableEqName {K✝ E✝ pS✝ : ℕ} {S✝ N✝ U✝ : Type} [DecidableEq S✝] [DecidableEq N✝] [DecidableEq U✝] :
    DecidableEq (Name K✝ E✝ pS✝ S✝ N✝ U✝)
    @[instance_reducible]
    instance Cslib.Circuits.Arithmetic.Separation.Dealing.instFintypeName {K✝ E✝ pS✝ : ℕ} {S✝ N✝ U✝ : Type} [Fintype S✝] [Fintype N✝] [Fintype U✝] :
    Fintype (Name K✝ E✝ pS✝ S✝ N✝ U✝)
    @[reducible, inline]
    abbrev Cslib.Circuits.Arithmetic.Separation.Dealing.PlanName {F : Type} [CommSemiring F] {K A' E : ℕ} (S : Type) (M : Cut.Moves F (K + K + A') E) (U0 U1 pS : ℕ) :

    The names of the values of the dealing program for the moves M, with at most U0 units of a string at the beginning and at most U1 units of a channel.

    structure Cslib.Circuits.Arithmetic.Separation.Dealing.PlanInput {F : Type} [CommSemiring F] {K A' E : ℕ} (M : Cut.Moves F (K + K + A') E) (U0 U1 : ℕ) :

    An argument of the functions of a plan: the numbers of units at the beginning and the outcomes of the moves.

    • counts : Fin (K + K) → Fin (K + K) → Fin (U0 + 1)

      The number of units of the string from a base party to a base party.

    • outcomes : M.Channel → Fin U1

      The outcome of a channel.

    structure Cslib.Circuits.Arithmetic.Separation.Dealing.SlpTab {F : Type} [CommSemiring F] {K A' E U0 U1 mm : ℕ} {M : Cut.Moves F (K + K + A') E} (P : Cut.Plan M U0 U1) (grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm) (D nI pS : ℕ) :

    A straight-line program over the digits Fin D, with nI inputs and pS steps, that computes from a PlanInput what the dealing program needs of the plan P and the groups grp of the parties: the input i reads the number of units of a pair of base parties or the outcome of a channel (input i), and dedicated steps compute, as 0/1, whether a unit is current in the end, cut between two groups, or given at a slot, compute the number of units of a move and the group of a party, and are 1 exactly if an outcome is good or if the numbers of units are valid (Valid).

    def Cslib.Circuits.Arithmetic.Separation.Dealing.SlpTab.conditionGate {F : Type} [CommSemiring F] {K A' E U0 U1 D nI pS mm : ℕ} {M : Cut.Moves F (K + K + A') E} {P : Cut.Plan M U0 U1} {grp : PlanInput M U0 U1 → Fin (K + K + A') → Fin mm} (tab : SlpTab P grp D nI pS) (c : Option (Fin E)) :
    Fin pS

    The step of a condition: the validity of the numbers of units for none, and whether the outcome of the move y is good for some y.

    structure Cslib.Circuits.Arithmetic.Separation.Dealing.Codes {F : Type} [CommSemiring F] {K A' E : ℕ} (S : Type) (M : Cut.Moves F (K + K + A') E) (U0 U1 D pS : ℕ) :

    Injective codes, as bit lists, of the names, of the digits Fin D and of the row data, and the keys of the cells and of the second copies of the units from a base party to itself.

    The flags of the partners in a row with the data d, as in baseBody: the last partner first.

    def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.digitTree {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (d : Fin D) :

    A digit as a tree.

    theorem Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.digitTree_injective {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) :
    noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.unaryStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (x dst : PlanName S M U0 U1 pS) (f : Fin D → Interpreter.Tree) :

    The step dst := f d for the digit d at the name x.

    noncomputable def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.binaryStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (x y dst : PlanName S M U0 U1 pS) (f : Fin D → Fin D → Fin D) :

    The step dst := f d d' for the digits d at x and d' at y.

    def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.constStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (dst : PlanName S M U0 U1 pS) (t : Interpreter.Tree) :

    The step dst := t.

    def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.writeKeysTree {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (a b : Fin (K + K)) (n : Fin (U0 + 1)) :

    The keys of the copies at a of the first n units of the string from a to b.

    def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.readKeysTree {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (a b : Fin (K + K)) (n : Fin (U0 + 1)) :

    The keys of the copies at b of the first n units of the string from a to b: the keys of the second copies if a = b.

    def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.selfAgreeTree {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (a : Fin (K + K)) (n : Fin (U0 + 1)) :

    The comparisons of the two copies of the first n units from a to itself, as in baseInstructions.

    def Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.newKeysTree {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} (C : Codes S M U0 U1 D pS) (ν : M.Channel) (d : Bool) (j : Fin U1) :

    The keys of the copies at the end d of the channel ν of its new units, for the outcome j.

    theorem Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.exec_unaryStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} {C : Codes S M U0 U1 D pS} [DecidableEq S] {m : ℕ} {st : PlanName S M U0 U1 pS → Interpreter.Tree} {x dst : PlanName S M U0 U1 pS} {f : Fin D → Interpreter.Tree} {d : Fin D} (hz : st Name.empty = Interpreter.Tree.nil) (hx : st x = C.digitTree d) :
    theorem Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.exec_binaryStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} {C : Codes S M U0 U1 D pS} [DecidableEq S] {m : ℕ} {st : PlanName S M U0 U1 pS → Interpreter.Tree} {x y dst : PlanName S M U0 U1 pS} {f : Fin D → Fin D → Fin D} {d d' : Fin D} (hx : st x = C.digitTree d) (hy : st y = C.digitTree d') :
    theorem Cslib.Circuits.Arithmetic.Separation.Dealing.Codes.exec_constStep {F : Type} [CommSemiring F] {K A' E U0 U1 D pS : ℕ} {M : Cut.Moves F (K + K + A') E} {S : Type} {C : Codes S M U0 U1 D pS} [DecidableEq S] {m : ℕ} {st : PlanName S M U0 U1 pS → Interpreter.Tree} {dst : PlanName S M U0 U1 pS} {t : Interpreter.Tree} (hz : st Name.empty = Interpreter.Tree.nil) :