Documentation

Atlas.ProjectionTheory.code.CellDecomposition

A line in ℝ²: a one-dimensional affine subspace, packaged with a proof that its direction has rank 1 and that its carrier set is nonempty.

Instances For
    @[implicit_reducible]

    Membership of a point in a Line2: belongs to the underlying affine subspace.

    theorem CellDecomposition.polynomial_ham_sandwich_finite {ι : Type} [Fintype ι] (D : ) :
    Fintype.card ι D ^ 2∀ (S : ιFinset (Fin 2)), ∃ (p : MvPolynomial (Fin 2) ), p 0 p.totalDegree D (∀ (i : ι), {xS i | (MvPolynomial.eval x) p > 0}.card (S i).card / 2) ∀ (i : ι), {xS i | (MvPolynomial.eval x) p < 0}.card (S i).card / 2

    Polynomial ham-sandwich theorem for finite sets in ℝ². Given at most finite sets S_i ⊆ ℝ², there is a nonzero polynomial p of total degree at most D such that for each i, both {x ∈ S_i : p(x) > 0} and {x ∈ S_i : p(x) < 0} contain at most half of S_i.

    Bézout-type bound: the intersection of a line ℓ ⊂ ℝ² with the zero set of a nonzero polynomial p is finite and has at most deg p points.

    noncomputable def CellDecomposition.polyCell {k : } (polys : Fin kMvPolynomial (Fin 2) ) (σ : Fin kBool) :
    Set (Fin 2)

    The open cell {x : ∀ i, sign(polys i (x)) = σ i} cut out by a sign pattern σ : Fin k → Bool (with true meaning positive sign and false meaning negative sign).

    Instances For
      def CellDecomposition.polyWall {k : } (polys : Fin kMvPolynomial (Fin 2) ) :
      Set (Fin 2)

      The "wall" ⋃_i Z(polys i): the union of the zero sets of the polynomials, separating the open cells polyCell polys σ.

      Instances For
        noncomputable def CellDecomposition.signPatternCell (X : Finset (Fin 2)) {k : } (polys : Fin kMvPolynomial (Fin 2) ) (σ : Fin kBool) :
        Finset (Fin 2)

        The points of a finite set X ⊆ ℝ² lying in the open cell polyCell polys σ, returned as a Finset.

        Instances For
          theorem CellDecomposition.polyCell_isOpen {k : } (polys : Fin kMvPolynomial (Fin 2) ) (σ : Fin kBool) :
          IsOpen (polyCell polys σ)

          Every polyCell is open, being a finite intersection of open half-spaces defined by polynomial inequalities.

          theorem CellDecomposition.polyWall_isClosed {k : } (polys : Fin kMvPolynomial (Fin 2) ) :

          The polynomial wall is closed, being a finite union of polynomial zero sets.

          theorem CellDecomposition.polyWall_union_cells {k : } (polys : Fin kMvPolynomial (Fin 2) ) :
          polyWall polys ⋃ (σ : Fin kBool), polyCell polys σ = Set.univ

          The wall together with the union of all sign-pattern open cells covers ℝ².

          theorem CellDecomposition.polyCell_pairwise_disjoint {k : } (polys : Fin kMvPolynomial (Fin 2) ) :
          Pairwise fun (σ τ : Fin kBool) => Disjoint (polyCell polys σ) (polyCell polys τ)

          Distinct sign patterns give disjoint open cells.

          theorem CellDecomposition.polyCell_disjoint_wall {k : } (polys : Fin kMvPolynomial (Fin 2) ) (σ : Fin kBool) :
          Disjoint (polyCell polys σ) (polyWall polys)

          Each open cell is disjoint from the wall.

          theorem CellDecomposition.polyWall_line_finite {k : } (polys : Fin kMvPolynomial (Fin 2) ) (hne : ∀ (i : Fin k), polys i 0) ( : Line2) :
          (.carrier polyWall polys).Finite

          The intersection of a line with the wall of nonzero polynomials is finite, by Bézout applied to each polynomial.

          theorem CellDecomposition.polyWall_line_ncard {k : } (polys : Fin kMvPolynomial (Fin 2) ) (hne : ∀ (i : Fin k), polys i 0) ( : Line2) :
          (.carrier polyWall polys).ncard i : Fin k, (polys i).totalDegree

          Bézout bound: the number of intersection points of a line with the polynomial wall is at most ∑_i deg(polys i).

          theorem CellDecomposition.signPatternCell_snoc_true_subset (X : Finset (Fin 2)) {k : } (polys : Fin kMvPolynomial (Fin 2) ) (p : MvPolynomial (Fin 2) ) (σ : Fin kBool) :
          signPatternCell X (Fin.snoc polys p) (Fin.snoc σ true) {xsignPatternCell X polys σ | (MvPolynomial.eval x) p > 0}

          Inductive step: after appending a polynomial p and the sign true, the sign-pattern cell sits inside the previous cell intersected with {x : p(x) > 0}.

          theorem CellDecomposition.signPatternCell_snoc_false_subset (X : Finset (Fin 2)) {k : } (polys : Fin kMvPolynomial (Fin 2) ) (p : MvPolynomial (Fin 2) ) (σ : Fin kBool) :
          signPatternCell X (Fin.snoc polys p) (Fin.snoc σ false) {xsignPatternCell X polys σ | (MvPolynomial.eval x) p < 0}

          Inductive step: after appending a polynomial p and the sign false, the sign-pattern cell sits inside the previous cell intersected with {x : p(x) < 0}.

          theorem CellDecomposition.degree_bound_step (j : ) :
          2 ^ j (2 ^ ((j + 1) / 2)) ^ 2

          Arithmetic estimate 2^j ≤ (2^{⌊(j+1)/2⌋})² used to control degrees at each bisection step.

          There are 2^k sign patterns in Fin k → Bool.

          theorem CellDecomposition.degree_sum_bound_even (m : ) :
          jFinset.range (2 * m), 2 ^ ((j + 1) / 2) = 3 * (2 ^ m - 1)

          Closed-form for the cumulative degree sum at an even number of bisection steps: ∑_{j<2m} 2^{⌊(j+1)/2⌋} = 3(2^m − 1).

          theorem CellDecomposition.degree_sum_bound (k : ) :
          jFinset.range k, 2 ^ ((j + 1) / 2) 4 * 2 ^ (k / 2)

          Cumulative degree bound after k bisection steps: ∑_{j<k} 2^{⌊(j+1)/2⌋} ≤ 4 · 2^{⌊k/2⌋}.

          theorem CellDecomposition.two_pow_log_bound (s : ) (hs : 1 s) :
          s ^ 2 2 ^ (2 * Nat.log 2 s + 2)

          For s ≥ 1, s² ≤ 2^{2 log₂ s + 2}. Used to relate the target parameter s to the chosen number of bisection steps k = 2 log₂ s + 2.

          theorem CellDecomposition.two_pow_half_log_bound (s : ) (hs : 1 s) :
          2 ^ ((2 * Nat.log 2 s + 2) / 2) 2 * s

          For s ≥ 1, 2^{⌊(2 log₂ s + 2) / 2⌋} ≤ 2s. Used to convert the O(2^{k/2}) degree bound into an O(s) bound.

          theorem CellDecomposition.iterative_bisection (X : Finset (Fin 2)) (k : ) :
          ∃ (polys : Fin kMvPolynomial (Fin 2) ), (∀ (i : Fin k), polys i 0) (∀ (i : Fin k), (polys i).totalDegree 2 ^ ((i + 1) / 2)) ∀ (σ : Fin kBool), (signPatternCell X polys σ).card X.card / 2 ^ k

          Iterated polynomial ham-sandwich bisection. For any finite X ⊆ ℝ² and any k, there exist polynomials polys₀, …, polys_{k−1} (all nonzero) with deg(polys i) ≤ 2^{⌊(i+1)/2⌋} such that each of the 2^k sign-pattern cells contains at most |X| / 2^k points of X.

          theorem CellDecomposition.cell_decomposition_lemma :
          ∃ (C : ) (_ : C > 0), ∀ (X : Finset (Fin 2)) (s : ), 1 s∃ (n : ) (O : Fin nSet (Fin 2)) (W : Set (Fin 2)), (∀ (i : Fin n), IsOpen (O i)) IsClosed W W ⋃ (i : Fin n), O i = Set.univ (Pairwise fun (i j : Fin n) => Disjoint (O i) (O j)) (∀ (i : Fin n), Disjoint (O i) W) (∀ ( : Line2), (.carrier W).Finite (.carrier W).ncard C * s) ∀ (i : Fin n), (X O i).ncard C * X.card / s ^ 2

          Cell decomposition lemma (Szemerédi–Trotter). For any finite X ⊆ ℝ² and integer s ≥ 1, the plane decomposes as ℝ² = W ∪ ⋃ᵢ Oᵢ, with the Oᵢ pairwise disjoint open sets, W closed and disjoint from each Oᵢ, such that every line meets W in at most C s points and each Oᵢ contains at most C |X| / s² points of X. Obtained via iterated polynomial bisection.