Theorem: AddCircle.ergodic_zsmul
File: Mathlib/Dynamics/Ergodic/AddCircle.lean

tactic: let u : ℕ → AddCircle T := fun j => ↑((↑1 : ℝ) / ↑(n.natAbs ^ j) * T)
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ

tactic: replace hn : 1 < n.natAbs := by rwa [Int.abs_eq_natAbs, Nat.one_lt_cast] at hn
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ

tactic: have hu₀ : ∀ j, addOrderOf (u j) = n.natAbs ^ j := fun j => by
  convert addOrderOf_div_of_gcd_eq_one (p := T) (m := 1)
    (pow_pos (pos_of_gt hn) j) (gcd_one_left _)
  norm_cast
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ

tactic: have hnu : ∀ j, n ^ j • u j = 0 := fun j => by
  rw [← addOrderOf_dvd_iff_zsmul_eq_zero, hu₀, Int.natCast_pow, Int.natCast_natAbs, ← abs_pow,
    abs_dvd]
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ

tactic: have hu₁ : ∀ j, (u j +ᵥ s : Set _) =ᵐ[volume] s := fun j => by
  rw [vadd_eq_self_of_preimage_zsmul_eq_self hs' (hnu j)]
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ

tactic: have hu₂ : Tendsto (fun j => addOrderOf <| u j) atTop atTop := by
  simp_rw [hu₀]; exact Nat.tendsto_pow_atTop_atTop_of_one_lt hn
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
hu₂ : Tendsto (fun j => addOrderOf (u j)) atTop atTop
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ

tactic: exact ae_empty_or_univ_of_forall_vadd_ae_eq_self hs.nullMeasurableSet hu₁ hu₂
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
hu₂ : Tendsto (fun j => addOrderOf (u j)) atTop atTop
⊢ s =ᶠ[ae volume] ∅ ∨ s =ᶠ[ae volume] univ
state_after: no goals

tactic: rwa [Int.abs_eq_natAbs, Nat.one_lt_cast] at hn
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
⊢ 1 < n.natAbs
state_after: no goals

tactic: convert addOrderOf_div_of_gcd_eq_one (p := T) (m := 1)
  (pow_pos (pos_of_gt hn) j) (gcd_one_left _)
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
j : ℕ
⊢ addOrderOf (u j) = n.natAbs ^ j
state_after: case h.e'_2.h.e'_3.h.e'_4.h.e'_5.h.e'_5
T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
j : ℕ
⊢ 1 = ↑1

tactic: norm_cast
state_before: case h.e'_2.h.e'_3.h.e'_4.h.e'_5.h.e'_5
T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
j : ℕ
⊢ 1 = ↑1
state_after: no goals

tactic: rw [← addOrderOf_dvd_iff_zsmul_eq_zero, hu₀, Int.natCast_pow, Int.natCast_natAbs, ← abs_pow,
  abs_dvd]
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
j : ℕ
⊢ n ^ j • u j = 0
state_after: no goals

tactic: rw [vadd_eq_self_of_preimage_zsmul_eq_self hs' (hnu j)]
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
j : ℕ
⊢ u j +ᵥ s =ᶠ[ae volume] s
state_after: no goals

tactic: simp_rw [hu₀]
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
⊢ Tendsto (fun j => addOrderOf (u j)) atTop atTop
state_after: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
⊢ Tendsto (fun j => n.natAbs ^ j) atTop atTop

tactic: exact Nat.tendsto_pow_atTop_atTop_of_one_lt hn
state_before: T : ℝ
hT : Fact (0 < T)
n : ℤ
hn✝ : 1 < |n|
s : Set (AddCircle T)
hs : MeasurableSet s
hs' : (fun y => n • y) ⁻¹' s = s
u : ℕ → AddCircle T := fun j => ↑(1 / ↑(n.natAbs ^ j) * T)
hn : 1 < n.natAbs
hu₀ : ∀ (j : ℕ), addOrderOf (u j) = n.natAbs ^ j
hnu : ∀ (j : ℕ), n ^ j • u j = 0
hu₁ : ∀ (j : ℕ), u j +ᵥ s =ᶠ[ae volume] s
⊢ Tendsto (fun j => n.natAbs ^ j) atTop atTop
state_after: no goals