l3lab/ntp-mathlib huggingface dataset:
theorem measure_Ici {l : ℝ} (hf : Tendsto f atTop (𝓝 l)) (x : ℝ) :
    f.measure (Ici x) = ofReal (l - leftLim f x) := by
  refine' tendsto_nhds_unique (tendsto_measure_Ico_atTop _ _) _
  simp_rw [measure_Ico]
  refine' ENNReal.tendsto_ofReal (Tendsto.sub_const _ _)
  

Proof state:
f : StieltjesFunction
l : ℝ
hf : Tendsto (↑f) atTop (𝓝 l)
x : ℝ
⊢ Tendsto (fun x => leftLim (↑f) x) atTop (𝓝 l)

Next tactic:
have h_le1 : ∀ x, f (x - 1) ≤ leftLim f x := fun x => Monotone.le_leftLim f.mono (sub_one_lt x)
theorem measure_Ici {l : ℝ} (hf : Tendsto f atTop (𝓝 l)) (x : ℝ) :
    f.measure (Ici x) = ofReal (l - leftLim f x) := by
  refine' tendsto_nhds_unique (tendsto_measure_Ico_atTop _ _) _
  simp_rw [measure_Ico]
  refine' ENNReal.tendsto_ofReal (Tendsto.sub_const _ _)
  have h_le1 : ∀ x, f (x - 1) ≤ leftLim f x := fun x => Monotone.le_leftLim f.mono (sub_one_lt x)
  

Proof state:
f : StieltjesFunction
l : ℝ
hf : Tendsto (↑f) atTop (𝓝 l)
x : ℝ
h_le1 : ∀ (x : ℝ), ↑f (x - 1) ≤ leftLim (↑f) x
⊢ Tendsto (fun x => leftLim (↑f) x) atTop (𝓝 l)

Next tactic:
have h_le2 : ∀ x, leftLim f x ≤ f x := fun x => Monotone.leftLim_le f.mono le_rfl
theorem measure_Ici {l : ℝ} (hf : Tendsto f atTop (𝓝 l)) (x : ℝ) :
    f.measure (Ici x) = ofReal (l - leftLim f x) := by
  refine' tendsto_nhds_unique (tendsto_measure_Ico_atTop _ _) _
  simp_rw [measure_Ico]
  refine' ENNReal.tendsto_ofReal (Tendsto.sub_const _ _)
  have h_le1 : ∀ x, f (x - 1) ≤ leftLim f x := fun x => Monotone.le_leftLim f.mono (sub_one_lt x)
  have h_le2 : ∀ x, leftLim f x ≤ f x := fun x => Monotone.leftLim_le f.mono le_rfl
  

Proof state:
f : StieltjesFunction
l : ℝ
hf : Tendsto (↑f) atTop (𝓝 l)
x : ℝ
h_le1 : ∀ (x : ℝ), ↑f (x - 1) ≤ leftLim (↑f) x
h_le2 : ∀ (x : ℝ), leftLim (↑f) x ≤ ↑f x
⊢ Tendsto (fun x => leftLim (↑f) x) atTop (𝓝 l)

Next tactic:
refine' tendsto_of_tendsto_of_tendsto_of_le_of_le (hf.comp _) hf h_le1 h_le2
theorem measure_Ici {l : ℝ} (hf : Tendsto f atTop (𝓝 l)) (x : ℝ) :
    f.measure (Ici x) = ofReal (l - leftLim f x) := by
  refine' tendsto_nhds_unique (tendsto_measure_Ico_atTop _ _) _
  simp_rw [measure_Ico]
  refine' ENNReal.tendsto_ofReal (Tendsto.sub_const _ _)
  have h_le1 : ∀ x, f (x - 1) ≤ leftLim f x := fun x => Monotone.le_leftLim f.mono (sub_one_lt x)
  have h_le2 : ∀ x, leftLim f x ≤ f x := fun x => Monotone.leftLim_le f.mono le_rfl
  refine' tendsto_of_tendsto_of_tendsto_of_le_of_le (hf.comp _) hf h_le1 h_le2
  

Proof state:
f : StieltjesFunction
l : ℝ
hf : Tendsto (↑f) atTop (𝓝 l)
x : ℝ
h_le1 : ∀ (x : ℝ), ↑f (x - 1) ≤ leftLim (↑f) x
h_le2 : ∀ (x : ℝ), leftLim (↑f) x ≤ ↑f x
⊢ Tendsto (fun i => i - 1) atTop atTop

Next tactic:
rw [tendsto_atTop_atTop]
theorem measure_Ici {l : ℝ} (hf : Tendsto f atTop (𝓝 l)) (x : ℝ) :
    f.measure (Ici x) = ofReal (l - leftLim f x) := by
  refine' tendsto_nhds_unique (tendsto_measure_Ico_atTop _ _) _
  simp_rw [measure_Ico]
  refine' ENNReal.tendsto_ofReal (Tendsto.sub_const _ _)
  have h_le1 : ∀ x, f (x - 1) ≤ leftLim f x := fun x => Monotone.le_leftLim f.mono (sub_one_lt x)
  have h_le2 : ∀ x, leftLim f x ≤ f x := fun x => Monotone.leftLim_le f.mono le_rfl
  refine' tendsto_of_tendsto_of_tendsto_of_le_of_le (hf.comp _) hf h_le1 h_le2
  rw [tendsto_atTop_atTop]
  

Proof state:
f : StieltjesFunction
l : ℝ
hf : Tendsto (↑f) atTop (𝓝 l)
x : ℝ
h_le1 : ∀ (x : ℝ), ↑f (x - 1) ≤ leftLim (↑f) x
h_le2 : ∀ (x : ℝ), leftLim (↑f) x ≤ ↑f x
⊢ ∀ (b : ℝ), ∃ i, ∀ (a : ℝ), i ≤ a → b ≤ a - 1

Next tactic:
exact fun y => ⟨y + 1, fun z hyz => by rwa [le_sub_iff_add_le]⟩
theorem measure_Ici {l : ℝ} (hf : Tendsto f atTop (𝓝 l)) (x : ℝ) :
    f.measure (Ici x) = ofReal (l - leftLim f x) := by
  refine' tendsto_nhds_unique (tendsto_measure_Ico_atTop _ _) _
  simp_rw [measure_Ico]
  refine' ENNReal.tendsto_ofReal (Tendsto.sub_const _ _)
  have h_le1 : ∀ x, f (x - 1) ≤ leftLim f x := fun x => Monotone.le_leftLim f.mono (sub_one_lt x)
  have h_le2 : ∀ x, leftLim f x ≤ f x := fun x => Monotone.leftLim_le f.mono le_rfl
  refine' tendsto_of_tendsto_of_tendsto_of_le_of_le (hf.comp _) hf h_le1 h_le2
  rw [tendsto_atTop_atTop]
  exact fun y => ⟨y + 1, fun z hyz => by 

Proof state:
f : StieltjesFunction
l : ℝ
hf : Tendsto (↑f) atTop (𝓝 l)
x : ℝ
h_le1 : ∀ (x : ℝ), ↑f (x - 1) ≤ leftLim (↑f) x
h_le2 : ∀ (x : ℝ), leftLim (↑f) x ≤ ↑f x
y z : ℝ
hyz : y + 1 ≤ z
⊢ y ≤ z - 1

Next tactic:
rwa [le_sub_iff_add_le]
theorem measure_univ {l u : ℝ} (hfl : Tendsto f atBot (𝓝 l)) (hfu : Tendsto f atTop (𝓝 u)) :
    f.measure univ = ofReal (u - l) := by
  

Proof state:
f : StieltjesFunction
l u : ℝ
hfl : Tendsto (↑f) atBot (𝓝 l)
hfu : Tendsto (↑f) atTop (𝓝 u)
⊢ ↑↑(StieltjesFunction.measure f) univ = ofReal (u - l)

Next tactic:
refine' tendsto_nhds_unique (tendsto_measure_Iic_atTop _) _
theorem measure_univ {l u : ℝ} (hfl : Tendsto f atBot (𝓝 l)) (hfu : Tendsto f atTop (𝓝 u)) :
    f.measure univ = ofReal (u - l) := by
  refine' tendsto_nhds_unique (tendsto_measure_Iic_atTop _) _
  

Proof state:
f : StieltjesFunction
l u : ℝ
hfl : Tendsto (↑f) atBot (𝓝 l)
hfu : Tendsto (↑f) atTop (𝓝 u)
⊢ Tendsto (fun x => ↑↑(StieltjesFunction.measure f) (Iic x)) atTop (𝓝 (ofReal (u - l)))

Next tactic:
simp_rw [measure_Iic f hfl]
theorem measure_univ {l u : ℝ} (hfl : Tendsto f atBot (𝓝 l)) (hfu : Tendsto f atTop (𝓝 u)) :
    f.measure univ = ofReal (u - l) := by
  refine' tendsto_nhds_unique (tendsto_measure_Iic_atTop _) _
  simp_rw [measure_Iic f hfl]
  

Proof state:
f : StieltjesFunction
l u : ℝ
hfl : Tendsto (↑f) atBot (𝓝 l)
hfu : Tendsto (↑f) atTop (𝓝 u)
⊢ Tendsto (fun x => ofReal (↑f x - l)) atTop (𝓝 (ofReal (u - l)))

Next tactic:
exact ENNReal.tendsto_ofReal (Tendsto.sub_const hfu _)
instance instIsLocallyFiniteMeasure : IsLocallyFiniteMeasure f.measure :=
  ⟨fun x => ⟨Ioo (x - 1) (x + 1), Ioo_mem_nhds (by 

Proof state:
f : StieltjesFunction
x : ℝ
⊢ x - 1 < x

Next tactic:
linarith
instance instIsLocallyFiniteMeasure : IsLocallyFiniteMeasure f.measure :=
  ⟨fun x => ⟨Ioo (x - 1) (x + 1), Ioo_mem_nhds (by linarith) (by 

Proof state:
f : StieltjesFunction
x : ℝ
⊢ x < x + 1

Next tactic:
linarith
instance instIsLocallyFiniteMeasure : IsLocallyFiniteMeasure f.measure :=
  ⟨fun x => ⟨Ioo (x - 1) (x + 1), Ioo_mem_nhds (by linarith) (by linarith), by 

Proof state:
f : StieltjesFunction
x : ℝ
⊢ ↑↑(StieltjesFunction.measure f) (Ioo (x - 1) (x + 1)) < ⊤

Next tactic:
simp
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  

Proof state:
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
⊢ f = g

Next tactic:
ext x
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  

Proof state:
case h
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
⊢ ↑f x = ↑g x

Next tactic:
have hf := measure_Iic f hfl x
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  have hf := measure_Iic f hfl x
  

Proof state:
case h
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
hf : ↑↑(StieltjesFunction.measure f) (Iic x) = ofReal (↑f x - l)
⊢ ↑f x = ↑g x

Next tactic:
rw [hfg, measure_Iic g hgl x, ENNReal.ofReal_eq_ofReal_iff, eq_comm] at hf
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  have hf := measure_Iic f hfl x
  rw [hfg, measure_Iic g hgl x, ENNReal.ofReal_eq_ofReal_iff, eq_comm] at hf
  · 

Proof state:
case h
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
hf : ↑f x - l = ↑g x - l
⊢ ↑f x = ↑g x

Next tactic:
simpa using hf
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  have hf := measure_Iic f hfl x
  rw [hfg, measure_Iic g hgl x, ENNReal.ofReal_eq_ofReal_iff, eq_comm] at hf
  · simpa using hf
  · 

Proof state:
case h.hp
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
hf : ofReal (↑g x - l) = ofReal (↑f x - l)
⊢ 0 ≤ ↑g x - l

Next tactic:
rw [sub_nonneg]
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  have hf := measure_Iic f hfl x
  rw [hfg, measure_Iic g hgl x, ENNReal.ofReal_eq_ofReal_iff, eq_comm] at hf
  · simpa using hf
  · rw [sub_nonneg]
    

Proof state:
case h.hp
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
hf : ofReal (↑g x - l) = ofReal (↑f x - l)
⊢ l ≤ ↑g x

Next tactic:
exact Monotone.le_of_tendsto g.mono hgl x
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  have hf := measure_Iic f hfl x
  rw [hfg, measure_Iic g hgl x, ENNReal.ofReal_eq_ofReal_iff, eq_comm] at hf
  · simpa using hf
  · rw [sub_nonneg]
    exact Monotone.le_of_tendsto g.mono hgl x
  · 

Proof state:
case h.hq
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
hf : ofReal (↑g x - l) = ofReal (↑f x - l)
⊢ 0 ≤ ↑f x - l

Next tactic:
rw [sub_nonneg]
lemma eq_of_measure_of_tendsto_atBot (g : StieltjesFunction) {l : ℝ}
    (hfg : f.measure = g.measure) (hfl : Tendsto f atBot (𝓝 l)) (hgl : Tendsto g atBot (𝓝 l)) :
    f = g := by
  ext x
  have hf := measure_Iic f hfl x
  rw [hfg, measure_Iic g hgl x, ENNReal.ofReal_eq_ofReal_iff, eq_comm] at hf
  · simpa using hf
  · rw [sub_nonneg]
    exact Monotone.le_of_tendsto g.mono hgl x
  · rw [sub_nonneg]
    

Proof state:
case h.hq
f g : StieltjesFunction
l : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hfl : Tendsto (↑f) atBot (𝓝 l)
hgl : Tendsto (↑g) atBot (𝓝 l)
x : ℝ
hf : ofReal (↑g x - l) = ofReal (↑f x - l)
⊢ l ≤ ↑f x

Next tactic:
exact Monotone.le_of_tendsto f.mono hfl x
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  

Proof state:
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
⊢ f = g

Next tactic:
ext x
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  

Proof state:
case h
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
⊢ ↑f x = ↑g x

Next tactic:
cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  

Proof state:
case h
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
x✝ : x ≤ y ∨ y ≤ x
⊢ ↑f x = ↑g x

Next tactic:
cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  

Proof state:
case h.inl
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
⊢ ↑f x = ↑g x

Next tactic:
| inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    

Proof state:
case h.inl
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
⊢ ↑f x = ↑g x

Next tactic:
have hf := measure_Ioc f x y
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    

Proof state:
case h.inl
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
hf : ↑↑(StieltjesFunction.measure f) (Ioc x y) = ofReal (↑f y - ↑f x)
⊢ ↑f x = ↑g x

Next tactic:
rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · 

Proof state:
case h.inl
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
hf : ↑g y - ↑f x = ↑g y - ↑g x
⊢ ↑f x = ↑g x

Next tactic:
simpa using hf
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · 

Proof state:
case h.inl.hp
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
hf : ofReal (↑g y - ↑g x) = ofReal (↑f y - ↑f x)
⊢ 0 ≤ ↑g y - ↑g x

Next tactic:
rw [sub_nonneg]
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      

Proof state:
case h.inl.hp
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
hf : ofReal (↑g y - ↑g x) = ofReal (↑f y - ↑f x)
⊢ ↑g x ≤ ↑g y

Next tactic:
exact g.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · 

Proof state:
case h.inl.hq
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
hf : ofReal (↑g y - ↑g x) = ofReal (↑f y - ↑f x)
⊢ 0 ≤ ↑f y - ↑f x

Next tactic:
rw [sub_nonneg]
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      

Proof state:
case h.inl.hq
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : x ≤ y
hf : ofReal (↑g y - ↑g x) = ofReal (↑f y - ↑f x)
⊢ ↑f x ≤ ↑f y

Next tactic:
exact f.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  

Proof state:
case h.inr
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
⊢ ↑f x = ↑g x

Next tactic:
| inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    

Proof state:
case h.inr
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
⊢ ↑f x = ↑g x

Next tactic:
have hf := measure_Ioc f y x
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    

Proof state:
case h.inr
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
hf : ↑↑(StieltjesFunction.measure f) (Ioc y x) = ofReal (↑f x - ↑f y)
⊢ ↑f x = ↑g x

Next tactic:
rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · 

Proof state:
case h.inr
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
hf : ↑f x - ↑g y = ↑g x - ↑g y
⊢ ↑f x = ↑g x

Next tactic:
simpa using hf
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · 

Proof state:
case h.inr.hp
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
hf : ofReal (↑g x - ↑g y) = ofReal (↑f x - ↑f y)
⊢ 0 ≤ ↑g x - ↑g y

Next tactic:
rw [sub_nonneg]
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      

Proof state:
case h.inr.hp
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
hf : ofReal (↑g x - ↑g y) = ofReal (↑f x - ↑f y)
⊢ ↑g y ≤ ↑g x

Next tactic:
exact g.mono hxy
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · 

Proof state:
case h.inr.hq
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
hf : ofReal (↑g x - ↑g y) = ofReal (↑f x - ↑f y)
⊢ 0 ≤ ↑f x - ↑f y

Next tactic:
rw [sub_nonneg]
lemma eq_of_measure_of_eq (g : StieltjesFunction) {y : ℝ}
    (hfg : f.measure = g.measure) (hy : f y = g y) :
    f = g := by
  ext x
  cases le_total x y with
  | inl hxy =>
    have hf := measure_Ioc f x y
    rw [hfg, measure_Ioc g x y, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      exact f.mono hxy
  | inr hxy =>
    have hf := measure_Ioc f y x
    rw [hfg, measure_Ioc g y x, ENNReal.ofReal_eq_ofReal_iff, eq_comm, hy] at hf
    · simpa using hf
    · rw [sub_nonneg]
      exact g.mono hxy
    · rw [sub_nonneg]
      

Proof state:
case h.inr.hq
f g : StieltjesFunction
y : ℝ
hfg : StieltjesFunction.measure f = StieltjesFunction.measure g
hy : ↑f y = ↑g y
x : ℝ
hxy : y ≤ x
hf : ofReal (↑g x - ↑g y) = ofReal (↑f x - ↑f y)
⊢ ↑f y ≤ ↑f x

Next tactic:
exact f.mono hxy
/-- Constructs an equivalence between nonempty finite linear orders from an order isomorphism
between them. -/
@[simps]
def Iso.mk {α β : NonemptyFinLinOrd.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : OrderHom _ _)
  inv := (e.symm : OrderHom _ _)
  hom_inv_id := by
    

Proof state:
α β : NonemptyFinLinOrd
e : ↑α ≃o ↑β
⊢ ↑e ≫ ↑(OrderIso.symm e) = 𝟙 α

Next tactic:
ext x
/-- Constructs an equivalence between nonempty finite linear orders from an order isomorphism
between them. -/
@[simps]
def Iso.mk {α β : NonemptyFinLinOrd.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : OrderHom _ _)
  inv := (e.symm : OrderHom _ _)
  hom_inv_id := by
    ext x
    

Proof state:
case w
α β : NonemptyFinLinOrd
e : ↑α ≃o ↑β
x : (forget NonemptyFinLinOrd).obj α
⊢ (↑e ≫ ↑(OrderIso.symm e)) x = (𝟙 α) x

Next tactic:
exact e.symm_apply_apply x