internlm/Lean-Github huggingface dataset:
Theorem: localOscillation_of_integer_linear
Proof state before:
case neg.a
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case neg.a
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 2 * R * |↑n - ↑m| ≤ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
. calc ⨆ z ∈ (Metric.ball x R) ×ˢ (Metric.ball x R), ‖(n - m) * (z.1 - x) - (n - m) * (z.2 - x)‖
    _ ≤ 2 * R * |↑n - ↑m| := by
      apply Real.iSup_le
      intro z
      apply Real.iSup_le
      . intro hz
        simp at hz
        rw [Real.dist_eq, Real.dist_eq] at hz
        rw [Real.norm_eq_abs]
        calc |(n - m) * (z.1 - x) - (n - m) * (z.2 - x)|
        _ ≤ |(n - m) * (z.1 - x)| + |(n - m) * (z.2 - x)| := by apply abs_sub
        _ = |↑n - ↑m| * |z.1 - x| + |↑n - ↑m| * |z.2 - x| := by congr <;> apply abs_mul
        _ ≤ |↑n - ↑m| * R + |↑n - ↑m| * R := by gcongr; linarith [hz.1]; linarith [hz.2]
        _ = 2 * R * |↑n - ↑m| := by ring
      repeat
        apply mul_nonneg
        linarith
        apply abs_nonneg
Proof state after:
case neg.a
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 2 * R * |↑n - ↑m| ≤ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Theorem: localOscillation_of_integer_linear
Proof state before:
case neg.a
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 2 * R * |↑n - ↑m| ≤ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
. apply le_of_forall_lt
  intro c hc
  have := fact_isCompact_ball x R
  by_cases c_nonneg : 0 > c
  . calc c
      _ < 0 := c_nonneg
      _ ≤ @dist (withLocalOscillation (Metric.ball x R)) PseudoMetricSpace.toDist (θ n) (θ m) := dist_nonneg
      _ = localOscillation (Metric.ball x R) (θ n) (θ m) := rfl
      _ = ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ := by
        rw [localOscillation]
        congr
        ext z
        congr
        rw [norm_integer_linear_eq]
  push_neg at c_nonneg
  set R' := (c + 2 * R * |(n : ℝ) - m|) / (4 * |(n : ℝ) - m|) with R'def
  have hR' : 0 ≤ R' ∧ R' < R := by
    rw [R'def]
    constructor
    . positivity
    calc (c + 2 * R * |↑n - ↑m|) / (4 * |↑n - ↑m|)
      _ < (2 * R * |↑n - ↑m| + 2 * R * |↑n - ↑m|) / (4 * |↑n - ↑m|) := by
        gcongr
      _ = R := by
        ring_nf
        rw [mul_assoc, mul_inv_cancel norm_n_sub_m_pos.ne.symm, mul_one]
  let y := (x - R', x + R')
  calc c
    _ = c / 2 + c / 2 := by ring
    _ < c / 2 + (2 * R * |↑n - ↑m|) / 2 := by
      gcongr
    _ = 2 * R' * |↑n - ↑m| := by
      rw [R'def]
      ring_nf
      rw [pow_two, ←mul_assoc, mul_assoc c, mul_inv_cancel norm_n_sub_m_pos.ne.symm, mul_assoc (R * _), mul_inv_cancel norm_n_sub_m_pos.ne.symm]
      ring
    _ ≤ ‖(↑n - ↑m) * (y.1 - x) - (↑n - ↑m) * (y.2 - x)‖ := by
      simp
      rw [sub_eq_add_neg (-((n - m) * R')), ←neg_add, abs_neg, ←two_mul, abs_mul, abs_mul, mul_comm |(n : ℝ) - m|, mul_assoc]
      simp
      gcongr
      apply le_abs_self
    _ ≤ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ := by
      apply ConditionallyCompleteLattice.le_biSup
      . convert bddAbove_localOscillation (Metric.ball x R) (θ n) (θ m)
        apply norm_integer_linear_eq.symm
      . use y
        simp
        rw [abs_of_nonneg]
        exact hR'.2
        exact hR'.1
Proof state after:
no goals
Theorem: localOscillation_of_integer_linear
Proof state before:
case pos
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n = m
⊢ localOscillation (Metric.ball x R) (θ n) (θ m) = 2 * R * |↑n - ↑m|
Tactic:
rw [n_ne_m]
Proof state after:
case pos
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n = m
⊢ localOscillation (Metric.ball x R) (θ m) (θ m) = 2 * R * |↑m - ↑m|
Theorem: localOscillation_of_integer_linear
Proof state before:
case pos
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n = m
⊢ localOscillation (Metric.ball x R) (θ m) (θ m) = 2 * R * |↑m - ↑m|
Tactic:
simp
Proof state after:
case pos
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n = m
⊢ localOscillation (Metric.ball x R) (θ m) (θ m) = 0
Theorem: localOscillation_of_integer_linear
Proof state before:
case pos
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n = m
⊢ localOscillation (Metric.ball x R) (θ m) (θ m) = 0
Tactic:
apply localOscillation_of_same
Proof state after:
no goals
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
⊢ 0 < |↑n - ↑m|
Tactic:
simp
Proof state after:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
⊢ ¬↑n - ↑m = 0
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
⊢ ¬↑n - ↑m = 0
Tactic:
rwa [sub_eq_zero, Int.cast_inj]
Proof state after:
no goals
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
rw [←Complex.norm_real, integer_linear, integer_linear]
Proof state after:
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ ‖{ toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.1 - { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.1 -
          { toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.2 +
        { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.2‖ =
    ‖↑((↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x))‖
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ ‖{ toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.1 - { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.1 -
          { toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.2 +
        { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.2‖ =
    ‖↑((↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x))‖
Tactic:
congr 1
Proof state after:
case e_a
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ { toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.1 - { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.1 -
        { toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.2 +
      { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.2 =
    ↑((↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x))
Theorem: localOscillation_of_integer_linear
Proof state before:
case e_a
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ { toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.1 - { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.1 -
        { toFun := fun x => ↑n * ↑x, continuous_toFun := ⋯ } z.2 +
      { toFun := fun x => ↑m * ↑x, continuous_toFun := ⋯ } z.2 =
    ↑((↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x))
Tactic:
simp
Proof state after:
case e_a
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ ↑n * ↑z.1 - ↑m * ↑z.1 - ↑n * ↑z.2 + ↑m * ↑z.2 = (↑n - ↑m) * (↑z.1 - ↑x) - (↑n - ↑m) * (↑z.2 - ↑x)
Theorem: localOscillation_of_integer_linear
Proof state before:
case e_a
x R : ℝ
R_nonneg : 0 ≤ R
n✝ m✝ : ℤ
n_ne_m : n✝ ≠ m✝
norm_n_sub_m_pos : 0 < |↑n✝ - ↑m✝|
n m : ℤ
z : ℝ × ℝ
⊢ ↑n * ↑z.1 - ↑m * ↑z.1 - ↑n * ↑z.2 + ↑m * ↑z.2 = (↑n - ↑m) * (↑z.1 - ↑x) - (↑n - ↑m) * (↑z.2 - ↑x)
Tactic:
ring
Proof state after:
no goals
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
rw [localOscillation]
Proof state after:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
congr
Proof state after:
case e_s
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ (fun z => ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖) = fun z =>
    ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Theorem: localOscillation_of_integer_linear
Proof state before:
case e_s
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ (fun z => ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖) = fun z =>
    ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
ext z
Proof state after:
case e_s.h
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ =
    ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Theorem: localOscillation_of_integer_linear
Proof state before:
case e_s.h
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ =
    ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
Tactic:
rw [norm_integer_linear_eq]
Proof state after:
no goals
Theorem: localOscillation_of_integer_linear
Proof state before:
case neg.a
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|
Tactic:
calc ⨆ z ∈ (Metric.ball x R) ×ˢ (Metric.ball x R), ‖(n - m) * (z.1 - x) - (n - m) * (z.2 - x)‖
  _ ≤ 2 * R * |↑n - ↑m| := by
    apply Real.iSup_le
    intro z
    apply Real.iSup_le
    . intro hz
      simp at hz
      rw [Real.dist_eq, Real.dist_eq] at hz
      rw [Real.norm_eq_abs]
      calc |(n - m) * (z.1 - x) - (n - m) * (z.2 - x)|
      _ ≤ |(n - m) * (z.1 - x)| + |(n - m) * (z.2 - x)| := by apply abs_sub
      _ = |↑n - ↑m| * |z.1 - x| + |↑n - ↑m| * |z.2 - x| := by congr <;> apply abs_mul
      _ ≤ |↑n - ↑m| * R + |↑n - ↑m| * R := by gcongr; linarith [hz.1]; linarith [hz.2]
      _ = 2 * R * |↑n - ↑m| := by ring
    repeat
      apply mul_nonneg
      linarith
      apply abs_nonneg
Proof state after:
no goals
Theorem: localOscillation_of_integer_linear
Proof state before:
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|
Tactic:
apply Real.iSup_le
Proof state after:
case hS
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ∀ (i : ℝ × ℝ),
    ⨆ (_ : i ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (i.1 - x) - (↑n - ↑m) * (i.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Theorem: localOscillation_of_integer_linear
Proof state before:
case hS
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ ∀ (i : ℝ × ℝ),
    ⨆ (_ : i ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (i.1 - x) - (↑n - ↑m) * (i.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Tactic:
intro z
Proof state after:
case hS
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Theorem: localOscillation_of_integer_linear
Proof state before:
case hS
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ ⨆ (_ : z ∈ Metric.ball x R ×ˢ Metric.ball x R), ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Tactic:
apply Real.iSup_le
Proof state after:
case hS.hS
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ z ∈ Metric.ball x R ×ˢ Metric.ball x R → ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case hS.ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ 0 ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Theorem: localOscillation_of_integer_linear
Proof state before:
case hS.hS
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ z ∈ Metric.ball x R ×ˢ Metric.ball x R → ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖ ≤ 2 * R * |↑n - ↑m|

case hS.ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ 0 ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Tactic:
. intro hz
  simp at hz
  rw [Real.dist_eq, Real.dist_eq] at hz
  rw [Real.norm_eq_abs]
  calc |(n - m) * (z.1 - x) - (n - m) * (z.2 - x)|
  _ ≤ |(n - m) * (z.1 - x)| + |(n - m) * (z.2 - x)| := by apply abs_sub
  _ = |↑n - ↑m| * |z.1 - x| + |↑n - ↑m| * |z.2 - x| := by congr <;> apply abs_mul
  _ ≤ |↑n - ↑m| * R + |↑n - ↑m| * R := by gcongr; linarith [hz.1]; linarith [hz.2]
  _ = 2 * R * |↑n - ↑m| := by ring
Proof state after:
case hS.ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ 0 ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Theorem: localOscillation_of_integer_linear
Proof state before:
case hS.ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
z : ℝ × ℝ
⊢ 0 ≤ 2 * R * |↑n - ↑m|

case ha
x R : ℝ
R_nonneg : 0 ≤ R
n m : ℤ
n_ne_m : n ≠ m
norm_n_sub_m_pos : 0 < |↑n - ↑m|
norm_integer_linear_eq :
  ∀ {n m : ℤ} {z : ℝ × ℝ},
    ‖(θ n) z.1 - (θ m) z.1 - (θ n) z.2 + (θ m) z.2‖ = ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
localOscillation_eq :
  localOscillation (Metric.ball x R) (θ n) (θ m) =
    ⨆ z ∈ Metric.ball x R ×ˢ Metric.ball x R, ‖(↑n - ↑m) * (z.1 - x) - (↑n - ↑m) * (z.2 - x)‖
⊢ 0 ≤ 2 * R * |↑n - ↑m|
Tactic:
repeat
  apply mul_nonneg
  linarith
  apply abs_nonneg
Proof state after:
no goals