Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Cuts.Rows

Row data of a staircase #

In Lemma I.2 of [Ant26] (modules Nc.Cut.Defs and Nc.Cut.Rows), the words X a b that a party a (a node of the paper) writes on a tape and a party b reads form a matrix with staircase support (List.StairRefinement.Stair), because a tape is a queue. This condition compares two rows. Row data (Cut.RowData, the data ρ of the paper) replace it by conditions on single rows: they say for every row whether it is empty, and which are the first and the last column that it uses; for an empty row both are the last column of the row before. Every row has to be as its row data say (Cut.RowData.Ok), and the row data have to be those of a staircase (Cut.ValidRow).

A matrix of words has valid row data that fit its rows if and only if it has staircase support, and then the row data are those of the matrix, Cut.rowsOf (Cut.validRow_and_ok_iff).

Main definitions #

Main results #

References #

The row data of a party on a tape: whether the party writes nothing on the tape, and the first and the last party that read what it writes. If it writes nothing, both are the last party of the row before.

  • empty : Bool

    The party writes nothing on the tape.

  • first : Fin A

    The first party that reads what the party writes.

  • last : Fin A

    The last party that reads what the party writes.

Instances For
    theorem Cslib.Circuits.Arithmetic.Separation.Cut.RowData.ext {A : ℕ} {x y : RowData A} (empty : x.empty = y.empty) (first : x.first = y.first) (last : x.last = y.last) :
    x = y

    The number of row data of A parties: a flag and two parties.

    def Cslib.Circuits.Arithmetic.Separation.Cut.RowData.Ok {Γ : Type u_1} {A : ℕ} (d : RowData A) (X : Fin A → List Γ) :

    The segments X b that a party writes on a tape for the parties b are as the row data say: all are empty, or those for the first and for the last party are not empty and all others that are not empty lie between them.

    Instances For
      @[instance_reducible]
      instance Cslib.Circuits.Arithmetic.Separation.Cut.instDecidableOk {Γ : Type u_1} {A : ℕ} (d : RowData A) (X : Fin A → List Γ) :

      The last party of the row before row p, and 0 for the first row.

      The row data of row p are those of a row of a staircase: an empty row repeats the last party of the row before, and another row begins at that party or later.

      Instances For
        @[instance_reducible]
        def Cslib.Circuits.Arithmetic.Separation.Cut.ValidRows {A : ℕ} {σ : Type u_2} (ρ : σ → Fin A → RowData A) :

        The row data on all tapes s are those of staircases.

        Instances For
          @[instance_reducible]
          def Cslib.Circuits.Arithmetic.Separation.Cut.rowsOf {Γ : Type u_1} {A : ℕ} (X : Fin A → Fin A → List Γ) (p : Fin A) :

          The row data of a matrix of words: a row that is not empty has its first and its last column that are not empty, and an empty row has twice the last column that a row before it uses (0 if there is none). They are the valid row data that fit the rows if the matrix has staircase support (validRow_and_ok_iff).

          theorem Cslib.Circuits.Arithmetic.Separation.Cut.stair_of_rows {Γ : Type u_1} {A : ℕ} {ρ : Fin A → RowData A} (h : ∀ (p : Fin A), ValidRow ρ p) {X : Fin A → Fin A → List Γ} (hX : ∀ (p : Fin A), (ρ p).Ok (X p)) :

          Valid row data that fit the rows of a matrix imply that it has staircase support.

          theorem Cslib.Circuits.Arithmetic.Separation.Cut.rows_unique {Γ : Type u_1} {A : ℕ} {X : Fin A → Fin A → List Γ} {ρ ρ' : Fin A → RowData A} (h : ∀ (p : Fin A), ValidRow ρ p) (h' : ∀ (p : Fin A), ValidRow ρ' p) (hX : ∀ (p : Fin A), (ρ p).Ok (X p)) (hX' : ∀ (p : Fin A), (ρ' p).Ok (X p)) :
          ρ = ρ'

          Valid row data that fit the rows of a matrix are determined by the matrix.

          theorem Cslib.Circuits.Arithmetic.Separation.Cut.validRow_and_ok_iff {Γ : Type u_1} {A : ℕ} {ρ : Fin A → RowData A} {X : Fin A → Fin A → List Γ} :
          ((∀ (p : Fin A), ValidRow ρ p) ∧ ∀ (p : Fin A), (ρ p).Ok (X p)) ↔ List.StairRefinement.Stair X ∧ ρ = rowsOf X

          Row data of a staircase. Row data are valid and fit the rows of a matrix of words if and only if the matrix has staircase support and they are the row data of the matrix.

          theorem Cslib.Circuits.Arithmetic.Separation.Cut.exists_rows {Γ : Type u_1} {A : ℕ} {X : Fin A → Fin A → List Γ} (hX : List.StairRefinement.Stair X) :
          ∃ (ρ : Fin A → RowData A), (∀ (p : Fin A), ValidRow ρ p) ∧ ∀ (p : Fin A), (ρ p).Ok (X p)

          A matrix of words with staircase support has valid row data that fit its rows.