File: Mathlib/NumberTheory/WellApproximable.lean

full_name: approxOrderOf
code: /-- In a seminormed group `A`, given `n : ℕ` and `δ : ℝ`, `approxOrderOf A n δ` is the set of
elements within a distance `δ` of a point of order `n`. -/
@[to_additive "In a seminormed additive group `A`, given `n : ℕ` and `δ : ℝ`,
`approxAddOrderOf A n δ` is the set of elements within a distance `δ` of a point of order `n`."]
def approxOrderOf (A : Type*) [SeminormedGroup A] (n : ℕ) (δ : ℝ) : Set A 
goal: Set A

full_name: approxAddOrderOf
code: /-- In a seminormed group `A`, given `n : ℕ` and `δ : ℝ`, `approxOrderOf A n δ` is the set of
elements within a distance `δ` of a point of order `n`. -/
@[to_additive "In a seminormed additive group `A`, given `n : ℕ` and `δ : ℝ`,
`approxAddOrderOf A n δ` is the set of elements within a distance `δ` of a point of order `n`."]
def approxOrderOf (A : Type*) [SeminormedGroup A] (n : ℕ) (δ : ℝ) : Set A 
goal: Set A

full_name: mem_approxOrderOf_iff
code: @[to_additive mem_approx_add_orderOf_iff]
theorem mem_approxOrderOf_iff {A : Type*} [SeminormedGroup A] {n : ℕ} {δ : ℝ} {a : A} :
    a ∈ approxOrderOf A n δ ↔ ∃ b : A, orderOf b = n ∧ a ∈ ball b δ 
goal: a ∈ approxOrderOf A n δ ↔ ∃ b, orderOf b = n ∧ a ∈ Metric.ball b δ

full_name: mem_approx_add_orderOf_iff
code: @[to_additive mem_approx_add_orderOf_iff]
theorem mem_approxOrderOf_iff {A : Type*} [SeminormedGroup A] {n : ℕ} {δ : ℝ} {a : A} :
    a ∈ approxOrderOf A n δ ↔ ∃ b : A, orderOf b = n ∧ a ∈ ball b δ 
goal: a ∈ approxAddOrderOf A n δ ↔ ∃ b, addOrderOf b = n ∧ a ∈ Metric.ball b δ

full_name: addWellApproximable
code: /-- In a seminormed group `A`, given a sequence of distances `δ₁, δ₂, ...`, `wellApproximable A δ`
is the limsup as `n → ∞` of the sets `approxOrderOf A n δₙ`. Thus, it is the set of points that
lie in infinitely many of the sets `approxOrderOf A n δₙ`. -/
@[to_additive addWellApproximable "In a seminormed additive group `A`, given a sequence of
distances `δ₁, δ₂, ...`, `addWellApproximable A δ` is the limsup as `n → ∞` of the sets
`approxAddOrderOf A n δₙ`. Thus, it is the set of points that lie in infinitely many of the sets
`approxAddOrderOf A n δₙ`."]
def wellApproximable (A : Type*) [SeminormedGroup A] (δ : ℕ → ℝ) : Set A 
goal: Set A

full_name: wellApproximable
code: /-- In a seminormed group `A`, given a sequence of distances `δ₁, δ₂, ...`, `wellApproximable A δ`
is the limsup as `n → ∞` of the sets `approxOrderOf A n δₙ`. Thus, it is the set of points that
lie in infinitely many of the sets `approxOrderOf A n δₙ`. -/
@[to_additive addWellApproximable "In a seminormed additive group `A`, given a sequence of
distances `δ₁, δ₂, ...`, `addWellApproximable A δ` is the limsup as `n → ∞` of the sets
`approxAddOrderOf A n δₙ`. Thus, it is the set of points that lie in infinitely many of the sets
`approxAddOrderOf A n δₙ`."]
def wellApproximable (A : Type*) [SeminormedGroup A] (δ : ℕ → ℝ) : Set A 
goal: Set A

full_name: mem_wellApproximable_iff
code: @[to_additive mem_add_wellApproximable_iff]
theorem mem_wellApproximable_iff {A : Type*} [SeminormedGroup A] {δ : ℕ → ℝ} {a : A} :
    a ∈ wellApproximable A δ ↔
      a ∈ blimsup (fun n => approxOrderOf A n (δ n)) atTop fun n => 0 < n 
goal: a ∈ wellApproximable A δ ↔ a ∈ Filter.blimsup (fun n => approxOrderOf A n (δ n)) Filter.atTop fun n => 0 < n

full_name: mem_add_wellApproximable_iff
code: @[to_additive mem_add_wellApproximable_iff]
theorem mem_wellApproximable_iff {A : Type*} [SeminormedGroup A] {δ : ℕ → ℝ} {a : A} :
    a ∈ wellApproximable A δ ↔
      a ∈ blimsup (fun n => approxOrderOf A n (δ n)) atTop fun n => 0 < n 
goal: a ∈ addWellApproximable A δ ↔ a ∈ Filter.blimsup (fun n => approxAddOrderOf A n (δ n)) Filter.atTop fun n => 0 < n

full_name: approxAddOrderOf.image_nsmul_subset_of_coprime
code: @[to_additive]
theorem image_pow_subset_of_coprime (hm : 0 < m) (hmn : n.Coprime m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (m * δ) 
goal: (fun y => m • y) '' approxAddOrderOf A n δ ⊆ approxAddOrderOf A n (↑m * δ)

full_name: approxOrderOf.image_pow_subset_of_coprime
code: @[to_additive]
theorem image_pow_subset_of_coprime (hm : 0 < m) (hmn : n.Coprime m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (m * δ) 
goal: (fun y => y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (↑m * δ)

full_name: approxAddOrderOf.image_nsmul_subset
code: @[to_additive]
theorem image_pow_subset (n : ℕ) (hm : 0 < m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (m * δ) 
goal: (fun y => m • y) '' approxAddOrderOf A (n * m) δ ⊆ approxAddOrderOf A n (↑m * δ)

full_name: approxOrderOf.image_pow_subset
code: @[to_additive]
theorem image_pow_subset (n : ℕ) (hm : 0 < m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (m * δ) 
goal: (fun y => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (↑m * δ)

full_name: approxOrderOf.smul_subset_of_coprime
code: @[to_additive]
theorem smul_subset_of_coprime (han : (orderOf a).Coprime n) :
    a • approxOrderOf A n δ ⊆ approxOrderOf A (orderOf a * n) δ 
goal: a • approxOrderOf A n δ ⊆ approxOrderOf A (orderOf a * n) δ

full_name: approxAddOrderOf.vadd_subset_of_coprime
code: @[to_additive]
theorem smul_subset_of_coprime (han : (orderOf a).Coprime n) :
    a • approxOrderOf A n δ ⊆ approxOrderOf A (orderOf a * n) δ 
goal: a +ᵥ approxAddOrderOf A n δ ⊆ approxAddOrderOf A (addOrderOf a * n) δ

full_name: approxOrderOf.smul_eq_of_mul_dvd
code: @[to_additive vadd_eq_of_mul_dvd]
theorem smul_eq_of_mul_dvd (hn : 0 < n) (han : orderOf a ^ 2 ∣ n) :
    a • approxOrderOf A n δ = approxOrderOf A n δ 
goal: a • approxOrderOf A n δ = approxOrderOf A n δ

full_name: approxAddOrderOf.vadd_eq_of_mul_dvd
code: @[to_additive vadd_eq_of_mul_dvd]
theorem smul_eq_of_mul_dvd (hn : 0 < n) (han : orderOf a ^ 2 ∣ n) :
    a • approxOrderOf A n δ = approxOrderOf A n δ 
goal: a +ᵥ approxAddOrderOf A n δ = approxAddOrderOf A n δ

full_name: UnitAddCircle.mem_approxAddOrderOf_iff
code: theorem mem_approxAddOrderOf_iff {δ : ℝ} {x : UnitAddCircle} {n : ℕ} (hn : 0 < n) :
    x ∈ approxAddOrderOf UnitAddCircle n δ ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑((m : ℝ) / n)‖ < δ 
goal: x ∈ approxAddOrderOf UnitAddCircle n δ ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ

full_name: UnitAddCircle.mem_addWellApproximable_iff
code: theorem mem_addWellApproximable_iff (δ : ℕ → ℝ) (x : UnitAddCircle) :
    x ∈ addWellApproximable UnitAddCircle δ ↔
      {n : ℕ | ∃ m < n, gcd m n = 1 ∧ ‖x - ↑((m : ℝ) / n)‖ < δ n}.Infinite 
goal: x ∈ addWellApproximable UnitAddCircle δ ↔ {n | ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ n}.Infinite

full_name: AddCircle.«_aux_Mathlib_NumberTheory_WellApproximable___macroRules_AddCircle_term_∤__1»
code: local notation a "∤" b => ¬a ∣ b
goal: Lean.Macro

full_name: AddCircle.«_aux_Mathlib_NumberTheory_WellApproximable___macroRules_AddCircle_term_∣∣__1»
code: local notation a "∣∣" b => a ∣ b ∧ (a * a)∤b
goal: Lean.Macro

full_name: AddCircle._aux_Mathlib_NumberTheory_WellApproximable___macroRules_AddCircle_term𝕊_1
code: local notation "𝕊" => AddCircle T
goal: Lean.Macro

full_name: AddCircle._aux_Mathlib_NumberTheory_WellApproximable___unexpand_AddCircle_1
code: local notation "𝕊" => AddCircle T
goal: Lean.PrettyPrinter.Unexpander

full_name: AddCircle.addWellApproximable_ae_empty_or_univ
code: /-- **Gallagher's ergodic theorem** on Diophantine approximation. -/
theorem addWellApproximable_ae_empty_or_univ (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0)) :
    (∀ᵐ x, ¬addWellApproximable 𝕊 δ x) ∨ ∀ᵐ x, addWellApproximable 𝕊 δ x 
goal: (∀ᵐ (x : AddCircle T), ¬addWellApproximable (AddCircle T) δ x) ∨
  ∀ᵐ (x : AddCircle T), addWellApproximable (AddCircle T) δ x

full_name: NormedAddCommGroup.exists_norm_nsmul_le
code: /-- A general version of **Dirichlet's approximation theorem**.

See also `AddCircle.exists_norm_nsmul_le`. -/
lemma _root_.NormedAddCommGroup.exists_norm_nsmul_le {A : Type*}
    [NormedAddCommGroup A] [CompactSpace A] [ConnectedSpace A]
    [MeasurableSpace A] [BorelSpace A] {μ : Measure A} [μ.IsAddHaarMeasure]
    (ξ : A) {n : ℕ} (hn : 0 < n) (δ : ℝ) (hδ : μ univ ≤ (n + 1) • μ (closedBall (0 : A) (δ/2))) :
    ∃ j ∈ Icc 1 n, ‖j • ξ‖ ≤ δ 
goal: ∃ j ∈ Set.Icc 1 n, ‖j • ξ‖ ≤ δ

full_name: AddCircle.exists_norm_nsmul_le
code: /-- **Dirichlet's approximation theorem**

See also `Real.exists_rat_abs_sub_le_and_den_le`. -/
lemma exists_norm_nsmul_le (ξ : 𝕊) {n : ℕ} (hn : 0 < n) :
    ∃ j ∈ Icc 1 n, ‖j • ξ‖ ≤ T / ↑(n + 1) 
goal: ∃ j ∈ Set.Icc 1 n, ‖j • ξ‖ ≤ T / ↑(n + 1)