diff --git a/Erdos824.lean b/Erdos824.lean index a7c6016..e3e61f0 100644 --- a/Erdos824.lean +++ b/Erdos824.lean @@ -1 +1,2 @@ import Erdos824.Theorem +import Erdos824.Squarefree diff --git a/Erdos824/LiZhuang/Core.lean b/Erdos824/LiZhuang/Core.lean index e94e832..805336c 100644 --- a/Erdos824/LiZhuang/Core.lean +++ b/Erdos824/LiZhuang/Core.lean @@ -120,12 +120,30 @@ lemma coprime_prod {S S' : Finset ℕ} (hS : S ⊆ P) (hS' : S' ⊆ P) (hd : Dis end primes +/-- Pairs satisfying both the coprimality and the squarefree conditions. -/ +noncomputable def hCoprimeSquarefree (x : ℕ) : ℕ := + ((Finset.Ico 1 x ×ˢ Finset.Ico 1 x).filter (fun p => + p.1 < p.2 ∧ Nat.Coprime p.1 p.2 ∧ Squarefree p.1 ∧ Squarefree p.2 ∧ + sigma 1 p.1 = sigma 1 p.2)).card + +lemma hCoprimeSquarefree_le_h (x : ℕ) : hCoprimeSquarefree x ≤ h x := by + apply Finset.card_le_card + intro p hp + obtain ⟨hm, hlt, hcop, _, _, hsig⟩ := Finset.mem_filter.mp hp + exact Finset.mem_filter.mpr ⟨hm, hlt, hcop, hsig⟩ + +private lemma squarefree_prime_product {S : Finset ℕ} (hS : ∀ p ∈ S, p.Prime) : + Squarefree (∏ p ∈ S, p) := by + refine Finset.squarefree_prod_of_pairwise_isCoprime (fun p hp q hq hpq ↦ ?_) + (fun p hp ↦ (hS p hp).squarefree) + exact Nat.coprime_iff_isRelPrime.mp ((Nat.coprime_primes (hS p hp) (hS q hq)).mpr hpq) + /-- Pairs of `k`-subsets with equal `τ` sharing fewer than `t` elements inject into -`(pairs counted by h x) × [1, Y^t] × Bool`. -/ -lemma card_good (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) +`(coprime squarefree pairs counted by hCoprimeSquarefree x) × [1, Y^t] × Bool`. -/ +lemma card_good_squarefree (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) (hY : ∀ p ∈ P, p ≤ Y) (hx : (Y+1)^k ≤ x) (htk : t ≤ k) : (((P.powersetCard k) ×ˢ (P.powersetCard k)).filter - (fun e => tau e.1 = tau e.2 ∧ (e.1 ∩ e.2).card < t)).card ≤ h x * (Y^t * 2) := by + (fun e => tau e.1 = tau e.2 ∧ (e.1 ∩ e.2).card < t)).card ≤ hCoprimeSquarefree x * (Y^t * 2) := by classical set F := P.powersetCard k let u : Finset ℕ × Finset ℕ → ℕ := fun e => ∏ p ∈ e.1 \ e.2, p @@ -134,9 +152,10 @@ lemma card_good (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) let φ : Finset ℕ × Finset ℕ → (ℕ × ℕ) × (ℕ × Bool) := fun e => ((min (u e) (v e), max (u e) (v e)), (g e, decide (u e < v e))) let H := (Finset.Ico 1 x ×ˢ Finset.Ico 1 x).filter - (fun p => p.1 < p.2 ∧ Nat.Coprime p.1 p.2 ∧ sigma 1 p.1 = sigma 1 p.2) - have hH : h x = H.card := rfl - have hcard : (H ×ˢ (Icc 1 (Y^t) ×ˢ (univ : Finset Bool))).card = h x * (Y^t * 2) := by + (fun p => p.1 < p.2 ∧ Nat.Coprime p.1 p.2 ∧ Squarefree p.1 ∧ Squarefree p.2 ∧ + sigma 1 p.1 = sigma 1 p.2) + have hH : hCoprimeSquarefree x = H.card := rfl + have hcard : (H ×ˢ (Icc 1 (Y^t) ×ˢ (univ : Finset Bool))).card = hCoprimeSquarefree x * (Y^t * 2) := by simp [card_product, hH] rw [← hcard] apply card_le_card_of_injOn φ @@ -179,6 +198,8 @@ lemma card_good (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) exact (mem_sdiff.1 hp0).2 (mem_sdiff.1 hp0').1 have hcop : Nat.Coprime (u (T, T')) (v (T, T')) := coprime_prod hP hA hB (disjoint_sdiff_sdiff) + have hsu : Squarefree (u (T, T')) := squarefree_prime_product (fun p hp ↦ hP p (hA hp)) + have hsv : Squarefree (v (T, T')) := squarefree_prime_product (fun p hp ↦ hP p (hB hp)) have hsig : sigma 1 (u (T, T')) = sigma 1 (v (T, T')) := by show sigma 1 (∏ p ∈ T \ T', p) = sigma 1 (∏ p ∈ T' \ T, p) rw [sigma_prod' hP hA, sigma_prod' hP hB] @@ -194,9 +215,9 @@ lemma card_good (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) refine ⟨?_, hg⟩ rcases lt_or_gt_of_ne huv with hl | hl · rw [min_eq_left hl.le, max_eq_right hl.le] - exact ⟨⟨⟨hu1, hu_x⟩, hv1, hv_x⟩, hl, hcop, hsig⟩ + exact ⟨⟨⟨hu1, hu_x⟩, hv1, hv_x⟩, hl, hcop, hsu, hsv, hsig⟩ · rw [min_eq_right hl.le, max_eq_left hl.le] - exact ⟨⟨⟨hv1, hv_x⟩, hu1, hu_x⟩, hl, hcop.symm, hsig.symm⟩ + exact ⟨⟨⟨hv1, hv_x⟩, hu1, hu_x⟩, hl, hcop.symm, hsv, hsu, hsig.symm⟩ · rintro ⟨T1, T1'⟩ he1 ⟨T2, T2'⟩ he2 hφ simp only [coe_filter, Set.mem_ofPred_eq, mem_product, mem_powersetCard, F] at he1 he2 simp only [φ, Prod.mk.injEq] at hφ @@ -231,6 +252,13 @@ lemma card_good (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) inter_comm] rw [e1, e2] +lemma card_good (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y k t x : ℕ) + (hY : ∀ p ∈ P, p ≤ Y) (hx : (Y+1)^k ≤ x) (htk : t ≤ k) : + (((P.powersetCard k) ×ˢ (P.powersetCard k)).filter + (fun e => tau e.1 = tau e.2 ∧ (e.1 ∩ e.2).card < t)).card ≤ h x * (Y^t * 2) := + (card_good_squarefree P hP Y k t x hY hx htk).trans + (Nat.mul_le_mul_right _ (hCoprimeSquarefree_le_h x)) + /-- Values of `τ` on `k`-subsets are `s`-smooth and `≤ x`; there are at most `(log₂ x + 1)^(s+1)` of them. -/ lemma card_image_tau (P : Finset ℕ) (Y s k x : ℕ) @@ -286,11 +314,11 @@ lemma card_image_tau (P : Finset ℕ) (Y s k x : ℕ) _ = _ := by simp /-- **Combinatorial core.** -/ -theorem core (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) +theorem core_squarefree (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) (hY : ∀ p ∈ P, p ≤ Y) (hs : ∀ p ∈ P, ∀ q ∈ (p+1).primeFactors, q ≤ s) (hx : (Y+1)^k ≤ x) (htk : t ≤ k) : (P.card.choose k)^2 ≤ (Nat.log 2 x + 1)^(s+1) * - (h x * (Y^t * 2) + P.card.choose k * (k.choose t * P.card.choose (k-t))) := by + (hCoprimeSquarefree x * (Y^t * 2) + P.card.choose k * (k.choose t * P.card.choose (k-t))) := by classical set F := P.powersetCard k have hF : F.card = P.card.choose k := card_powersetCard k P @@ -305,9 +333,18 @@ theorem core (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) · exact Or.inl ⟨he.1, he.2, hlt⟩ · exact Or.inr ⟨he.1, not_lt.1 hlt⟩ refine (card_le_card hsub).trans ((card_union_le _ _).trans (Nat.add_le_add ?_ ?_)) - · exact card_good P hP Y k t x hY hx htk + · exact card_good_squarefree P hP Y k t x hY hx htk · exact card_bad P k t +theorem core (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) + (hY : ∀ p ∈ P, p ≤ Y) (hs : ∀ p ∈ P, ∀ q ∈ (p+1).primeFactors, q ≤ s) + (hx : (Y+1)^k ≤ x) (htk : t ≤ k) : + (P.card.choose k)^2 ≤ (Nat.log 2 x + 1)^(s+1) * + (h x * (Y^t * 2) + P.card.choose k * (k.choose t * P.card.choose (k-t))) := by + apply (core_squarefree P hP Y s k t x hY hs hx htk).trans + gcongr + exact hCoprimeSquarefree_le_h x + /-- `C(M,k-t) * (M-k)^t ≤ C(M,k) * k^t` for `t ≤ k`. -/ lemma choose_ratio (M k : ℕ) : ∀ t, t ≤ k → M.choose (k - t) * (M - k)^t ≤ M.choose k * k^t := by @@ -359,12 +396,21 @@ lemma arith (N U H G c b D K E : ℕ) (h1 : N^2 ≤ U * (H * (G * 2) + N * (c * /-- **Core, final form**: if the bad-pair condition `2 U 2^k k^t ≤ (M-k)^t` holds, then `C(M,k)^2 ≤ 4 U h(x) Y^t`, with `U = (log₂ x + 1)^(s+1)`. -/ -theorem core_final (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) +theorem core_final_squarefree (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) (hY : ∀ p ∈ P, p ≤ Y) (hs : ∀ p ∈ P, ∀ q ∈ (p+1).primeFactors, q ≤ s) (hx : (Y+1)^k ≤ x) (htk : t ≤ k) (hkM : k < P.card) (hbad : 2 * (Nat.log 2 x + 1)^(s+1) * 2^k * k^t ≤ (P.card - k)^t) : - (P.card.choose k)^2 ≤ 4 * (Nat.log 2 x + 1)^(s+1) * h x * Y^t := - arith _ _ _ _ _ _ _ _ _ (core P hP Y s k t x hY hs hx htk) (Nat.choose_le_two_pow k t) + (P.card.choose k)^2 ≤ 4 * (Nat.log 2 x + 1)^(s+1) * hCoprimeSquarefree x * Y^t := + arith _ _ _ _ _ _ _ _ _ (core_squarefree P hP Y s k t x hY hs hx htk) (Nat.choose_le_two_pow k t) (choose_ratio P.card k t htk) hbad (pow_pos (by omega) _) +theorem core_final (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime) (Y s k t x : ℕ) + (hY : ∀ p ∈ P, p ≤ Y) (hs : ∀ p ∈ P, ∀ q ∈ (p+1).primeFactors, q ≤ s) + (hx : (Y+1)^k ≤ x) (htk : t ≤ k) (hkM : k < P.card) + (hbad : 2 * (Nat.log 2 x + 1)^(s+1) * 2^k * k^t ≤ (P.card - k)^t) : + (P.card.choose k)^2 ≤ 4 * (Nat.log 2 x + 1)^(s+1) * h x * Y^t := by + apply (core_final_squarefree P hP Y s k t x hY hs hx htk hkM hbad).trans + gcongr + exact hCoprimeSquarefree_le_h x + end Erdos824.LiZhuang diff --git a/Erdos824/LiZhuang/Main.lean b/Erdos824/LiZhuang/Main.lean index 6656f0c..403f09a 100644 --- a/Erdos824/LiZhuang/Main.lean +++ b/Erdos824/LiZhuang/Main.lean @@ -49,7 +49,7 @@ lemma master (c : ℝ) (hc : 0 < c) : set_option maxHeartbeats 4000000 in /-- The main estimate at one (large) `x`, with all largeness conditions explicit. -/ -lemma main_at (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / ε) (hη : η = ε / 16) +lemma main_at_squarefree (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / ε) (hη : η = ε / 16) (hδ : δ = 1 / (2 * B)) (x : ℕ) (hx : 0 < x) (L : ℝ) (hL : L = Real.log x) (hL8 : Real.exp 8 ≤ L) (hG1 : 8 * (3*B+4) * ((√L + 1) * (Real.log (2*L) + 1)) ≤ 3 * ε * L) @@ -58,7 +58,7 @@ lemma main_at (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / (hPdef : P = (Finset.Iic ⌊5*(L^B)⌋₊).filter (fun p => p.Prime ∧ ∀ q ∈ (p+1).primeFactors, ((q:ℕ):ℝ) ≤ (L^B) ^ δ)) (hM : (L^B) ^ (1 - η) ≤ (P.card : ℝ)) : - (x:ℝ) ^ (2 - ε) < (h x : ℝ) := by + (x:ℝ) ^ (2 - ε) < (hCoprimeSquarefree x : ℝ) := by obtain ⟨hlog6, hlog5, hlog4, hlog5p, hlog6p⟩ := log_consts have hlog2 := Real.log_two_gt_d9 have hlog2' := Real.log_two_lt_d9 @@ -226,7 +226,7 @@ lemma main_at (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / -- the combinatorial core have hbad' : 2 * (Nat.log 2 x + 1)^(s+1) * 2^k * k^t ≤ (P.card - k)^t := by rw [hUdef, hEdef, hDdef, hMdef] at hbad; exact hbad - have hcore := core_final P (fun p hp => (hPprop p hp).1) Y s k t x + have hcore := core_final_squarefree P (fun p hp => (hPprop p hp).1) Y s k t x (fun p hp => (hPprop p hp).2.1) (fun p hp => (hPprop p hp).2.2) hYk htk (by rw [← hMdef]; exact hkM) hbad' rw [← hMdef, ← hEdef, ← hUdef] at hcore @@ -253,16 +253,16 @@ lemma main_at (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / have hlt := Real.exp_lt_exp.2 hmain_log rw [Real.exp_add, hC, hDpow] at hlt have hlowR : (D:ℝ)^k ≤ N * (k:ℝ)^k := by exact_mod_cast hlow - have hcoreR : (N:ℝ)^2 ≤ 4 * U * h x * (Y:ℝ)^t := by exact_mod_cast hcore - have hD2 : (D:ℝ)^(2*k) ≤ (h x : ℝ) * (4 * U * (Y:ℝ)^t * (k:ℝ)^(2*k)) := by + have hcoreR : (N:ℝ)^2 ≤ 4 * U * hCoprimeSquarefree x * (Y:ℝ)^t := by exact_mod_cast hcore + have hD2 : (D:ℝ)^(2*k) ≤ (hCoprimeSquarefree x : ℝ) * (4 * U * (Y:ℝ)^t * (k:ℝ)^(2*k)) := by have e1 : (D:ℝ)^(2*k) = ((D:ℝ)^k)^2 := by ring have e2 : (k:ℝ)^(2*k) = ((k:ℝ)^k)^2 := by ring rw [e1, e2] calc ((D:ℝ)^k)^2 ≤ (N * (k:ℝ)^k)^2 := pow_le_pow_left₀ (by positivity) hlowR 2 _ = (N:ℝ)^2 * ((k:ℝ)^k)^2 := by ring - _ ≤ (4 * U * h x * (Y:ℝ)^t) * ((k:ℝ)^k)^2 := + _ ≤ (4 * U * hCoprimeSquarefree x * (Y:ℝ)^t) * ((k:ℝ)^k)^2 := mul_le_mul_of_nonneg_right hcoreR (by positivity) - _ = (h x : ℝ) * (4 * U * (Y:ℝ)^t * ((k:ℝ)^k)^2) := by ring + _ = (hCoprimeSquarefree x : ℝ) * (4 * U * (Y:ℝ)^t * ((k:ℝ)^k)^2) := by ring have hCpos : 0 < 4 * (U:ℝ) * (Y:ℝ)^t * (k:ℝ)^(2*k) := by positivity have hfinal := lt_of_lt_of_le hlt hD2 have := lt_of_mul_lt_mul_right hfinal hCpos.le @@ -270,9 +270,22 @@ lemma main_at (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / rw [Real.rpow_def_of_pos (by exact_mod_cast hx), e] exact this +lemma main_at (ε B η δ : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) (hB : B = 16 / ε) (hη : η = ε / 16) + (hδ : δ = 1 / (2 * B)) (x : ℕ) (hx : 0 < x) (L : ℝ) (hL : L = Real.log x) + (hL8 : Real.exp 8 ≤ L) + (hG1 : 8 * (3*B+4) * ((√L + 1) * (Real.log (2*L) + 1)) ≤ 3 * ε * L) + (hG2 : 12 * B * ((√L + 1) * (Real.log (2*L) + 1)) ≤ L) + (P : Finset ℕ) + (hPdef : P = (Finset.Iic ⌊5*(L^B)⌋₊).filter + (fun p => p.Prime ∧ ∀ q ∈ (p+1).primeFactors, ((q:ℕ):ℝ) ≤ (L^B) ^ δ)) + (hM : (L^B) ^ (1 - η) ≤ (P.card : ℝ)) : + (x:ℝ) ^ (2 - ε) < (h x : ℝ) := by + apply (main_at_squarefree ε B η δ hε hε1 hB hη hδ x hx L hL hL8 hG1 hG2 P hPdef hM).trans_le + exact_mod_cast hCoprimeSquarefree_le_h x + /-- The theorem for `0 < ε ≤ 1`, from the weakened hypothesis. -/ -lemma main_small (H : SmoothSuccessorHypWeak) (ε : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) : - ∃ X : ℝ, ∀ x : ℕ, X ≤ x → (x:ℝ) ^ (2 - ε) < (h x : ℝ) := by +lemma main_small_squarefree (H : SmoothSuccessorHypWeak) (ε : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) : + ∃ X : ℝ, ∀ x : ℕ, X ≤ x → (x:ℝ) ^ (2 - ε) < (hCoprimeSquarefree x : ℝ) := by set B : ℝ := 16 / ε with hB set η : ℝ := ε / 16 with hη set δ : ℝ := 1 / (2 * B) with hδ @@ -310,18 +323,29 @@ lemma main_small (H : SmoothSuccessorHypWeak) (ε : ℝ) (hε : 0 < ε) (hε1 : rw [hc2def]; field_simp calc _ ≤ 12 * B * (c2 * L) := mul_le_mul_of_nonneg_left h1 (by positivity) _ = _ := e - exact main_at ε B η δ hε hε1 hB hη hδ x hx0 L hL hL8 hG1 hG2 _ rfl (hy0 _ hyL) + exact main_at_squarefree ε B η δ hε hε1 hB hη hδ x hx0 L hL hL8 hG1 hG2 _ rfl (hy0 _ hyL) + +lemma main_small (H : SmoothSuccessorHypWeak) (ε : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) : + ∃ X : ℝ, ∀ x : ℕ, X ≤ x → (x:ℝ) ^ (2 - ε) < (h x : ℝ) := by + obtain ⟨X, hX⟩ := main_small_squarefree H ε hε hε1 + exact ⟨X, fun x hx ↦ (hX x hx).trans_le (by exact_mod_cast hCoprimeSquarefree_le_h x)⟩ /-- **Main theorem (weak hypothesis).** -/ -theorem erdos824_of_smoothSuccessorWeak (H : SmoothSuccessorHypWeak) : - ∀ ε : ℝ, 0 < ε → ∃ X : ℝ, ∀ x : ℕ, X ≤ x → (x:ℝ) ^ (2 - ε) < (h x : ℝ) := by +theorem erdos824_of_smoothSuccessorWeak_squarefree (H : SmoothSuccessorHypWeak) : + ∀ ε : ℝ, 0 < ε → ∃ X : ℝ, ∀ x : ℕ, X ≤ x → (x:ℝ) ^ (2 - ε) < (hCoprimeSquarefree x : ℝ) := by intro ε hε - obtain ⟨X, hX⟩ := main_small H (min ε 1) (lt_min hε one_pos) (min_le_right _ _) + obtain ⟨X, hX⟩ := main_small_squarefree H (min ε 1) (lt_min hε one_pos) (min_le_right _ _) refine ⟨max X 1, fun x hx => ?_⟩ have hx1 : (1:ℝ) ≤ x := le_trans (le_max_right _ _) hx calc (x:ℝ) ^ (2 - ε) ≤ (x:ℝ) ^ (2 - min ε 1) := Real.rpow_le_rpow_of_exponent_le hx1 (by linarith [min_le_left ε 1]) - _ < h x := hX x (le_trans (le_max_left _ _) hx) + _ < hCoprimeSquarefree x := hX x (le_trans (le_max_left _ _) hx) + +theorem erdos824_of_smoothSuccessorWeak (H : SmoothSuccessorHypWeak) : + ∀ ε : ℝ, 0 < ε → ∃ X : ℝ, ∀ x : ℕ, X ≤ x → (x:ℝ) ^ (2 - ε) < (h x : ℝ) := by + intro ε hε + obtain ⟨X, hX⟩ := erdos824_of_smoothSuccessorWeak_squarefree H ε hε + exact ⟨X, fun x hx ↦ (hX x hx).trans_le (by exact_mod_cast hCoprimeSquarefree_le_h x)⟩ /-- **Main theorem (hypothesis exactly as stated in the task).** -/ theorem erdos824_of_smoothSuccessor (H : SmoothSuccessorHyp) : diff --git a/Erdos824/Squarefree.lean b/Erdos824/Squarefree.lean new file mode 100644 index 0000000..069cb63 --- /dev/null +++ b/Erdos824/Squarefree.lean @@ -0,0 +1,45 @@ +import Erdos824.Final + +/-! +# The squarefree variant of Erdős problem 824 + +Li and Zhuang, Theorem 1.3, observe that their coprime pairs are also squarefree. +This module derives the squarefree variant in Formal Conjectures from that +strengthening of their finite counting argument and Yao Xu's smooth-successor supply. +-/ + +open Filter +open scoped ArithmeticFunction.sigma + +namespace Erdos824 + +/-- Formal Conjectures' count for the squarefree variant. -/ +noncomputable def hSquarefree (x : ℕ) : ℕ := + ((Finset.Ico 1 x ×ˢ Finset.Ico 1 x).filter fun (a, b) ↦ + a < b ∧ Squarefree a ∧ Squarefree b ∧ σ 1 a = σ 1 b).card + +private theorem coprimeSquarefree_le_squarefree (x : ℕ) : + LiZhuang.hCoprimeSquarefree x ≤ hSquarefree x := by + apply Finset.card_le_card + intro p hp + obtain ⟨hm, hlt, _, ha, hb, hsig⟩ := Finset.mem_filter.mp hp + exact Finset.mem_filter.mpr ⟨hm, hlt, ha, hb, hsig⟩ + +/-- Coprime pairs that are squarefree in both coordinates satisfy the near-quadratic bound. -/ +theorem erdos_824_coprime_squarefree : + ∀ ε : ℝ, 0 < ε → ∀ᶠ x : ℕ in atTop, + (x : ℝ) ^ (2 - ε) < (LiZhuang.hCoprimeSquarefree x : ℝ) := by + intro ε hε + obtain ⟨X, hX⟩ := LiZhuang.erdos824_of_smoothSuccessorWeak_squarefree + (weak_of_supply Final.supply) ε hε + refine eventually_atTop.2 ⟨⌈X⌉₊, fun n hn ↦ hX n ?_⟩ + exact (Nat.le_ceil X).trans (by exact_mod_cast hn) + +/-- The statement of the squarefree variant in Formal Conjectures. -/ +theorem erdos_824.variants.squarefree : + ∀ ε : ℝ, 0 < ε → ∀ᶠ x : ℕ in atTop, (x : ℝ) ^ (2 - ε) < (hSquarefree x : ℝ) := by + intro ε hε + filter_upwards [erdos_824_coprime_squarefree ε hε] with x hx + exact hx.trans_le (by exact_mod_cast coprimeSquarefree_le_squarefree x) + +end Erdos824