l3lab/ntp-mathlib huggingface dataset:
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  

Proof state:
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  

Proof state:
case intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
t : Set E
hst : t ∈ 𝓝[insert x s] x
p : E → FormalMultilinearSeries ℝ E F
hp : HasFTaylorSeriesUpToOn (↑1) f p t
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
  

Proof state:
case intro.intro.intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
t : Set E
hst : t ∈ 𝓝[insert x s] x
p : E → FormalMultilinearSeries ℝ E F
hp : HasFTaylorSeriesUpToOn (↑1) f p t
ε : ℝ
ε0 : ε > 0
hε : Metric.ball x ε ∩ insert x s ⊆ t
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
  replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
  

Proof state:
case intro.intro.intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
t : Set E
hst : t ∈ 𝓝[insert x s] x
p : E → FormalMultilinearSeries ℝ E F
ε : ℝ
ε0 : ε > 0
hε : Metric.ball x ε ∩ insert x s ⊆ t
hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s)
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
clear hst hε t
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
  replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
  clear hst hε t
  

Proof state:
case intro.intro.intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
p : E → FormalMultilinearSeries ℝ E F
ε : ℝ
ε0 : ε > 0
hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s)
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
rw [← insert_eq_of_mem (Metric.mem_ball_self ε0), ← insert_inter_distrib] at hp
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
  replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
  clear hst hε t
  rw [← insert_eq_of_mem (Metric.mem_ball_self ε0), ← insert_inter_distrib] at hp
  

Proof state:
case intro.intro.intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
p : E → FormalMultilinearSeries ℝ E F
ε : ℝ
ε0 : ε > 0
hp : HasFTaylorSeriesUpToOn 1 f p (insert x (Metric.ball x ε ∩ s))
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
rcases hp.exists_lipschitzOnWith ((convex_ball _ _).inter hs) with ⟨K, t, hst, hft⟩
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
  replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
  clear hst hε t
  rw [← insert_eq_of_mem (Metric.mem_ball_self ε0), ← insert_inter_distrib] at hp
  rcases hp.exists_lipschitzOnWith ((convex_ball _ _).inter hs) with ⟨K, t, hst, hft⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
p : E → FormalMultilinearSeries ℝ E F
ε : ℝ
ε0 : ε > 0
hp : HasFTaylorSeriesUpToOn 1 f p (insert x (Metric.ball x ε ∩ s))
K : ℝ≥0
t : Set E
hst : t ∈ 𝓝[Metric.ball x ε ∩ s] x
hft : LipschitzOnWith K f t
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
rw [inter_comm, ← nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ ε0)] at hst
/-- If `f` is `C^1` within a convex set `s` at `x`, then it is Lipschitz on a neighborhood of `x`
within `s`. -/
theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F} {s : Set E} {x : E}
    (hf : ContDiffWithinAt ℝ 1 f s x) (hs : Convex ℝ s) :
    ∃ K : ℝ≥0, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
  rcases hf 1 le_rfl with ⟨t, hst, p, hp⟩
  rcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩
  replace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε
  clear hst hε t
  rw [← insert_eq_of_mem (Metric.mem_ball_self ε0), ← insert_inter_distrib] at hp
  rcases hp.exists_lipschitzOnWith ((convex_ball _ _).inter hs) with ⟨K, t, hst, hft⟩
  rw [inter_comm, ← nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ ε0)] at hst
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁸ : IsROrC 𝕂
E' : Type u_2
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : NormedSpace 𝕂 E'
F' : Type u_3
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕂 F'
E : Type u_4
F : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : E → F
s : Set E
x : E
hf : ContDiffWithinAt ℝ 1 f s x
hs : Convex ℝ s
p : E → FormalMultilinearSeries ℝ E F
ε : ℝ
ε0 : ε > 0
hp : HasFTaylorSeriesUpToOn 1 f p (insert x (Metric.ball x ε ∩ s))
K : ℝ≥0
t : Set E
hst : t ∈ 𝓝[s] x
hft : LipschitzOnWith K f t
⊢ ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

Next tactic:
exact ⟨K, t, hst, hft⟩
/-- If `f` is `C^1`, it is locally Lipschitz. -/
lemma ContDiff.locallyLipschitz {f : E' → F'} (hf : ContDiff 𝕂 1 f) : LocallyLipschitz f := by
  

Proof state:
n : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
hf : ContDiff 𝕂 1 f
⊢ LocallyLipschitz f

Next tactic:
intro x
/-- If `f` is `C^1`, it is locally Lipschitz. -/
lemma ContDiff.locallyLipschitz {f : E' → F'} (hf : ContDiff 𝕂 1 f) : LocallyLipschitz f := by
  intro x
  

Proof state:
n : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
hf : ContDiff 𝕂 1 f
x : E'
⊢ ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t

Next tactic:
rcases hf.contDiffAt.exists_lipschitzOnWith with ⟨K, t, ht, hf⟩
/-- If `f` is `C^1`, it is locally Lipschitz. -/
lemma ContDiff.locallyLipschitz {f : E' → F'} (hf : ContDiff 𝕂 1 f) : LocallyLipschitz f := by
  intro x
  rcases hf.contDiffAt.exists_lipschitzOnWith with ⟨K, t, ht, hf⟩
  

Proof state:
case intro.intro.intro
n : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
hf✝ : ContDiff 𝕂 1 f
x : E'
K : ℝ≥0
t : Set E'
ht : t ∈ 𝓝 ?m.48948
hf : LipschitzOnWith K f t
⊢ ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t

Next tactic:
use K, t
/-- A `C^1` function with compact support is Lipschitz. -/
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' → F'} {n : ℕ∞}
    (hf : HasCompactSupport f) (h'f : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
    ∃ C, LipschitzWith C f := by
  

Proof state:
n✝ : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
n : ℕ∞
hf : HasCompactSupport f
h'f : ContDiff 𝕂 n f
hn : 1 ≤ n
⊢ ∃ C, LipschitzWith C f

Next tactic:
obtain ⟨C, hC⟩ := (hf.fderiv 𝕂).exists_bound_of_continuous (h'f.continuous_fderiv hn)
/-- A `C^1` function with compact support is Lipschitz. -/
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' → F'} {n : ℕ∞}
    (hf : HasCompactSupport f) (h'f : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
    ∃ C, LipschitzWith C f := by
  obtain ⟨C, hC⟩ := (hf.fderiv 𝕂).exists_bound_of_continuous (h'f.continuous_fderiv hn)
  

Proof state:
case intro
n✝ : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
n : ℕ∞
hf : HasCompactSupport f
h'f : ContDiff 𝕂 n f
hn : 1 ≤ n
C : ℝ
hC : ∀ (x : E'), ‖fderiv 𝕂 f x‖ ≤ C
⊢ ∃ C, LipschitzWith C f

Next tactic:
refine ⟨⟨max C 0, le_max_right _ _⟩, ?_⟩
/-- A `C^1` function with compact support is Lipschitz. -/
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' → F'} {n : ℕ∞}
    (hf : HasCompactSupport f) (h'f : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
    ∃ C, LipschitzWith C f := by
  obtain ⟨C, hC⟩ := (hf.fderiv 𝕂).exists_bound_of_continuous (h'f.continuous_fderiv hn)
  refine ⟨⟨max C 0, le_max_right _ _⟩, ?_⟩
  

Proof state:
case intro
n✝ : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
n : ℕ∞
hf : HasCompactSupport f
h'f : ContDiff 𝕂 n f
hn : 1 ≤ n
C : ℝ
hC : ∀ (x : E'), ‖fderiv 𝕂 f x‖ ≤ C
⊢ LipschitzWith { val := max C 0, property := (_ : 0 ≤ max C 0) } f

Next tactic:
apply lipschitzWith_of_nnnorm_fderiv_le (h'f.differentiable hn) (fun x ↦ ?_)
/-- A `C^1` function with compact support is Lipschitz. -/
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' → F'} {n : ℕ∞}
    (hf : HasCompactSupport f) (h'f : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
    ∃ C, LipschitzWith C f := by
  obtain ⟨C, hC⟩ := (hf.fderiv 𝕂).exists_bound_of_continuous (h'f.continuous_fderiv hn)
  refine ⟨⟨max C 0, le_max_right _ _⟩, ?_⟩
  apply lipschitzWith_of_nnnorm_fderiv_le (h'f.differentiable hn) (fun x ↦ ?_)
  

Proof state:
n✝ : ℕ∞
𝕂 : Type u_1
inst✝⁴ : IsROrC 𝕂
E' : Type u_2
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕂 E'
F' : Type u_3
inst✝¹ : NormedAddCommGroup F'
inst✝ : NormedSpace 𝕂 F'
f : E' → F'
n : ℕ∞
hf : HasCompactSupport f
h'f : ContDiff 𝕂 n f
hn : 1 ≤ n
C : ℝ
hC : ∀ (x : E'), ‖fderiv 𝕂 f x‖ ≤ C
x : E'
⊢ ‖fderiv 𝕂 f x‖₊ ≤ { val := max C 0, property := (_ : 0 ≤ max C 0) }

Next tactic:
simp [← NNReal.coe_le_coe, hC x]
/-- A helper definition used to define the morphisms for `plus`. -/
@[simps]
def diagramPullback {X Y : C} (f : X ⟶ Y) : J.diagram P Y ⟶ (J.pullback f).op ⋙ J.diagram P X where
  app S :=
    Multiequalizer.lift _ _ (fun I => Multiequalizer.ι (S.unop.index P) I.base) fun I =>
      Multiequalizer.condition (S.unop.index P) I.base
  naturality S T f := Multiequalizer.hom_ext _ _ _ (fun I => by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P : Cᵒᵖ ⥤ D
X Y : C
f✝ : X ⟶ Y
S T : (Cover J Y)ᵒᵖ
f : S ⟶ T
I : (Cover.index ((pullback J f✝).op.obj T).unop P).L
⊢ ((diagram J P Y).map f ≫
        (fun S =>
            Multiequalizer.lift (Cover.index ((pullback J f✝).op.obj S).unop P) ((diagram J P Y).obj S)
              (fun I => Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base I))
              (_ :
                ∀ (I : (Cover.index ((pullback J f✝).op.obj S).unop P).R),
                  Multiequalizer.ι (Cover.index S.unop P)
                        (MulticospanIndex.fstTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                      MulticospanIndex.fst (Cover.index S.unop P) (Cover.Relation.base I) =
                    Multiequalizer.ι (Cover.index S.unop P)
                        (MulticospanIndex.sndTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                      MulticospanIndex.snd (Cover.index S.unop P) (Cover.Relation.base I)))
          T) ≫
      Multiequalizer.ι (Cover.index ((pullback J f✝).op.obj T).unop P) I =
    ((fun S =>
            Multiequalizer.lift (Cover.index ((pullback J f✝).op.obj S).unop P) ((diagram J P Y).obj S)
              (fun I => Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base I))
              (_ :
                ∀ (I : (Cover.index ((pullback J f✝).op.obj S).unop P).R),
                  Multiequalizer.ι (Cover.index S.unop P)
                        (MulticospanIndex.fstTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                      MulticospanIndex.fst (Cover.index S.unop P) (Cover.Relation.base I) =
                    Multiequalizer.ι (Cover.index S.unop P)
                        (MulticospanIndex.sndTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                      MulticospanIndex.snd (Cover.index S.unop P) (Cover.Relation.base I)))
          S ≫
        ((pullback J f✝).op ⋙ diagram J P X).map f) ≫
      Multiequalizer.ι (Cover.index ((pullback J f✝).op.obj T).unop P) I

Next tactic:
dsimp
/-- A helper definition used to define the morphisms for `plus`. -/
@[simps]
def diagramPullback {X Y : C} (f : X ⟶ Y) : J.diagram P Y ⟶ (J.pullback f).op ⋙ J.diagram P X where
  app S :=
    Multiequalizer.lift _ _ (fun I => Multiequalizer.ι (S.unop.index P) I.base) fun I =>
      Multiequalizer.condition (S.unop.index P) I.base
  naturality S T f := Multiequalizer.hom_ext _ _ _ (fun I => by dsimp; simp; 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P : Cᵒᵖ ⥤ D
X Y : C
f✝ : X ⟶ Y
S T : (Cover J Y)ᵒᵖ
f : S ⟶ T
I : (Cover.index ((pullback J f✝).op.obj T).unop P).L
⊢ Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.map (Cover.Arrow.base I) f.unop) =
    Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base (Cover.Arrow.map I ((pullback J f✝).map f.unop)))

Next tactic:
rfl
/-- A natural transformation `P ⟶ Q` induces a natural transformation
between diagrams whose colimits define the values of `plus`. -/
@[simps]
def diagramNatTrans {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (X : C) : J.diagram P X ⟶ J.diagram Q X where
  app W :=
    Multiequalizer.lift _ _ (fun i => Multiequalizer.ι _ _ ≫ η.app _) (fun i => by
      

Proof state:
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
X : C
W : (Cover J X)ᵒᵖ
i : (Cover.index W.unop Q).R
⊢ (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ η.app (op i.Y))
        (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫
      MulticospanIndex.fst (Cover.index W.unop Q) i =
    (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ η.app (op i.Y))
        (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫
      MulticospanIndex.snd (Cover.index W.unop Q) i

Next tactic:
dsimp only
/-- A natural transformation `P ⟶ Q` induces a natural transformation
between diagrams whose colimits define the values of `plus`. -/
@[simps]
def diagramNatTrans {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (X : C) : J.diagram P X ⟶ J.diagram Q X where
  app W :=
    Multiequalizer.lift _ _ (fun i => Multiequalizer.ι _ _ ≫ η.app _) (fun i => by
      dsimp only
      

Proof state:
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
X : C
W : (Cover J X)ᵒᵖ
i : (Cover.index W.unop Q).R
⊢ (Multiequalizer.ι (Cover.index W.unop P) (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫
        η.app (op (MulticospanIndex.fstTo (Cover.index W.unop Q) i).Y)) ≫
      MulticospanIndex.fst (Cover.index W.unop Q) i =
    (Multiequalizer.ι (Cover.index W.unop P) (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫
        η.app (op (MulticospanIndex.sndTo (Cover.index W.unop Q) i).Y)) ≫
      MulticospanIndex.snd (Cover.index W.unop Q) i

Next tactic:
erw [Category.assoc, Category.assoc, ← η.naturality, ← η.naturality,
        Multiequalizer.condition_assoc]
/-- A natural transformation `P ⟶ Q` induces a natural transformation
between diagrams whose colimits define the values of `plus`. -/
@[simps]
def diagramNatTrans {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (X : C) : J.diagram P X ⟶ J.diagram Q X where
  app W :=
    Multiequalizer.lift _ _ (fun i => Multiequalizer.ι _ _ ≫ η.app _) (fun i => by
      dsimp only
      erw [Category.assoc, Category.assoc, ← η.naturality, ← η.naturality,
        Multiequalizer.condition_assoc]
      

Proof state:
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
X : C
W : (Cover J X)ᵒᵖ
i : (Cover.index W.unop Q).R
⊢ Multiequalizer.ι (Cover.index W.unop P) (MulticospanIndex.sndTo (Cover.index W.unop P) i) ≫
      MulticospanIndex.snd (Cover.index W.unop P) i ≫ η.app (op i.Z) =
    Multiequalizer.ι (Cover.index W.unop P) (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫
      P.map i.g₂.op ≫ η.app (op i.Z)

Next tactic:
rfl
@[simp]
theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X) := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
⊢ diagramNatTrans J (𝟙 P) X = 𝟙 (diagram J P X)

Next tactic:
ext : 2
@[simp]
theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X) := by
  ext : 2
  

Proof state:
case w.h
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
⊢ (diagramNatTrans J (𝟙 P) X).app x✝ = (𝟙 (diagram J P X)).app x✝

Next tactic:
refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
@[simp]
theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X) := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  

Proof state:
case w.h
C : Type u
inst✝² : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category.{max v u, w} D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop P).L
⊢ (diagramNatTrans J (𝟙 P) X).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop P) i =
    (𝟙 (diagram J P X)).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop P) i

Next tactic:
dsimp