Documentation

Complexity.Computability.PolyTime.BooleanAnalysis.SparsePolyCounter

Heavy-branched sparse 𝔽₂ polynomial-system zero counter (Β§5.5, Theorem 2.2) #

Uniform native heavy-branched sparse 𝔽₂ common-zero counter of Β§5.5 (Proof of Theorem 2.2, pp. 38–39) and Β§6.3 parity-system wrapper (p. 43) of OpenAI, The Exponential Time Hypothesis is False, parameterized over a Proposition 5.3 branch evaluator (branchEval).

Main definitions #

Main results #

References #

1. Computable Checkers, Branch Preparation, and Heavy-Branched Counters #

Check that every variable occurring in sys satisfies v < n.

Instances For

    Check that a monomial m : List β„• is strictly increasing (IsCanonicalMonomial m).

    Instances For

      Check that eq has duplicate-free strictly increasing monomials (IsCanonicalEquation eq).

      Instances For

        Check that every equation in sys satisfies IsCanonicalEquation.

        Instances For

          Number of variables < n occurring in at least one monomial of eq.

          Instances For

            Maximum monomial degree (List.length) across all equations in sys (0 if empty).

            Instances For

              Maximum neutral-augmented factor incidence b = max_{v < n'} (varDegree v eqs') + 1 (Β§5.5).

              Instances For

                Maximum neutral-augmented factor scope width w = max (max_{eq ∈ eqs'} |I'_{eq}|) 1 (§5.5).

                Instances For

                  Total neutral-augmented factor–variable incidence M' = βˆ‘_{eq ∈ eqs'} |I'_{eq}| + n' (Β§5.5).

                  Instances For
                    @[reducible, inline]

                    Input bundle ((n', k'), (b, w, M', Ξ²), (r, Q, R, Aβ‚€), eqs') for Proposition 5.3 (Β§5.4–5.5).

                    Instances For

                      Native encoding of BranchEvalInput ((n', k') unary, parameter quadruples binary).

                      Instances For

                        Assemble the Proposition 5.3 branch input from a reduced system (n', eqs') (Β§5.5).

                        Instances For

                          Per-branch exact feasibility guard (Β§5.5): Nβ‚€_branch ≀ n', canonical < n', schedule ok.

                          Instances For

                            Guarded per-branch solver (Β§5.5): runs branchEval when feasible, else exhaustive fallback.

                            Instances For
                              @[reducible, inline]

                              Top-level input (n, (k_deg, s_div, bβ‚€), eqs) to the heavy-branched sparse 𝔽₂ counter.

                              Instances For

                                Native encoding of SparseSystemInput (n and k_deg unary, s_div and bβ‚€ binary).

                                Instances For

                                  Construct the canonical Β§5.5 SparseSystemInput (n, (k_deg, s_div, bβ‚€), eqs) (p. 38).

                                  Instances For

                                    Top-level Β§5.5 feasibility guard: Nβ‚€_top ≀ n, 1 ≀ s_div, canonical < n, |S| ≀ n/s.

                                    Instances For

                                      Assemble HeavyBranchFold.BranchInput (n, heavyVarList n bβ‚€ eqs, eqs) from inp.

                                      Instances For

                                        Uniform heavy-branched sparse 𝔽₂ polynomial-system zero counter (Β§5.5, Theorem 2.2).

                                        Instances For

                                          Compile (ctx, rows) into SparseSystemInput via compileParitySystemBounded k_deg (Β§6.3).

                                          Instances For
                                            def Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.countContextParity {C : Type} (Nβ‚€_top Nβ‚€_branch k_deg : β„•) (nOf sDivOf bβ‚€Of : C β†’ β„•) (Ο†Of : C β†’ Logic.PL.CNF β„•) (branchEval : BranchEvalInput β†’ β„•) (p : C Γ— List (List Bool)) :

                                            Context-carrying parity-system counter (ctx, rows) ↦ β„• matching GreedyContext (Β§6.3).

                                            Instances For

                                              2. Branch Scope Invariants and ReplacementDesign Bridge #

                                              Neutral-augmented scope family on Fin eqs'.length βŠ• Fin n' associated to (n', eqs').

                                              Instances For
                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.checkVarsLt_eq_true_iff {n : β„•} {sys : List (List (List β„•))} :
                                                checkVarsLt n sys = true ↔ βˆ€ eq ∈ sys, βˆ€ m ∈ eq, βˆ€ v ∈ m, v < n
                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.feasible_of_checkBranchFeasible {Nβ‚€_branch n' : β„•} {eqs' : List (List (List β„•))} (h : checkBranchFeasible Nβ‚€_branch (n', eqs') = true) :
                                                have out := prepareBranchEvalInput (n', eqs'); Nβ‚€_branch ≀ n' ∧ (βˆ€ eq ∈ eqs', IsCanonicalEquation eq) ∧ (βˆ€ eq ∈ eqs', βˆ€ m ∈ eq, βˆ€ v ∈ m, v < n') ∧ ReplacementParams.Feasible out.2.1.2.2.2 n' out.2.1.1 out.2.1.2.1 out.2.1.2.2.1

                                                Soundness of checkBranchFeasible: passing certifies Nβ‚€_branch ≀ n', canonical < n' equations, and ReplacementParams.Feasible at prepareBranchEvalInput.

                                                Passing checkBranchFeasible yields a Section 4 ReplacementDesign on branchNeutralScope.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.emod_ediv_design_eq_rootCount_of_checkBranchFeasible {Nβ‚€_branch n' β„“ : β„•} {eqs' : List (List (List β„•))} (h : checkBranchFeasible Nβ‚€_branch (n', eqs') = true) (hβ„“ : n' < β„“) (D : LinearAlgebra.ReplacementDesign (branchNeutralScope n' eqs') (prepareBranchEvalInput (n', eqs')).2.2.1.2.1 (prepareBranchEvalInput (n', eqs')).2.2.1.1 (prepareBranchEvalInput (n', eqs')).2.2.1.2.2.2 (prepareBranchEvalInput (n', eqs')).2.2.1.2.2.1 (ReplacementParams.tauRat n')) :
                                                have out := prepareBranchEvalInput (n', eqs'); have P := fun (i : Fin eqs'.length) => GenericRAM.HeavyBranchFold.toFinsetEquation n' eqs'[i]; Polynomial.eval 0 (BitString.univariateClearedParityTruncatedSum Finset.univ P (↑(LinearAlgebra.commonDenom out.2.2.1.2.1 out.2.2.1.2.2.1)) out.1.2 β„“ (BitString.designReplacementScaledIntMap D Sum.inl)) / BitString.clearedProductDenom (↑(LinearAlgebra.commonDenom out.2.2.1.2.1 out.2.2.1.2.2.1)) out.1.2 β„“ eqs'.length % 2 ^ β„“ = ↑(GenericRAM.HeavyBranchFold.rootCount n' eqs')

                                                Proposition 5.3 / Β§5.4–5.5 semantic bridge: when checkBranchFeasible holds, n' < β„“, and D is any ReplacementDesign at prepareBranchEvalInput (n', eqs'), the cleared integer truncated parity quotient modulo 2 ^ β„“ equals rootCount n' eqs'.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.exists_threshold_checkBranchFeasible_eq_true (Nβ‚€_branch : β„•) {Ξ²β‚€ : β„•} (hΞ²β‚€ : 1 ≀ Ξ²β‚€) :
                                                βˆƒ (N₁ : β„•), max Nβ‚€_branch 20 ≀ N₁ ∧ βˆ€ {n' : β„•} {eqs' : List (List (List β„•))}, N₁ ≀ n' β†’ (βˆ€ eq ∈ eqs', IsCanonicalEquation eq) β†’ (βˆ€ eq ∈ eqs', βˆ€ m ∈ eq, βˆ€ v ∈ m, v < n') β†’ branchMaxFactorIncidence n' eqs' ≀ Nat.clog 2 n' ^ Ξ²β‚€ β†’ branchMaxFactorWidth n' eqs' ≀ Nat.clog 2 n' ^ Ξ²β‚€ β†’ have Ξ² := ParameterCheck.chooseBeta (Nat.clog 2 n') (branchMaxFactorIncidence n' eqs') (branchMaxFactorWidth n' eqs'); 1 ≀ Ξ² ∧ Ξ² ≀ Ξ²β‚€ ∧ checkBranchFeasible Nβ‚€_branch (n', eqs') = true

                                                Uniform eventual passage of checkBranchFeasible (Lemma 4.8 & Β§5.5): for every 1 ≀ Ξ²β‚€, above a constant threshold N₁ β‰₯ max Nβ‚€_branch 20, every canonical < n' system with b, w ≀ (clog 2 n') ^ Ξ²β‚€ passes checkBranchFeasible with 1 ≀ Ξ² ≀ Ξ²β‚€.

                                                3. Polynomial-Time Certificates for Checkers and Schedule Builders #

                                                4. Semantic Exactness & Heavy-Branching Invariants (Β§5.5, pp. 38–39) #

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.guardedBranchSolver_eq_rootCount {Nβ‚€_branch : β„•} {branchEval : BranchEvalInput β†’ β„•} (hbranch : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) = GenericRAM.HeavyBranchFold.rootCount n' eqs') (n' : β„•) (eqs' : List (List (List β„•))) :
                                                guardedBranchSolver Nβ‚€_branch branchEval n' eqs' = GenericRAM.HeavyBranchFold.rootCount n' eqs'

                                                When branchEval is exact on feasible branches, guardedBranchSolver = rootCount always.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.guardedBranchSolver_le_two_pow {Nβ‚€_branch : β„•} {branchEval : BranchEvalInput β†’ β„•} (hbound : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) ≀ 2 ^ n') (n' : β„•) (eqs' : List (List (List β„•))) :
                                                guardedBranchSolver Nβ‚€_branch branchEval n' eqs' ≀ 2 ^ n'

                                                When branchEval ≀ 2 ^ n' on feasible inputs, guardedBranchSolver ≀ 2 ^ n' everywhere.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.checkTopFeasible_eq_true_iff {Nβ‚€_top : β„•} {inp : SparseSystemInput} :
                                                checkTopFeasible Nβ‚€_top inp = true ↔ Nβ‚€_top ≀ inp.1 ∧ 1 ≀ inp.2.1.2.1 ∧ (βˆ€ eq ∈ inp.2.2, βˆ€ m ∈ eq, βˆ€ v ∈ m, v < inp.1) ∧ (βˆ€ eq ∈ inp.2.2, IsCanonicalEquation eq) ∧ (βˆ€ eq ∈ inp.2.2, βˆ€ m ∈ eq, m.length ≀ inp.2.1.1) ∧ (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2).length ≀ inp.1 / inp.2.1.2.1
                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.countSparsePolySystem_eq_rootCount {Nβ‚€_top Nβ‚€_branch : β„•} {branchEval : BranchEvalInput β†’ β„•} (hbranch : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) = GenericRAM.HeavyBranchFold.rootCount n' eqs') (inp : SparseSystemInput) :
                                                countSparsePolySystem Nβ‚€_top Nβ‚€_branch branchEval inp = GenericRAM.HeavyBranchFold.rootCount inp.1 inp.2.2

                                                Pointwise unconditional exactness (Β§5.5): countSparsePolySystem = rootCount always.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.countSparsePolySystem_eq_commonZeroCount {Nβ‚€_top Nβ‚€_branch : β„•} {branchEval : BranchEvalInput β†’ β„•} (hbranch : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) = GenericRAM.HeavyBranchFold.rootCount n' eqs') (inp : SparseSystemInput) (hcan : βˆ€ eq ∈ inp.2.2, IsCanonicalEquation eq) (hvars : βˆ€ eq ∈ inp.2.2, βˆ€ m ∈ eq, βˆ€ v ∈ m, v < inp.1) :
                                                countSparsePolySystem Nβ‚€_top Nβ‚€_branch branchEval inp = BitString.commonZeroCount Finset.univ fun (i : Fin inp.2.2.length) => GenericRAM.HeavyBranchFold.toFinsetEquation inp.1 inp.2.2[i]

                                                Semantic bridge to Cslib.BitString.commonZeroCount (Β§5.5, Theorem 2.2) on Fin n.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.length_heavyVarList_le_div_of_incidence {n bβ‚€ s_div : β„•} {eqs : List (List (List β„•))} (hbβ‚€ : 1 ≀ bβ‚€) (hs : 1 ≀ s_div) (hvars : βˆ€ eq ∈ eqs, βˆ€ m ∈ eq, βˆ€ v ∈ m, v < n) (hM : (List.map (scopeWidthOn n) eqs).sum * s_div ≀ bβ‚€ * n) :

                                                Markov heavy-variable bound (Β§5.5, p. 38): M_eqs * s_div ≀ bβ‚€ * n β†’ |S| ≀ n / s_div.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.checkTopFeasible_mkPaperSparseInput_of_le {Nβ‚€_top n k_deg : β„•} {eqs : List (List (List β„•))} (hn : max Nβ‚€_top 2 ≀ n) (hcan : βˆ€ eq ∈ eqs, IsCanonicalEquation eq) (hvars : βˆ€ eq ∈ eqs, βˆ€ m ∈ eq, βˆ€ v ∈ m, v < n) (hdeg : βˆ€ eq ∈ eqs, βˆ€ m ∈ eq, m.length ≀ k_deg) :
                                                checkTopFeasible Nβ‚€_top (mkPaperSparseInput n k_deg eqs) = true

                                                checkTopFeasible Nβ‚€_top (mkPaperSparseInput n k_deg eqs) holds for canonical < n systems.

                                                theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.reduced_branch_invariants {Nβ‚€_top : β„•} {inp : SparseSystemInput} {vals : List Bool} {n' : β„•} {sys' : List (List (List β„•))} (htop : checkTopFeasible Nβ‚€_top inp = true) (hs2 : 2 ≀ inp.2.1.2.1) (hred : GenericRAM.HeavyBranchFold.prepareBranch inp.1 (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2) vals inp.2.2 = GenericRAM.HeavyBranchFold.BranchOutcome.reduced n' sys') :
                                                n' = inp.1 - (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2).length ∧ inp.1 ≀ 2 * n' ∧ (βˆ€ eq' ∈ sys', IsCanonicalEquation eq') ∧ (βˆ€ eq' ∈ sys', βˆ€ m' ∈ eq', βˆ€ v' ∈ m', v' < n') ∧ (βˆ€ eq' ∈ sys', βˆ€ m' ∈ eq', m'.length ≀ inp.2.1.1) ∧ branchMaxFactorIncidence n' sys' ≀ inp.2.1.2.2 + 1 ∧ branchMaxFactorWidth n' sys' ≀ branchMaxFactorWidth inp.1 inp.2.2

                                                Invariants of .reduced n' sys' branches (n ≀ 2 * n', canonical < n', b ≀ bβ‚€ + 1).

                                                Polylogarithmic transfer (Β§5.5): (clog 2 n) ^ Ξ± ≀ (clog 2 n') ^ (2 * Ξ±) for n ≀ 2 * n'.

                                                5. Native Resource Certificates & Split Time / Polynomial-Space Bounds #

                                                Constant-threshold branch-fallback time bound when checkBranchFeasible = false β†’ p.1 < N₁.

                                                Maximum per-branch solver cost across all .reduced branches of inp : BranchInput.

                                                Instances For

                                                  Native certificate for HeavyBranchFold.countByBranching (guardedBranchSolver ...).

                                                  Instances For
                                                    noncomputable def Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.sparsePolyCounterCertificate {branchEval : BranchEvalInput β†’ β„•} (Nβ‚€_top Nβ‚€_branch : β„•) (cBranch : GenericRAM.NativeCertificate branchEval encBranchEvalInput Turing.MultiTapeTM.encNat) (hbound : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) ≀ 2 ^ n') :

                                                    Full native certificate for countSparsePolySystem Nβ‚€_top Nβ‚€_branch branchEval (Β§5.5).

                                                    Instances For
                                                      theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.polyBounded_sparsePolyCounterCertificate_space {branchEval : BranchEvalInput β†’ β„•} (Nβ‚€_top Nβ‚€_branch : β„•) (cBranch : GenericRAM.NativeCertificate branchEval encBranchEvalInput Turing.MultiTapeTM.encNat) (hbound : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) ≀ 2 ^ n') (hs : Turing.MultiTapeTM.PolyBounded (fun (x : BranchEvalInput) => (encBranchEvalInput x).length) cBranch.space) :
                                                      Turing.MultiTapeTM.PolyBounded (fun (inp : SparseSystemInput) => (encSparseSystemInput inp).length) (sparsePolyCounterCertificate Nβ‚€_top Nβ‚€_branch cBranch hbound).space

                                                      Independent polynomial workspace (Β§5.5, p. 39) for sparsePolyCounterCertificate.

                                                      theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.sparsePolyCounterCertificate_time_le_of_feasible {branchEval : BranchEvalInput β†’ β„•} (Nβ‚€_top Nβ‚€_branch : β„•) (cBranch : GenericRAM.NativeCertificate branchEval encBranchEvalInput Turing.MultiTapeTM.encNat) (hbound : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) ≀ 2 ^ n') :
                                                      βˆƒ (C_ov : β„•) (d_ov : β„•), βˆ€ (inp : SparseSystemInput) (R_branch : β„•), checkTopFeasible Nβ‚€_top inp = true β†’ (βˆ€ idx < 2 ^ (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2).length, βˆ€ (n' : β„•) (sys' : List (List (List β„•))), GenericRAM.HeavyBranchFold.prepareBranch inp.1 (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2) (BitString.lowBits (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2).length idx) inp.2.2 = GenericRAM.HeavyBranchFold.BranchOutcome.reduced n' sys' β†’ (guardedBranchCertificate Nβ‚€_branch cBranch).time (n', sys') ≀ R_branch) β†’ (sparsePolyCounterCertificate Nβ‚€_top Nβ‚€_branch cBranch hbound).time inp ≀ (2 ^ (GenericRAM.HeavyBranchFold.heavyVarList inp.1 inp.2.1.2.2 inp.2.2).length + 1) * (C_ov * ((encSparseSystemInput inp).length + 1) ^ d_ov + R_branch)

                                                      Feasible-regime multi-branch time bound (Β§5.5): ≀ (2 ^ |S| + 1) * (poly + R).

                                                      theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.exists_real_exp_bound_countSparsePolySystem {branchEval : BranchEvalInput β†’ β„•} {ΞΉ : Type} {encI : ΞΉ β†ͺ List Bool} {mk : ΞΉ β†’ SparseSystemInput} (Nβ‚€_top Nβ‚€_branch N_lim : β„•) (cBranch : GenericRAM.NativeCertificate branchEval encBranchEvalInput Turing.MultiTapeTM.encNat) (hbound : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) ≀ 2 ^ n') (hs : Turing.MultiTapeTM.PolyBounded (fun (y : BranchEvalInput) => (encBranchEvalInput y).length) cBranch.space) (hmk : Turing.MultiTapeTM.ComputableInPolyTime mk encI encSparseSystemInput) {E : ΞΉ β†’ ℝ} {C_f d_f : β„•} (hE : βˆ€ (x : ΞΉ), 0 ≀ E x) (hthresh : βˆ€ (x : ΞΉ), checkTopFeasible Nβ‚€_top (mk x) = false β†’ (mk x).1 < N_lim) (ht_fast : βˆ€ (x : ΞΉ), checkTopFeasible Nβ‚€_top (mk x) = true β†’ ↑(((guardedBranchingCertificate Nβ‚€_branch cBranch hbound).comp (GenericRAM.NativeCertificate.ofPolyTime computableInPolyTime_toBranchInput)).time (mk x)) ≀ ↑C_f * (↑(encI x).length + 1) ^ d_f * 2 ^ E x) :
                                                      βˆƒ (e : β„•) (S : ΞΉ β†’ β„•), Turing.MultiTapeTM.PolyBounded (fun (x : ΞΉ) => (encI x).length) S ∧ Turing.MultiTapeTM.ComputableInO (fun (x : ΞΉ) => countSparsePolySystem Nβ‚€_top Nβ‚€_branch branchEval (mk x)) encI Turing.MultiTapeTM.encNat (fun (x : ΞΉ) => ((encI x).length + 1) ^ e * ⌈2 ^ E xβŒ‰β‚Š) S

                                                      Subexponential real-exponent constant absorption across families (Β§5.5, p. 39): absorbs bounded-n fallback regimes into O((|encI x| + 1) ^ e * ⌈(2 : ℝ) ^ E xβŒ‰β‚Š) time and poly space.

                                                      6. Context-Carrying Β§6.3 Parity-System Wrapper (countContextParity) #

                                                      noncomputable def Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.contextParityCertificate {C : Type} {encC : C β†ͺ List Bool} {nOf sDivOf bβ‚€Of : C β†’ β„•} {Ο†Of : C β†’ Logic.PL.CNF β„•} {branchEval : BranchEvalInput β†’ β„•} (Nβ‚€_top Nβ‚€_branch k_deg : β„•) (hn : Turing.MultiTapeTM.ComputableInPolyTime nOf encC Turing.MultiTapeTM.encUnary) (hs : Turing.MultiTapeTM.ComputableInPolyTime sDivOf encC Turing.MultiTapeTM.encNat) (hb : Turing.MultiTapeTM.ComputableInPolyTime bβ‚€Of encC Turing.MultiTapeTM.encNat) (hΟ† : Turing.MultiTapeTM.ComputableInPolyTime Ο†Of encC encCNF) (cBranch : GenericRAM.NativeCertificate branchEval encBranchEvalInput Turing.MultiTapeTM.encNat) (hbound : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) ≀ 2 ^ n') :

                                                      Uniform NativeCertificate for countContextParity matching GreedyContext (Β§6.3).

                                                      Instances For

                                                        Polynomial workspace preservation for contextParityCertificate (Β§6.3).

                                                        theorem Cslib.Complexity.SubexponentialSAT.SparsePolyCounter.countContextParity_eq_numPassing {C : Type} {nOf sDivOf bβ‚€Of : C β†’ β„•} {Ο†Of : C β†’ Logic.PL.CNF β„•} {branchEval : BranchEvalInput β†’ β„•} {Nβ‚€_top Nβ‚€_branch k_deg : β„•} (hbranch : βˆ€ (n' : β„•) (eqs' : List (List (List β„•))), checkBranchFeasible Nβ‚€_branch (n', eqs') = true β†’ branchEval (prepareBranchEvalInput (n', eqs')) = GenericRAM.HeavyBranchFold.rootCount n' eqs') (ctx : C) (Ο†Fin : Logic.PL.CNF (Fin (nOf ctx))) (rows : List (List Bool)) (hΟ†_eq : Ο†Of ctx = List.map (List.map fun (l : Logic.PL.Literal (Fin (nOf ctx))) => (↑l.1, l.2)) Ο†Fin) (hk : βˆ€ c ∈ Ο†Fin, List.length c ≀ k_deg) :
                                                        countContextParity Nβ‚€_top Nβ‚€_branch k_deg nOf sDivOf bβ‚€Of Ο†Of branchEval (ctx, rows) = BitString.numPassing Ο†Fin.violations (List.map (BitString.ofList (List.length Ο†Fin)) rows)

                                                        Exact agreement with numPassing (Β§6.3, Lemma 6.2) on Fin (nOf ctx).