/- Released under Apache-2.0; see adjacent LICENSE. Supplemental binding of the unchanged finite G2 to the manuscript integer maximum. -/ import PrimaryMain namespace IntegerMainBinding open KKFiniteCoreDraft /-- Nat consecutive gaps are the same integer gaps at a nonnegative start. -/ theorem intConsecutive_nat_iff (S : Finset Nat) (s d : Nat) : IntConsecutive S (s : Int) d ↔ Consecutive S s d := by unfold IntConsecutive Consecutive simp only [← Nat.cast_add, KKFiniteCoreProof.int_survivor_nat] /-- The original G2 is attained by an actual integer consecutive gap. -/ theorem integer_G2_attained (S : Finset Nat) (hS : PrimeFamily S) : ∃ s : Int, IntConsecutive S s (G2 S) := by obtain ⟨_, _, s, _, hc⟩ := KKFiniteCoreProof.G2_attained_and_bounds S hS exact ⟨(s : Int), (intConsecutive_nat_iff S s (G2 S)).mpr hc⟩ /-- Every integer consecutive gap, including negative starts, is bounded by G2. -/ theorem integer_consecutive_le_G2 (S : Finset Nat) (s : Int) (d : Nat) (hS : PrimeFamily S) (hc : IntConsecutive S s d) : d ≤ G2 S := by exact KKFiniteCoreProof.all_consecutive_distances_le_G2 S ((s % (period S : Int)).toNat) d hS ((KKFiniteCoreProof.integer_consecutive_normalization S s d hS).mp hc) /-- Exact maximum/attainment characterization on the manuscript integer object. -/ theorem integer_maximum_binding (S : Finset Nat) (hS : PrimeFamily S) : (∃ s : Int, IntConsecutive S s (G2 S)) ∧ (∀ (s : Int) (d : Nat), IntConsecutive S s d → d ≤ G2 S) := by exact ⟨integer_G2_attained S hS, fun s d hc => integer_consecutive_le_G2 S s d hS hc⟩ /-- Equation (1) for an attained maximum of the original integer consecutive gaps, with the unchanged literal full prime cutoff and natural-log main shape. -/ theorem manuscript_integer_main_goal : ∃ c : ℝ, 0 < c ∧ ∃ Y : ℝ, ∀ y : ℝ, Y ≤ y → ∃ d : Nat, (∃ s : Int, IntConsecutive (SieveParameters.mainPrimes y) s d) ∧ (∀ (s : Int) (e : Nat), IntConsecutive (SieveParameters.mainPrimes y) s e → e ≤ d) ∧ c * SieveParameters.mainShape y ≤ (d : ℝ) := by obtain ⟨c, hc, Y, hmain⟩ := PrimaryMain.manuscript_main_goal refine ⟨c, hc, Y, ?_⟩ intro y hy have hfamily : PrimeFamily (SieveParameters.mainPrimes y) := ReserveBudget.fullPrimeFamily y obtain ⟨ha, hb⟩ := integer_maximum_binding (SieveParameters.mainPrimes y) hfamily exact ⟨G2 (SieveParameters.mainPrimes y), ha, hb, hmain y hy⟩ end IntegerMainBinding #print axioms IntegerMainBinding.intConsecutive_nat_iff #print axioms IntegerMainBinding.integer_G2_attained #print axioms IntegerMainBinding.integer_consecutive_le_G2 #print axioms IntegerMainBinding.integer_maximum_binding #print axioms IntegerMainBinding.manuscript_integer_main_goal