Documentation

CslibFrontier.Computability.Complexity.Problems.XORSAT.Dense

Dense Gaussian elimination over the Boolean ring #

Each equation consists of a Boolean coefficient row and a Boolean right-hand side. A column step selects a row whose leading coefficient is one, adds it to all other rows with leading coefficient one, and drops the column. The selected row becomes 0 = 0; retaining it keeps the number of equations fixed. If the column is zero, the step simply drops it. Repeating once per column leaves only constant equations. This is the elimination argument following Theorem 4.3 of [Che06], printed p. 16 (arXiv version 1).

The native multi-tape certificate composes the library's list operations and bounded iteration. Every step weakly decreases the complete encoded state length, including on malformed rows. The explicit width is unary; coefficient words and right-hand sides use their ordinary binary encodings. Inputs with a row of a different width are rejected.

Main definitions #

A dense parity equation row with a Boolean coefficient word and Boolean right-hand side.

  • coeffs : List Bool

    The Boolean coefficient word, one entry per declared variable column.

  • rhs : Bool

    The Boolean right-hand side of the parity equation.

Instances For
    theorem Cslib.Complexity.XORSAT.Dense.Row.ext {x y : Row} (coeffs : x.coeffs = y.coeffs) (rhs : x.rhs = y.rhs) :
    x = y
    Instances For
      @[reducible, inline]

      A list of dense equations.

      Instances For

        A dense XOR-SAT instance with a unary declared width and a list of equation rows.

        • width : ℕ

          The unary-encoded declared number of variable columns.

        • rows : System

          The list of dense equation rows.

        Instances For
          theorem Cslib.Complexity.XORSAT.Dense.Input.ext {x y : Input} (width : x.width = y.width) (rows : x.rows = y.rows) :
          x = y

          Dot product over the Boolean ring; missing coordinates have value zero.

          Instances For

            Every row has the declared number of coefficients.

            Instances For

              An assignment satisfies every equation.

              Instances For

                A solution has exactly the declared width.

                Instances For

                  Substitute the first variable using a pivot equation, then drop that variable.

                  Instances For

                    One column of Gaussian elimination. A missing pivot means that the column is zero.

                    Instances For
                      @[reducible, inline]

                      The tuple of the fields of encRow.

                      Instances For
                        theorem Cslib.Complexity.XORSAT.Dense.encRow_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → List Bool} {x1 : γ → Bool} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.encBits budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encBool budget) :
                        Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { coeffs := x0 x, rhs := x1 x }) encIn encRow budget
                        theorem Cslib.Complexity.XORSAT.Dense.encRow_rhs_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Row} :
                        theorem Cslib.Complexity.XORSAT.Dense.encRow_coeffs_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Row} :
                        theorem Cslib.Complexity.XORSAT.Dense.encRow_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List Bool} {T0 S0 : γ → ℕ} {x1 : γ → Bool} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encBits T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encBool T1 S1) :
                        Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { coeffs := x0 x, rhs := x1 x }) encIn encRow (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x

                        Framed rows with raw binary coefficient words.

                        Instances For
                          theorem Cslib.Complexity.XORSAT.Dense.encRow_rhs_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Row} :
                          @[reducible, inline]

                          A framed list of rows.

                          Instances For
                            theorem Cslib.Complexity.XORSAT.Dense.encInput_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 : γ → ℕ} {x1 : γ → System} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.encUnary budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn encSystem budget) :
                            Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { width := x0 x, rows := x1 x }) encIn encInput budget
                            theorem Cslib.Complexity.XORSAT.Dense.encInput_rows_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Input} :
                            theorem Cslib.Complexity.XORSAT.Dense.encInput_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 : γ → ℕ} {x1 : γ → System} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encUnary T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn encSystem T1 S1) :
                            Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { width := x0 x, rows := x1 x }) encIn encInput (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x

                            Unary declared width and a framed list of rows.

                            Instances For
                              theorem Cslib.Complexity.XORSAT.Dense.encInput_rows_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Input} :
                              Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ encInput S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (a : γ✝) => (g✝ a).rows) encIn✝ encSystem S✝
                              theorem Cslib.Complexity.XORSAT.Dense.encInput_width_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Input} :
                              @[reducible, inline]

                              The tuple of the fields of encInput.

                              Instances For

                                Check the row widths, eliminate all columns, then reject a remaining equation 0 = 1.

                                Instances For
                                  theorem Cslib.Complexity.XORSAT.Dense.clear_holds_iff (p e : Row) (h : e.coeffs.length = p.coeffs.length) (b : Bool) (a : List Bool) (hp : p.coeffs.headD false = true) (hpa : dot p.coeffs (b :: a) = p.rhs) :
                                  dot (clear p e).coeffs a = (clear p e).rhs ↔ dot e.coeffs (b :: a) = e.rhs

                                  Clearing a row preserves its equation whenever the pivot equation holds.

                                  theorem Cslib.Complexity.XORSAT.Dense.width_step {n : ℕ} {F : System} (hF : Width (n + 1) F) :
                                  Width n (step F)

                                  The residual system has one fewer column.

                                  One elimination column preserves existence of a solution.

                                  Elimination decides dense systems of the declared width.

                                  The Boolean decider rejects malformed row widths and otherwise decides satisfiability.

                                  A column operation never lengthens an individual coefficient word.

                                  The complete encoded state weakly decreases at every iteration; there is no growth hidden in repeated substitution or in the framing of rows.

                                  The actual Gaussian-elimination decider is computable in polynomial time on native multi-tape Turing machines, with unary width and raw binary coefficient words.

                                  Dense XOR-SAT is in the native Turing-machine class P.