[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
rcases eq_empty_or_nonempty s with (rfl | hs)
[GOAL]
case inl
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
f' : E → E →L[ℝ] F
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      ∅ ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (∅ ∩ t n) (r (A n))) ∧
          (Set.Nonempty ∅ → ∀ (n : ℕ), ∃ y, y ∈ ∅ ∧ A n = f' y)
[PROOFSTEP]
refine' ⟨fun _ => ∅, fun _ => 0, _, _, _, _⟩
[GOAL]
case inl.refine'_1
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
f' : E → E →L[ℝ] F
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x
⊢ ∀ (n : ℕ), IsClosed ((fun x => ∅) n)
[PROOFSTEP]
simp
  -- we will use countably many linear maps. Select these from all the derivatives since the
    -- space of linear maps is second-countable
[GOAL]
case inl.refine'_2
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
f' : E → E →L[ℝ] F
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x
⊢ ∅ ⊆ ⋃ (n : ℕ), (fun x => ∅) n
[PROOFSTEP]
simp
  -- we will use countably many linear maps. Select these from all the derivatives since the
    -- space of linear maps is second-countable
[GOAL]
case inl.refine'_3
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
f' : E → E →L[ℝ] F
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x
⊢ ∀ (n : ℕ), ApproximatesLinearOn f ((fun x => 0) n) (∅ ∩ (fun x => ∅) n) (r ((fun x => 0) n))
[PROOFSTEP]
simp
  -- we will use countably many linear maps. Select these from all the derivatives since the
    -- space of linear maps is second-countable
[GOAL]
case inl.refine'_4
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
f' : E → E →L[ℝ] F
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x
⊢ Set.Nonempty ∅ → ∀ (n : ℕ), ∃ y, y ∈ ∅ ∧ (fun x => 0) n = f' y
[PROOFSTEP]
simp
  -- we will use countably many linear maps. Select these from all the derivatives since the
    -- space of linear maps is second-countable
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
obtain ⟨T, T_count, hT⟩ :
  ∃ T : Set s, T.Countable ∧ ⋃ x ∈ T, ball (f' (x : E)) (r (f' x)) = ⋃ x : s, ball (f' x) (r (f' x)) :=
  TopologicalSpace.isOpen_iUnion_countable _ fun x => isOpen_ball
[GOAL]
case inr.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
obtain ⟨u, _, u_pos, u_lim⟩ : ∃ u : ℕ → ℝ, StrictAnti u ∧ (∀ n : ℕ, 0 < u n) ∧ Tendsto u atTop (𝓝 0) :=
  exists_seq_strictAnti_tendsto
    (0 : ℝ)
      -- `M n z` is the set of points `x` such that `f y - f x` is close to `f' z (y - x)` for `y`
        -- in the ball of radius `u n` around `x`.
[GOAL]
case inr.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
let M : ℕ → T → Set E := fun n z =>
  {x | x ∈ s ∧ ∀ y ∈ s ∩ ball x (u n), ‖f y - f x - f' z (y - x)‖ ≤ r (f' z) * ‖y - x‖}
    -- As `f` is differentiable everywhere on `s`, the sets `M n z` cover `s` by design.
[GOAL]
case inr.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
have s_subset : ∀ x ∈ s, ∃ (n : ℕ) (z : T), x ∈ M n z :=
  by
  intro x xs
  obtain ⟨z, zT, hz⟩ : ∃ z ∈ T, f' x ∈ ball (f' (z : E)) (r (f' z)) :=
    by
    have : f' x ∈ ⋃ z ∈ T, ball (f' (z : E)) (r (f' z)) :=
      by
      rw [hT]
      refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩
      simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt
    rwa [mem_iUnion₂, bex_def] at this
  obtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ ‖f' x - f' z‖ + ε ≤ r (f' z) :=
    by
    refine' ⟨r (f' z) - ‖f' x - f' z‖, _, le_of_eq (by abel)⟩
    simpa only [sub_pos] using mem_ball_iff_norm.mp hz
  obtain ⟨δ, δpos, hδ⟩ : ∃ (δ : ℝ), 0 < δ ∧ ball x δ ∩ s ⊆ {y | ‖f y - f x - (f' x) (y - x)‖ ≤ ε * ‖y - x‖} :=
    Metric.mem_nhdsWithin_iff.1 (IsLittleO.def (hf' x xs) εpos)
  obtain ⟨n, hn⟩ : ∃ n, u n < δ := ((tendsto_order.1 u_lim).2 _ δpos).exists
  refine' ⟨n, ⟨z, zT⟩, ⟨xs, _⟩⟩
  intro y hy
  calc
    ‖f y - f x - (f' z) (y - x)‖ = ‖f y - f x - (f' x) (y - x) + (f' x - f' z) (y - x)‖ :=
      by
      congr 1
      simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]
      abel
    _ ≤ ‖f y - f x - (f' x) (y - x)‖ + ‖(f' x - f' z) (y - x)‖ := (norm_add_le _ _)
    _ ≤ ε * ‖y - x‖ + ‖f' x - f' z‖ * ‖y - x‖ :=
      by
      refine' add_le_add (hδ _) (ContinuousLinearMap.le_op_norm _ _)
      rw [inter_comm]
      exact inter_subset_inter_right _ (ball_subset_ball hn.le) hy
    _ ≤ r (f' z) * ‖y - x‖ := by
      rw [← add_mul, add_comm]
      exact
        mul_le_mul_of_nonneg_right hε
          (norm_nonneg _)
            -- the sets `M n z` are relatively closed in `s`, as all the conditions defining it are clearly
              -- closed
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
⊢ ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
[PROOFSTEP]
intro x xs
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
⊢ ∃ n z, x ∈ M n z
[PROOFSTEP]
obtain ⟨z, zT, hz⟩ : ∃ z ∈ T, f' x ∈ ball (f' (z : E)) (r (f' z)) :=
  by
  have : f' x ∈ ⋃ z ∈ T, ball (f' (z : E)) (r (f' z)) := by
    rw [hT]
    refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩
    simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt
  rwa [mem_iUnion₂, bex_def] at this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
⊢ ∃ z, z ∈ T ∧ f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
[PROOFSTEP]
have : f' x ∈ ⋃ z ∈ T, ball (f' (z : E)) (r (f' z)) := by
  rw [hT]
  refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩
  simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
⊢ f' x ∈ ⋃ (z : ↑s) (_ : z ∈ T), ball (f' ↑z) ↑(r (f' ↑z))
[PROOFSTEP]
rw [hT]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
⊢ f' x ∈ ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
[PROOFSTEP]
refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
⊢ f' x ∈ ball (f' ↑{ val := x, property := xs }) ↑(r (f' ↑{ val := x, property := xs }))
[PROOFSTEP]
simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
this : f' x ∈ ⋃ (z : ↑s) (_ : z ∈ T), ball (f' ↑z) ↑(r (f' ↑z))
⊢ ∃ z, z ∈ T ∧ f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
[PROOFSTEP]
rwa [mem_iUnion₂, bex_def] at this
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
⊢ ∃ n z, x ∈ M n z
[PROOFSTEP]
obtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ ‖f' x - f' z‖ + ε ≤ r (f' z) :=
  by
  refine' ⟨r (f' z) - ‖f' x - f' z‖, _, le_of_eq (by abel)⟩
  simpa only [sub_pos] using mem_ball_iff_norm.mp hz
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
⊢ ∃ ε, 0 < ε ∧ ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
[PROOFSTEP]
refine' ⟨r (f' z) - ‖f' x - f' z‖, _, le_of_eq (by abel)⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
⊢ ‖f' x - f' ↑z‖ + (↑(r (f' ↑z)) - ‖f' x - f' ↑z‖) = ↑(r (f' ↑z))
[PROOFSTEP]
abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
⊢ ‖f' x - f' ↑z‖ + (↑(r (f' ↑z)) - ‖f' x - f' ↑z‖) = ↑(r (f' ↑z))
[PROOFSTEP]
abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
⊢ 0 < ↑(r (f' ↑z)) - ‖f' x - f' ↑z‖
[PROOFSTEP]
simpa only [sub_pos] using mem_ball_iff_norm.mp hz
[GOAL]
case intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
⊢ ∃ n z, x ∈ M n z
[PROOFSTEP]
obtain ⟨δ, δpos, hδ⟩ : ∃ (δ : ℝ), 0 < δ ∧ ball x δ ∩ s ⊆ {y | ‖f y - f x - (f' x) (y - x)‖ ≤ ε * ‖y - x‖} :=
  Metric.mem_nhdsWithin_iff.1 (IsLittleO.def (hf' x xs) εpos)
[GOAL]
case intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
⊢ ∃ n z, x ∈ M n z
[PROOFSTEP]
obtain ⟨n, hn⟩ : ∃ n, u n < δ := ((tendsto_order.1 u_lim).2 _ δpos).exists
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
⊢ ∃ n z, x ∈ M n z
[PROOFSTEP]
refine' ⟨n, ⟨z, zT⟩, ⟨xs, _⟩⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
⊢ ∀ (y : E),
    y ∈ s ∩ ball x (u n) →
      ‖f y - f x - ↑(f' ↑↑{ val := z, property := zT }) (y - x)‖ ≤ ↑(r (f' ↑↑{ val := z, property := zT })) * ‖y - x‖
[PROOFSTEP]
intro y hy
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ ‖f y - f x - ↑(f' ↑↑{ val := z, property := zT }) (y - x)‖ ≤ ↑(r (f' ↑↑{ val := z, property := zT })) * ‖y - x‖
[PROOFSTEP]
calc
  ‖f y - f x - (f' z) (y - x)‖ = ‖f y - f x - (f' x) (y - x) + (f' x - f' z) (y - x)‖ :=
    by
    congr 1
    simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]
    abel
  _ ≤ ‖f y - f x - (f' x) (y - x)‖ + ‖(f' x - f' z) (y - x)‖ := (norm_add_le _ _)
  _ ≤ ε * ‖y - x‖ + ‖f' x - f' z‖ * ‖y - x‖ :=
    by
    refine' add_le_add (hδ _) (ContinuousLinearMap.le_op_norm _ _)
    rw [inter_comm]
    exact inter_subset_inter_right _ (ball_subset_ball hn.le) hy
  _ ≤ r (f' z) * ‖y - x‖ := by
    rw [← add_mul, add_comm]
    exact
      mul_le_mul_of_nonneg_right hε
        (norm_nonneg _)
          -- the sets `M n z` are relatively closed in `s`, as all the conditions defining it are clearly
            -- closed
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ ‖f y - f x - ↑(f' ↑z) (y - x)‖ = ‖f y - f x - ↑(f' x) (y - x) + ↑(f' x - f' ↑z) (y - x)‖
[PROOFSTEP]
congr 1
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ f y - f x - ↑(f' ↑z) (y - x) = f y - f x - ↑(f' x) (y - x) + ↑(f' x - f' ↑z) (y - x)
[PROOFSTEP]
simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ f y - f x - (↑(f' ↑z) y - ↑(f' ↑z) x) =
    f y - f x - (↑(f' x) y - ↑(f' x) x) + (↑(f' x) y - ↑(f' ↑z) y - (↑(f' x) x - ↑(f' ↑z) x))
[PROOFSTEP]
abel
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ f y - f x - (↑(f' ↑z) y - ↑(f' ↑z) x) =
    f y - f x - (↑(f' x) y - ↑(f' x) x) + (↑(f' x) y - ↑(f' ↑z) y - (↑(f' x) x - ↑(f' ↑z) x))
[PROOFSTEP]
abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ ‖f y - f x - ↑(f' x) (y - x)‖ + ‖↑(f' x - f' ↑z) (y - x)‖ ≤ ε * ‖y - x‖ + ‖f' x - f' ↑z‖ * ‖y - x‖
[PROOFSTEP]
refine' add_le_add (hδ _) (ContinuousLinearMap.le_op_norm _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ y ∈ ball x δ ∩ s
[PROOFSTEP]
rw [inter_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ y ∈ s ∩ ball x δ
[PROOFSTEP]
exact inter_subset_inter_right _ (ball_subset_ball hn.le) hy
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ ε * ‖y - x‖ + ‖f' x - f' ↑z‖ * ‖y - x‖ ≤ ↑(r (f' ↑z)) * ‖y - x‖
[PROOFSTEP]
rw [← add_mul, add_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
x : E
xs : x ∈ s
z : ↑s
zT : z ∈ T
hz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))
ε : ℝ
εpos : 0 < ε
hε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))
δ : ℝ
δpos : 0 < δ
hδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
n : ℕ
hn : u n < δ
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ (‖f' x - f' ↑z‖ + ε) * ‖y - x‖ ≤ ↑(r (f' ↑z)) * ‖y - x‖
[PROOFSTEP]
exact
  mul_le_mul_of_nonneg_right hε
    (norm_nonneg _)
      -- the sets `M n z` are relatively closed in `s`, as all the conditions defining it are clearly
        -- closed
[GOAL]
case inr.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
have closure_M_subset : ∀ n z, s ∩ closure (M n z) ⊆ M n z :=
  by
  rintro n z x ⟨xs, hx⟩
  refine' ⟨xs, fun y hy => _⟩
  obtain ⟨a, aM, a_lim⟩ : ∃ a : ℕ → E, (∀ k, a k ∈ M n z) ∧ Tendsto a atTop (𝓝 x) := mem_closure_iff_seq_limit.1 hx
  have L1 : Tendsto (fun k : ℕ => ‖f y - f (a k) - (f' z) (y - a k)‖) atTop (𝓝 ‖f y - f x - (f' z) (y - x)‖) :=
    by
    apply Tendsto.norm
    have L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x)) :=
      by
      apply (hf' x xs).continuousWithinAt.tendsto.comp
      apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim
      exact eventually_of_forall fun k => (aM k).1
    apply Tendsto.sub (tendsto_const_nhds.sub L)
    exact ((f' z).continuous.tendsto _).comp (tendsto_const_nhds.sub a_lim)
  have L2 : Tendsto (fun k : ℕ => (r (f' z) : ℝ) * ‖y - a k‖) atTop (𝓝 (r (f' z) * ‖y - x‖)) :=
    (tendsto_const_nhds.sub a_lim).norm.const_mul _
  have I : ∀ᶠ k in atTop, ‖f y - f (a k) - (f' z) (y - a k)‖ ≤ r (f' z) * ‖y - a k‖ :=
    by
    have L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x)) := tendsto_const_nhds.dist a_lim
    filter_upwards [(tendsto_order.1 L).2 _ hy.2]
    intro k hk
    exact (aM k).2 y ⟨hy.1, hk⟩
  exact le_of_tendsto_of_tendsto L1 L2 I
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
⊢ ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
[PROOFSTEP]
rintro n z x ⟨xs, hx⟩
[GOAL]
case intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
⊢ x ∈ M n z
[PROOFSTEP]
refine' ⟨xs, fun y hy => _⟩
[GOAL]
case intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖
[PROOFSTEP]
obtain ⟨a, aM, a_lim⟩ : ∃ a : ℕ → E, (∀ k, a k ∈ M n z) ∧ Tendsto a atTop (𝓝 x) := mem_closure_iff_seq_limit.1 hx
[GOAL]
case intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖
[PROOFSTEP]
have L1 : Tendsto (fun k : ℕ => ‖f y - f (a k) - (f' z) (y - a k)‖) atTop (𝓝 ‖f y - f x - (f' z) (y - x)‖) :=
  by
  apply Tendsto.norm
  have L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x)) :=
    by
    apply (hf' x xs).continuousWithinAt.tendsto.comp
    apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim
    exact eventually_of_forall fun k => (aM k).1
  apply Tendsto.sub (tendsto_const_nhds.sub L)
  exact ((f' z).continuous.tendsto _).comp (tendsto_const_nhds.sub a_lim)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
⊢ Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
[PROOFSTEP]
apply Tendsto.norm
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
⊢ Tendsto (fun x => f y - f (a x) - ↑(f' ↑↑z) (y - a x)) atTop (𝓝 (f y - f x - ↑(f' ↑↑z) (y - x)))
[PROOFSTEP]
have L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x)) :=
  by
  apply (hf' x xs).continuousWithinAt.tendsto.comp
  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim
  exact eventually_of_forall fun k => (aM k).1
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
⊢ Tendsto (fun k => f (a k)) atTop (𝓝 (f x))
[PROOFSTEP]
apply (hf' x xs).continuousWithinAt.tendsto.comp
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
⊢ Tendsto (fun k => a k) atTop (𝓝[s] x)
[PROOFSTEP]
apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
⊢ ∀ᶠ (x : ℕ) in atTop, a x ∈ s
[PROOFSTEP]
exact eventually_of_forall fun k => (aM k).1
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x))
⊢ Tendsto (fun x => f y - f (a x) - ↑(f' ↑↑z) (y - a x)) atTop (𝓝 (f y - f x - ↑(f' ↑↑z) (y - x)))
[PROOFSTEP]
apply Tendsto.sub (tendsto_const_nhds.sub L)
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x))
⊢ Tendsto (fun x => ↑(f' ↑↑z) (y - a x)) atTop (𝓝 (↑(f' ↑↑z) (y - x)))
[PROOFSTEP]
exact ((f' z).continuous.tendsto _).comp (tendsto_const_nhds.sub a_lim)
[GOAL]
case intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖
[PROOFSTEP]
have L2 : Tendsto (fun k : ℕ => (r (f' z) : ℝ) * ‖y - a k‖) atTop (𝓝 (r (f' z) * ‖y - x‖)) :=
  (tendsto_const_nhds.sub a_lim).norm.const_mul _
[GOAL]
case intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
L2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))
⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖
[PROOFSTEP]
have I : ∀ᶠ k in atTop, ‖f y - f (a k) - (f' z) (y - a k)‖ ≤ r (f' z) * ‖y - a k‖ :=
  by
  have L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x)) := tendsto_const_nhds.dist a_lim
  filter_upwards [(tendsto_order.1 L).2 _ hy.2]
  intro k hk
  exact (aM k).2 y ⟨hy.1, hk⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
L2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))
⊢ ∀ᶠ (k : ℕ) in atTop, ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖
[PROOFSTEP]
have L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x)) := tendsto_const_nhds.dist a_lim
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
L2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))
L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x))
⊢ ∀ᶠ (k : ℕ) in atTop, ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖
[PROOFSTEP]
filter_upwards [(tendsto_order.1 L).2 _ hy.2]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
L2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))
L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x))
⊢ ∀ (a_1 : ℕ), dist y (a a_1) < u n → ‖f y - f (a a_1) - ↑(f' ↑↑z) (y - a a_1)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a a_1‖
[PROOFSTEP]
intro k hk
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
L2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))
L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x))
k : ℕ
hk : dist y (a k) < u n
⊢ ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖
[PROOFSTEP]
exact (aM k).2 y ⟨hy.1, hk⟩
[GOAL]
case intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
n : ℕ
z : ↑T
x : E
xs : x ∈ s
hx : x ∈ closure (M n z)
y : E
hy : y ∈ s ∩ ball x (u n)
a : ℕ → E
aM : ∀ (k : ℕ), a k ∈ M n z
a_lim : Tendsto a atTop (𝓝 x)
L1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)
L2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))
I : ∀ᶠ (k : ℕ) in atTop, ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖
⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖
[PROOFSTEP]
exact le_of_tendsto_of_tendsto L1 L2 I
[GOAL]
case inr.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
rcases TopologicalSpace.exists_dense_seq E with
  ⟨d, hd⟩
    -- split `M n z` into subsets `K n z p` of small diameters by intersecting with the ball
      -- `closedBall (d p) (u n / 3)`.
[GOAL]
case inr.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
let K : ℕ → T → ℕ → Set E := fun n z p =>
  closure (M n z) ∩
    closedBall (d p)
      (u n / 3)
        -- on the sets `K n z p`, the map `f` is well approximated by `f' z` by design.
[GOAL]
case inr.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
have K_approx : ∀ (n) (z : T) (p), ApproximatesLinearOn f (f' z) (s ∩ K n z p) (r (f' z)) :=
  by
  intro n z p x hx y hy
  have yM : y ∈ M n z := closure_M_subset _ _ ⟨hy.1, hy.2.1⟩
  refine' yM.2 _ ⟨hx.1, _⟩
  calc
    dist x y ≤ dist x (d p) + dist y (d p) := dist_triangle_right _ _ _
    _ ≤ u n / 3 + u n / 3 := (add_le_add hx.2.2 hy.2.2)
    _ < u n := by
      linarith [u_pos n]
        -- the sets `K n z p` are also closed, again by design.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
⊢ ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
[PROOFSTEP]
intro n z p x hx y hy
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
n : ℕ
z : ↑T
p : ℕ
x : E
hx : x ∈ s ∩ K n z p
y : E
hy : y ∈ s ∩ K n z p
⊢ ‖f x - f y - ↑(f' ↑↑z) (x - y)‖ ≤ ↑(r (f' ↑↑z)) * ‖x - y‖
[PROOFSTEP]
have yM : y ∈ M n z := closure_M_subset _ _ ⟨hy.1, hy.2.1⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
n : ℕ
z : ↑T
p : ℕ
x : E
hx : x ∈ s ∩ K n z p
y : E
hy : y ∈ s ∩ K n z p
yM : y ∈ M n z
⊢ ‖f x - f y - ↑(f' ↑↑z) (x - y)‖ ≤ ↑(r (f' ↑↑z)) * ‖x - y‖
[PROOFSTEP]
refine' yM.2 _ ⟨hx.1, _⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
n : ℕ
z : ↑T
p : ℕ
x : E
hx : x ∈ s ∩ K n z p
y : E
hy : y ∈ s ∩ K n z p
yM : y ∈ M n z
⊢ x ∈ ball y (u n)
[PROOFSTEP]
calc
  dist x y ≤ dist x (d p) + dist y (d p) := dist_triangle_right _ _ _
  _ ≤ u n / 3 + u n / 3 := (add_le_add hx.2.2 hy.2.2)
  _ < u n := by
    linarith [u_pos n]
      -- the sets `K n z p` are also closed, again by design.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
n : ℕ
z : ↑T
p : ℕ
x : E
hx : x ∈ s ∩ K n z p
y : E
hy : y ∈ s ∩ K n z p
yM : y ∈ M n z
⊢ u n / 3 + u n / 3 < u n
[PROOFSTEP]
linarith [u_pos n]
  -- the sets `K n z p` are also closed, again by design.
[GOAL]
case inr.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
have K_closed : ∀ (n) (z : T) (p), IsClosed (K n z p) := fun n z p => isClosed_closure.inter isClosed_ball
[GOAL]
case inr.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
obtain ⟨F, hF⟩ : ∃ F : ℕ → ℕ × T × ℕ, Function.Surjective F :=
  by
  haveI : Encodable T := T_count.toEncodable
  have : Nonempty T := by
    rcases eq_empty_or_nonempty T with (rfl | hT)
    · rcases hs with ⟨x, xs⟩
      rcases s_subset x xs with ⟨n, z, _⟩
      exact False.elim z.2
    · exact hT.coe_sort
  inhabit ↥T
  exact
    ⟨_, Encodable.surjective_decode_iget (ℕ × T × ℕ)⟩
      -- these sets `t q = K n z p` will do
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
⊢ ∃ F, Function.Surjective F
[PROOFSTEP]
haveI : Encodable T := T_count.toEncodable
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
this : Encodable ↑T
⊢ ∃ F, Function.Surjective F
[PROOFSTEP]
have : Nonempty T := by
  rcases eq_empty_or_nonempty T with (rfl | hT)
  · rcases hs with ⟨x, xs⟩
    rcases s_subset x xs with ⟨n, z, _⟩
    exact False.elim z.2
  · exact hT.coe_sort
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
this : Encodable ↑T
⊢ Nonempty ↑T
[PROOFSTEP]
rcases eq_empty_or_nonempty T with (rfl | hT)
[GOAL]
case inl
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
d : ℕ → E
hd : DenseRange d
T_count : Set.Countable ∅
hT : ⋃ (x : ↑s) (_ : x ∈ ∅), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
M : ℕ → ↑∅ → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑∅), s ∩ closure (M n z) ⊆ M n z
K : ℕ → ↑∅ → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), IsClosed (K n z p)
this : Encodable ↑∅
⊢ Nonempty ↑∅
[PROOFSTEP]
rcases hs with ⟨x, xs⟩
[GOAL]
case inl.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
d : ℕ → E
hd : DenseRange d
T_count : Set.Countable ∅
hT : ⋃ (x : ↑s) (_ : x ∈ ∅), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
M : ℕ → ↑∅ → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑∅), s ∩ closure (M n z) ⊆ M n z
K : ℕ → ↑∅ → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), IsClosed (K n z p)
this : Encodable ↑∅
x : E
xs : x ∈ s
⊢ Nonempty ↑∅
[PROOFSTEP]
rcases s_subset x xs with ⟨n, z, _⟩
[GOAL]
case inl.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
d : ℕ → E
hd : DenseRange d
T_count : Set.Countable ∅
hT : ⋃ (x : ↑s) (_ : x ∈ ∅), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
M : ℕ → ↑∅ → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑∅), s ∩ closure (M n z) ⊆ M n z
K : ℕ → ↑∅ → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), IsClosed (K n z p)
this : Encodable ↑∅
x : E
xs : x ∈ s
n : ℕ
z : ↑∅
h✝ : x ∈ M n z
⊢ Nonempty ↑∅
[PROOFSTEP]
exact False.elim z.2
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT✝ : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
this : Encodable ↑T
hT : Set.Nonempty T
⊢ Nonempty ↑T
[PROOFSTEP]
exact hT.coe_sort
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
this✝ : Encodable ↑T
this : Nonempty ↑T
⊢ ∃ F, Function.Surjective F
[PROOFSTEP]
inhabit ↥T
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
this✝ : Encodable ↑T
this : Nonempty ↑T
inhabited_h : Inhabited ↑T
⊢ ∃ F, Function.Surjective F
[PROOFSTEP]
exact
  ⟨_, Encodable.surjective_decode_iget (ℕ × T × ℕ)⟩
    -- these sets `t q = K n z p` will do
[GOAL]
case inr.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
⊢ ∃ t A,
    (∀ (n : ℕ), IsClosed (t n)) ∧
      s ⊆ ⋃ (n : ℕ), t n ∧
        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
refine'
  ⟨fun q => K (F q).1 (F q).2.1 (F q).2.2, fun q => f' (F q).2.1, fun n => K_closed _ _ _, fun x xs => _, fun q =>
    K_approx _ _ _, fun _ q => ⟨(F q).2.1, (F q).2.1.1.2, rfl⟩⟩
    -- the only fact that needs further checking is that they cover `s`.
      -- we already know that any point `x ∈ s` belongs to a set `M n z`.
[GOAL]
case inr.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n
[PROOFSTEP]
obtain ⟨n, z, hnz⟩ : ∃ (n : ℕ) (z : T), x ∈ M n z := s_subset x xs
[GOAL]
case inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n
[PROOFSTEP]
obtain ⟨p, hp⟩ : ∃ p : ℕ, x ∈ closedBall (d p) (u n / 3) :=
  by
  have : Set.Nonempty (ball x (u n / 3)) := by simp only [nonempty_ball]; linarith [u_pos n]
  obtain ⟨p, hp⟩ : ∃ p : ℕ, d p ∈ ball x (u n / 3) := hd.exists_mem_open isOpen_ball this
  exact
    ⟨p, (mem_ball'.1 hp).le⟩
      -- choose `q` for which `t q = K n z p`.
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
⊢ ∃ p, x ∈ closedBall (d p) (u n / 3)
[PROOFSTEP]
have : Set.Nonempty (ball x (u n / 3)) := by simp only [nonempty_ball]; linarith [u_pos n]
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
⊢ Set.Nonempty (ball x (u n / 3))
[PROOFSTEP]
simp only [nonempty_ball]
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
⊢ 0 < u n / 3
[PROOFSTEP]
linarith [u_pos n]
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
this : Set.Nonempty (ball x (u n / 3))
⊢ ∃ p, x ∈ closedBall (d p) (u n / 3)
[PROOFSTEP]
obtain ⟨p, hp⟩ : ∃ p : ℕ, d p ∈ ball x (u n / 3) := hd.exists_mem_open isOpen_ball this
[GOAL]
case intro
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
this : Set.Nonempty (ball x (u n / 3))
p : ℕ
hp : d p ∈ ball x (u n / 3)
⊢ ∃ p, x ∈ closedBall (d p) (u n / 3)
[PROOFSTEP]
exact
  ⟨p, (mem_ball'.1 hp).le⟩
    -- choose `q` for which `t q = K n z p`.
[GOAL]
case inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
p : ℕ
hp : x ∈ closedBall (d p) (u n / 3)
⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n
[PROOFSTEP]
obtain ⟨q, hq⟩ : ∃ q, F q = (n, z, p) :=
  hF
    _
      -- then `x` belongs to `t q`.
[GOAL]
case inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
p : ℕ
hp : x ∈ closedBall (d p) (u n / 3)
q : ℕ
hq : F q = (n, z, p)
⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n
[PROOFSTEP]
apply mem_iUnion.2 ⟨q, _⟩
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : FiniteDimensional ℝ E
inst✝² : NormedAddCommGroup F✝
inst✝¹ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝ : SecondCountableTopology F✝
f : E → F✝
s : Set E
f' : E → E →L[ℝ] F✝
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F✝) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0
hs : Set.Nonempty s
T : Set ↑s
T_count : Set.Countable T
hT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))
u : ℕ → ℝ
left✝ : StrictAnti u
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
M : ℕ → ↑T → Set E :=
  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}
s_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z
closure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z
d : ℕ → E
hd : DenseRange d
K : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)
K_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))
K_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)
F : ℕ → ℕ × ↑T × ℕ
hF : Function.Surjective F
x : E
xs : x ∈ s
n : ℕ
z : ↑T
hnz : x ∈ M n z
p : ℕ
hp : x ∈ closedBall (d p) (u n / 3)
q : ℕ
hq : F q = (n, z, p)
⊢ x ∈ (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) q
[PROOFSTEP]
simp (config := { zeta := false }) only [hq, subset_closure hnz, hp, mem_inter_iff, and_true, hnz]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
⊢ ∃ t A,
    Pairwise (Disjoint on t) ∧
      (∀ (n : ℕ), MeasurableSet (t n)) ∧
        s ⊆ ⋃ (n : ℕ), t n ∧
          (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
            (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
rcases exists_closed_cover_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' r rpos with
  ⟨t, A, t_closed, st, t_approx, ht⟩
[GOAL]
case intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
t : ℕ → Set E
A : ℕ → E →L[ℝ] F
t_closed : ∀ (n : ℕ), IsClosed (t n)
st : s ⊆ ⋃ (n : ℕ), t n
t_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))
ht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∃ t A,
    Pairwise (Disjoint on t) ∧
      (∀ (n : ℕ), MeasurableSet (t n)) ∧
        s ⊆ ⋃ (n : ℕ), t n ∧
          (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
            (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)
[PROOFSTEP]
refine' ⟨disjointed t, A, disjoint_disjointed _, MeasurableSet.disjointed fun n => (t_closed n).measurableSet, _, _, ht⟩
[GOAL]
case intro.intro.intro.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
t : ℕ → Set E
A : ℕ → E →L[ℝ] F
t_closed : ∀ (n : ℕ), IsClosed (t n)
st : s ⊆ ⋃ (n : ℕ), t n
t_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))
ht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ s ⊆ ⋃ (n : ℕ), disjointed t n
[PROOFSTEP]
rw [iUnion_disjointed]
[GOAL]
case intro.intro.intro.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
t : ℕ → Set E
A : ℕ → E →L[ℝ] F
t_closed : ∀ (n : ℕ), IsClosed (t n)
st : s ⊆ ⋃ (n : ℕ), t n
t_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))
ht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ s ⊆ ⋃ (n : ℕ), t n
[PROOFSTEP]
exact st
[GOAL]
case intro.intro.intro.intro.intro.refine'_2
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
t : ℕ → Set E
A : ℕ → E →L[ℝ] F
t_closed : ∀ (n : ℕ), IsClosed (t n)
st : s ⊆ ⋃ (n : ℕ), t n
t_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))
ht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ disjointed t n) (r (A n))
[PROOFSTEP]
intro n
[GOAL]
case intro.intro.intro.intro.intro.refine'_2
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : SecondCountableTopology F
f : E → F
s : Set E
f' : E → E →L[ℝ] F
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
r : (E →L[ℝ] F) → ℝ≥0
rpos : ∀ (A : E →L[ℝ] F), r A ≠ 0
t : ℕ → Set E
A : ℕ → E →L[ℝ] F
t_closed : ∀ (n : ℕ), IsClosed (t n)
st : s ⊆ ⋃ (n : ℕ), t n
t_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))
ht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
⊢ ApproximatesLinearOn f (A n) (s ∩ disjointed t n) (r (A n))
[PROOFSTEP]
exact (t_approx n).mono_set (inter_subset_inter_right _ (disjointed_subset _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0, ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
apply nhdsWithin_le_nhds
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0
[PROOFSTEP]
let d :=
  ENNReal.ofReal
    |A.det|
      -- construct a small neighborhood of `A '' (closedBall 0 1)` with measure comparable to
        -- the determinant of `A`.
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0
[PROOFSTEP]
obtain ⟨ε, hε, εpos⟩ : ∃ ε : ℝ, μ (closedBall 0 ε + A '' closedBall 0 1) < m * μ (closedBall 0 1) ∧ 0 < ε :=
  by
  have HC : IsCompact (A '' closedBall 0 1) := (ProperSpace.isCompact_closedBall _ _).image A.continuous
  have L0 : Tendsto (fun ε => μ (cthickening ε (A '' closedBall 0 1))) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=
    by
    apply Tendsto.mono_left _ nhdsWithin_le_nhds
    exact tendsto_measure_cthickening_of_isCompact HC
  have L1 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=
    by
    apply L0.congr' _
    filter_upwards [self_mem_nhdsWithin] with r hr
    rw [← HC.add_closedBall_zero (le_of_lt hr), add_comm]
  have L2 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (d * μ (closedBall 0 1))) :=
    by
    convert L1
    exact (addHaar_image_continuousLinearMap _ _ _).symm
  have I : d * μ (closedBall 0 1) < m * μ (closedBall 0 1) :=
    (ENNReal.mul_lt_mul_right (measure_closedBall_pos μ _ zero_lt_one).ne' measure_closedBall_lt_top.ne).2 hm
  have H : ∀ᶠ b : ℝ in 𝓝[>] 0, μ (closedBall 0 b + A '' closedBall 0 1) < m * μ (closedBall 0 1) :=
    (tendsto_order.1 L2).2 _ I
  exact (H.and self_mem_nhdsWithin).exists
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
have HC : IsCompact (A '' closedBall 0 1) := (ProperSpace.isCompact_closedBall _ _).image A.continuous
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
have L0 : Tendsto (fun ε => μ (cthickening ε (A '' closedBall 0 1))) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=
  by
  apply Tendsto.mono_left _ nhdsWithin_le_nhds
  exact tendsto_measure_cthickening_of_isCompact HC
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
⊢ Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
[PROOFSTEP]
apply Tendsto.mono_left _ nhdsWithin_le_nhds
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
⊢ Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
[PROOFSTEP]
exact tendsto_measure_cthickening_of_isCompact HC
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
have L1 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=
  by
  apply L0.congr' _
  filter_upwards [self_mem_nhdsWithin] with r hr
  rw [← HC.add_closedBall_zero (le_of_lt hr), add_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
⊢ Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
[PROOFSTEP]
apply L0.congr' _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
⊢ (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) =ᶠ[𝓝[Ioi 0] 0] fun ε =>
    ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)
[PROOFSTEP]
filter_upwards [self_mem_nhdsWithin] with r hr
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
r : ℝ
hr : r ∈ Ioi 0
⊢ ↑↑μ (cthickening r (↑A '' closedBall 0 1)) = ↑↑μ (closedBall 0 r + ↑A '' closedBall 0 1)
[PROOFSTEP]
rw [← HC.add_closedBall_zero (le_of_lt hr), add_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
have L2 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (d * μ (closedBall 0 1))) :=
  by
  convert L1
  exact (addHaar_image_continuousLinearMap _ _ _).symm
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
⊢ Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))
[PROOFSTEP]
convert L1
[GOAL]
case h.e'_5.h.e'_3
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
⊢ d * ↑↑μ (closedBall 0 1) = ↑↑μ (↑A '' closedBall 0 1)
[PROOFSTEP]
exact (addHaar_image_continuousLinearMap _ _ _).symm
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L2 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
have I : d * μ (closedBall 0 1) < m * μ (closedBall 0 1) :=
  (ENNReal.mul_lt_mul_right (measure_closedBall_pos μ _ zero_lt_one).ne' measure_closedBall_lt_top.ne).2 hm
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L2 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))
I : d * ↑↑μ (closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
have H : ∀ᶠ b : ℝ in 𝓝[>] 0, μ (closedBall 0 b + A '' closedBall 0 1) < m * μ (closedBall 0 1) :=
  (tendsto_order.1 L2).2 _ I
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
HC : IsCompact (↑A '' closedBall 0 1)
L0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))
L2 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))
I : d * ↑↑μ (closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
H : ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall 0 b + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε
[PROOFSTEP]
exact (H.and self_mem_nhdsWithin).exists
[GOAL]
case a.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0
[PROOFSTEP]
have : Iio (⟨ε, εpos.le⟩ : ℝ≥0) ∈ 𝓝 (0 : ℝ≥0) := by apply Iio_mem_nhds; exact εpos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
⊢ Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
[PROOFSTEP]
apply Iio_mem_nhds
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
⊢ 0 < { val := ε, property := (_ : 0 ≤ ε) }
[PROOFSTEP]
exact εpos
[GOAL]
case a.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0
[PROOFSTEP]
filter_upwards [this]
  -- fix a function `f` which is close enough to `A`.
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
⊢ ∀ (a : ℝ≥0),
    a ∈ Iio { val := ε, property := (_ : 0 ≤ ε) } →
      ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s a → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
intro δ hδ s f hf
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
have I : ∀ x r, x ∈ s → 0 ≤ r → μ (f '' (s ∩ closedBall x r)) ≤ m * μ (closedBall x r) :=
  by
  intro x r xs r0
  have K : f '' (s ∩ closedBall x r) ⊆ A '' closedBall 0 r + closedBall (f x) (ε * r) :=
    by
    rintro y ⟨z, ⟨zs, zr⟩, rfl⟩
    apply Set.mem_add.2 ⟨A (z - x), f z - f x - A (z - x) + f x, _, _, _⟩
    · apply mem_image_of_mem
      simpa only [dist_eq_norm, mem_closedBall, mem_closedBall_zero_iff, sub_zero] using zr
    · rw [mem_closedBall_iff_norm, add_sub_cancel]
      calc
        ‖f z - f x - A (z - x)‖ ≤ δ * ‖z - x‖ := hf _ zs _ xs
        _ ≤ ε * r := mul_le_mul (le_of_lt hδ) (mem_closedBall_iff_norm.1 zr) (norm_nonneg _) εpos.le
    · simp only [map_sub, Pi.sub_apply]
      abel
  have : A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (A '' closedBall 0 1 + closedBall 0 ε) := by
    rw [smul_add, ← add_assoc, add_comm {f x}, add_assoc, smul_closedBall _ _ εpos.le, smul_zero,
      singleton_add_closedBall_zero, ← image_smul_set ℝ E E A, smul_closedBall _ _ zero_le_one, smul_zero,
      Real.norm_eq_abs, abs_of_nonneg r0, mul_one, mul_comm]
  rw [this] at K
  calc
    μ (f '' (s ∩ closedBall x r)) ≤ μ ({f x} + r • (A '' closedBall 0 1 + closedBall 0 ε)) := measure_mono K
    _ = ENNReal.ofReal (r ^ finrank ℝ E) * μ (A '' closedBall 0 1 + closedBall 0 ε) := by
      simp only [abs_of_nonneg r0, addHaar_smul, image_add_left, abs_pow, singleton_add, measure_preimage_add]
    _ ≤ ENNReal.ofReal (r ^ finrank ℝ E) * (m * μ (closedBall 0 1)) := by rw [add_comm]; exact mul_le_mul_left' hε.le _
    _ = m * μ (closedBall x r) := by simp only [addHaar_closedBall' μ _ r0];
      ring
        -- covering `s` by closed balls with total measure very close to `μ s`, one deduces that the
          -- measure of `f '' s` is at most `m * (μ s + a)` for any positive `a`.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
⊢ ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
[PROOFSTEP]
intro x r xs r0
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
[PROOFSTEP]
have K : f '' (s ∩ closedBall x r) ⊆ A '' closedBall 0 r + closedBall (f x) (ε * r) :=
  by
  rintro y ⟨z, ⟨zs, zr⟩, rfl⟩
  apply Set.mem_add.2 ⟨A (z - x), f z - f x - A (z - x) + f x, _, _, _⟩
  · apply mem_image_of_mem
    simpa only [dist_eq_norm, mem_closedBall, mem_closedBall_zero_iff, sub_zero] using zr
  · rw [mem_closedBall_iff_norm, add_sub_cancel]
    calc
      ‖f z - f x - A (z - x)‖ ≤ δ * ‖z - x‖ := hf _ zs _ xs
      _ ≤ ε * r := mul_le_mul (le_of_lt hδ) (mem_closedBall_iff_norm.1 zr) (norm_nonneg _) εpos.le
  · simp only [map_sub, Pi.sub_apply]
    abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
⊢ f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)
[PROOFSTEP]
rintro y ⟨z, ⟨zs, zr⟩, rfl⟩
[GOAL]
case intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ f z ∈ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)
[PROOFSTEP]
apply Set.mem_add.2 ⟨A (z - x), f z - f x - A (z - x) + f x, _, _, _⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ ↑A (z - x) ∈ ↑A '' closedBall 0 r
[PROOFSTEP]
apply mem_image_of_mem
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ z - x ∈ closedBall 0 r
[PROOFSTEP]
simpa only [dist_eq_norm, mem_closedBall, mem_closedBall_zero_iff, sub_zero] using zr
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ f z - f x - ↑A (z - x) + f x ∈ closedBall (f x) (ε * r)
[PROOFSTEP]
rw [mem_closedBall_iff_norm, add_sub_cancel]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ ‖f z - f x - ↑A (z - x)‖ ≤ ε * r
[PROOFSTEP]
calc
  ‖f z - f x - A (z - x)‖ ≤ δ * ‖z - x‖ := hf _ zs _ xs
  _ ≤ ε * r := mul_le_mul (le_of_lt hδ) (mem_closedBall_iff_norm.1 zr) (norm_nonneg _) εpos.le
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ ↑A (z - x) + (f z - f x - ↑A (z - x) + f x) = f z
[PROOFSTEP]
simp only [map_sub, Pi.sub_apply]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ ↑A z - ↑A x + (f z - f x - (↑A z - ↑A x) + f x) = f z
[PROOFSTEP]
abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
z : E
zs : z ∈ s
zr : z ∈ closedBall x r
⊢ ↑A z - ↑A x + (f z - f x - (↑A z - ↑A x) + f x) = f z
[PROOFSTEP]
abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)
⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
[PROOFSTEP]
have : A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (A '' closedBall 0 1 + closedBall 0 ε) := by
  rw [smul_add, ← add_assoc, add_comm {f x}, add_assoc, smul_closedBall _ _ εpos.le, smul_zero,
    singleton_add_closedBall_zero, ← image_smul_set ℝ E E A, smul_closedBall _ _ zero_le_one, smul_zero,
    Real.norm_eq_abs, abs_of_nonneg r0, mul_one, mul_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)
⊢ ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
[PROOFSTEP]
rw [smul_add, ← add_assoc, add_comm {f x}, add_assoc, smul_closedBall _ _ εpos.le, smul_zero,
  singleton_add_closedBall_zero, ← image_smul_set ℝ E E A, smul_closedBall _ _ zero_le_one, smul_zero, Real.norm_eq_abs,
  abs_of_nonneg r0, mul_one, mul_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
[PROOFSTEP]
rw [this] at K
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
[PROOFSTEP]
calc
  μ (f '' (s ∩ closedBall x r)) ≤ μ ({f x} + r • (A '' closedBall 0 1 + closedBall 0 ε)) := measure_mono K
  _ = ENNReal.ofReal (r ^ finrank ℝ E) * μ (A '' closedBall 0 1 + closedBall 0 ε) := by
    simp only [abs_of_nonneg r0, addHaar_smul, image_add_left, abs_pow, singleton_add, measure_preimage_add]
  _ ≤ ENNReal.ofReal (r ^ finrank ℝ E) * (m * μ (closedBall 0 1)) := by rw [add_comm]; exact mul_le_mul_left' hε.le _
  _ = m * μ (closedBall x r) := by simp only [addHaar_closedBall' μ _ r0];
    ring
      -- covering `s` by closed balls with total measure very close to `μ s`, one deduces that the
        -- measure of `f '' s` is at most `m * (μ s + a)` for any positive `a`.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ↑↑μ ({f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)) =
    ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (↑A '' closedBall 0 1 + closedBall 0 ε)
[PROOFSTEP]
simp only [abs_of_nonneg r0, addHaar_smul, image_add_left, abs_pow, singleton_add, measure_preimage_add]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (↑A '' closedBall 0 1 + closedBall 0 ε) ≤
    ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1))
[PROOFSTEP]
rw [add_comm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) ≤
    ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1))
[PROOFSTEP]
exact mul_le_mul_left' hε.le _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1)) = ↑m * ↑↑μ (closedBall x r)
[PROOFSTEP]
simp only [addHaar_closedBall' μ _ r0]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
x : E
r : ℝ
xs : x ∈ s
r0 : 0 ≤ r
K : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
this : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)
⊢ ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1)) =
    ↑m * (ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1))
[PROOFSTEP]
ring
  -- covering `s` by closed balls with total measure very close to `μ s`, one deduces that the
    -- measure of `f '' s` is at most `m * (μ s + a)` for any positive `a`.
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
have J : ∀ᶠ a in 𝓝[>] (0 : ℝ≥0∞), μ (f '' s) ≤ m * (μ s + a) :=
  by
  filter_upwards [self_mem_nhdsWithin] with a ha
  change 0 < a at ha
  obtain ⟨t, r, t_count, ts, rpos, st, μt⟩ :
    ∃ (t : Set E) (r : E → ℝ),
      t.Countable ∧
        t ⊆ s ∧
          (∀ x : E, x ∈ t → 0 < r x) ∧
            (s ⊆ ⋃ x ∈ t, closedBall x (r x)) ∧ (∑' x : ↥t, μ (closedBall (↑x) (r ↑x))) ≤ μ s + a :=
    Besicovitch.exists_closedBall_covering_tsum_measure_le μ ha.ne' (fun _ => Ioi 0) s fun x _ δ δpos =>
      ⟨δ / 2, by simp [half_pos δpos, δpos]⟩
  haveI : Encodable t := t_count.toEncodable
  calc
    μ (f '' s) ≤ μ (⋃ x : t, f '' (s ∩ closedBall x (r x))) :=
      by
      rw [biUnion_eq_iUnion] at st
      apply measure_mono
      rw [← image_iUnion, ← inter_iUnion]
      exact image_subset _ (subset_inter (Subset.refl _) st)
    _ ≤ ∑' x : t, μ (f '' (s ∩ closedBall x (r x))) := (measure_iUnion_le _)
    _ ≤ ∑' x : t, m * μ (closedBall x (r x)) := (ENNReal.tsum_le_tsum fun x => I x (r x) (ts x.2) (rpos x x.2).le)
    _ ≤ m * (μ s + a) := by rw [ENNReal.tsum_mul_left];
      exact
        mul_le_mul_left' μt
          _
            -- taking the limit in `a`, one obtains the conclusion
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
⊢ ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
filter_upwards [self_mem_nhdsWithin] with a ha
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : a ∈ Ioi 0
⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
change 0 < a at ha
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
obtain ⟨t, r, t_count, ts, rpos, st, μt⟩ :
  ∃ (t : Set E) (r : E → ℝ),
    t.Countable ∧
      t ⊆ s ∧
        (∀ x : E, x ∈ t → 0 < r x) ∧
          (s ⊆ ⋃ x ∈ t, closedBall x (r x)) ∧ (∑' x : ↥t, μ (closedBall (↑x) (r ↑x))) ≤ μ s + a :=
  Besicovitch.exists_closedBall_covering_tsum_measure_le μ ha.ne' (fun _ => Ioi 0) s fun x _ δ δpos =>
    ⟨δ / 2, by simp [half_pos δpos, δpos]⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ✝ : ℝ≥0
hδ : δ✝ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ✝
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
x : E
x✝ : x ∈ s
δ : ℝ
δpos : δ > 0
⊢ δ / 2 ∈ (fun x => Ioi 0) x ∩ Ioo 0 δ
[PROOFSTEP]
simp [half_pos δpos, δpos]
[GOAL]
case h.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
haveI : Encodable t := t_count.toEncodable
[GOAL]
case h.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
calc
  μ (f '' s) ≤ μ (⋃ x : t, f '' (s ∩ closedBall x (r x))) :=
    by
    rw [biUnion_eq_iUnion] at st
    apply measure_mono
    rw [← image_iUnion, ← inter_iUnion]
    exact image_subset _ (subset_inter (Subset.refl _) st)
  _ ≤ ∑' x : t, μ (f '' (s ∩ closedBall x (r x))) := (measure_iUnion_le _)
  _ ≤ ∑' x : t, m * μ (closedBall x (r x)) := (ENNReal.tsum_le_tsum fun x => I x (r x) (ts x.2) (rpos x x.2).le)
  _ ≤ m * (μ s + a) := by rw [ENNReal.tsum_mul_left];
    exact
      mul_le_mul_left' μt
        _
          -- taking the limit in `a`, one obtains the conclusion
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (x : ↑t), f '' (s ∩ closedBall (↑x) (r ↑x)))
[PROOFSTEP]
rw [biUnion_eq_iUnion] at st
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : ↑t), closedBall (↑x) (r ↑x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (x : ↑t), f '' (s ∩ closedBall (↑x) (r ↑x)))
[PROOFSTEP]
apply measure_mono
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : ↑t), closedBall (↑x) (r ↑x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ f '' s ⊆ ⋃ (x : ↑t), f '' (s ∩ closedBall (↑x) (r ↑x))
[PROOFSTEP]
rw [← image_iUnion, ← inter_iUnion]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : ↑t), closedBall (↑x) (r ↑x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ↑t), closedBall (↑i) (r ↑i))
[PROOFSTEP]
exact image_subset _ (subset_inter (Subset.refl _) st)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ ∑' (x : ↑t), ↑m * ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
rw [ENNReal.tsum_mul_left]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
a : ℝ≥0∞
ha : 0 < a
t : Set E
r : E → ℝ
t_count : Set.Countable t
ts : t ⊆ s
rpos : ∀ (x : E), x ∈ t → 0 < r x
st : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)
μt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a
this : Encodable ↑t
⊢ ↑m * ∑' (i : ↑t), ↑↑μ (closedBall (↑i) (r ↑i)) ≤ ↑m * (↑↑μ s + a)
[PROOFSTEP]
exact
  mul_le_mul_left' μt
    _
      -- taking the limit in `a`, one obtains the conclusion
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
J : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
have L : Tendsto (fun a => (m : ℝ≥0∞) * (μ s + a)) (𝓝[>] 0) (𝓝 (m * (μ s + 0))) :=
  by
  apply Tendsto.mono_left _ nhdsWithin_le_nhds
  apply ENNReal.Tendsto.const_mul (tendsto_const_nhds.add tendsto_id)
  simp only [ENNReal.coe_ne_top, Ne.def, or_true_iff, not_false_iff]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
J : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
⊢ Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝[Ioi 0] 0) (𝓝 (↑m * (↑↑μ s + 0)))
[PROOFSTEP]
apply Tendsto.mono_left _ nhdsWithin_le_nhds
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
J : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
⊢ Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝 0) (𝓝 (↑m * (↑↑μ s + 0)))
[PROOFSTEP]
apply ENNReal.Tendsto.const_mul (tendsto_const_nhds.add tendsto_id)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
J : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
⊢ ↑↑μ s + 0 ≠ 0 ∨ ↑m ≠ ⊤
[PROOFSTEP]
simp only [ENNReal.coe_ne_top, Ne.def, or_true_iff, not_false_iff]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
J : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
L : Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝[Ioi 0] 0) (𝓝 (↑m * (↑↑μ s + 0)))
⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
rw [add_zero] at L
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
d : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|
ε : ℝ
hε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)
εpos : 0 < ε
this : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0
δ : ℝ≥0
hδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
I : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)
J : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)
L : Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝[Ioi 0] 0) (𝓝 (↑m * ↑↑μ s))
⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
[PROOFSTEP]
exact ge_of_tendsto L J
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0, ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
apply nhdsWithin_le_nhds
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
rcases eq_or_lt_of_le (zero_le m) with (rfl | mpos)
[GOAL]
case a.inl
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
hm : ↑0 < ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑0 * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
apply eventually_of_forall
[GOAL]
case a.inl.hp
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
hm : ↑0 < ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ ∀ (x : ℝ≥0) (s : Set E) (f : E → E), ApproximatesLinearOn f A s x → ↑0 * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
simp only [forall_const, zero_mul, imp_true_iff, zero_le, ENNReal.coe_zero]
[GOAL]
case a.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
have hA : A.det ≠ 0 := by intro h; simp only [h, ENNReal.not_lt_zero, ENNReal.ofReal_zero, abs_zero] at hm
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
⊢ ContinuousLinearMap.det A ≠ 0
[PROOFSTEP]
intro h
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
h : ContinuousLinearMap.det A = 0
⊢ False
[PROOFSTEP]
simp only [h, ENNReal.not_lt_zero, ENNReal.ofReal_zero, abs_zero] at hm
[GOAL]
case a.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
let B := A.toContinuousLinearEquivOfDetNeZero hA
[GOAL]
case a.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
have I : ENNReal.ofReal |(B.symm : E →L[ℝ] E).det| < (m⁻¹ : ℝ≥0) :=
  by
  simp only [ENNReal.ofReal, abs_inv, Real.toNNReal_inv, ContinuousLinearEquiv.det_coe_symm,
    ContinuousLinearMap.coe_toContinuousLinearEquivOfDetNeZero, ENNReal.coe_lt_coe] at hm ⊢
  exact NNReal.inv_lt_inv mpos.ne' hm
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
⊢ ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
[PROOFSTEP]
simp only [ENNReal.ofReal, abs_inv, Real.toNNReal_inv, ContinuousLinearEquiv.det_coe_symm,
  ContinuousLinearMap.coe_toContinuousLinearEquivOfDetNeZero, ENNReal.coe_lt_coe] at hm ⊢
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
hm : m < Real.toNNReal |ContinuousLinearMap.det A|
⊢ (Real.toNNReal |ContinuousLinearMap.det A|)⁻¹ < m⁻¹
[PROOFSTEP]
exact NNReal.inv_lt_inv mpos.ne' hm
[GOAL]
case a.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
obtain ⟨δ₀, δ₀pos, hδ₀⟩ :
  ∃ δ : ℝ≥0,
    0 < δ ∧ ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (B.symm : E →L[ℝ] E) t δ → μ (g '' t) ≤ ↑m⁻¹ * μ t :=
  by
  have :
    ∀ᶠ δ : ℝ≥0 in 𝓝[>] 0,
      ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (B.symm : E →L[ℝ] E) t δ → μ (g '' t) ≤ ↑m⁻¹ * μ t :=
    addHaar_image_le_mul_of_det_lt μ B.symm I
  rcases(this.and self_mem_nhdsWithin).exists with ⟨δ₀, h, h'⟩
  exact
    ⟨δ₀, h', h⟩
      -- record smallness conditions for `δ` that will be needed to apply `hδ₀` below.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E) (g : E → E),
        ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
[PROOFSTEP]
have :
  ∀ᶠ δ : ℝ≥0 in 𝓝[>] 0,
    ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (B.symm : E →L[ℝ] E) t δ → μ (g '' t) ≤ ↑m⁻¹ * μ t :=
  addHaar_image_le_mul_of_det_lt μ B.symm I
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
this :
  ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0,
    ∀ (t : Set E) (g : E → E),
      ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E) (g : E → E),
        ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
[PROOFSTEP]
rcases(this.and self_mem_nhdsWithin).exists with ⟨δ₀, h, h'⟩
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
this :
  ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0,
    ∀ (t : Set E) (g : E → E),
      ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
δ₀ : ℝ≥0
h :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
h' : 0 < δ₀
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E) (g : E → E),
        ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
[PROOFSTEP]
exact
  ⟨δ₀, h', h⟩
    -- record smallness conditions for `δ` that will be needed to apply `hδ₀` below.
[GOAL]
case a.inr.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
have L1 : ∀ᶠ δ in 𝓝 (0 : ℝ≥0), Subsingleton E ∨ δ < ‖(B.symm : E →L[ℝ] E)‖₊⁻¹ :=
  by
  by_cases Subsingleton E
  · simp only [h, true_or_iff, eventually_const]
  simp only [h, false_or_iff]
  apply Iio_mem_nhds
  simpa only [h, false_or_iff, inv_pos] using B.subsingleton_or_nnnorm_symm_pos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
[PROOFSTEP]
by_cases Subsingleton E
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
[PROOFSTEP]
by_cases Subsingleton E
[GOAL]
case pos
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
h : Subsingleton E
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
[PROOFSTEP]
simp only [h, true_or_iff, eventually_const]
[GOAL]
case neg
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
h : ¬Subsingleton E
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
[PROOFSTEP]
simp only [h, false_or_iff]
[GOAL]
case neg
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
h : ¬Subsingleton E
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0,
    δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
[PROOFSTEP]
apply Iio_mem_nhds
[GOAL]
case neg.h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
h : ¬Subsingleton E
⊢ 0 < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
[PROOFSTEP]
simpa only [h, false_or_iff, inv_pos] using B.subsingleton_or_nnnorm_symm_pos
[GOAL]
case a.inr.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
have L2 : ∀ᶠ δ in 𝓝 (0 : ℝ≥0), ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ < δ₀ :=
  by
  have :
    Tendsto (fun δ => ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)
      (𝓝 (‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - 0)⁻¹ * 0)) :=
    by
    rcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H)
    · simpa only [H, zero_mul] using tendsto_const_nhds
    refine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id
    refine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _
    simpa only [tsub_zero, inv_eq_zero, Ne.def] using H
  simp only [mul_zero] at this
  exact (tendsto_order.1 this).2 δ₀ δ₀pos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
[PROOFSTEP]
have :
  Tendsto (fun δ => ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)
    (𝓝 (‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - 0)⁻¹ * 0)) :=
  by
  rcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H)
  · simpa only [H, zero_mul] using tendsto_const_nhds
  refine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id
  refine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _
  simpa only [tsub_zero, inv_eq_zero, Ne.def] using H
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
⊢ Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)
    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))
[PROOFSTEP]
rcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H)
[GOAL]
case inl
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
H : ‖↑(ContinuousLinearEquiv.symm B)‖₊ = 0
⊢ Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)
    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))
[PROOFSTEP]
simpa only [H, zero_mul] using tendsto_const_nhds
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
H : ‖↑(ContinuousLinearEquiv.symm B)‖₊ ≠ 0
⊢ Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)
    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))
[PROOFSTEP]
refine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
H : ‖↑(ContinuousLinearEquiv.symm B)‖₊ ≠ 0
⊢ Tendsto (fun δ => (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹) (𝓝 0) (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹)
[PROOFSTEP]
refine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
H : ‖↑(ContinuousLinearEquiv.symm B)‖₊ ≠ 0
⊢ ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0 ≠ 0
[PROOFSTEP]
simpa only [tsub_zero, inv_eq_zero, Ne.def] using H
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
this :
  Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)
    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
[PROOFSTEP]
simp only [mul_zero] at this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
this :
  Tendsto
    (fun δ =>
      ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
          (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
        δ)
    (𝓝 0) (𝓝 0)
⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
[PROOFSTEP]
exact (tendsto_order.1 this).2 δ₀ δ₀pos
[GOAL]
case a.inr.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0
[PROOFSTEP]
filter_upwards [L1, L2]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
⊢ ∀ (a : ℝ≥0),
    Subsingleton E ∨
        a < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ →
      ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
              (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - a)⁻¹ *
            a <
          δ₀ →
        ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s a → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
intro δ h1δ h2δ s f hf
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
have hf' : ApproximatesLinearOn f (B : E →L[ℝ] E) s δ := by convert hf
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
⊢ ApproximatesLinearOn f (↑B) s δ
[PROOFSTEP]
convert hf
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
let F := hf'.toLocalEquiv h1δ
[GOAL]
case h
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
suffices H : μ (F.symm '' F.target) ≤ (m⁻¹ : ℝ≥0) * μ F.target
[GOAL]
case h
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
H : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target
⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
[PROOFSTEP]
change (m : ℝ≥0∞) * μ F.source ≤ μ F.target
[GOAL]
case h
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
H : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target
⊢ ↑m * ↑↑μ F.source ≤ ↑↑μ F.target
[PROOFSTEP]
rwa [← F.symm_image_target_eq_source, mul_comm, ← ENNReal.le_div_iff_mul_le, div_eq_mul_inv, mul_comm, ←
  ENNReal.coe_inv mpos.ne']
[GOAL]
case h.h0
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
H : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target
⊢ ↑m ≠ 0 ∨ ↑↑μ F.target ≠ 0
[PROOFSTEP]
apply Or.inl
[GOAL]
case h.h0.h
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
H : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target
⊢ ↑m ≠ 0
[PROOFSTEP]
simpa only [ENNReal.coe_eq_zero, Ne.def] using mpos.ne'
[GOAL]
case h.ht
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
H : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target
⊢ ↑m ≠ ⊤ ∨ ↑↑μ F.target ≠ ⊤
[PROOFSTEP]
simp only [ENNReal.coe_ne_top, true_or_iff, Ne.def, not_false_iff]
  -- as `f⁻¹` is well approximated by `B⁻¹`, the conclusion follows from `hδ₀`
    -- and our choice of `δ`.
[GOAL]
case H
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s✝ : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
m : ℝ≥0
hm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
mpos : 0 < m
hA : ContinuousLinearMap.det A ≠ 0
B : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA
I : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹
δ₀ : ℝ≥0
δ₀pos : 0 < δ₀
hδ₀ :
  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t
L1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹
L2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀
δ : ℝ≥0
h1δ :
  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹
h2δ :
  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *
        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *
      δ <
    δ₀
s : Set E
f : E → E
hf : ApproximatesLinearOn f A s δ
hf' : ApproximatesLinearOn f (↑B) s δ
F : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ
⊢ ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target
[PROOFSTEP]
exact hδ₀ _ _ ((hf'.to_inv h1δ).mono_num h2δ.le)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, ‖f' x - A‖₊ ≤ δ
[PROOFSTEP]
filter_upwards [Besicovitch.ae_tendsto_measure_inter_div μ s, ae_restrict_mem hs]
  -- start from a Lebesgue density point `x`, belonging to `s`.
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ ∀ (a : E),
    Tendsto (fun r => ↑↑μ (s ∩ closedBall a r) / ↑↑μ (closedBall a r)) (𝓝[Ioi 0] 0) (𝓝 1) → a ∈ s → ‖f' a - A‖₊ ≤ δ
[PROOFSTEP]
intro x hx xs
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
⊢ ‖f' x - A‖₊ ≤ δ
[PROOFSTEP]
apply
  ContinuousLinearMap.op_norm_le_bound _ δ.2 fun z =>
    ?_
      -- to show that `‖(f' x - A) z‖ ≤ δ ‖z‖`, it suffices to do it up to some error that vanishes
        -- asymptotically in terms of `ε > 0`.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖
[PROOFSTEP]
suffices H : ∀ ε, 0 < ε → ‖(f' x - A) z‖ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
H : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖
[PROOFSTEP]
have :
  Tendsto (fun ε : ℝ => ((δ : ℝ) + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[>] 0)
    (𝓝 ((δ + 0) * (‖z‖ + 0) + ‖f' x - A‖ * 0)) :=
  Tendsto.mono_left (Continuous.tendsto (by continuity) 0) nhdsWithin_le_nhds
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
H : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
⊢ Continuous fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
continuity
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
H : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
this : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 ((↑δ + 0) * (‖z‖ + 0) + ‖f' x - A‖ * 0))
⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖
[PROOFSTEP]
simp only [add_zero, mul_zero] at this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
H : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
this : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 (↑δ * ‖z‖))
⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖
[PROOFSTEP]
apply le_of_tendsto_of_tendsto tendsto_const_nhds this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
H : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
this : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 (↑δ * ‖z‖))
⊢ (fun x_1 => ‖↑(f' x - A) z‖) ≤ᶠ[𝓝[Ioi 0] 0] fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
filter_upwards [self_mem_nhdsWithin]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
H : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
this : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 (↑δ * ‖z‖))
⊢ ∀ (a : ℝ), a ∈ Ioi 0 → ‖↑(f' x - A) z‖ ≤ (↑δ + a) * (‖z‖ + a) + ‖f' x - A‖ * a
[PROOFSTEP]
exact H
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
⊢ ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
intro ε εpos
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
have B₁ : ∀ᶠ r in 𝓝[>] (0 : ℝ), (s ∩ ({ x } + r • closedBall z ε)).Nonempty :=
  eventually_nonempty_inter_smul_of_density_one μ s x hx _ measurableSet_closedBall
    (measure_closedBall_pos μ z εpos).ne'
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
obtain ⟨ρ, ρpos, hρ⟩ : ∃ ρ > 0, ball x ρ ∩ s ⊆ {y : E | ‖f y - f x - (f' x) (y - x)‖ ≤ ε * ‖y - x‖} :=
  mem_nhdsWithin_iff.1
    (IsLittleO.def (hf' x xs) εpos)
      -- for small enough `r`, the rescaled ball `r • closedBall z ε` is included in the set where
        -- `f y - f x` is well approximated by `f' x (y - x)`.
[GOAL]
case H.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
have B₂ : ∀ᶠ r in 𝓝[>] (0 : ℝ), { x } + r • closedBall z ε ⊆ ball x ρ :=
  by
  apply nhdsWithin_le_nhds
  exact
    eventually_singleton_add_smul_subset bounded_closedBall
      (ball_mem_nhds x ρpos)
        -- fix a small positive `r` satisfying the above properties, as well as a corresponding `y`.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
⊢ ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
[PROOFSTEP]
apply nhdsWithin_le_nhds
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
⊢ {x_1 | (fun r => {x} + r • closedBall z ε ⊆ ball x ρ) x_1} ∈ 𝓝 0
[PROOFSTEP]
exact
  eventually_singleton_add_smul_subset bounded_closedBall
    (ball_mem_nhds x ρpos)
      -- fix a small positive `r` satisfying the above properties, as well as a corresponding `y`.
[GOAL]
case H.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
obtain ⟨r, ⟨y, ⟨ys, hy⟩⟩, rρ, rpos⟩ :
  ∃ r : ℝ, (s ∩ ({ x } + r • closedBall z ε)).Nonempty ∧ { x } + r • closedBall z ε ⊆ ball x ρ ∧ 0 < r :=
  (B₁.and (B₂.and self_mem_nhdsWithin)).exists
[GOAL]
case H.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
obtain ⟨a, az, ya⟩ : ∃ a, a ∈ closedBall z ε ∧ y = x + r • a :=
  by
  simp only [mem_smul_set, image_add_left, mem_preimage, singleton_add] at hy
  rcases hy with ⟨a, az, ha⟩
  exact ⟨a, az, by simp only [ha, add_neg_cancel_left]⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
⊢ ∃ a, a ∈ closedBall z ε ∧ y = x + r • a
[PROOFSTEP]
simp only [mem_smul_set, image_add_left, mem_preimage, singleton_add] at hy
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
hy : ∃ y_1, y_1 ∈ closedBall z ε ∧ r • y_1 = -x + y
⊢ ∃ a, a ∈ closedBall z ε ∧ y = x + r • a
[PROOFSTEP]
rcases hy with ⟨a, az, ha⟩
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ha : r • a = -x + y
⊢ ∃ a, a ∈ closedBall z ε ∧ y = x + r • a
[PROOFSTEP]
exact ⟨a, az, by simp only [ha, add_neg_cancel_left]⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ha : r • a = -x + y
⊢ y = x + r • a
[PROOFSTEP]
simp only [ha, add_neg_cancel_left]
[GOAL]
case H.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
have norm_a : ‖a‖ ≤ ‖z‖ + ε :=
  calc
    ‖a‖ = ‖z + (a - z)‖ := by simp only [add_sub_cancel'_right]
    _ ≤ ‖z‖ + ‖a - z‖ := (norm_add_le _ _)
    _ ≤ ‖z‖ + ε :=
      add_le_add_left (mem_closedBall_iff_norm.1 az)
        _
          -- use the approximation properties to control `(f' x - A) a`, and then `(f' x - A) z` as `z` is
            -- close to `a`.
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
⊢ ‖a‖ = ‖z + (a - z)‖
[PROOFSTEP]
simp only [add_sub_cancel'_right]
[GOAL]
case H.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
have I : r * ‖(f' x - A) a‖ ≤ r * (δ + ε) * (‖z‖ + ε) :=
  calc
    r * ‖(f' x - A) a‖ = ‖(f' x - A) (r • a)‖ := by
      simp only [ContinuousLinearMap.map_smul, norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]
    _ = ‖f y - f x - A (y - x) - (f y - f x - (f' x) (y - x))‖ :=
      by
      congr 1
      simp only [ya, add_sub_cancel', sub_sub_sub_cancel_left, ContinuousLinearMap.coe_sub', eq_self_iff_true,
        sub_left_inj, Pi.sub_apply, ContinuousLinearMap.map_smul, smul_sub]
    _ ≤ ‖f y - f x - A (y - x)‖ + ‖f y - f x - (f' x) (y - x)‖ := (norm_sub_le _ _)
    _ ≤ δ * ‖y - x‖ + ε * ‖y - x‖ := (add_le_add (hf _ ys _ xs) (hρ ⟨rρ hy, ys⟩))
    _ = r * (δ + ε) * ‖a‖ :=
      by
      simp only [ya, add_sub_cancel', norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]
      ring
    _ ≤ r * (δ + ε) * (‖z‖ + ε) := mul_le_mul_of_nonneg_left norm_a (mul_nonneg rpos.le (add_nonneg δ.2 εpos.le))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
⊢ r * ‖↑(f' x - A) a‖ = ‖↑(f' x - A) (r • a)‖
[PROOFSTEP]
simp only [ContinuousLinearMap.map_smul, norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
⊢ ‖↑(f' x - A) (r • a)‖ = ‖f y - f x - ↑A (y - x) - (f y - f x - ↑(f' x) (y - x))‖
[PROOFSTEP]
congr 1
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
⊢ ↑(f' x - A) (r • a) = f y - f x - ↑A (y - x) - (f y - f x - ↑(f' x) (y - x))
[PROOFSTEP]
simp only [ya, add_sub_cancel', sub_sub_sub_cancel_left, ContinuousLinearMap.coe_sub', eq_self_iff_true, sub_left_inj,
  Pi.sub_apply, ContinuousLinearMap.map_smul, smul_sub]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
⊢ ↑δ * ‖y - x‖ + ε * ‖y - x‖ = r * (↑δ + ε) * ‖a‖
[PROOFSTEP]
simp only [ya, add_sub_cancel', norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
⊢ ↑δ * (r * ‖a‖) + ε * (r * ‖a‖) = r * (↑δ + ε) * ‖a‖
[PROOFSTEP]
ring
[GOAL]
case H.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
show ‖(f' x - A) z‖ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[GOAL]
case H.intro.intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε
[PROOFSTEP]
exact
  calc
    ‖(f' x - A) z‖ = ‖(f' x - A) a + (f' x - A) (z - a)‖ :=
      by
      congr 1
      simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]
      abel
    _ ≤ ‖(f' x - A) a‖ + ‖(f' x - A) (z - a)‖ := (norm_add_le _ _)
    _ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ‖z - a‖ :=
      by
      apply add_le_add
      · rw [mul_assoc] at I ; exact (mul_le_mul_left rpos).1 I
      · apply ContinuousLinearMap.le_op_norm
    _ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε :=
      add_le_add le_rfl (mul_le_mul_of_nonneg_left (mem_closedBall_iff_norm'.1 az) (norm_nonneg _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ‖↑(f' x - A) z‖ = ‖↑(f' x - A) a + ↑(f' x - A) (z - a)‖
[PROOFSTEP]
congr 1
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ↑(f' x - A) z = ↑(f' x - A) a + ↑(f' x - A) (z - a)
[PROOFSTEP]
simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ↑(f' x) z - ↑A z = ↑(f' x) a - ↑A a + (↑(f' x) z - ↑A z - (↑(f' x) a - ↑A a))
[PROOFSTEP]
abel
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ↑(f' x) z - ↑A z = ↑(f' x) a - ↑A a + (↑(f' x) z - ↑A z - (↑(f' x) a - ↑A a))
[PROOFSTEP]
abel
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ‖↑(f' x - A) a‖ + ‖↑(f' x - A) (z - a)‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ‖z - a‖
[PROOFSTEP]
apply add_le_add
[GOAL]
case h₁
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ‖↑(f' x - A) a‖ ≤ (↑δ + ε) * (‖z‖ + ε)
[PROOFSTEP]
rw [mul_assoc] at I
[GOAL]
case h₁
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * ((↑δ + ε) * (‖z‖ + ε))
⊢ ‖↑(f' x - A) a‖ ≤ (↑δ + ε) * (‖z‖ + ε)
[PROOFSTEP]
exact (mul_le_mul_left rpos).1 I
[GOAL]
case h₂
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
A : E →L[ℝ] E
δ : ℝ≥0
hf : ApproximatesLinearOn f A s δ
hs : MeasurableSet s
f' : E → E →L[ℝ] E
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
x : E
hx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)
xs : x ∈ s
z : E
ε : ℝ
εpos : 0 < ε
B₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))
ρ : ℝ
ρpos : ρ > 0
hρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}
B₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ
r : ℝ
y : E
ys : y ∈ s
hy : y ∈ {x} + r • closedBall z ε
rρ : {x} + r • closedBall z ε ⊆ ball x ρ
rpos : 0 < r
a : E
az : a ∈ closedBall z ε
ya : y = x + r • a
norm_a : ‖a‖ ≤ ‖z‖ + ε
I : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)
⊢ ‖↑(f' x - A) (z - a)‖ ≤ ‖f' x - A‖ * ‖z - a‖
[PROOFSTEP]
apply ContinuousLinearMap.le_op_norm
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
⊢ ↑↑μ (f '' s) = 0
[PROOFSTEP]
refine' le_antisymm _ (zero_le _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
⊢ ↑↑μ (f '' s) ≤ 0
[PROOFSTEP]
have :
  ∀ A : E →L[ℝ] E,
    ∃ δ : ℝ≥0,
      0 < δ ∧ ∀ (t : Set E), ApproximatesLinearOn f A t δ → μ (f '' t) ≤ (Real.toNNReal |A.det| + 1 : ℝ≥0) * μ t :=
  by
  intro A
  let m : ℝ≥0 := Real.toNNReal |A.det| + 1
  have I : ENNReal.ofReal |A.det| < m := by
    simp only [ENNReal.ofReal, lt_add_iff_pos_right, zero_lt_one, ENNReal.coe_lt_coe]
  rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩
  exact ⟨δ, h', fun t ht => h t f ht⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
⊢ ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        ∀ (t : Set E),
          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
[PROOFSTEP]
intro A
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
A : E →L[ℝ] E
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
[PROOFSTEP]
let m : ℝ≥0 := Real.toNNReal |A.det| + 1
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
[PROOFSTEP]
have I : ENNReal.ofReal |A.det| < m := by
  simp only [ENNReal.ofReal, lt_add_iff_pos_right, zero_lt_one, ENNReal.coe_lt_coe]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
[PROOFSTEP]
simp only [ENNReal.ofReal, lt_add_iff_pos_right, zero_lt_one, ENNReal.coe_lt_coe]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
[PROOFSTEP]
rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
h' : 0 < δ
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
[PROOFSTEP]
exact ⟨δ, h', fun t ht => h t f ht⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
this :
  ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        ∀ (t : Set E),
          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
⊢ ↑↑μ (f '' s) ≤ 0
[PROOFSTEP]
choose δ hδ using this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
⊢ ↑↑μ (f '' s) ≤ 0
[PROOFSTEP]
obtain ⟨t, A, _, _, t_cover, ht, -⟩ :
  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),
    Pairwise (Disjoint on t) ∧
      (∀ n : ℕ, MeasurableSet (t n)) ∧
        (s ⊆ ⋃ n : ℕ, t n) ∧
          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧
            (s.Nonempty → ∀ n, ∃ y ∈ s, A n = fderivWithin ℝ f s y) :=
  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s (fderivWithin ℝ f s)
    (fun x xs => (hf x xs).hasFDerivWithinAt) δ fun A => (hδ A).1.ne'
[GOAL]
case intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ↑↑μ (f '' s) ≤ 0
[PROOFSTEP]
calc
  μ (f '' s) ≤ μ (⋃ n, f '' (s ∩ t n)) := by
    apply measure_mono
    rw [← image_iUnion, ← inter_iUnion]
    exact image_subset f (subset_inter Subset.rfl t_cover)
  _ ≤ ∑' n, μ (f '' (s ∩ t n)) := (measure_iUnion_le _)
  _ ≤ ∑' n, (Real.toNNReal |(A n).det| + 1 : ℝ≥0) * μ (s ∩ t n) :=
    by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply (hδ (A n)).2
    exact ht n
  _ ≤ ∑' n, ((Real.toNNReal |(A n).det| + 1 : ℝ≥0) : ℝ≥0∞) * 0 :=
    by
    refine' ENNReal.tsum_le_tsum fun n => mul_le_mul_left' _ _
    exact le_trans (measure_mono (inter_subset_left _ _)) (le_of_eq hs)
  _ = 0 := by simp only [tsum_zero, mul_zero]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (n : ℕ), f '' (s ∩ t n))
[PROOFSTEP]
apply measure_mono
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ f '' s ⊆ ⋃ (n : ℕ), f '' (s ∩ t n)
[PROOFSTEP]
rw [← image_iUnion, ← inter_iUnion]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ℕ), t i)
[PROOFSTEP]
exact image_subset f (subset_inter Subset.rfl t_cover)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ t n)) ≤ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * ↑↑μ (s ∩ t n)
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ↑↑μ (f '' (s ∩ t n)) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * ↑↑μ (s ∩ t n)
[PROOFSTEP]
apply (hδ (A n)).2
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
[PROOFSTEP]
exact ht n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * ↑↑μ (s ∩ t n) ≤
    ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * 0
[PROOFSTEP]
refine' ENNReal.tsum_le_tsum fun n => mul_le_mul_left' _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ↑↑μ (s ∩ t n) ≤ 0
[PROOFSTEP]
exact le_trans (measure_mono (inter_subset_left _ _)) (le_of_eq hs)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf : DifferentiableOn ℝ f s
hs : ↑↑μ s = 0
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
left✝¹ : Pairwise (Disjoint on t)
left✝ : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * 0 = 0
[PROOFSTEP]
simp only [tsum_zero, mul_zero]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
rcases eq_empty_or_nonempty s with (rfl | h's)
[GOAL]
case inl
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
R : ℝ
ε : ℝ≥0
εpos : 0 < ε
hf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x
hs : ∅ ⊆ closedBall 0 R
h'f' : ∀ (x : E), x ∈ ∅ → ContinuousLinearMap.det (f' x) = 0
⊢ ↑↑μ (f '' ∅) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
simp only [measure_empty, zero_le, image_empty]
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
have :
  ∀ A : E →L[ℝ] E,
    ∃ δ : ℝ≥0,
      0 < δ ∧ ∀ (t : Set E), ApproximatesLinearOn f A t δ → μ (f '' t) ≤ (Real.toNNReal |A.det| + ε : ℝ≥0) * μ t :=
  by
  intro A
  let m : ℝ≥0 := Real.toNNReal |A.det| + ε
  have I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]
  rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩
  exact ⟨δ, h', fun t ht => h t f ht⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
⊢ ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        ∀ (t : Set E),
          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
[PROOFSTEP]
intro A
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
A : E →L[ℝ] E
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
[PROOFSTEP]
let m : ℝ≥0 := Real.toNNReal |A.det| + ε
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
[PROOFSTEP]
have I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
[PROOFSTEP]
simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
[PROOFSTEP]
rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
h' : 0 < δ
⊢ ∃ δ,
    0 < δ ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
[PROOFSTEP]
exact ⟨δ, h', fun t ht => h t f ht⟩
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
this :
  ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        ∀ (t : Set E),
          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
choose δ hδ using this
[GOAL]
case inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
obtain ⟨t, A, t_disj, t_meas, t_cover, ht, Af'⟩ :
  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),
    Pairwise (Disjoint on t) ∧
      (∀ n : ℕ, MeasurableSet (t n)) ∧
        (s ⊆ ⋃ n : ℕ, t n) ∧
          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=
  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' δ fun A => (hδ A).1.ne'
[GOAL]
case inr.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
calc
  μ (f '' s) ≤ μ (⋃ n, f '' (s ∩ t n)) := by
    apply measure_mono
    rw [← image_iUnion, ← inter_iUnion]
    exact image_subset f (subset_inter Subset.rfl t_cover)
  _ ≤ ∑' n, μ (f '' (s ∩ t n)) := (measure_iUnion_le _)
  _ ≤ ∑' n, (Real.toNNReal |(A n).det| + ε : ℝ≥0) * μ (s ∩ t n) :=
    by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply (hδ (A n)).2
    exact ht n
  _ = ∑' n, ε * μ (s ∩ t n) := by
    congr with n
    rcases Af' h's n with ⟨y, ys, hy⟩
    simp only [hy, h'f' y ys, Real.toNNReal_zero, abs_zero, zero_add]
  _ ≤ ε * ∑' n, μ (closedBall 0 R ∩ t n) := by
    rw [ENNReal.tsum_mul_left]
    refine' mul_le_mul_left' (ENNReal.tsum_le_tsum fun n => measure_mono _) _
    exact inter_subset_inter_left _ hs
  _ = ε * μ (⋃ n, closedBall 0 R ∩ t n) := by
    rw [measure_iUnion]
    · exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _
    · intro n
      exact measurableSet_closedBall.inter (t_meas n)
  _ ≤ ε * μ (closedBall 0 R) := by
    rw [← inter_iUnion]
    exact mul_le_mul_left' (measure_mono (inter_subset_left _ _)) _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (n : ℕ), f '' (s ∩ t n))
[PROOFSTEP]
apply measure_mono
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ f '' s ⊆ ⋃ (n : ℕ), f '' (s ∩ t n)
[PROOFSTEP]
rw [← image_iUnion, ← inter_iUnion]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ℕ), t i)
[PROOFSTEP]
exact image_subset f (subset_inter Subset.rfl t_cover)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ t n)) ≤ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n)
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
⊢ ↑↑μ (f '' (s ∩ t n)) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n)
[PROOFSTEP]
apply (hδ (A n)).2
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
⊢ ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
[PROOFSTEP]
exact ht n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n) = ∑' (n : ℕ), ↑ε * ↑↑μ (s ∩ t n)
[PROOFSTEP]
congr with n
[GOAL]
case e_f.h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
⊢ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n) = ↑ε * ↑↑μ (s ∩ t n)
[PROOFSTEP]
rcases Af' h's n with ⟨y, ys, hy⟩
[GOAL]
case e_f.h.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
y : E
ys : y ∈ s
hy : A n = f' y
⊢ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n) = ↑ε * ↑↑μ (s ∩ t n)
[PROOFSTEP]
simp only [hy, h'f' y ys, Real.toNNReal_zero, abs_zero, zero_add]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∑' (n : ℕ), ↑ε * ↑↑μ (s ∩ t n) ≤ ↑ε * ∑' (n : ℕ), ↑↑μ (closedBall 0 R ∩ t n)
[PROOFSTEP]
rw [ENNReal.tsum_mul_left]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ↑ε * ∑' (i : ℕ), ↑↑μ (s ∩ t i) ≤ ↑ε * ∑' (n : ℕ), ↑↑μ (closedBall 0 R ∩ t n)
[PROOFSTEP]
refine' mul_le_mul_left' (ENNReal.tsum_le_tsum fun n => measure_mono _) _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
⊢ s ∩ t n ⊆ closedBall 0 R ∩ t n
[PROOFSTEP]
exact inter_subset_inter_left _ hs
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ↑ε * ∑' (n : ℕ), ↑↑μ (closedBall 0 R ∩ t n) = ↑ε * ↑↑μ (⋃ (n : ℕ), closedBall 0 R ∩ t n)
[PROOFSTEP]
rw [measure_iUnion]
[GOAL]
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ Pairwise (Disjoint on fun n => closedBall 0 R ∩ t n)
[PROOFSTEP]
exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∀ (i : ℕ), MeasurableSet (closedBall 0 R ∩ t i)
[PROOFSTEP]
intro n
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
n : ℕ
⊢ MeasurableSet (closedBall 0 R ∩ t n)
[PROOFSTEP]
exact measurableSet_closedBall.inter (t_meas n)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ↑ε * ↑↑μ (⋃ (n : ℕ), closedBall 0 R ∩ t n) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
rw [← inter_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
R : ℝ
hs : s ⊆ closedBall 0 R
ε : ℝ≥0
εpos : 0 < ε
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
h's : Set.Nonempty s
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      ∀ (t : Set E),
        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
Af' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ↑ε * ↑↑μ (closedBall 0 R ∩ ⋃ (i : ℕ), t i) ≤ ↑ε * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
exact mul_le_mul_left' (measure_mono (inter_subset_left _ _)) _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
⊢ ↑↑μ (f '' s) = 0
[PROOFSTEP]
suffices H : ∀ R, μ (f '' (s ∩ closedBall 0 R)) = 0
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
H : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
⊢ ↑↑μ (f '' s) = 0
[PROOFSTEP]
apply le_antisymm _ (zero_le _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
H : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
⊢ ↑↑μ (f '' s) ≤ 0
[PROOFSTEP]
rw [← iUnion_inter_closedBall_nat s 0]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
H : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
⊢ ↑↑μ (f '' ⋃ (n : ℕ), s ∩ closedBall 0 ↑n) ≤ 0
[PROOFSTEP]
calc
  μ (f '' ⋃ n : ℕ, s ∩ closedBall 0 n) ≤ ∑' n : ℕ, μ (f '' (s ∩ closedBall 0 n)) := by rw [image_iUnion];
    exact measure_iUnion_le _
  _ ≤ 0 := by simp only [H, tsum_zero, nonpos_iff_eq_zero]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
H : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
⊢ ↑↑μ (f '' ⋃ (n : ℕ), s ∩ closedBall 0 ↑n) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ closedBall 0 ↑n))
[PROOFSTEP]
rw [image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
H : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
⊢ ↑↑μ (⋃ (i : ℕ), f '' (s ∩ closedBall 0 ↑i)) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ closedBall 0 ↑n))
[PROOFSTEP]
exact measure_iUnion_le _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
H : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ closedBall 0 ↑n)) ≤ 0
[PROOFSTEP]
simp only [H, tsum_zero, nonpos_iff_eq_zero]
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
⊢ ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
[PROOFSTEP]
intro R
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
[PROOFSTEP]
have A : ∀ (ε : ℝ≥0), 0 < ε → μ (f '' (s ∩ closedBall 0 R)) ≤ ε * μ (closedBall 0 R) := fun ε εpos =>
  addHaar_image_eq_zero_of_det_fderivWithin_eq_zero_aux μ (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _)) R
    (inter_subset_right _ _) ε εpos fun x hx => h'f' x hx.1
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
[PROOFSTEP]
have B : Tendsto (fun ε : ℝ≥0 => (ε : ℝ≥0∞) * μ (closedBall 0 R)) (𝓝[>] 0) (𝓝 0) :=
  by
  have : Tendsto (fun ε : ℝ≥0 => (ε : ℝ≥0∞) * μ (closedBall 0 R)) (𝓝 0) (𝓝 (((0 : ℝ≥0) : ℝ≥0∞) * μ (closedBall 0 R))) :=
    ENNReal.Tendsto.mul_const (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr measure_closedBall_lt_top.ne)
  simp only [zero_mul, ENNReal.coe_zero] at this
  exact Tendsto.mono_left this nhdsWithin_le_nhds
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
⊢ Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
[PROOFSTEP]
have : Tendsto (fun ε : ℝ≥0 => (ε : ℝ≥0∞) * μ (closedBall 0 R)) (𝓝 0) (𝓝 (((0 : ℝ≥0) : ℝ≥0∞) * μ (closedBall 0 R))) :=
  ENNReal.Tendsto.mul_const (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr measure_closedBall_lt_top.ne)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
this : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝 0) (𝓝 (↑0 * ↑↑μ (closedBall 0 R)))
⊢ Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
[PROOFSTEP]
simp only [zero_mul, ENNReal.coe_zero] at this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
this : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝 0) (𝓝 0)
⊢ Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
[PROOFSTEP]
exact Tendsto.mono_left this nhdsWithin_le_nhds
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
B : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0
[PROOFSTEP]
apply le_antisymm _ (zero_le _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
B : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ 0
[PROOFSTEP]
apply ge_of_tendsto B
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
B : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
⊢ ∀ᶠ (c : ℝ≥0) in 𝓝[Ioi 0] 0, ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑c * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
filter_upwards [self_mem_nhdsWithin]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
h'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0
R : ℝ
A : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)
B : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)
⊢ ∀ (a : ℝ≥0), a ∈ Ioi 0 → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑a * ↑↑μ (closedBall 0 R)
[PROOFSTEP]
exact A
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable f'
[PROOFSTEP]
refine' aemeasurable_of_unif_approx fun ε εpos => _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε
[PROOFSTEP]
let δ : ℝ≥0 := ⟨ε, le_of_lt εpos⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε
[PROOFSTEP]
have δpos : 0 < δ := εpos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε
[PROOFSTEP]
obtain ⟨t, A, t_disj, t_meas, t_cover, ht, _⟩ :
  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),
    Pairwise (Disjoint on t) ∧
      (∀ n : ℕ, MeasurableSet (t n)) ∧
        (s ⊆ ⋃ n : ℕ, t n) ∧
          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) δ) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=
  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' (fun _ => δ) fun _ => δpos.ne'
[GOAL]
case intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε
[PROOFSTEP]
obtain ⟨g, g_meas, hg⟩ : ∃ g : E → E →L[ℝ] E, Measurable g ∧ ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n :=
  exists_measurable_piecewise t t_meas (fun n _ => A n) (fun n => measurable_const) <|
    t_disj.mono fun i j h => by simp only [h.inter_eq, eqOn_empty]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
i j : ℕ
h : (Disjoint on t) i j
⊢ EqOn ((fun n x => A n) i) ((fun n x => A n) j) (t i ∩ t j)
[PROOFSTEP]
simp only [h.inter_eq, eqOn_empty]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε
[PROOFSTEP]
refine'
  ⟨g, g_meas.aemeasurable, _⟩
    -- reduce to checking that `f'` and `g` are close on almost all of `s ∩ t n`, for all `n`.
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (g x) (f' x) ≤ ε
[PROOFSTEP]
suffices H : ∀ᵐ x : E ∂sum fun n => μ.restrict (s ∩ t n), dist (g x) (f' x) ≤ ε
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (g x) (f' x) ≤ ε
[PROOFSTEP]
have : μ.restrict s ≤ sum fun n => μ.restrict (s ∩ t n) :=
  by
  have : s = ⋃ n, s ∩ t n := by
    rw [← inter_iUnion]
    exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
  conv_lhs => rw [this]
  exact restrict_iUnion_le
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
⊢ Measure.restrict μ s ≤ sum fun n => Measure.restrict μ (s ∩ t n)
[PROOFSTEP]
have : s = ⋃ n, s ∩ t n := by
  rw [← inter_iUnion]
  exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
⊢ s = ⋃ (n : ℕ), s ∩ t n
[PROOFSTEP]
rw [← inter_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
⊢ s = s ∩ ⋃ (i : ℕ), t i
[PROOFSTEP]
exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
this : s = ⋃ (n : ℕ), s ∩ t n
⊢ Measure.restrict μ s ≤ sum fun n => Measure.restrict μ (s ∩ t n)
[PROOFSTEP]
conv_lhs => rw [this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
this : s = ⋃ (n : ℕ), s ∩ t n
| Measure.restrict μ s
[PROOFSTEP]
rw [this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
this : s = ⋃ (n : ℕ), s ∩ t n
| Measure.restrict μ s
[PROOFSTEP]
rw [this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
this : s = ⋃ (n : ℕ), s ∩ t n
| Measure.restrict μ s
[PROOFSTEP]
rw [this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
this : s = ⋃ (n : ℕ), s ∩ t n
⊢ Measure.restrict μ (⋃ (n : ℕ), s ∩ t n) ≤ sum fun n => Measure.restrict μ (s ∩ t n)
[PROOFSTEP]
exact restrict_iUnion_le
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
H : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
this : Measure.restrict μ s ≤ sum fun n => Measure.restrict μ (s ∩ t n)
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (g x) (f' x) ≤ ε
[PROOFSTEP]
exact ae_mono this H
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
⊢ ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
[PROOFSTEP]
refine'
  ae_sum_iff.2 fun n =>
    _
      -- on almost all `s ∩ t n`, `f' x` is close to `A n` thanks to
        -- `ApproximatesLinearOn.norm_fderiv_sub_le`.
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
[PROOFSTEP]
have E₁ : ∀ᵐ x : E ∂μ.restrict (s ∩ t n), ‖f' x - A n‖₊ ≤ δ :=
  (ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>
    (hf' x hx.1).mono
      (inter_subset_left _ _)
        -- moreover, `g x` is equal to `A n` there.
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
[PROOFSTEP]
have E₂ : ∀ᵐ x : E ∂μ.restrict (s ∩ t n), g x = A n :=
  by
  suffices H : ∀ᵐ x : E ∂μ.restrict (t n), g x = A n
  exact ae_mono (restrict_mono (inter_subset_right _ _) le_rfl) H
  filter_upwards [ae_restrict_mem (t_meas n)]
  exact hg n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n
[PROOFSTEP]
suffices H : ∀ᵐ x : E ∂μ.restrict (t n), g x = A n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
H : ∀ᵐ (x : E) ∂Measure.restrict μ (t n), g x = A n
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (t n), g x = A n
[PROOFSTEP]
exact ae_mono (restrict_mono (inter_subset_right _ _) le_rfl) H
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (t n), g x = A n
[PROOFSTEP]
filter_upwards [ae_restrict_mem (t_meas n)]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
⊢ ∀ (a : E), a ∈ t n → g a = A n
[PROOFSTEP]
exact hg n
[GOAL]
case H
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
E₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε
[PROOFSTEP]
filter_upwards [E₁, E₂] with x hx1 hx2
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
E₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n
x : E
hx1 : ‖f' x - A n‖₊ ≤ { val := ε, property := (_ : 0 ≤ ε) }
hx2 : g x = A n
⊢ dist (g x) (f' x) ≤ ε
[PROOFSTEP]
rw [← nndist_eq_nnnorm] at hx1
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
E₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n
x : E
hx1 : nndist (f' x) (A n) ≤ { val := ε, property := (_ : 0 ≤ ε) }
hx2 : g x = A n
⊢ dist (g x) (f' x) ≤ ε
[PROOFSTEP]
rw [hx2, dist_comm]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ
εpos : ε > 0
δ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }
δpos : 0 < δ
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ
right✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y
g : E → E →L[ℝ] E
g_meas : Measurable g
hg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n
n : ℕ
E₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ
E₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n
x : E
hx1 : nndist (f' x) (A n) ≤ { val := ε, property := (_ : 0 ≤ ε) }
hx2 : g x = A n
⊢ dist (f' x) (A n) ≤ ε
[PROOFSTEP]
exact hx1
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|
[PROOFSTEP]
apply ENNReal.measurable_ofReal.comp_aemeasurable
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => |ContinuousLinearMap.det (f' x)|
[PROOFSTEP]
refine' continuous_abs.measurable.comp_aemeasurable _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => ContinuousLinearMap.det (f' x)
[PROOFSTEP]
refine' ContinuousLinearMap.continuous_det.measurable.comp_aemeasurable _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => f' x
[PROOFSTEP]
exact aemeasurable_fderivWithin μ hs hf'
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => Real.toNNReal |ContinuousLinearMap.det (f' x)|
[PROOFSTEP]
apply measurable_real_toNNReal.comp_aemeasurable
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => |ContinuousLinearMap.det (f' x)|
[PROOFSTEP]
refine' continuous_abs.measurable.comp_aemeasurable _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => ContinuousLinearMap.det (f' x)
[PROOFSTEP]
refine' ContinuousLinearMap.continuous_det.measurable.comp_aemeasurable _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ AEMeasurable fun x => f' x
[PROOFSTEP]
exact aemeasurable_fderivWithin μ hs hf'
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
have :
  ∀ A : E →L[ℝ] E,
    ∃ δ : ℝ≥0,
      0 < δ ∧
        (∀ B : E →L[ℝ] E, ‖B - A‖ ≤ δ → |B.det - A.det| ≤ ε) ∧
          ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g A t δ → μ (g '' t) ≤ (ENNReal.ofReal |A.det| + ε) * μ t :=
  by
  intro A
  let m : ℝ≥0 := Real.toNNReal |A.det| + ε
  have I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]
  rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩
  obtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=
    continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos
  let δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩
  refine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩
  · intro B hB
    rw [← Real.dist_eq]
    apply (hδ' B _).le
    rw [dist_eq_norm]
    calc
      ‖B - A‖ ≤ (min δ δ'' : ℝ≥0) := hB
      _ ≤ δ'' := by simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]
      _ < δ' := half_lt_self δ'pos
  · intro t g htg
    exact h t g (htg.mono_num (min_le_left _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
⊢ ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
          ∀ (t : Set E) (g : E → E),
            ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
intro A
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
let m : ℝ≥0 := Real.toNNReal |A.det| + ε
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
have I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
[PROOFSTEP]
simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
obtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=
  continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos
[GOAL]
case intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
let δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩
[GOAL]
case intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
refine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩
[GOAL]
case intro.intro.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
⊢ ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(min δ δ'') → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
[PROOFSTEP]
intro B hB
[GOAL]
case intro.intro.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
[PROOFSTEP]
rw [← Real.dist_eq]
[GOAL]
case intro.intro.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) ≤ ↑ε
[PROOFSTEP]
apply (hδ' B _).le
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ dist B A < δ'
[PROOFSTEP]
rw [dist_eq_norm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ ‖B - A‖ < δ'
[PROOFSTEP]
calc
  ‖B - A‖ ≤ (min δ δ'' : ℝ≥0) := hB
  _ ≤ δ'' := by simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]
  _ < δ' := half_lt_self δ'pos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ ↑(min δ δ'') ≤ ↑δ''
[PROOFSTEP]
simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]
[GOAL]
case intro.intro.intro.intro.refine'_2
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
⊢ ∀ (t : Set E) (g : E → E),
    ApproximatesLinearOn g A t (min δ δ'') → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
intro t g htg
[GOAL]
case intro.intro.intro.intro.refine'_2
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε
I : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s
δpos : 0 < δ
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
t : Set E
g : E → E
htg : ApproximatesLinearOn g A t (min δ δ'')
⊢ ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
[PROOFSTEP]
exact h t g (htg.mono_num (min_le_left _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
this :
  ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
          ∀ (t : Set E) (g : E → E),
            ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
choose δ hδ using this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
obtain ⟨t, A, t_disj, t_meas, t_cover, ht, -⟩ :
  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),
    Pairwise (Disjoint on t) ∧
      (∀ n : ℕ, MeasurableSet (t n)) ∧
        (s ⊆ ⋃ n : ℕ, t n) ∧
          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=
  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' δ fun A => (hδ A).1.ne'
[GOAL]
case intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
calc
  μ (f '' s) ≤ μ (⋃ n, f '' (s ∩ t n)) := by
    apply measure_mono
    rw [← image_iUnion, ← inter_iUnion]
    exact image_subset f (subset_inter Subset.rfl t_cover)
  _ ≤ ∑' n, μ (f '' (s ∩ t n)) := (measure_iUnion_le _)
  _ ≤ ∑' n, (ENNReal.ofReal |(A n).det| + ε) * μ (s ∩ t n) :=
    by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply (hδ (A n)).2.2
    exact ht n
  _ = ∑' n, ∫⁻ _ in s ∩ t n, ENNReal.ofReal |(A n).det| + ε ∂μ := by
    simp only [lintegral_const, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
  _ ≤ ∑' n, ∫⁻ x in s ∩ t n, ENNReal.ofReal |(f' x).det| + 2 * ε ∂μ :=
    by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply lintegral_mono_ae
    filter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>
        (hf' x hx.1).mono (inter_subset_left _ _)]
    intro x hx
    have I : |(A n).det| ≤ |(f' x).det| + ε :=
      calc
        |(A n).det| = |(f' x).det - ((f' x).det - (A n).det)| := by congr 1; abel
        _ ≤ |(f' x).det| + |(f' x).det - (A n).det| := (abs_sub _ _)
        _ ≤ |(f' x).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)
    calc
      ENNReal.ofReal |(A n).det| + ε ≤ ENNReal.ofReal (|(f' x).det| + ε) + ε :=
        add_le_add (ENNReal.ofReal_le_ofReal I) le_rfl
      _ = ENNReal.ofReal |(f' x).det| + 2 * ε := by
        simp only [ENNReal.ofReal_add, abs_nonneg, two_mul, add_assoc, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]
  _ = ∫⁻ x in ⋃ n, s ∩ t n, ENNReal.ofReal |(f' x).det| + 2 * ε ∂μ :=
    by
    have M : ∀ n : ℕ, MeasurableSet (s ∩ t n) := fun n => hs.inter (t_meas n)
    rw [lintegral_iUnion M]
    exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _
  _ = ∫⁻ x in s, ENNReal.ofReal |(f' x).det| + 2 * ε ∂μ :=
    by
    have : s = ⋃ n, s ∩ t n := by
      rw [← inter_iUnion]
      exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
    rw [← this]
  _ = (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) + 2 * ε * μ s := by
    simp only [lintegral_add_right' _ aemeasurable_const, set_lintegral_const]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (n : ℕ), f '' (s ∩ t n))
[PROOFSTEP]
apply measure_mono
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ f '' s ⊆ ⋃ (n : ℕ), f '' (s ∩ t n)
[PROOFSTEP]
rw [← image_iUnion, ← inter_iUnion]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ℕ), t i)
[PROOFSTEP]
exact image_subset f (subset_inter Subset.rfl t_cover)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ t n)) ≤ ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε) * ↑↑μ (s ∩ t n)
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ↑↑μ (f '' (s ∩ t n)) ≤ (ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε) * ↑↑μ (s ∩ t n)
[PROOFSTEP]
apply (hδ (A n)).2.2
[GOAL]
case a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
[PROOFSTEP]
exact ht n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε) * ↑↑μ (s ∩ t n) =
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ
[PROOFSTEP]
simp only [lintegral_const, MeasurableSet.univ, Measure.restrict_apply, univ_inter]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ ≤
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ ≤
    ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ
[PROOFSTEP]
apply lintegral_mono_ae
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ∀ᵐ (a : E) ∂Measure.restrict μ (s ∩ t n),
    ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' a)| + 2 * ↑ε
[PROOFSTEP]
filter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>
    (hf' x hx.1).mono (inter_subset_left _ _)]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
⊢ ∀ (a : E),
    ‖f' a - A n‖₊ ≤ δ (A n) →
      ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' a)| + 2 * ↑ε
[PROOFSTEP]
intro x hx
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε
[PROOFSTEP]
have I : |(A n).det| ≤ |(f' x).det| + ε :=
  calc
    |(A n).det| = |(f' x).det - ((f' x).det - (A n).det)| := by congr 1; abel
    _ ≤ |(f' x).det| + |(f' x).det - (A n).det| := (abs_sub _ _)
    _ ≤ |(f' x).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ |ContinuousLinearMap.det (A n)| =
    |ContinuousLinearMap.det (f' x) - (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))|
[PROOFSTEP]
congr 1
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ ContinuousLinearMap.det (A n) =
    ContinuousLinearMap.det (f' x) - (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))
[PROOFSTEP]
abel
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ ContinuousLinearMap.det (A n) =
    ContinuousLinearMap.det (f' x) - (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))
[PROOFSTEP]
abel
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
I : |ContinuousLinearMap.det (A n)| ≤ |ContinuousLinearMap.det (f' x)| + ↑ε
⊢ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε
[PROOFSTEP]
calc
  ENNReal.ofReal |(A n).det| + ε ≤ ENNReal.ofReal (|(f' x).det| + ε) + ε :=
    add_le_add (ENNReal.ofReal_le_ofReal I) le_rfl
  _ = ENNReal.ofReal |(f' x).det| + 2 * ε := by
    simp only [ENNReal.ofReal_add, abs_nonneg, two_mul, add_assoc, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
I : |ContinuousLinearMap.det (A n)| ≤ |ContinuousLinearMap.det (f' x)| + ↑ε
⊢ ENNReal.ofReal (|ContinuousLinearMap.det (f' x)| + ↑ε) + ↑ε = ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε
[PROOFSTEP]
simp only [ENNReal.ofReal_add, abs_nonneg, two_mul, add_assoc, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =
    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ
[PROOFSTEP]
have M : ∀ n : ℕ, MeasurableSet (s ∩ t n) := fun n => hs.inter (t_meas n)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
M : ∀ (n : ℕ), MeasurableSet (s ∩ t n)
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =
    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ
[PROOFSTEP]
rw [lintegral_iUnion M]
[GOAL]
case hd
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
M : ∀ (n : ℕ), MeasurableSet (s ∩ t n)
⊢ Pairwise (Disjoint on fun i => s ∩ t i)
[PROOFSTEP]
exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ
[PROOFSTEP]
have : s = ⋃ n, s ∩ t n := by
  rw [← inter_iUnion]
  exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ s = ⋃ (n : ℕ), s ∩ t n
[PROOFSTEP]
rw [← inter_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ s = s ∩ ⋃ (i : ℕ), t i
[PROOFSTEP]
exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
this : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ
[PROOFSTEP]
rw [← this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
simp only [lintegral_add_right' _ aemeasurable_const, set_lintegral_const]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
have :
  Tendsto (fun ε : ℝ≥0 => (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) + 2 * ε * μ s) (𝓝[>] 0)
    (𝓝 ((∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) + 2 * (0 : ℝ≥0) * μ s)) :=
  by
  apply Tendsto.mono_left _ nhdsWithin_le_nhds
  refine' tendsto_const_nhds.add _
  refine' ENNReal.Tendsto.mul_const _ (Or.inr h's)
  exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑0 * ↑↑μ s))
[PROOFSTEP]
apply Tendsto.mono_left _ nhdsWithin_le_nhds
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑0 * ↑↑μ s))
[PROOFSTEP]
refine' tendsto_const_nhds.add _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ Tendsto (fun ε => 2 * ↑ε * ↑↑μ s) (𝓝 0) (𝓝 (2 * ↑0 * ↑↑μ s))
[PROOFSTEP]
refine' ENNReal.Tendsto.mul_const _ (Or.inr h's)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ Tendsto (fun ε => 2 * ↑ε) (𝓝 0) (𝓝 (2 * ↑0))
[PROOFSTEP]
exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
this :
  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑0 * ↑↑μ s))
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
simp only [add_zero, zero_mul, mul_zero, ENNReal.coe_zero] at this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
this :
  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
apply ge_of_tendsto this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
this :
  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))
⊢ ∀ᶠ (c : ℝ≥0) in 𝓝[Ioi 0] 0,
    ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑c * ↑↑μ s
[PROOFSTEP]
filter_upwards [self_mem_nhdsWithin]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
this :
  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))
⊢ ∀ (a : ℝ≥0),
    a ∈ Ioi 0 → ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑a * ↑↑μ s
[PROOFSTEP]
rintro ε (εpos : 0 < ε)
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
this :
  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)
    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))
ε : ℝ≥0
εpos : 0 < ε
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
exact addHaar_image_le_lintegral_abs_det_fderiv_aux1 μ hs hf' εpos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
let u n := disjointed (spanningSets μ) n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
have u_meas : ∀ n, MeasurableSet (u n) := by
  intro n
  apply MeasurableSet.disjointed fun i => ?_
  exact measurable_spanningSets μ i
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
⊢ ∀ (n : ℕ), MeasurableSet (u n)
[PROOFSTEP]
intro n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
n : ℕ
⊢ MeasurableSet (u n)
[PROOFSTEP]
apply MeasurableSet.disjointed fun i => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
n i : ℕ
⊢ MeasurableSet (spanningSets μ i)
[PROOFSTEP]
exact measurable_spanningSets μ i
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
have A : s = ⋃ n, s ∩ u n := by rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
⊢ s = ⋃ (n : ℕ), s ∩ u n
[PROOFSTEP]
rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
calc
  μ (f '' s) ≤ ∑' n, μ (f '' (s ∩ u n)) := by
    conv_lhs => rw [A, image_iUnion]
    exact measure_iUnion_le _
  _ ≤ ∑' n, ∫⁻ x in s ∩ u n, ENNReal.ofReal |(f' x).det| ∂μ :=
    by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply
      addHaar_image_le_lintegral_abs_det_fderiv_aux2 μ (hs.inter (u_meas n)) _ fun x hx =>
        (hf' x hx.1).mono (inter_subset_left _ _)
    have : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)
    exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)
  _ = ∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ := by
    conv_rhs => rw [A]
    rw [lintegral_iUnion]
    · intro n; exact hs.inter (u_meas n)
    · exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ↑↑μ (f '' s) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))
[PROOFSTEP]
conv_lhs => rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ↑↑μ (f '' s)
[PROOFSTEP]
rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ↑↑μ (f '' s)
[PROOFSTEP]
rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ↑↑μ (f '' s)
[PROOFSTEP]
rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ↑↑μ (⋃ (i : ℕ), f '' (s ∩ u i)) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))
[PROOFSTEP]
exact measure_iUnion_le _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n)) ≤
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ ↑↑μ (f '' (s ∩ u n)) ≤ ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
apply
  addHaar_image_le_lintegral_abs_det_fderiv_aux2 μ (hs.inter (u_meas n)) _ fun x hx =>
    (hf' x hx.1).mono (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ ↑↑μ (s ∩ u n) ≠ ⊤
[PROOFSTEP]
have : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
this : ↑↑μ (u n) < ⊤
⊢ ↑↑μ (s ∩ u n) ≠ ⊤
[PROOFSTEP]
exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
conv_rhs => rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =
    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [lintegral_iUnion]
[GOAL]
case hm
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∀ (i : ℕ), MeasurableSet (s ∩ u i)
[PROOFSTEP]
intro n
[GOAL]
case hm
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ MeasurableSet (s ∩ u n)
[PROOFSTEP]
exact hs.inter (u_meas n)
[GOAL]
case hd
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ Pairwise (Disjoint on fun n => s ∩ u n)
[PROOFSTEP]
exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
have :
  ∀ A : E →L[ℝ] E,
    ∃ δ : ℝ≥0,
      0 < δ ∧
        (∀ B : E →L[ℝ] E, ‖B - A‖ ≤ δ → |B.det - A.det| ≤ ε) ∧
          ∀ (t : Set E) (g : E → E),
            ApproximatesLinearOn g A t δ → ENNReal.ofReal |A.det| * μ t ≤ μ (g '' t) + ε * μ t :=
  by
  intro A
  obtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=
    continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos
  let δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩
  have I'' : ∀ B : E →L[ℝ] E, ‖B - A‖ ≤ ↑δ'' → |B.det - A.det| ≤ ↑ε :=
    by
    intro B hB
    rw [← Real.dist_eq]
    apply (hδ' B _).le
    rw [dist_eq_norm]
    exact hB.trans_lt (half_lt_self δ'pos)
  rcases eq_or_ne A.det 0 with (hA | hA)
  · refine' ⟨δ'', half_pos δ'pos, I'', _⟩
    simp only [hA, forall_const, zero_mul, ENNReal.ofReal_zero, imp_true_iff, zero_le, abs_zero]
  let m : ℝ≥0 := Real.toNNReal |A.det| - ε
  have I : (m : ℝ≥0∞) < ENNReal.ofReal |A.det| :=
    by
    simp only [ENNReal.ofReal, ENNReal.coe_sub]
    apply ENNReal.sub_lt_self ENNReal.coe_ne_top
    · simpa only [abs_nonpos_iff, Real.toNNReal_eq_zero, ENNReal.coe_eq_zero, Ne.def] using hA
    · simp only [εpos.ne', ENNReal.coe_eq_zero, Ne.def, not_false_iff]
  rcases((mul_le_addHaar_image_of_lt_det μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩
  refine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩
  · intro B hB
    apply I'' _ (hB.trans _)
    simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]
  · intro t g htg
    rcases eq_or_ne (μ t) ∞ with (ht | ht)
    · simp only [ht, εpos.ne', ENNReal.mul_top, ENNReal.coe_eq_zero, le_top, Ne.def, not_false_iff, _root_.add_top]
    have := h t g (htg.mono_num (min_le_left _ _))
    rwa [ENNReal.coe_sub, ENNReal.sub_mul, tsub_le_iff_right] at this
    simp only [ht, imp_true_iff, Ne.def, not_false_iff]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
⊢ ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
          ∀ (t : Set E) (g : E → E),
            ApproximatesLinearOn g A t δ →
              ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
intro A
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
obtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=
  continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
let δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
have I'' : ∀ B : E →L[ℝ] E, ‖B - A‖ ≤ ↑δ'' → |B.det - A.det| ≤ ↑ε :=
  by
  intro B hB
  rw [← Real.dist_eq]
  apply (hδ' B _).le
  rw [dist_eq_norm]
  exact hB.trans_lt (half_lt_self δ'pos)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
⊢ ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
[PROOFSTEP]
intro B hB
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑δ''
⊢ |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
[PROOFSTEP]
rw [← Real.dist_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑δ''
⊢ dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) ≤ ↑ε
[PROOFSTEP]
apply (hδ' B _).le
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑δ''
⊢ dist B A < δ'
[PROOFSTEP]
rw [dist_eq_norm]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑δ''
⊢ ‖B - A‖ < δ'
[PROOFSTEP]
exact hB.trans_lt (half_lt_self δ'pos)
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
rcases eq_or_ne A.det 0 with (hA | hA)
[GOAL]
case intro.intro.inl
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A = 0
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
refine' ⟨δ'', half_pos δ'pos, I'', _⟩
[GOAL]
case intro.intro.inl
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A = 0
⊢ ∀ (t : Set E) (g : E → E),
    ApproximatesLinearOn g A t δ'' → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
simp only [hA, forall_const, zero_mul, ENNReal.ofReal_zero, imp_true_iff, zero_le, abs_zero]
[GOAL]
case intro.intro.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
let m : ℝ≥0 := Real.toNNReal |A.det| - ε
[GOAL]
case intro.intro.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
have I : (m : ℝ≥0∞) < ENNReal.ofReal |A.det| :=
  by
  simp only [ENNReal.ofReal, ENNReal.coe_sub]
  apply ENNReal.sub_lt_self ENNReal.coe_ne_top
  · simpa only [abs_nonpos_iff, Real.toNNReal_eq_zero, ENNReal.coe_eq_zero, Ne.def] using hA
  · simp only [εpos.ne', ENNReal.coe_eq_zero, Ne.def, not_false_iff]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
⊢ ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
[PROOFSTEP]
simp only [ENNReal.ofReal, ENNReal.coe_sub]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
⊢ ↑(Real.toNNReal |ContinuousLinearMap.det A|) - ↑ε < ↑(Real.toNNReal |ContinuousLinearMap.det A|)
[PROOFSTEP]
apply ENNReal.sub_lt_self ENNReal.coe_ne_top
[GOAL]
case ha₀
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
⊢ ↑(Real.toNNReal |ContinuousLinearMap.det A|) ≠ 0
[PROOFSTEP]
simpa only [abs_nonpos_iff, Real.toNNReal_eq_zero, ENNReal.coe_eq_zero, Ne.def] using hA
[GOAL]
case hb
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
⊢ ↑ε ≠ 0
[PROOFSTEP]
simp only [εpos.ne', ENNReal.coe_eq_zero, Ne.def, not_false_iff]
[GOAL]
case intro.intro.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
rcases((mul_le_addHaar_image_of_lt_det μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩
[GOAL]
case intro.intro.inr.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
⊢ ∃ δ,
    0 < δ ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
refine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩
[GOAL]
case intro.intro.inr.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
⊢ ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(min δ δ'') → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
[PROOFSTEP]
intro B hB
[GOAL]
case intro.intro.inr.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
[PROOFSTEP]
apply I'' _ (hB.trans _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
B : E →L[ℝ] E
hB : ‖B - A‖ ≤ ↑(min δ δ'')
⊢ ↑(min δ δ'') ≤ ↑δ''
[PROOFSTEP]
simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]
[GOAL]
case intro.intro.inr.intro.intro.refine'_2
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
⊢ ∀ (t : Set E) (g : E → E),
    ApproximatesLinearOn g A t (min δ δ'') →
      ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
intro t g htg
[GOAL]
case intro.intro.inr.intro.intro.refine'_2
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
t : Set E
g : E → E
htg : ApproximatesLinearOn g A t (min δ δ'')
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
rcases eq_or_ne (μ t) ∞ with (ht | ht)
[GOAL]
case intro.intro.inr.intro.intro.refine'_2.inl
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
t : Set E
g : E → E
htg : ApproximatesLinearOn g A t (min δ δ'')
ht : ↑↑μ t = ⊤
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
simp only [ht, εpos.ne', ENNReal.mul_top, ENNReal.coe_eq_zero, le_top, Ne.def, not_false_iff, _root_.add_top]
[GOAL]
case intro.intro.inr.intro.intro.refine'_2.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
t : Set E
g : E → E
htg : ApproximatesLinearOn g A t (min δ δ'')
ht : ↑↑μ t ≠ ⊤
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
have := h t g (htg.mono_num (min_le_left _ _))
[GOAL]
case intro.intro.inr.intro.intro.refine'_2.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
t : Set E
g : E → E
htg : ApproximatesLinearOn g A t (min δ δ'')
ht : ↑↑μ t ≠ ⊤
this : ↑m * ↑↑μ t ≤ ↑↑μ (g '' t)
⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
[PROOFSTEP]
rwa [ENNReal.coe_sub, ENNReal.sub_mul, tsub_le_iff_right] at this
[GOAL]
case intro.intro.inr.intro.intro.refine'_2.inr
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
A : E →L[ℝ] E
δ' : ℝ
δ'pos : 0 < δ'
hδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε
δ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }
I'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε
hA : ContinuousLinearMap.det A ≠ 0
m : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε
I : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|
δ : ℝ≥0
h : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)
δpos : 0 < δ
t : Set E
g : E → E
htg : ApproximatesLinearOn g A t (min δ δ'')
ht : ↑↑μ t ≠ ⊤
this : (↑(Real.toNNReal |ContinuousLinearMap.det A|) - ↑ε) * ↑↑μ t ≤ ↑↑μ (g '' t)
⊢ 0 < ↑ε → ↑ε < ↑(Real.toNNReal |ContinuousLinearMap.det A|) → ↑↑μ t ≠ ⊤
[PROOFSTEP]
simp only [ht, imp_true_iff, Ne.def, not_false_iff]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
this :
  ∀ (A : E →L[ℝ] E),
    ∃ δ,
      0 < δ ∧
        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
          ∀ (t : Set E) (g : E → E),
            ApproximatesLinearOn g A t δ →
              ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
choose δ hδ using this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
obtain ⟨t, A, t_disj, t_meas, t_cover, ht, -⟩ :
  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),
    Pairwise (Disjoint on t) ∧
      (∀ n : ℕ, MeasurableSet (t n)) ∧
        (s ⊆ ⋃ n : ℕ, t n) ∧
          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=
  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' δ fun A => (hδ A).1.ne'
[GOAL]
case intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
have s_eq : s = ⋃ n, s ∩ t n := by
  rw [← inter_iUnion]
  exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ s = ⋃ (n : ℕ), s ∩ t n
[PROOFSTEP]
rw [← inter_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
⊢ s = s ∩ ⋃ (i : ℕ), t i
[PROOFSTEP]
exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)
[GOAL]
case intro.intro.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
calc
  (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) = ∑' n, ∫⁻ x in s ∩ t n, ENNReal.ofReal |(f' x).det| ∂μ :=
    by
    conv_lhs => rw [s_eq]
    rw [lintegral_iUnion]
    · exact fun n => hs.inter (t_meas n)
    · exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _
  _ ≤ ∑' n, ∫⁻ _ in s ∩ t n, ENNReal.ofReal |(A n).det| + ε ∂μ :=
    by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply lintegral_mono_ae
    filter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>
        (hf' x hx.1).mono (inter_subset_left _ _)]
    intro x hx
    have I : |(f' x).det| ≤ |(A n).det| + ε :=
      calc
        |(f' x).det| = |(A n).det + ((f' x).det - (A n).det)| := by congr 1; abel
        _ ≤ |(A n).det| + |(f' x).det - (A n).det| := (abs_add _ _)
        _ ≤ |(A n).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)
    calc
      ENNReal.ofReal |(f' x).det| ≤ ENNReal.ofReal (|(A n).det| + ε) := ENNReal.ofReal_le_ofReal I
      _ = ENNReal.ofReal |(A n).det| + ε := by
        simp only [ENNReal.ofReal_add, abs_nonneg, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]
  _ = ∑' n, (ENNReal.ofReal |(A n).det| * μ (s ∩ t n) + ε * μ (s ∩ t n)) := by
    simp only [set_lintegral_const, lintegral_add_right _ measurable_const]
  _ ≤ ∑' n, (μ (f '' (s ∩ t n)) + ε * μ (s ∩ t n) + ε * μ (s ∩ t n)) :=
    by
    refine' ENNReal.tsum_le_tsum fun n => add_le_add_right _ _
    exact (hδ (A n)).2.2 _ _ (ht n)
  _ = μ (f '' s) + 2 * ε * μ s := by
    conv_rhs => rw [s_eq]
    rw [image_iUnion, measure_iUnion]; rotate_left
    · intro i j hij
      apply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)
      exact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (t_disj hij)
    · intro i
      exact
        measurable_image_of_fderivWithin (hs.inter (t_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))
          (hf.mono (inter_subset_left _ _))
    rw [measure_iUnion]; rotate_left
    · exact pairwise_disjoint_mono t_disj fun i => inter_subset_right _ _
    · exact fun i => hs.inter (t_meas i)
    rw [← ENNReal.tsum_mul_left, ← ENNReal.tsum_add]
    congr 1
    ext1 i
    rw [mul_assoc, two_mul, add_assoc]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
conv_lhs => rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [lintegral_iUnion]
[GOAL]
case hm
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∀ (i : ℕ), MeasurableSet (s ∩ t i)
[PROOFSTEP]
exact fun n => hs.inter (t_meas n)
[GOAL]
case hd
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ Pairwise (Disjoint on fun n => s ∩ t n)
[PROOFSTEP]
exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
⊢ ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤
    ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ
[PROOFSTEP]
apply lintegral_mono_ae
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
⊢ ∀ᵐ (a : E) ∂Measure.restrict μ (s ∩ t n),
    ENNReal.ofReal |ContinuousLinearMap.det (f' a)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε
[PROOFSTEP]
filter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>
    (hf' x hx.1).mono (inter_subset_left _ _)]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
⊢ ∀ (a : E),
    ‖f' a - A n‖₊ ≤ δ (A n) →
      ENNReal.ofReal |ContinuousLinearMap.det (f' a)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε
[PROOFSTEP]
intro x hx
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε
[PROOFSTEP]
have I : |(f' x).det| ≤ |(A n).det| + ε :=
  calc
    |(f' x).det| = |(A n).det + ((f' x).det - (A n).det)| := by congr 1; abel
    _ ≤ |(A n).det| + |(f' x).det - (A n).det| := (abs_add _ _)
    _ ≤ |(A n).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ |ContinuousLinearMap.det (f' x)| =
    |ContinuousLinearMap.det (A n) + (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))|
[PROOFSTEP]
congr 1
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ ContinuousLinearMap.det (f' x) =
    ContinuousLinearMap.det (A n) + (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))
[PROOFSTEP]
abel
[GOAL]
case e_a
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
⊢ ContinuousLinearMap.det (f' x) =
    ContinuousLinearMap.det (A n) + (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))
[PROOFSTEP]
abel
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
I : |ContinuousLinearMap.det (f' x)| ≤ |ContinuousLinearMap.det (A n)| + ↑ε
⊢ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε
[PROOFSTEP]
calc
  ENNReal.ofReal |(f' x).det| ≤ ENNReal.ofReal (|(A n).det| + ε) := ENNReal.ofReal_le_ofReal I
  _ = ENNReal.ofReal |(A n).det| + ε := by
    simp only [ENNReal.ofReal_add, abs_nonneg, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
x : E
hx : ‖f' x - A n‖₊ ≤ δ (A n)
I : |ContinuousLinearMap.det (f' x)| ≤ |ContinuousLinearMap.det (A n)| + ↑ε
⊢ ENNReal.ofReal (|ContinuousLinearMap.det (A n)| + ↑ε) = ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε
[PROOFSTEP]
simp only [ENNReal.ofReal_add, abs_nonneg, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ =
    ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n))
[PROOFSTEP]
simp only [set_lintegral_const, lintegral_add_right _ measurable_const]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) ≤
    ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n))
[PROOFSTEP]
refine' ENNReal.tsum_le_tsum fun n => add_le_add_right _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
n : ℕ
⊢ ENNReal.ofReal |ContinuousLinearMap.det (A n)| * ↑↑μ (s ∩ t n) ≤ ↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n)
[PROOFSTEP]
exact (hδ (A n)).2.2 _ _ (ht n)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) = ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
conv_rhs => rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
| ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
| ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
| ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
rw [s_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =
    ↑↑μ (f '' ⋃ (n : ℕ), s ∩ t n) + 2 * ↑ε * ↑↑μ (⋃ (n : ℕ), s ∩ t n)
[PROOFSTEP]
rw [image_iUnion, measure_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =
    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ↑↑μ (⋃ (n : ℕ), s ∩ t n)
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ Pairwise (Disjoint on fun i => f '' (s ∩ t i))
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∀ (i : ℕ), MeasurableSet (f '' (s ∩ t i))
[PROOFSTEP]
rotate_left
[GOAL]
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ Pairwise (Disjoint on fun i => f '' (s ∩ t i))
[PROOFSTEP]
intro i j hij
[GOAL]
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
i j : ℕ
hij : i ≠ j
⊢ (Disjoint on fun i => f '' (s ∩ t i)) i j
[PROOFSTEP]
apply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
i j : ℕ
hij : i ≠ j
⊢ Disjoint (s ∩ t i) (s ∩ t j)
[PROOFSTEP]
exact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (t_disj hij)
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∀ (i : ℕ), MeasurableSet (f '' (s ∩ t i))
[PROOFSTEP]
intro i
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
i : ℕ
⊢ MeasurableSet (f '' (s ∩ t i))
[PROOFSTEP]
exact
  measurable_image_of_fderivWithin (hs.inter (t_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))
    (hf.mono (inter_subset_left _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =
    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ↑↑μ (⋃ (n : ℕ), s ∩ t n)
[PROOFSTEP]
rw [measure_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =
    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ∑' (i : ℕ), ↑↑μ (s ∩ t i)
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ Pairwise (Disjoint on fun n => s ∩ t n)
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∀ (i : ℕ), MeasurableSet (s ∩ t i)
[PROOFSTEP]
rotate_left
[GOAL]
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ Pairwise (Disjoint on fun n => s ∩ t n)
[PROOFSTEP]
exact pairwise_disjoint_mono t_disj fun i => inter_subset_right _ _
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∀ (i : ℕ), MeasurableSet (s ∩ t i)
[PROOFSTEP]
exact fun i => hs.inter (t_meas i)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =
    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ∑' (i : ℕ), ↑↑μ (s ∩ t i)
[PROOFSTEP]
rw [← ENNReal.tsum_mul_left, ← ENNReal.tsum_add]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =
    ∑' (a : ℕ), (↑↑μ (f '' (s ∩ t a)) + 2 * ↑ε * ↑↑μ (s ∩ t a))
[PROOFSTEP]
congr 1
[GOAL]
case e_f
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
⊢ (fun n => ↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) = fun a =>
    ↑↑μ (f '' (s ∩ t a)) + 2 * ↑ε * ↑↑μ (s ∩ t a)
[PROOFSTEP]
ext1 i
[GOAL]
case e_f.h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
ε : ℝ≥0
εpos : 0 < ε
δ : (E →L[ℝ] E) → ℝ≥0
hδ :
  ∀ (A : E →L[ℝ] E),
    0 < δ A ∧
      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧
        ∀ (t : Set E) (g : E → E),
          ApproximatesLinearOn g A t (δ A) →
            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t
t : ℕ → Set E
A : ℕ → E →L[ℝ] E
t_disj : Pairwise (Disjoint on t)
t_meas : ∀ (n : ℕ), MeasurableSet (t n)
t_cover : s ⊆ ⋃ (n : ℕ), t n
ht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))
s_eq : s = ⋃ (n : ℕ), s ∩ t n
i : ℕ
⊢ ↑↑μ (f '' (s ∩ t i)) + ↑ε * ↑↑μ (s ∩ t i) + ↑ε * ↑↑μ (s ∩ t i) = ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ↑↑μ (s ∩ t i)
[PROOFSTEP]
rw [mul_assoc, two_mul, add_assoc]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
have : Tendsto (fun ε : ℝ≥0 => μ (f '' s) + 2 * ε * μ s) (𝓝[>] 0) (𝓝 (μ (f '' s) + 2 * (0 : ℝ≥0) * μ s)) :=
  by
  apply Tendsto.mono_left _ nhdsWithin_le_nhds
  refine' tendsto_const_nhds.add _
  refine' ENNReal.Tendsto.mul_const _ (Or.inr h's)
  exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s) + 2 * ↑0 * ↑↑μ s))
[PROOFSTEP]
apply Tendsto.mono_left _ nhdsWithin_le_nhds
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝 0) (𝓝 (↑↑μ (f '' s) + 2 * ↑0 * ↑↑μ s))
[PROOFSTEP]
refine' tendsto_const_nhds.add _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ Tendsto (fun ε => 2 * ↑ε * ↑↑μ s) (𝓝 0) (𝓝 (2 * ↑0 * ↑↑μ s))
[PROOFSTEP]
refine' ENNReal.Tendsto.mul_const _ (Or.inr h's)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ Tendsto (fun ε => 2 * ↑ε) (𝓝 0) (𝓝 (2 * ↑0))
[PROOFSTEP]
exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
this : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s) + 2 * ↑0 * ↑↑μ s))
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
simp only [add_zero, zero_mul, mul_zero, ENNReal.coe_zero] at this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
this : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
apply ge_of_tendsto this
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
this : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))
⊢ ∀ᶠ (c : ℝ≥0) in 𝓝[Ioi 0] 0,
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑c * ↑↑μ s
[PROOFSTEP]
filter_upwards [self_mem_nhdsWithin]
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
this : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))
⊢ ∀ (a : ℝ≥0),
    a ∈ Ioi 0 → ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑a * ↑↑μ s
[PROOFSTEP]
rintro ε (εpos : 0 < ε)
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
h's : ↑↑μ s ≠ ⊤
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
this : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))
ε : ℝ≥0
εpos : 0 < ε
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s
[PROOFSTEP]
exact lintegral_abs_det_fderiv_le_addHaar_image_aux1 μ hs hf' hf εpos
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
let u n := disjointed (spanningSets μ) n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
have u_meas : ∀ n, MeasurableSet (u n) := by
  intro n
  apply MeasurableSet.disjointed fun i => ?_
  exact measurable_spanningSets μ i
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
⊢ ∀ (n : ℕ), MeasurableSet (u n)
[PROOFSTEP]
intro n
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
n : ℕ
⊢ MeasurableSet (u n)
[PROOFSTEP]
apply MeasurableSet.disjointed fun i => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
n i : ℕ
⊢ MeasurableSet (spanningSets μ i)
[PROOFSTEP]
exact measurable_spanningSets μ i
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
have A : s = ⋃ n, s ∩ u n := by rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
⊢ s = ⋃ (n : ℕ), s ∩ u n
[PROOFSTEP]
rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)
[PROOFSTEP]
calc
  (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) = ∑' n, ∫⁻ x in s ∩ u n, ENNReal.ofReal |(f' x).det| ∂μ :=
    by
    conv_lhs => rw [A]
    rw [lintegral_iUnion]
    · intro n; exact hs.inter (u_meas n)
    · exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _
  _ ≤ ∑' n, μ (f '' (s ∩ u n)) := by
    apply ENNReal.tsum_le_tsum fun n => ?_
    apply
      lintegral_abs_det_fderiv_le_addHaar_image_aux2 μ (hs.inter (u_meas n)) _
        (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _)) (hf.mono (inter_subset_left _ _))
    have : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)
    exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)
  _ = μ (f '' s) := by
    conv_rhs => rw [A, image_iUnion]
    rw [measure_iUnion]
    · intro i j hij
      apply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)
      exact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (disjoint_disjointed _ hij)
    · intro i
      exact
        measurable_image_of_fderivWithin (hs.inter (u_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))
          (hf.mono (inter_subset_left _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
conv_lhs => rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [A]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =
    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ
[PROOFSTEP]
rw [lintegral_iUnion]
[GOAL]
case hm
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∀ (i : ℕ), MeasurableSet (s ∩ u i)
[PROOFSTEP]
intro n
[GOAL]
case hm
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ MeasurableSet (s ∩ u n)
[PROOFSTEP]
exact hs.inter (u_meas n)
[GOAL]
case hd
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ Pairwise (Disjoint on fun n => s ∩ u n)
[PROOFSTEP]
exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤
    ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))
[PROOFSTEP]
apply ENNReal.tsum_le_tsum fun n => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' (s ∩ u n))
[PROOFSTEP]
apply
  lintegral_abs_det_fderiv_le_addHaar_image_aux2 μ (hs.inter (u_meas n)) _
    (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _)) (hf.mono (inter_subset_left _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
⊢ ↑↑μ (s ∩ u n) ≠ ⊤
[PROOFSTEP]
have : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
n : ℕ
this : ↑↑μ (u n) < ⊤
⊢ ↑↑μ (s ∩ u n) ≠ ⊤
[PROOFSTEP]
exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n)) = ↑↑μ (f '' s)
[PROOFSTEP]
conv_rhs => rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ↑↑μ (f '' s)
[PROOFSTEP]
rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ↑↑μ (f '' s)
[PROOFSTEP]
rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
| ↑↑μ (f '' s)
[PROOFSTEP]
rw [A, image_iUnion]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n)) = ↑↑μ (⋃ (i : ℕ), f '' (s ∩ u i))
[PROOFSTEP]
rw [measure_iUnion]
[GOAL]
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ Pairwise (Disjoint on fun i => f '' (s ∩ u i))
[PROOFSTEP]
intro i j hij
[GOAL]
case hn
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
i j : ℕ
hij : i ≠ j
⊢ (Disjoint on fun i => f '' (s ∩ u i)) i j
[PROOFSTEP]
apply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
i j : ℕ
hij : i ≠ j
⊢ Disjoint (s ∩ u i) (s ∩ u j)
[PROOFSTEP]
exact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (disjoint_disjointed _ hij)
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
⊢ ∀ (i : ℕ), MeasurableSet (f '' (s ∩ u i))
[PROOFSTEP]
intro i
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : ℕ → Set E := fun n => disjointed (spanningSets μ) n
u_meas : ∀ (n : ℕ), MeasurableSet (u n)
A : s = ⋃ (n : ℕ), s ∩ u n
i : ℕ
⊢ MeasurableSet (f '' (s ∩ u i))
[PROOFSTEP]
exact
  measurable_image_of_fderivWithin (hs.inter (u_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))
    (hf.mono (inter_subset_left _ _))
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
h'f : Measurable f
⊢ Measure.map f (withDensity (Measure.restrict μ s) fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
apply Measure.ext fun t ht => ?_
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
h'f : Measurable f
t : Set E
ht : MeasurableSet t
⊢ ↑↑(Measure.map f (withDensity (Measure.restrict μ s) fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) t =
    ↑↑(Measure.restrict μ (f '' s)) t
[PROOFSTEP]
rw [map_apply h'f ht, withDensity_apply _ (h'f ht), Measure.restrict_apply ht, restrict_restrict (h'f ht),
  lintegral_abs_det_fderiv_eq_addHaar_image μ ((h'f ht).inter hs)
    (fun x hx => (hf' x hx.2).mono (inter_subset_right _ _)) (hf.mono (inter_subset_right _ _)),
  image_preimage_inter]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
obtain ⟨u, u_meas, uf⟩ : ∃ u, Measurable u ∧ EqOn u f s := by
  classical
  refine' ⟨piecewise s f 0, _, piecewise_eqOn _ _ _⟩
  refine' ContinuousOn.measurable_piecewise _ continuous_zero.continuousOn hs
  have : DifferentiableOn ℝ f s := fun x hx => (hf' x hx).differentiableWithinAt
  exact this.continuousOn
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ ∃ u, Measurable u ∧ EqOn u f s
[PROOFSTEP]
classical
refine' ⟨piecewise s f 0, _, piecewise_eqOn _ _ _⟩
refine' ContinuousOn.measurable_piecewise _ continuous_zero.continuousOn hs
have : DifferentiableOn ℝ f s := fun x hx => (hf' x hx).differentiableWithinAt
exact this.continuousOn
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ ∃ u, Measurable u ∧ EqOn u f s
[PROOFSTEP]
refine' ⟨piecewise s f 0, _, piecewise_eqOn _ _ _⟩
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ Measurable (piecewise s f 0)
[PROOFSTEP]
refine' ContinuousOn.measurable_piecewise _ continuous_zero.continuousOn hs
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
⊢ ContinuousOn f s
[PROOFSTEP]
have : DifferentiableOn ℝ f s := fun x hx => (hf' x hx).differentiableWithinAt
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
this : DifferentiableOn ℝ f s
⊢ ContinuousOn f s
[PROOFSTEP]
exact this.continuousOn
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
have u' : ∀ x ∈ s, HasFDerivWithinAt u (f' x) s x := fun x hx => (hf' x hx).congr (fun y hy => uf hy) (uf hx)
[GOAL]
case intro.intro
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
set F : s → E := u ∘ (↑) with hF
[GOAL]
case intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
have A : Measure.map F (comap (↑) (μ.withDensity fun x => ENNReal.ofReal |(f' x).det|)) = μ.restrict (u '' s) :=
  by
  rw [hF, ← Measure.map_map u_meas measurable_subtype_coe, map_comap_subtype_coe hs, restrict_withDensity hs]
  exact map_withDensity_abs_det_fderiv_eq_addHaar μ hs u' (hf.congr uf.symm) u_meas
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
⊢ Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (u '' s)
[PROOFSTEP]
rw [hF, ← Measure.map_map u_meas measurable_subtype_coe, map_comap_subtype_coe hs, restrict_withDensity hs]
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
⊢ Measure.map u (withDensity (Measure.restrict μ s) fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    Measure.restrict μ (u '' s)
[PROOFSTEP]
exact map_withDensity_abs_det_fderiv_eq_addHaar μ hs u' (hf.congr uf.symm) u_meas
[GOAL]
case intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
A :
  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (u '' s)
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
rw [uf.image_eq] at A
[GOAL]
case intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
A :
  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
have : F = s.restrict f := by
  ext x
  exact uf x.2
[GOAL]
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
A :
  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
⊢ F = Set.restrict s f
[PROOFSTEP]
ext x
[GOAL]
case h
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
A :
  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
x : ↑s
⊢ F x = Set.restrict s f x
[PROOFSTEP]
exact uf x.2
[GOAL]
case intro.intro
E : Type u_1
F✝ : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
u : E → E
u_meas : Measurable u
uf : EqOn u f s
u' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x
F : ↑s → E := u ∘ Subtype.val
hF : F = u ∘ Subtype.val
A :
  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
this : F = Set.restrict s f
⊢ Measure.map (Set.restrict s f)
      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =
    Measure.restrict μ (f '' s)
[PROOFSTEP]
rwa [this] at A
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
⊢ ∫⁻ (x : E) in f '' s, g x ∂μ = ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ
[PROOFSTEP]
rw [← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,
  (measurableEmbedding_of_fderivWithin hs hf' hf).lintegral_map]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
⊢ ∫⁻ (a : ↑s),
      g
        (Set.restrict s f
          a) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ
[PROOFSTEP]
have : ∀ x : s, g (s.restrict f x) = (g ∘ f) x := fun x => rfl
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∫⁻ (a : ↑s),
      g
        (Set.restrict s f
          a) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ
[PROOFSTEP]
simp only [this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∫⁻ (a : ↑s),
      (g ∘ f) ↑a ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ
[PROOFSTEP]
rw [← (MeasurableEmbedding.subtype_coe hs).lintegral_map, map_comap_subtype_coe hs,
  set_lintegral_withDensity_eq_set_lintegral_mul_non_measurable₀ _ _ _ hs]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∫⁻ (a : E) in s, ((fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) * fun a => (g ∘ f) a) a ∂μ =
    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ
[PROOFSTEP]
rfl
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| < ⊤
[PROOFSTEP]
simp only [eventually_true, ENNReal.ofReal_lt_top]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → ℝ≥0∞
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ AEMeasurable fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|
[PROOFSTEP]
exact aemeasurable_ofReal_abs_det_fderivWithin μ hs hf'
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ IntegrableOn g (f '' s) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s
[PROOFSTEP]
rw [IntegrableOn, ← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,
  (measurableEmbedding_of_fderivWithin hs hf' hf).integrable_map_iff]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ Integrable (g ∘ Set.restrict s f) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s
[PROOFSTEP]
change Integrable ((g ∘ f) ∘ ((↑) : s → E)) _ ↔ _
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ Integrable ((g ∘ f) ∘ Subtype.val) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s
[PROOFSTEP]
rw [← (MeasurableEmbedding.subtype_coe hs).integrable_map_iff, map_comap_subtype_coe hs]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ Integrable (g ∘ f) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s
[PROOFSTEP]
simp only [ENNReal.ofReal]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ Integrable (g ∘ f) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s
[PROOFSTEP]
rw [restrict_withDensity hs, integrable_withDensity_iff_integrable_coe_smul₀, IntegrableOn]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ (Integrable fun x => ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|) • (g ∘ f) x) ↔
    Integrable fun x => |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
rw [iff_iff_eq]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ (Integrable fun x => ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|) • (g ∘ f) x) =
    Integrable fun x => |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
congr 2 with x
[GOAL]
case e_f.h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
x : E
⊢ ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|) • (g ∘ f) x = |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
rw [Real.coe_toNNReal _ (abs_nonneg _)]
[GOAL]
case e_f.h
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
x : E
⊢ |ContinuousLinearMap.det (f' x)| • (g ∘ f) x = |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
rfl
[GOAL]
case hf
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ AEMeasurable fun x => Real.toNNReal |ContinuousLinearMap.det (f' x)|
[PROOFSTEP]
exact aemeasurable_toNNReal_abs_det_fderivWithin μ hs hf'
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ ∫ (x : E) in f '' s, g x ∂μ = ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ
[PROOFSTEP]
rw [← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,
  (measurableEmbedding_of_fderivWithin hs hf' hf).integral_map]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
⊢ ∫ (x : ↑s),
      g
        (Set.restrict s f
          x) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ
[PROOFSTEP]
have : ∀ x : s, g (s.restrict f x) = (g ∘ f) x := fun x => rfl
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∫ (x : ↑s),
      g
        (Set.restrict s f
          x) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =
    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ
[PROOFSTEP]
simp only [this, ENNReal.ofReal]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∫ (x : ↑s),
      (g ∘ f) ↑x ∂Measure.comap Subtype.val (withDensity μ fun x => ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|)) =
    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ
[PROOFSTEP]
rw [← (MeasurableEmbedding.subtype_coe hs).integral_map, map_comap_subtype_coe hs,
  set_integral_withDensity_eq_set_integral_smul₀ (aemeasurable_toNNReal_abs_det_fderivWithin μ hs hf') _ hs]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
⊢ ∫ (a : E) in s, Real.toNNReal |ContinuousLinearMap.det (f' a)| • (g ∘ f) a ∂μ =
    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ
[PROOFSTEP]
congr with x
[GOAL]
case e_f.h
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
x : E
⊢ Real.toNNReal |ContinuousLinearMap.det (f' x)| • (g ∘ f) x = |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
conv_rhs => rw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
x : E
| |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
rw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
x : E
| |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
rw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x
hf : InjOn f s
g : E → F
this : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x
x : E
| |ContinuousLinearMap.det (f' x)| • g (f x)
[PROOFSTEP]
rw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
𝕜 : Type u_3
inst✝ : NormedField 𝕜
v : 𝕜
⊢ ContinuousLinearMap.det (ContinuousLinearMap.smulRight 1 v) = v
[PROOFSTEP]
have : (1 : 𝕜 →L[𝕜] 𝕜).smulRight v = v • (1 : 𝕜 →L[𝕜] 𝕜) :=
  by
  ext1
  simp only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, Algebra.id.smul_eq_mul, one_mul,
    ContinuousLinearMap.coe_smul', Pi.smul_apply, mul_one]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
𝕜 : Type u_3
inst✝ : NormedField 𝕜
v : 𝕜
⊢ ContinuousLinearMap.smulRight 1 v = v • 1
[PROOFSTEP]
ext1
[GOAL]
case h
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
𝕜 : Type u_3
inst✝ : NormedField 𝕜
v : 𝕜
⊢ ↑(ContinuousLinearMap.smulRight 1 v) 1 = ↑(v • 1) 1
[PROOFSTEP]
simp only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, Algebra.id.smul_eq_mul, one_mul,
  ContinuousLinearMap.coe_smul', Pi.smul_apply, mul_one]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
𝕜 : Type u_3
inst✝ : NormedField 𝕜
v : 𝕜
this : ContinuousLinearMap.smulRight 1 v = v • 1
⊢ ContinuousLinearMap.det (ContinuousLinearMap.smulRight 1 v) = v
[PROOFSTEP]
rw [this, ContinuousLinearMap.det, ContinuousLinearMap.coe_smul]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
𝕜 : Type u_3
inst✝ : NormedField 𝕜
v : 𝕜
this : ContinuousLinearMap.smulRight 1 v = v • 1
⊢ ↑LinearMap.det (v • ↑1) = v
[PROOFSTEP]
rw [show ((1 : 𝕜 →L[𝕜] 𝕜) : 𝕜 →ₗ[𝕜] 𝕜) = LinearMap.id from rfl]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
𝕜 : Type u_3
inst✝ : NormedField 𝕜
v : 𝕜
this : ContinuousLinearMap.smulRight 1 v = v • 1
⊢ ↑LinearMap.det (v • LinearMap.id) = v
[PROOFSTEP]
rw [LinearMap.det_smul, FiniteDimensional.finrank_self, LinearMap.det_id, pow_one, mul_one]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : FiniteDimensional ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : IsAddHaarMeasure μ
s : Set ℝ
f f' : ℝ → ℝ
hs : MeasurableSet s
hf' : ∀ (x : ℝ), x ∈ s → HasDerivWithinAt f (f' x) s x
hf : InjOn f s
g : ℝ → F
⊢ IntegrableOn g (f '' s) ↔ IntegrableOn (fun x => |f' x| • g (f x)) s
[PROOFSTEP]
simpa only [det_one_smulRight] using
  integrableOn_image_iff_integrableOn_abs_det_fderiv_smul volume hs (fun x hx => (hf' x hx).hasFDerivWithinAt) hf g
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s✝ : Set E
f✝ : E → E
f'✝ : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
s : Set ℝ
f f' : ℝ → ℝ
inst✝ : CompleteSpace F
hs : MeasurableSet s
hf' : ∀ (x : ℝ), x ∈ s → HasDerivWithinAt f (f' x) s x
hf : InjOn f s
g : ℝ → F
⊢ ∫ (x : ℝ) in f '' s, g x = ∫ (x : ℝ) in s, |f' x| • g (f x)
[PROOFSTEP]
simpa only [det_one_smulRight] using
  integral_image_eq_integral_abs_det_fderiv_smul volume hs (fun x hx => (hf' x hx).hasFDerivWithinAt) hf g
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
f : LocalHomeomorph E E
hf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x
g : E → F
⊢ ∫ (x : E) in f.target, g x ∂μ = ∫ (x : E) in f.source, |ContinuousLinearMap.det (f' x)| • g (↑f x) ∂μ
[PROOFSTEP]
have : f '' f.source = f.target := LocalEquiv.image_source_eq_target f.toLocalEquiv
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
f : LocalHomeomorph E E
hf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x
g : E → F
this : ↑f '' f.source = f.target
⊢ ∫ (x : E) in f.target, g x ∂μ = ∫ (x : E) in f.source, |ContinuousLinearMap.det (f' x)| • g (↑f x) ∂μ
[PROOFSTEP]
rw [← this]
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
f : LocalHomeomorph E E
hf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x
g : E → F
this : ↑f '' f.source = f.target
⊢ ∫ (x : E) in ↑f '' f.source, g x ∂μ = ∫ (x : E) in f.source, |ContinuousLinearMap.det (f' x)| • g (↑f x) ∂μ
[PROOFSTEP]
apply integral_image_eq_integral_abs_det_fderiv_smul μ f.open_source.measurableSet _ f.injOn
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
f : LocalHomeomorph E E
hf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x
g : E → F
this : ↑f '' f.source = f.target
⊢ ∀ (x : E), x ∈ f.source → HasFDerivWithinAt (↑f) (f' x) f.source x
[PROOFSTEP]
intro x hx
[GOAL]
E : Type u_1
F : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : FiniteDimensional ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
s : Set E
f✝ : E → E
f' : E → E →L[ℝ] E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
μ : Measure E
inst✝¹ : IsAddHaarMeasure μ
inst✝ : CompleteSpace F
f : LocalHomeomorph E E
hf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x
g : E → F
this : ↑f '' f.source = f.target
x : E
hx : x ∈ f.source
⊢ HasFDerivWithinAt (↑f) (f' x) f.source x
[PROOFSTEP]
exact (hf' x hx).hasFDerivWithinAt