Documentation

Complexity.Computability.Circuit.Rational.EncodingBounds

Encoding-length bounds for the hitting lists #

Bounds on the length of the canonical binary encoding of the generated list. The normalized matrices are U₀⁻¹ * Uₐ for integer matrices Uₐ with entries of absolute value at most 2 ^ b; by Cramer's rule each entry is a ratio of two integer determinants, and the permutation-sum bound |det A| ≤ d! * B ^ d keeps both below 2 ^ (d * d + d * b + 1). Polynomial bookkeeping in the parameters n and s then bounds the full output length by a fixed polynomial of degree 104 in n + s + 1. The bounds hold for all n and s, including n = 0; the source assumes 1 ≤ n, and covering n = 0 raises the grid-size coefficient from 24577 to 49153, so the constant outputConstant is larger than the source's.

Main definitions #

Main results #

References #

theorem Cslib.Circuits.Rational.EncodingBounds.encodeRat_ratio_le (a b : ℤ) (hb : b ≠ 0) (L : ℕ) (ha : a.natAbs < 2 ^ L) (hb' : b.natAbs < 2 ^ L) :
theorem Cslib.Circuits.Rational.EncodingBounds.determinant_bound {d : ℕ} (A : Matrix (Fin d) (Fin d) ℤ) (B : ℕ) (hA : ∀ (i j : Fin d), |A i j| ≤ ↑B) :
|A.det| ≤ ↑d.factorial * ↑B ^ d
theorem Cslib.Circuits.Rational.EncodingBounds.normalized_entry_ratio {d : ℕ} (A B : Matrix (Fin d) (Fin d) ℤ) (hA : A.det ≠ 0) (i j : Fin d) :
((A.map ⇑(Int.castRingHom ℚ))⁻¹ * B.map ⇑(Int.castRingHom ℚ)) i j = Rat.divInt (A.updateCol i fun (k : Fin d) => B k j).det A.det

Cramer's rule used by the generator, without any assumption on arithmetic algorithms.

theorem Cslib.Circuits.Rational.EncodingBounds.determinant_pow_bound {d b : ℕ} (A : Matrix (Fin d) (Fin d) ℤ) (hA : ∀ (i j : Fin d), |A i j| ≤ 2 ^ b) :
|A.det| < 2 ^ (d * d + d * b + 1)
theorem Cslib.Circuits.Rational.EncodingBounds.normalization_bit_bound {d b : ℕ} (A B : Matrix (Fin d) (Fin d) ℤ) (hA : A.det ≠ 0) (hAb : ∀ (i j : Fin d), |A i j| ≤ 2 ^ b) (hBb : ∀ (i j : Fin d), |B i j| ≤ 2 ^ b) (i j : Fin d) :
(encodeRat (((A.map ⇑(Int.castRingHom ℚ))⁻¹ * B.map ⇑(Int.castRingHom ℚ)) i j)).length ≤ 4 * (d * d + d * b + 1) + 3
theorem Cslib.Circuits.Rational.EncodingBounds.tuple_length_le {n d B : ℕ} (X : Tuple n d) (h : ∀ (a : Fin n) (i j : Fin d), (encodeRat (X a i j)).length ≤ B) :
(encodeTuple X).length ≤ n * d * d * B
theorem Cslib.Circuits.Rational.EncodingBounds.output_length_le {n B : ℕ} (H : Output n) (hb : ∀ X ∈ H.tuples, ∀ (a : Fin n) (i j : Fin H.dimension), (encodeRat (X a i j)).length ≤ B) :
theorem Cslib.Circuits.Rational.PolynomialBounds.mul_monomials (a b m i j : ℕ) :
a * m ^ i * (b * m ^ j) = a * b * m ^ (i + j)

Coefficient/exponent bookkeeping, with no symbolic expansion of large powers.

theorem Cslib.Circuits.Rational.PolynomialBounds.lift_power (c m i j : ℕ) (hm : 1 ≤ m) (hij : i ≤ j) :
c * m ^ i ≤ c * m ^ j

Exponent bounding all denominator-cleared matrix entries by a power of 2.

Instances For

    Fixed coefficient bounding the binary logarithm of integral entry magnitudes.

    Instances For

      Fixed coefficient in the bound on normalized rational entry encodings.

      Instances For
        theorem Cslib.Circuits.Rational.PolynomialBounds.normalized_bits_bound (m D b : ℕ) (hm : 1 ≤ m) (hD : D ≤ 256 * m ^ 10) (hb : b ≤ logConstant * m ^ 22) :
        4 * (D * D + D * b + 1) + 3 ≤ bitConstant * m ^ 32

        Fixed coefficient in the bound on the complete binary output length. It differs from the source's constant: the bound also covers n = 0, which raises the grid-size coefficient of Parameters.polynomial_H from 24577 to 49153.

        Instances For
          theorem Cslib.Circuits.Rational.PolynomialBounds.output_bits_bound (n m D L B : ℕ) (hm : 1 ≤ m) (hn : n ≤ m) (hD : D ≤ 256 * m ^ 10) (hL : L ≤ 49153 ^ 3 * m ^ 51) (hB : B ≤ bitConstant * m ^ 32) :
          2 * (D + 1) + 1 + 2 * (L + 1) + 1 + L * n * D * D * B ≤ outputConstant * m ^ 104
          theorem Cslib.Circuits.Rational.Generator.U_power_bound (n N e H : ℕ) (x : Fin 3 → ℕ) (hH : 1 ≤ H) (hx : ∀ (l : Fin 3), x l ≤ H) (a : Fin (n + 1)) (i j : Fin (matrixDimension e)) :
          theorem Cslib.Circuits.Rational.Generator.tupleAt_bit_bound (n N e H : ℕ) (x : Fin 3 → ℕ) (hH : 1 ≤ H) (hx : ∀ (l : Fin 3), x l ≤ H) (hz : Matrix.det (rationalLift n N e x 0) ≠ 0) (a : Fin n) (i j : Fin (matrixDimension e)) :