Theorem: isBigO_norm_Icc_restrict_atBot
File: Mathlib/Analysis/Fourier/PoissonSummation.lean

Proof steps:
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
tactic: have h1 : (f.comp (ContinuousMap.mk _ continuous_neg)) =O[atTop] fun x : ℝ => |x| ^ (-b) := by
    convert hf.comp_tendsto tendsto_neg_atTop_atBot using 1
    ext1 x; simp only [Function.comp_apply, abs_neg]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    ((fun x => |x| ^ (-b)) ∘ Neg.neg)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
tactic: have h2 := (isBigO_norm_Icc_restrict_atTop hb h1 (-S) (-R)).comp_tendsto tendsto_neg_atBot_atTop
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    ((fun x => |x| ^ (-b)) ∘ Neg.neg)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    ((fun x => |x| ^ (-b)) ∘ Neg.neg)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
tactic: have : (fun x : ℝ => |x| ^ (-b)) ∘ Neg.neg = fun x : ℝ => |x| ^ (-b) := by
    ext1 x; simp only [Function.comp_apply, abs_neg]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    ((fun x => |x| ^ (-b)) ∘ Neg.neg)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
tactic: rw [this] at h2
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
⊢ (fun x => ‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖) =O[atBot] fun x => |x| ^ (-b)
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x : ℝ
⊢ ‖‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖‖ ≤
    ‖((fun x =>
            ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
          Neg.neg)
        x‖
tactic: refine (isBigO_of_le _ fun x => ?_).trans h2
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x : ℝ
⊢ ‖‖ContinuousMap.restrict (Icc (x + R) (x + S)) f‖‖ ≤
    ‖((fun x =>
            ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
          Neg.neg)
        x‖
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x : ℝ
⊢ ∀ (x_1 : ↑(Icc (x + R) (x + S))),
    ‖(ContinuousMap.restrict (Icc (x + R) (x + S)) f) x_1‖ ≤
      ‖ContinuousMap.restrict (Icc (-x + -S) (-x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖
tactic: rw [norm_norm, Function.comp_apply, norm_norm, ContinuousMap.norm_le _ (norm_nonneg _)]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x : ℝ
⊢ ∀ (x_1 : ↑(Icc (x + R) (x + S))),
    ‖(ContinuousMap.restrict (Icc (x + R) (x + S)) f) x_1‖ ≤
      ‖ContinuousMap.restrict (Icc (-x + -S) (-x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖
state_after: case mk
E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x✝ x : ℝ
hx : x ∈ Icc (x✝ + R) (x✝ + S)
⊢ ‖(ContinuousMap.restrict (Icc (x✝ + R) (x✝ + S)) f) ⟨x, hx⟩‖ ≤
    ‖ContinuousMap.restrict (Icc (-x✝ + -S) (-x✝ + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖
tactic: rintro ⟨x, hx⟩
state_before: case mk
E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x✝ x : ℝ
hx : x ∈ Icc (x✝ + R) (x✝ + S)
⊢ ‖(ContinuousMap.restrict (Icc (x✝ + R) (x✝ + S)) f) ⟨x, hx⟩‖ ≤
    ‖ContinuousMap.restrict (Icc (-x✝ + -S) (-x✝ + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖
state_after: case mk
E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x✝ x : ℝ
hx : x ∈ Icc (x✝ + R) (x✝ + S)
⊢ ‖f x‖ ≤ ‖ContinuousMap.restrict (Icc (-x✝ + -S) (-x✝ + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖
tactic: rw [ContinuousMap.restrict_apply_mk]
state_before: case mk
E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x✝ x : ℝ
hx : x ∈ Icc (x✝ + R) (x✝ + S)
⊢ ‖f x‖ ≤ ‖ContinuousMap.restrict (Icc (-x✝ + -S) (-x✝ + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖
state_after: case mk.refine_1
E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x✝ x : ℝ
hx : x ∈ Icc (x✝ + R) (x✝ + S)
⊢ ‖f x‖ =
    ‖(ContinuousMap.restrict (Icc (-x✝ + -S) (-x✝ + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }))
        ⟨-x, ?mk.refine_2⟩‖

case mk.refine_2
E : Type u_1
inst✝ : NormedAddCommGroup E
f : C(ℝ, E)
b : ℝ
hb : 0 < b
hf : ⇑f =O[atBot] fun x => |x| ^ (-b)
R S : ℝ
h1 : ⇑(f.comp { toFun := fun a => -a, continuous_toFun := ⋯ }) =O[atTop] fun x => |x| ^ (-b)
h2 :
  ((fun x =>
        ‖ContinuousMap.restrict (Icc (x + -S) (x + -R)) (f.comp { toFun := fun a => -a, continuous_toFun := ⋯ })‖) ∘
      Neg.neg) =O[atBot]
    fun x => |x| ^ (-b)
this : (fun x => |x| ^ (-b)) ∘ Neg.neg = fun x => |x| ^ (-b)
x✝ x : ℝ
hx : x ∈ Icc (x✝ + R) (x✝ + S)
⊢ -x ∈ Icc (-x✝ + -S) (-x✝ + -R)
tactic: refine (le_of_eq ?_).trans (ContinuousMap.norm_coe_le_norm _ ⟨-x, ?_⟩)