l3lab/ntp-mathlib huggingface dataset:
/-- If a function is differentiable around `x`, and has two derivatives at `x`, then the second
derivative is symmetric. -/
theorem second_derivative_symmetric_of_eventually {f : E → F} {f' : E → E →L[ℝ] F}
    {f'' : E →L[ℝ] E →L[ℝ] F} (hf : ∀ᶠ y in 𝓝 x, HasFDerivAt f (f' y) y) (hx : HasFDerivAt f' f'' x)
    (v w : E) : f'' v w = f'' w v := by
  

Proof state:
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f✝ : E → F
f'✝ : E → E →L[ℝ] F
f''✝ : E →L[ℝ] E →L[ℝ] F
hf✝ : ∀ x ∈ interior s, HasFDerivAt f✝ (f'✝ x) x
x : E
xs : x ∈ s
hx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y
hx : HasFDerivAt f' f'' x
v w : E
⊢ (f'' v) w = (f'' w) v

Next tactic:
rcases Metric.mem_nhds_iff.1 hf with ⟨ε, εpos, hε⟩
/-- If a function is differentiable around `x`, and has two derivatives at `x`, then the second
derivative is symmetric. -/
theorem second_derivative_symmetric_of_eventually {f : E → F} {f' : E → E →L[ℝ] F}
    {f'' : E →L[ℝ] E →L[ℝ] F} (hf : ∀ᶠ y in 𝓝 x, HasFDerivAt f (f' y) y) (hx : HasFDerivAt f' f'' x)
    (v w : E) : f'' v w = f'' w v := by
  rcases Metric.mem_nhds_iff.1 hf with ⟨ε, εpos, hε⟩
  

Proof state:
case intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f✝ : E → F
f'✝ : E → E →L[ℝ] F
f''✝ : E →L[ℝ] E →L[ℝ] F
hf✝ : ∀ x ∈ interior s, HasFDerivAt f✝ (f'✝ x) x
x : E
xs : x ∈ s
hx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y
hx : HasFDerivAt f' f'' x
v w : E
ε : ℝ
εpos : ε > 0
hε : Metric.ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x}
⊢ (f'' v) w = (f'' w) v

Next tactic:
have A : (interior (Metric.ball x ε)).Nonempty := by
    rwa [Metric.isOpen_ball.interior_eq, Metric.nonempty_ball]
/-- If a function is differentiable around `x`, and has two derivatives at `x`, then the second
derivative is symmetric. -/
theorem second_derivative_symmetric_of_eventually {f : E → F} {f' : E → E →L[ℝ] F}
    {f'' : E →L[ℝ] E →L[ℝ] F} (hf : ∀ᶠ y in 𝓝 x, HasFDerivAt f (f' y) y) (hx : HasFDerivAt f' f'' x)
    (v w : E) : f'' v w = f'' w v := by
  rcases Metric.mem_nhds_iff.1 hf with ⟨ε, εpos, hε⟩
  have A : (interior (Metric.ball x ε)).Nonempty := by
    

Proof state:
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f✝ : E → F
f'✝ : E → E →L[ℝ] F
f''✝ : E →L[ℝ] E →L[ℝ] F
hf✝ : ∀ x ∈ interior s, HasFDerivAt f✝ (f'✝ x) x
x : E
xs : x ∈ s
hx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y
hx : HasFDerivAt f' f'' x
v w : E
ε : ℝ
εpos : ε > 0
hε : Metric.ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x}
⊢ Set.Nonempty (interior (Metric.ball x ε))

Next tactic:
rwa [Metric.isOpen_ball.interior_eq, Metric.nonempty_ball]
/-- If a function is differentiable around `x`, and has two derivatives at `x`, then the second
derivative is symmetric. -/
theorem second_derivative_symmetric_of_eventually {f : E → F} {f' : E → E →L[ℝ] F}
    {f'' : E →L[ℝ] E →L[ℝ] F} (hf : ∀ᶠ y in 𝓝 x, HasFDerivAt f (f' y) y) (hx : HasFDerivAt f' f'' x)
    (v w : E) : f'' v w = f'' w v := by
  rcases Metric.mem_nhds_iff.1 hf with ⟨ε, εpos, hε⟩
  have A : (interior (Metric.ball x ε)).Nonempty := by
    rwa [Metric.isOpen_ball.interior_eq, Metric.nonempty_ball]
  

Proof state:
case intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
s : Set E
s_conv : Convex ℝ s
f✝ : E → F
f'✝ : E → E →L[ℝ] F
f''✝ : E →L[ℝ] E →L[ℝ] F
hf✝ : ∀ x ∈ interior s, HasFDerivAt f✝ (f'✝ x) x
x : E
xs : x ∈ s
hx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x
f : E → F
f' : E → E →L[ℝ] F
f'' : E →L[ℝ] E →L[ℝ] F
hf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y
hx : HasFDerivAt f' f'' x
v w : E
ε : ℝ
εpos : ε > 0
hε : Metric.ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x}
A : Set.Nonempty (interior (Metric.ball x ε))
⊢ (f'' v) w = (f'' w) v

Next tactic:
exact
    Convex.second_derivative_within_at_symmetric (convex_ball x ε) A
      (fun y hy => hε (interior_subset hy)) (Metric.mem_ball_self εpos) hx.hasFDerivWithinAt v w
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
⊢ Projective P ↔ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))

Next tactic:
rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
⊢ Functor.PreservesEpimorphisms (coyoneda.obj (op P)) ↔ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))

Next tactic:
refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
  · 

Proof state:
case refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
h : Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P) ⋙ forget AddCommGroupCat)
⊢ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))

Next tactic:
exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
        (forget _)
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
  · exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
        (forget _)
  · 

Proof state:
case refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
⊢ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P)) → Functor.PreservesEpimorphisms (coyoneda.obj (op P))

Next tactic:
intro
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
  · exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
        (forget _)
  · intro
    

Proof state:
case refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
a✝ : Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))
⊢ Functor.PreservesEpimorphisms (coyoneda.obj (op P))

Next tactic:
exact (inferInstance : (preadditiveCoyoneda.obj (op P) ⋙ forget _).PreservesEpimorphisms)
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
⊢ Projective P ↔ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))

Next tactic:
rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
⊢ Functor.PreservesEpimorphisms (coyoneda.obj (op P)) ↔ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))

Next tactic:
refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
  · 

Proof state:
case refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
h : Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P) ⋙ forget AddCommGroupCat)
⊢ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))

Next tactic:
exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
        (forget _)
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
  · exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
        (forget _)
  · 

Proof state:
case refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
⊢ Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P)) → Functor.PreservesEpimorphisms (coyoneda.obj (op P))

Next tactic:
intro
theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by
  rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
  refine' ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
      forget AddCommGroupCat).PreservesEpimorphisms => _, _⟩
  · exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
        (forget _)
  · intro
    

Proof state:
case refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
P : C
a✝ : Functor.PreservesEpimorphisms (preadditiveCoyoneda.obj (op P))
⊢ Functor.PreservesEpimorphisms (coyoneda.obj (op P))

Next tactic:
exact (inferInstance : (preadditiveCoyoneda.obj (op P) ⋙ forget _).PreservesEpimorphisms)
private theorem findExistsOneDivLT_spec (hi : ¬s ≤[i] 0) :
    ExistsOneDivLT s i (findExistsOneDivLT s i) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)

Next tactic:
rw [findExistsOneDivLT, dif_pos hi]
private theorem findExistsOneDivLT_spec (hi : ¬s ≤[i] 0) :
    ExistsOneDivLT s i (findExistsOneDivLT s i) := by
  rw [findExistsOneDivLT, dif_pos hi]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.ExistsOneDivLT s i (Nat.find (_ : ∃ n, MeasureTheory.SignedMeasure.ExistsOneDivLT s i n))

Next tactic:
convert Nat.find_spec (existsNatOneDivLTMeasure_of_not_negative hi)
private theorem findExistsOneDivLT_min (hi : ¬s ≤[i] 0) {m : ℕ}
    (hm : m < findExistsOneDivLT s i) : ¬ExistsOneDivLT s i m := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
m : ℕ
hm : m < MeasureTheory.SignedMeasure.findExistsOneDivLT s i
⊢ ¬MeasureTheory.SignedMeasure.ExistsOneDivLT s i m

Next tactic:
rw [findExistsOneDivLT, dif_pos hi] at hm
private theorem findExistsOneDivLT_min (hi : ¬s ≤[i] 0) {m : ℕ}
    (hm : m < findExistsOneDivLT s i) : ¬ExistsOneDivLT s i m := by
  rw [findExistsOneDivLT, dif_pos hi] at hm
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
m : ℕ
hm : m < Nat.find (_ : ∃ n, MeasureTheory.SignedMeasure.ExistsOneDivLT s i n)
⊢ ¬MeasureTheory.SignedMeasure.ExistsOneDivLT s i m

Next tactic:
exact Nat.find_min _ hm
private theorem someExistsOneDivLT_spec (hi : ¬s ≤[i] 0) :
    someExistsOneDivLT s i ⊆ i ∧
      MeasurableSet (someExistsOneDivLT s i) ∧
        (1 / (findExistsOneDivLT s i + 1) : ℝ) < s (someExistsOneDivLT s i) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i ∧
    MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i) ∧
      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) <
        ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)

Next tactic:
rw [someExistsOneDivLT, dif_pos hi]
private theorem someExistsOneDivLT_spec (hi : ¬s ≤[i] 0) :
    someExistsOneDivLT s i ⊆ i ∧
      MeasurableSet (someExistsOneDivLT s i) ∧
        (1 / (findExistsOneDivLT s i + 1) : ℝ) < s (someExistsOneDivLT s i) := by
  rw [someExistsOneDivLT, dif_pos hi]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ Classical.choose
        (_ : MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)) ⊆
      i ∧
    MeasurableSet
        (Classical.choose
          (_ : MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i))) ∧
      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) <
        ↑s
          (Classical.choose
            (_ : MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)))

Next tactic:
exact Classical.choose_spec (findExistsOneDivLT_spec hi)
private theorem someExistsOneDivLT_subset : someExistsOneDivLT s i ⊆ i := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i

Next tactic:
by_cases hi : ¬s ≤[i] 0
private theorem someExistsOneDivLT_subset : someExistsOneDivLT s i ⊆ i := by
  by_cases hi : ¬s ≤[i] 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i

Next tactic:
exact
      let ⟨h, _⟩ := someExistsOneDivLT_spec hi
      h
private theorem someExistsOneDivLT_subset : someExistsOneDivLT s i ⊆ i := by
  by_cases hi : ¬s ≤[i] 0
  · exact
      let ⟨h, _⟩ := someExistsOneDivLT_spec hi
      h
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i

Next tactic:
rw [someExistsOneDivLT, dif_neg hi]
private theorem someExistsOneDivLT_subset : someExistsOneDivLT s i ⊆ i := by
  by_cases hi : ¬s ≤[i] 0
  · exact
      let ⟨h, _⟩ := someExistsOneDivLT_spec hi
      h
  · rw [someExistsOneDivLT, dif_neg hi]
    

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬¬restrict s i ≤ restrict 0 i
⊢ ∅ ⊆ i

Next tactic:
exact Set.empty_subset _
private theorem someExistsOneDivLT_measurableSet : MeasurableSet (someExistsOneDivLT s i) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)

Next tactic:
by_cases hi : ¬s ≤[i] 0
private theorem someExistsOneDivLT_measurableSet : MeasurableSet (someExistsOneDivLT s i) := by
  by_cases hi : ¬s ≤[i] 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)

Next tactic:
exact
      let ⟨_, h, _⟩ := someExistsOneDivLT_spec hi
      h
private theorem someExistsOneDivLT_measurableSet : MeasurableSet (someExistsOneDivLT s i) := by
  by_cases hi : ¬s ≤[i] 0
  · exact
      let ⟨_, h, _⟩ := someExistsOneDivLT_spec hi
      h
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬¬restrict s i ≤ restrict 0 i
⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)

Next tactic:
rw [someExistsOneDivLT, dif_neg hi]
private theorem someExistsOneDivLT_measurableSet : MeasurableSet (someExistsOneDivLT s i) := by
  by_cases hi : ¬s ≤[i] 0
  · exact
      let ⟨_, h, _⟩ := someExistsOneDivLT_spec hi
      h
  · rw [someExistsOneDivLT, dif_neg hi]
    

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬¬restrict s i ≤ restrict 0 i
⊢ MeasurableSet ∅

Next tactic:
exact MeasurableSet.empty
private theorem restrictNonposSeq_succ (n : ℕ) :
    restrictNonposSeq s i n.succ = someExistsOneDivLT s (i \ ⋃ k ≤ n, restrictNonposSeq s i k) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n) =
    MeasureTheory.SignedMeasure.someExistsOneDivLT s
      (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)

Next tactic:
rw [restrictNonposSeq]
private theorem restrictNonposSeq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ⊆ i

Next tactic:
cases n
private theorem restrictNonposSeq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
  cases n <;> · 

Proof state:
case zero
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero ⊆ i

Next tactic:
rw [restrictNonposSeq]
private theorem restrictNonposSeq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
  cases n <;> · rw [restrictNonposSeq]; 

Proof state:
case zero
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \ ∅) ⊆ i

Next tactic:
exact someExistsOneDivLT_subset'
private theorem restrictNonposSeq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
  cases n <;> · 

Proof state:
case succ
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n✝ : ℕ
⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n✝) ⊆ i

Next tactic:
rw [restrictNonposSeq]
private theorem restrictNonposSeq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
  cases n <;> · rw [restrictNonposSeq]; 

Proof state:
case succ
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n✝ : ℕ
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s
      (i \
        ⋃ k,
          ⋃ (H : k ≤ n✝),
            let_fun this := (_ : k < Nat.succ n✝);
            MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ⊆
    i

Next tactic:
exact someExistsOneDivLT_subset'
private theorem restrictNonposSeq_lt (n : ℕ) (hn : ¬s ≤[i \ ⋃ k ≤ n, restrictNonposSeq s i k] 0) :
    (1 / (findExistsOneDivLT s (i \ ⋃ k ≤ n, restrictNonposSeq s i k) + 1) : ℝ) <
      s (restrictNonposSeq s i n.succ) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
hn :
  ¬restrict s (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤
      restrict 0 (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)
⊢ 1 /
      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s
            (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +
        1) <
    ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n))

Next tactic:
rw [restrictNonposSeq_succ]
private theorem restrictNonposSeq_lt (n : ℕ) (hn : ¬s ≤[i \ ⋃ k ≤ n, restrictNonposSeq s i k] 0) :
    (1 / (findExistsOneDivLT s (i \ ⋃ k ≤ n, restrictNonposSeq s i k) + 1) : ℝ) <
      s (restrictNonposSeq s i n.succ) := by
  rw [restrictNonposSeq_succ]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
hn :
  ¬restrict s (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤
      restrict 0 (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)
⊢ 1 /
      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s
            (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +
        1) <
    ↑s
      (MeasureTheory.SignedMeasure.someExistsOneDivLT s
        (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))

Next tactic:
apply someExistsOneDivLT_lt hn