l3lab/ntp-mathlib huggingface dataset:
theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H := by
  subst_vars
  fapply Functor.hext
  · rintro X
    dsimp [lift, Functor]
    

Proof state:
case h_obj
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
Φ : Quotient r ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → (functor r ⋙ Φ).map f₁ = (functor r ⋙ Φ).map f₂
X : Quotient r
⊢ Φ.obj X = Φ.obj ((functor r).obj X.as)

Next tactic:
congr
theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H := by
  subst_vars
  fapply Functor.hext
  · rintro X
    dsimp [lift, Functor]
    congr
  · 

Proof state:
case h_map
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
Φ : Quotient r ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → (functor r ⋙ Φ).map f₁ = (functor r ⋙ Φ).map f₂
⊢ ∀ (X Y : Quotient r) (f : X ⟶ Y), HEq (Φ.map f) ((lift r (functor r ⋙ Φ) H).map f)

Next tactic:
rintro _ _ f
theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H := by
  subst_vars
  fapply Functor.hext
  · rintro X
    dsimp [lift, Functor]
    congr
  · rintro _ _ f
    

Proof state:
case h_map
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
Φ : Quotient r ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → (functor r ⋙ Φ).map f₁ = (functor r ⋙ Φ).map f₂
X✝ Y✝ : Quotient r
f : X✝ ⟶ Y✝
⊢ HEq (Φ.map f) ((lift r (functor r ⋙ Φ) H).map f)

Next tactic:
dsimp [lift, Functor]
theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H := by
  subst_vars
  fapply Functor.hext
  · rintro X
    dsimp [lift, Functor]
    congr
  · rintro _ _ f
    dsimp [lift, Functor]
    

Proof state:
case h_map
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
Φ : Quotient r ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → (functor r ⋙ Φ).map f₁ = (functor r ⋙ Φ).map f₂
X✝ Y✝ : Quotient r
f : X✝ ⟶ Y✝
⊢ HEq (Φ.map f)
    (Quot.liftOn f (fun f => Φ.map ((functor r).map f))
      (_ :
        ∀ (a b : X✝.as ⟶ Y✝.as),
          CompClosure r a b → (fun f => (functor r ⋙ Φ).map f) a = (fun f => (functor r ⋙ Φ).map f) b))

Next tactic:
refine Quot.inductionOn f (fun _ ↦ ?_)
theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H := by
  subst_vars
  fapply Functor.hext
  · rintro X
    dsimp [lift, Functor]
    congr
  · rintro _ _ f
    dsimp [lift, Functor]
    refine Quot.inductionOn f (fun _ ↦ ?_) -- porting note: this line was originally an `apply`
    

Proof state:
case h_map
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
Φ : Quotient r ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → (functor r ⋙ Φ).map f₁ = (functor r ⋙ Φ).map f₂
X✝ Y✝ : Quotient r
f : X✝ ⟶ Y✝
x✝ : X✝.as ⟶ Y✝.as
⊢ HEq (Φ.map (Quot.mk (CompClosure r) x✝))
    (Quot.liftOn (Quot.mk (CompClosure r) x✝) (fun f => Φ.map ((functor r).map f))
      (_ :
        ∀ (a b : X✝.as ⟶ Y✝.as),
          CompClosure r a b → (fun f => (functor r ⋙ Φ).map f) a = (fun f => (functor r ⋙ Φ).map f) b))

Next tactic:
simp only [Quot.liftOn_mk, Functor.comp_map]
theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H := by
  subst_vars
  fapply Functor.hext
  · rintro X
    dsimp [lift, Functor]
    congr
  · rintro _ _ f
    dsimp [lift, Functor]
    refine Quot.inductionOn f (fun _ ↦ ?_) -- porting note: this line was originally an `apply`
    simp only [Quot.liftOn_mk, Functor.comp_map]
    

Proof state:
case h_map
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
Φ : Quotient r ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → (functor r ⋙ Φ).map f₁ = (functor r ⋙ Φ).map f₂
X✝ Y✝ : Quotient r
f : X✝ ⟶ Y✝
x✝ : X✝.as ⟶ Y✝.as
⊢ HEq (Φ.map (Quot.mk (CompClosure r) x✝)) (Φ.map ((functor r).map x✝))

Next tactic:
congr
theorem lift_map_functor_map {X Y : C} (f : X ⟶ Y) :
    (lift r F H).map ((functor r).map f) = F.map f := by
  

Proof state:
C : Type u_2
inst✝¹ : Category.{u_1, u_2} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_3, u_4} D
F : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂
X Y : C
f : X ⟶ Y
⊢ (lift r F H).map ((functor r).map f) = F.map f

Next tactic:
rw [← NatIso.naturality_1 (lift.isLift r F H)]
theorem lift_map_functor_map {X Y : C} (f : X ⟶ Y) :
    (lift r F H).map ((functor r).map f) = F.map f := by
  rw [← NatIso.naturality_1 (lift.isLift r F H)]
  

Proof state:
C : Type u_2
inst✝¹ : Category.{u_1, u_2} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_3, u_4} D
F : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂
X Y : C
f : X ⟶ Y
⊢ (lift r F H).map ((functor r).map f) =
    (lift.isLift r F H).inv.app X ≫ (functor r ⋙ lift r F H).map f ≫ (lift.isLift r F H).hom.app Y

Next tactic:
dsimp [lift, functor]
theorem lift_map_functor_map {X Y : C} (f : X ⟶ Y) :
    (lift r F H).map ((functor r).map f) = F.map f := by
  rw [← NatIso.naturality_1 (lift.isLift r F H)]
  dsimp [lift, functor]
  

Proof state:
C : Type u_2
inst✝¹ : Category.{u_1, u_2} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_3, u_4} D
F : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂
X Y : C
f : X ⟶ Y
⊢ Quot.liftOn (Quot.mk (CompClosure r) f) (fun f => F.map f)
      (_ : ∀ (a b : { as := X }.as ⟶ { as := Y }.as), CompClosure r a b → (fun f => F.map f) a = (fun f => F.map f) b) =
    𝟙 (F.obj X) ≫
      Quot.liftOn (Quot.mk (CompClosure r) f) (fun f => F.map f)
          (_ :
            ∀ (a b : { as := X }.as ⟶ { as := Y }.as),
              CompClosure r a b → (fun f => F.map f) a = (fun f => F.map f) b) ≫
        𝟙 (F.obj Y)

Next tactic:
simp
lemma natTrans_ext {F G : Quotient r ⥤ D} (τ₁ τ₂ : F ⟶ G)
    (h : whiskerLeft (Quotient.functor r) τ₁ = whiskerLeft (Quotient.functor r) τ₂) : τ₁ = τ₂ :=
  NatTrans.ext _ _ (by 

Proof state:
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G : Quotient r ⥤ D
τ₁ τ₂ : F ⟶ G
h : whiskerLeft (functor r) τ₁ = whiskerLeft (functor r) τ₂
⊢ τ₁.app = τ₂.app

Next tactic:
ext1 ⟨X⟩
lemma natTrans_ext {F G : Quotient r ⥤ D} (τ₁ τ₂ : F ⟶ G)
    (h : whiskerLeft (Quotient.functor r) τ₁ = whiskerLeft (Quotient.functor r) τ₂) : τ₁ = τ₂ :=
  NatTrans.ext _ _ (by ext1 ⟨X⟩; 

Proof state:
case h.mk
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G : Quotient r ⥤ D
τ₁ τ₂ : F ⟶ G
h : whiskerLeft (functor r) τ₁ = whiskerLeft (functor r) τ₂
X : C
⊢ τ₁.app { as := X } = τ₂.app { as := X }

Next tactic:
exact NatTrans.congr_app h X
/-- In order to define a natural transformation `F ⟶ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
def natTransLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ⟶ Quotient.functor r ⋙ G) :
    F ⟶ G where
  app := fun ⟨X⟩ => τ.app X
  naturality := fun ⟨X⟩ ⟨Y⟩ => by
    

Proof state:
C : Type ?u.21219
inst✝¹ : Category.{?u.21223, ?u.21219} C
r : HomRel C
D : Type ?u.21251
inst✝ : Category.{?u.21255, ?u.21251} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G : Quotient r ⥤ D
τ : functor r ⋙ F ⟶ functor r ⋙ G
x✝¹ x✝ : Quotient r
X Y : C
⊢ ∀ (f : { as := X } ⟶ { as := Y }),
    F.map f ≫
        (fun x =>
            match x with
            | { as := X } => τ.app X)
          { as := Y } =
      (fun x =>
            match x with
            | { as := X } => τ.app X)
          { as := X } ≫
        G.map f

Next tactic:
rintro ⟨f⟩
/-- In order to define a natural transformation `F ⟶ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
def natTransLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ⟶ Quotient.functor r ⋙ G) :
    F ⟶ G where
  app := fun ⟨X⟩ => τ.app X
  naturality := fun ⟨X⟩ ⟨Y⟩ => by
    rintro ⟨f⟩
    

Proof state:
case mk
C : Type ?u.21219
inst✝¹ : Category.{?u.21223, ?u.21219} C
r : HomRel C
D : Type ?u.21251
inst✝ : Category.{?u.21255, ?u.21251} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G : Quotient r ⥤ D
τ : functor r ⋙ F ⟶ functor r ⋙ G
x✝¹ x✝ : Quotient r
X Y : C
f✝ : { as := X } ⟶ { as := Y }
f : { as := X }.as ⟶ { as := Y }.as
⊢ F.map (Quot.mk (CompClosure r) f) ≫
      (fun x =>
          match x with
          | { as := X } => τ.app X)
        { as := Y } =
    (fun x =>
          match x with
          | { as := X } => τ.app X)
        { as := X } ≫
      G.map (Quot.mk (CompClosure r) f)

Next tactic:
exact τ.naturality f
@[reassoc]
lemma comp_natTransLift {F G H : Quotient r ⥤ D}
    (τ : Quotient.functor r ⋙ F ⟶ Quotient.functor r ⋙ G)
    (τ' : Quotient.functor r ⋙ G ⟶ Quotient.functor r ⋙ H) :
    natTransLift r τ ≫ natTransLift r τ' =  natTransLift r (τ ≫ τ') := by 

Proof state:
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
F✝ : C ⥤ D
H✝ : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G H : Quotient r ⥤ D
τ : functor r ⋙ F ⟶ functor r ⋙ G
τ' : functor r ⋙ G ⟶ functor r ⋙ H
⊢ natTransLift r τ ≫ natTransLift r τ' = natTransLift r (τ ≫ τ')

Next tactic:
aesop_cat
@[simp]
lemma natTransLift_id (F : Quotient r ⥤ D) :
    natTransLift r (𝟙 (Quotient.functor r ⋙ F)) = 𝟙 _ := by 

Proof state:
C : Type u_3
inst✝¹ : Category.{u_1, u_3} C
r : HomRel C
D : Type u_4
inst✝ : Category.{u_2, u_4} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F : Quotient r ⥤ D
⊢ natTransLift r (𝟙 (functor r ⋙ F)) = 𝟙 F

Next tactic:
aesop_cat
/-- In order to define a natural isomorphism `F ≅ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
@[simps]
def natIsoLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ≅ Quotient.functor r ⋙ G) :
    F ≅ G where
  hom := natTransLift _ τ.hom
  inv := natTransLift _ τ.inv
  hom_inv_id := by 

Proof state:
C : Type ?u.27722
inst✝¹ : Category.{?u.27726, ?u.27722} C
r : HomRel C
D : Type ?u.27754
inst✝ : Category.{?u.27758, ?u.27754} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G : Quotient r ⥤ D
τ : functor r ⋙ F ≅ functor r ⋙ G
⊢ natTransLift r τ.hom ≫ natTransLift r τ.inv = 𝟙 F

Next tactic:
rw [comp_natTransLift, τ.hom_inv_id, natTransLift_id]
/-- In order to define a natural isomorphism `F ≅ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
@[simps]
def natIsoLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ≅ Quotient.functor r ⋙ G) :
    F ≅ G where
  hom := natTransLift _ τ.hom
  inv := natTransLift _ τ.inv
  hom_inv_id := by rw [comp_natTransLift, τ.hom_inv_id, natTransLift_id]
  inv_hom_id := by 

Proof state:
C : Type ?u.27722
inst✝¹ : Category.{?u.27726, ?u.27722} C
r : HomRel C
D : Type ?u.27754
inst✝ : Category.{?u.27758, ?u.27754} D
F✝ : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F✝.map f₁ = F✝.map f₂
F G : Quotient r ⥤ D
τ : functor r ⋙ F ≅ functor r ⋙ G
⊢ natTransLift r τ.inv ≫ natTransLift r τ.hom = 𝟙 G

Next tactic:
rw [comp_natTransLift, τ.inv_hom_id, natTransLift_id]
instance faithful_whiskeringLeft_functor :
    Faithful ((whiskeringLeft C _ D).obj (functor r)) := ⟨by 

Proof state:
C : Type ?u.32590
inst✝¹ : Category.{?u.32594, ?u.32590} C
r : HomRel C
D : Type ?u.32622
inst✝ : Category.{?u.32626, ?u.32622} D
F : C ⥤ D
H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂
⊢ ∀ {X Y : Quotient r ⥤ D}, Function.Injective ((whiskeringLeft C (Quotient r) D).obj (functor r)).map

Next tactic:
apply natTrans_ext
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c d r : ℝ
h : -1 < r
⊢ IntervalIntegrable (fun x => x ^ r) volume a b

Next tactic:
suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c d r : ℝ
h : -1 < r
this : ∀ (c : ℝ), IntervalIntegrable (fun x => x ^ r) volume 0 c
⊢ IntervalIntegrable (fun x => x ^ r) volume a b

Next tactic:
exact IntervalIntegrable.trans (this a).symm (this b)
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c d r : ℝ
h : -1 < r
⊢ ∀ (c : ℝ), IntervalIntegrable (fun x => x ^ r) volume 0 c

Next tactic:
have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      field_simp [(by linarith : r + 1 ≠ 0)]; ring
    apply integrableOn_deriv_of_nonneg _ hderiv
    · intro x hx; apply rpow_nonneg_of_nonneg hx.1.le
    · refine' (continuousOn_id.rpow_const _).div_const _; intro x _; right; linarith
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c d r : ℝ
h : -1 < r
⊢ ∀ (c : ℝ), 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c

Next tactic:
intro c hc
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
⊢ IntervalIntegrable (fun x => x ^ r) volume 0 c

Next tactic:
rw [intervalIntegrable_iff, uIoc_of_le hc]
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
⊢ IntegrableOn (fun x => x ^ r) (Set.Ioc 0 c)

Next tactic:
have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      field_simp [(by linarith : r + 1 ≠ 0)]; ring
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
⊢ ∀ x ∈ Set.Ioo 0 c, HasDerivAt (fun x => x ^ (r + 1) / (r + 1)) (x ^ r) x

Next tactic:
intro x hx
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
x : ℝ
hx : x ∈ Set.Ioo 0 c
⊢ HasDerivAt (fun x => x ^ (r + 1) / (r + 1)) (x ^ r) x

Next tactic:
convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      

Proof state:
case h.e'_7
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
x : ℝ
hx : x ∈ Set.Ioo 0 c
⊢ x ^ r = (r + 1) * x ^ (r + 1 - 1) / (r + 1)

Next tactic:
field_simp [(by linarith : r + 1 ≠ 0)]
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      field_simp [(by 

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
x : ℝ
hx : x ∈ Set.Ioo 0 c
⊢ r + 1 ≠ 0

Next tactic:
linarith
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      field_simp [(by linarith : r + 1 ≠ 0)]; 

Proof state:
case h.e'_7
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
x : ℝ
hx : x ∈ Set.Ioo 0 c
⊢ x ^ r * (r + 1) = (r + 1) * x ^ r

Next tactic:
ring
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      field_simp [(by linarith : r + 1 ≠ 0)]; ring
    

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
hderiv : ∀ x ∈ Set.Ioo 0 c, HasDerivAt (fun x => x ^ (r + 1) / (r + 1)) (x ^ r) x
⊢ IntegrableOn (fun x => x ^ r) (Set.Ioc 0 c)

Next tactic:
apply integrableOn_deriv_of_nonneg _ hderiv
/-- See `intervalIntegrable_rpow` for a version applying to any locally finite measure, but with a
stronger hypothesis on `r`. -/
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) :
    IntervalIntegrable (fun x => x ^ r) volume a b := by
  suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by
    exact IntervalIntegrable.trans (this a).symm (this b)
  have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by
    intro c hc
    rw [intervalIntegrable_iff, uIoc_of_le hc]
    have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x : ℝ => x ^ (r + 1) / (r + 1)) (x ^ r) x := by
      intro x hx
      convert (Real.hasDerivAt_rpow_const (p := r + 1) (Or.inl hx.1.ne')).div_const (r + 1) using 1
      field_simp [(by linarith : r + 1 ≠ 0)]; ring
    apply integrableOn_deriv_of_nonneg _ hderiv
    · 

Proof state:
a b : ℝ
n : ℕ
f : ℝ → ℝ
μ ν : Measure ℝ
inst✝ : IsLocallyFiniteMeasure μ
c✝ d r : ℝ
h : -1 < r
c : ℝ
hc : 0 ≤ c
hderiv : ∀ x ∈ Set.Ioo 0 c, HasDerivAt (fun x => x ^ (r + 1) / (r + 1)) (x ^ r) x
⊢ ∀ x ∈ Set.Ioo 0 c, 0 ≤ x ^ r

Next tactic:
intro x hx