Documentation

Complexitylib.Circuits.DepthThree.LowerBound.Internal.SparseTree

Unrestricted depth-three lower bound: sparse tree #

Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a. Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/DepthThree/SparseTree.lean

Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical proofs are retained.

There exists an eligible sunflower in the current state.

Equations
Instances For

    There is no eligible sunflower left in the current state.

    Equations
    Instances For
      structure Complexity.DepthThreeLowerBound.SparseSelection {V : Type uDepth1} [DecidableEq V] (r : ℕ → ℕ) (s : SparseState V) :
      Type uDepth1

      A smallest eligible sunflower selected for branching.

      Instances For
        noncomputable def Complexity.DepthThreeLowerBound.sparseSelect {V : Type uDepth1} [DecidableEq V] (r : ℕ → ℕ) (s : SparseState V) (h : SparseEligible r s) :

        Choose a smallest eligible sunflower when one exists.

        Equations
        Instances For

          The successor state selected by the Boolean branch choice.

          Equations
          Instances For
            def Complexity.DepthThreeLowerBound.SparseSelection.step {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {s : SparseState V} (c : SparseSelection r s) (choice : Bool) :
            SparseStep r s (c.branch choice)

            The certified sparsification step determined by a selected branch.

            Equations
            • c.step choice = { size := c.size, selected := c.selected, minimal := ⋯, choice := choice, target := ⋯ }
            Instances For
              def Complexity.DepthThreeLowerBound.SparseSelection.label {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {s : SparseState V} {b : ℕ} (c : SparseSelection r s) (hs : s.Valid b) :
              Fin (b + 1)

              The clause-size label attached to a selected sunflower.

              Equations
              Instances For
                theorem Complexity.DepthThreeLowerBound.SparseSelection.branch_valid {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {s : SparseState V} {b : ℕ} (c : SparseSelection r s) (hs : s.Valid b) (choice : Bool) :
                (c.branch choice).Valid b
                theorem Complexity.DepthThreeLowerBound.SparseSelection.branch_eval_imp {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {s : SparseState V} (c : SparseSelection r s) (choice : Bool) (x : Cube V) (h : (c.branch choice).eval x = true) :
                s.eval x = true
                theorem Complexity.DepthThreeLowerBound.SparsePath.length_prepend {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {start middle finish : SparseState V} (step : SparseStep r start middle) (path : SparsePath r middle finish) :
                (prepend step path).length = 1 + path.length
                theorem Complexity.DepthThreeLowerBound.SparsePath.processed_prepend {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {start middle finish : SparseState V} (step : SparseStep r start middle) (path : SparsePath r middle finish) (i : ℕ) :
                (prepend step path).processed i = (if step.size = i then 1 else 0) + path.processed i
                theorem Complexity.DepthThreeLowerBound.SparsePath.petalSteps_prepend {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {start middle finish : SparseState V} (step : SparseStep r start middle) (path : SparsePath r middle finish) (i : ℕ) :
                (prepend step path).petalSteps i = (if step.size = i ∧ step.choice = true then 1 else 0) + path.petalSteps i
                structure Complexity.DepthThreeLowerBound.SparseTreeResult {V : Type uDepth1} [DecidableEq V] (r : ℕ → ℕ) (b : ℕ) (start : SparseState V) (fuel : ℕ) :
                Type uDepth1

                A finite sparsification tree with valid paths and terminal leaves.

                Instances For
                  def Complexity.DepthThreeLowerBound.SparseTreeResult.stop {V : Type uDepth1} [DecidableEq V] (r : ℕ → ℕ) (b : ℕ) (s : SparseState V) (fuel : ℕ) (h : SparseTerminal r s ∨ fuel = 0) :
                  SparseTreeResult r b s fuel

                  Construct a leaf tree when the current sparsification state is terminal.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Complexity.DepthThreeLowerBound.SparseTreeResult.join {V : Type uDepth1} [DecidableEq V] {r : ℕ → ℕ} {b fuel : ℕ} {s : SparseState V} (c : SparseSelection r s) (hs : s.Valid b) (left : SparseTreeResult r b (c.branch false) fuel) (right : SparseTreeResult r b (c.branch true) fuel) :
                    SparseTreeResult r b s (fuel + 1)

                    Join the two branch trees below a selected sunflower.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Complexity.DepthThreeLowerBound.SparseTreeResult.build {V : Type uDepth1} [DecidableEq V] (r : ℕ → ℕ) (b fuel : ℕ) (s : SparseState V) :
                      s.Valid b → SparseTreeResult r b s fuel

                      Build a sparsification tree recursively within the supplied fuel bound.

                      Equations
                      Instances For

                        A sufficient fuel bound for finite-width sparsification.

                        Equations
                        Instances For
                          noncomputable def Complexity.DepthThreeLowerBound.sparseTree {V : Type uDepth1} [DecidableEq V] [Fintype V] (r D : ℕ → ℕ) (b : ℕ) (s : SparseState V) (hs : s.Valid b) :

                          The complete sparsification tree from an initial state.

                          Equations
                          Instances For
                            theorem Complexity.DepthThreeLowerBound.sparseTree_terminal {V : Type uDepth1} [DecidableEq V] [Fintype V] {r e D : ℕ → ℕ} {b : ℕ} (hnum : SparseNumerics r e D b) (s : SparseState V) (hs : s.Valid b) (hadded : s.added = ∅) (p : (sparseTree r D b s hs).tree.Leaf) :
                            SparseTerminal r ((sparseTree r D b s hs).finish p)
                            theorem Complexity.DepthThreeLowerBound.sparseTree_stream_length {V : Type uDepth1} [DecidableEq V] [Fintype V] {r e D : ℕ → ℕ} {b : ℕ} (hnum : SparseNumerics r e D b) (s : SparseState V) (hs : s.Valid b) (hadded : s.added = ∅) (p : (sparseTree r D b s hs).tree.Leaf) (i : Fin (b + 1)) :
                            ((sparseTree r D b s hs).tree.stream p i).length ≤ (∑ u ∈ Finset.Ico 1 ↑i, D u) * Fintype.card V
                            theorem Complexity.DepthThreeLowerBound.sparseTree_stream_ones {V : Type uDepth1} [DecidableEq V] [Fintype V] {r e D : ℕ → ℕ} {b : ℕ} (hnum : SparseNumerics r e D b) (s : SparseState V) (hs : s.Valid b) (hadded : s.added = ∅) (p : (sparseTree r D b s hs).tree.Leaf) (i : Fin (b + 1)) :
                            r ↑i * List.count true ((sparseTree r D b s hs).tree.stream p i) ≤ (∑ u ∈ Finset.Ico 1 ↑i, D u) * Fintype.card V