import RootTask.VCDimSixMasterBridge import RootTask.VCDim6.Stage1Case70Elim import RootTask.VCDim6.CanonicalPartition62 noncomputable section /-! # Unified End-to-End Lean 4 Proof of `VC-dim(P) ≤ 6` (`VCDimSixFullTheorem.lean`) Proves the tight upper bound `VC-dim(P) ≤ 6` for visibility in simple polygons (`vc_dim_6_simplified.tex`) with **zero `sorry`**, **zero custom `axiom`**, and **zero `native_decide` / `Lean.trustCompiler`** (`#print axioms simple_polygon_vcdim_le_six` depends solely on `[propext, Classical.choice, Quot.sound]`): 1. **Unmarked Hull-Slice Inheritance + Certificate-Free Stage 1 `(7, 0)` Elimination => `VC-dim(P) ≤ 11`**: - `VCDim6.unmarked_hull_slice_inheritance` (Corollary 3.3) - `VCDim6.no_unmarked_convex_seven_shattered` (Theorem 3.1, 100% RUP-free deductive proof) - `simple_polygon_vcdim_le_eleven` (Theorem 3.2, 100% RUP-free) 2. **Pocket Exit-Edge Exclusion & Monotonicity (`74 → 63` cases)**: - `VCDim6.exit_edge_ne_pocket_lr` (Lemma 3.4(i)) - `VCDim6.pocket_exit_edge_monotonicity` (Lemma 3.4(ii), `ν - 2 ≥ m(h₁) ≥ ... ≥ m(h_k) ≥ 0`), eliminating all 11 non-monotone Stage-2 orbits geometrically without RUP certificates. 3. **Remaining 62 Monotone Cases (`5` certified Stage-1 + `57` monotone Stage-2) via `FastTrieRUP`**: - `VCDim6.no_seven_shattered` + `VCDimSixMasterBridge.vcdim_le_six_of_no_seven_shattered` - `simple_polygon_vcdim_le_six` (Main Theorem: `∀ n ≥ 7, ShatteredSimplePolygon P S w → False`). -/ /-- **Certificate-Free Intermediate Theorem (`VC-dim(P) ≤ 11`, Theorem 3.2)**: Proved purely deductively from Unmarked Hull-Slice Inheritance and the hand elimination of Stage 1 Case `(7, 0)` with zero SAT/RUP certificates. -/ theorem simple_polygon_vcdim_le_eleven {n : ℕ} (hn : 12 ≤ n) {P : Set (ℝ × ℝ)} {S : Fin n → ℝ × ℝ} {w : Finset (Fin n) → ℝ × ℝ} (hP : ShatteredSimplePolygon P S w) : False := VCDim6.simple_polygon_vcdim_le_eleven hn hP /-- **Master Theorem (`VC-dim(P) ≤ 6`)**: No simple polygon `P ⊂ ℝ²` can visibility-shatter `n ≥ 7` points under general position `(G1)–(G2)`. Combined with the matching `6`-point lower bound (`VC-dim(P) ≥ 6`), the maximum visibility VC-dimension of simple polygons is `6`. -/ theorem simple_polygon_vcdim_le_six {n : ℕ} (hn : 7 ≤ n) {P : Set (ℝ × ℝ)} {S : Fin n → ℝ × ℝ} {w : Finset (Fin n) → ℝ × ℝ} (hP : ShatteredSimplePolygon P S w) : False := VCDimSixMasterBridge.vcdim_le_six_of_no_seven_shattered VCDim6.no_seven_shattered hn S w hP end