Documentation

Atlas.AnAlgorithmistsToolkit.code.IntegerProgramming

def IntegerProgramming.IP.IsFeasible {m n : ℕ} (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) :
Instances For
    Instances For
      theorem IntegerProgramming.lattice_approx_bound_sum {n : ℕ} (b : Fin n → EuclideanSpace ℝ (Fin n)) (h_sorted : ∀ (i j : Fin n), i ≤ j → ‖b i‖ ^ 2 ≤ ‖b j‖ ^ 2) (x : EuclideanSpace ℝ (Fin n)) :
      ∃ y ∈ Lattice n b, ‖x - y‖ ^ 2 ≤ 1 / 4 * ∑ i : Fin n, ‖b i‖ ^ 2
      theorem IntegerProgramming.lattice_approx_bound_chain {n : ℕ} (hn : 0 < n) (b : Fin n → EuclideanSpace ℝ (Fin n)) (h_sorted : ∀ (i j : Fin n), i ≤ j → ‖b i‖ ^ 2 ≤ ‖b j‖ ^ 2) (x : EuclideanSpace ℝ (Fin n)) :
      ∃ y ∈ Lattice n b, ‖x - y‖ ^ 2 ≤ 1 / 4 * ∑ i : Fin n, ‖b i‖ ^ 2 ∧ ‖x - y‖ ^ 2 ≤ ↑n / 4 * ‖b ⟨n - 1, ⋯⟩‖ ^ 2
      Instances For
        noncomputable def IntegerProgramming.fritzJohnRadius (n : ℕ) :
        Instances For
          noncomputable def IntegerProgramming.layerCountBound (k : ℕ) :
          Instances For
            noncomputable def IntegerProgramming.candidateBox (n : ℕ) :
            Finset (Fin n → ℤ)
            Instances For
              theorem IntegerProgramming.fritz_john_lll_geometric_containment {n : ℕ} (hn : 0 < n) {m : ℕ} (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) (hfeas : IP.IsFeasible A b) :
              ∃ (basis : Fin n → EuclideanSpace ℝ (Fin n)) (P : EuclideanSpace ℝ (Fin n)), IsLLLReduced basis ∧ (∀ (i j : Fin n), i ≤ j → ‖basis i‖ ^ 2 ≤ ‖basis j‖ ^ 2) ∧ ‖basis ⟨n - 1, ⋯⟩‖ ≥ 2 / √↑n ∧ ∀ (x : Fin n → ℤ), A.mulVec (Int.cast ∘ x) ≤ b → ∑ i : Fin n, ↑(x i) • basis i ∈ Metric.ball P (fritzJohnRadius n)
              theorem IntegerProgramming.lattice_coord_projection_bound {n : ℕ} (hn : 0 < n) (basis : Fin n → EuclideanSpace ℝ (Fin n)) (P : EuclideanSpace ℝ (Fin n)) (hred : IsLLLReduced basis) (hsorted : ∀ (i j : Fin n), i ≤ j → ‖basis i‖ ^ 2 ≤ ‖basis j‖ ^ 2) (hbn : ‖basis ⟨n - 1, ⋯⟩‖ ≥ 2 / √↑n) (c : Fin n → ℤ) (hball : ∑ i : Fin n, ↑(c i) • basis i ∈ Metric.ball P (fritzJohnRadius n)) (i : Fin n) :
              theorem IntegerProgramming.lattice_coord_bound_in_ball {n : ℕ} (hn : 0 < n) (basis : Fin n → EuclideanSpace ℝ (Fin n)) (P : EuclideanSpace ℝ (Fin n)) (hred : IsLLLReduced basis) (hsorted : ∀ (i j : Fin n), i ≤ j → ‖basis i‖ ^ 2 ≤ ‖basis j‖ ^ 2) (hbn : ‖basis ⟨n - 1, ⋯⟩‖ ≥ 2 / √↑n) (c : Fin n → ℤ) (hball : ∑ i : Fin n, ↑(c i) • basis i ∈ Metric.ball P (fritzJohnRadius n)) (i : Fin n) :
              |c i| ≤ ↑(lenstraBound n)
              theorem IntegerProgramming.lenstra_solution_in_candidateBox (n m : ℕ) (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) :
              IP.IsFeasible A b → ∃ x ∈ candidateBox n, A.mulVec (Int.cast ∘ x) ≤ b
              theorem IntegerProgramming.lenstra_ip_fpt (n m : ℕ) (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) :
              (candidateBox n).card ≤ (2 * lenstraBound n + 1) ^ n ∧ (IP.IsFeasible A b → ∃ x ∈ candidateBox n, A.mulVec (Int.cast ∘ x) ≤ b)