l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem abs_cos_add_sin_mul_I (x : ℝ) : abs (cos x + sin x * I) = 1 := by
  have := Real.sin_sq_add_cos_sq x
  

Proof state:
x : ℝ
this : Real.sin x ^ 2 + Real.cos x ^ 2 = 1
⊢ abs (cos ↑x + sin ↑x * I) = 1

Next tactic:
simp_all [add_comm, abs, normSq, sq, sin_ofReal_re, cos_ofReal_re, mul_re]
@[simp]
theorem abs_exp_ofReal (x : ℝ) : abs (exp x) = Real.exp x := by
  

Proof state:
x : ℝ
⊢ abs (cexp ↑x) = Real.exp x

Next tactic:
rw [← ofReal_exp]
@[simp]
theorem abs_exp_ofReal (x : ℝ) : abs (exp x) = Real.exp x := by
  rw [← ofReal_exp]
  

Proof state:
x : ℝ
⊢ abs ↑(Real.exp x) = Real.exp x

Next tactic:
exact abs_of_nonneg (le_of_lt (Real.exp_pos _))
@[simp]
theorem abs_exp_ofReal_mul_I (x : ℝ) : abs (exp (x * I)) = 1 := by
  

Proof state:
x : ℝ
⊢ abs (cexp (↑x * I)) = 1

Next tactic:
rw [exp_mul_I, abs_cos_add_sin_mul_I]
theorem abs_exp (z : ℂ) : abs (exp z) = Real.exp z.re := by
  

Proof state:
z : ℂ
⊢ abs (cexp z) = Real.exp z.re

Next tactic:
rw [exp_eq_exp_re_mul_sin_add_cos, map_mul, abs_exp_ofReal, abs_cos_add_sin_mul_I, mul_one]
theorem abs_exp_eq_iff_re_eq {x y : ℂ} : abs (exp x) = abs (exp y) ↔ x.re = y.re := by
  

Proof state:
x y : ℂ
⊢ abs (cexp x) = abs (cexp y) ↔ x.re = y.re

Next tactic:
rw [abs_exp, abs_exp, Real.exp_eq_exp]
theorem isRat_ofScientific_of_true [DivisionRing α] (σα : OfScientific α) :
    {m e : ℕ} → {n : ℤ} → {d : ℕ} →
    @OfScientific.ofScientific α σα = (fun m s e ↦ (Rat.ofScientific m s e : α)) →
    IsRat (mkRat m (10 ^ e) : α) n d → IsRat (@OfScientific.ofScientific α σα m true e) n d
  | _, _, _, _, σh, ⟨_, eq⟩ => ⟨_, by 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
σα : OfScientific α
x✝¹ x✝ : ℕ
num✝ : ℤ
denom✝ : ℕ
σh : OfScientific.ofScientific = fun m s e => ↑(Rat.ofScientific m s e)
inv✝ : Invertible ↑denom✝
eq : ↑(mkRat (↑x✝¹) (10 ^ x✝)) = ↑num✝ * ⅟↑denom✝
⊢ OfScientific.ofScientific x✝¹ true x✝ = ↑num✝ * ⅟↑denom✝

Next tactic:
simp only [σh, Rat.ofScientific_true_def]
theorem isRat_ofScientific_of_true [DivisionRing α] (σα : OfScientific α) :
    {m e : ℕ} → {n : ℤ} → {d : ℕ} →
    @OfScientific.ofScientific α σα = (fun m s e ↦ (Rat.ofScientific m s e : α)) →
    IsRat (mkRat m (10 ^ e) : α) n d → IsRat (@OfScientific.ofScientific α σα m true e) n d
  | _, _, _, _, σh, ⟨_, eq⟩ => ⟨_, by simp only [σh, Rat.ofScientific_true_def]; 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
σα : OfScientific α
x✝¹ x✝ : ℕ
num✝ : ℤ
denom✝ : ℕ
σh : OfScientific.ofScientific = fun m s e => ↑(Rat.ofScientific m s e)
inv✝ : Invertible ↑denom✝
eq : ↑(mkRat (↑x✝¹) (10 ^ x✝)) = ↑num✝ * ⅟↑denom✝
⊢ ↑(mkRat (↑x✝¹) (10 ^ x✝)) = ↑num✝ * ⅟↑denom✝

Next tactic:
exact eq
theorem isNat_ofScientific_of_false [DivisionRing α] (σα : OfScientific α) : {m e nm ne n : ℕ} →
    @OfScientific.ofScientific α σα = (fun m s e ↦ (Rat.ofScientific m s e : α)) →
    IsNat m nm → IsNat e ne → n = Nat.mul nm ((10 : ℕ) ^ ne) →
    IsNat (@OfScientific.ofScientific α σα m false e : α) n
  | _, _, _, _, _, σh, ⟨rfl⟩, ⟨rfl⟩, h => ⟨by 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
σα : OfScientific α
n✝¹ n✝ x✝ : ℕ
σh : OfScientific.ofScientific = fun m s e => ↑(Rat.ofScientific m s e)
h : x✝ = Nat.mul n✝¹ (10 ^ n✝)
⊢ OfScientific.ofScientific (↑n✝¹) false ↑n✝ = ↑x✝

Next tactic:
simp [σh, Rat.ofScientific_false_def, h]
theorem isNat_ofScientific_of_false [DivisionRing α] (σα : OfScientific α) : {m e nm ne n : ℕ} →
    @OfScientific.ofScientific α σα = (fun m s e ↦ (Rat.ofScientific m s e : α)) →
    IsNat m nm → IsNat e ne → n = Nat.mul nm ((10 : ℕ) ^ ne) →
    IsNat (@OfScientific.ofScientific α σα m false e : α) n
  | _, _, _, _, _, σh, ⟨rfl⟩, ⟨rfl⟩, h => ⟨by simp [σh, Rat.ofScientific_false_def, h]; 

Proof state:
α : Type u_1
inst✝ : DivisionRing α
σα : OfScientific α
n✝¹ n✝ x✝ : ℕ
σh : OfScientific.ofScientific = fun m s e => ↑(Rat.ofScientific m s e)
h : x✝ = Nat.mul n✝¹ (10 ^ n✝)
⊢ ↑(↑n✝¹ * ↑(10 ^ n✝)) = ↑n✝¹ * ↑(10 ^ n✝)

Next tactic:
norm_cast
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
⊢ Category.{?u.1815, u + 1} (Bundled c)

Next tactic:
refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ }
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> 

Proof state:
case refine'_1
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
⊢ ∀ {X Y : Bundled c} (f : X ⟶ Y), 𝟙 X ≫ f = f

Next tactic:
intros
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> 

Proof state:
case refine'_2
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
⊢ ∀ {X Y : Bundled c} (f : X ⟶ Y), f ≫ 𝟙 Y = f

Next tactic:
intros
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> 

Proof state:
case refine'_3
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
⊢ ∀ {W X Y Z : Bundled c} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
intros
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> intros <;> 

Proof state:
case refine'_1
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ : Bundled c
f✝ : X✝ ⟶ Y✝
⊢ 𝟙 X✝ ≫ f✝ = f✝

Next tactic:
apply 𝒞.hom_ext
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> intros <;> 

Proof state:
case refine'_2
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ : Bundled c
f✝ : X✝ ⟶ Y✝
⊢ f✝ ≫ 𝟙 Y✝ = f✝

Next tactic:
apply 𝒞.hom_ext
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> intros <;> 

Proof state:
case refine'_3
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
W✝ X✝ Y✝ Z✝ : Bundled c
f✝ : W✝ ⟶ X✝
g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
⊢ (f✝ ≫ g✝) ≫ h✝ = f✝ ≫ g✝ ≫ h✝

Next tactic:
apply 𝒞.hom_ext
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> intros <;> apply 𝒞.hom_ext <;>
    

Proof state:
case refine'_1.a
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ : Bundled c
f✝ : X✝ ⟶ Y✝
⊢ toFun 𝒞 X✝.str Y✝.str (𝟙 X✝ ≫ f✝) = toFun 𝒞 X✝.str Y✝.str f✝

Next tactic:
aesop_cat
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> intros <;> apply 𝒞.hom_ext <;>
    

Proof state:
case refine'_2.a
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ : Bundled c
f✝ : X✝ ⟶ Y✝
⊢ toFun 𝒞 X✝.str Y✝.str (f✝ ≫ 𝟙 Y✝) = toFun 𝒞 X✝.str Y✝.str f✝

Next tactic:
aesop_cat
set_option synthInstance.checkSynthOrder false in
/-- Every `@BundledHom c _` defines a category with objects in `Bundled c`.

This instance generates the type-class problem `BundledHom ?m`.
Currently that is not a problem, as there are almost no instances of `BundledHom`.
-/
instance category : Category (Bundled c) := by
  refine' { Hom := fun X Y => @hom X Y X.str Y.str
            id := fun X => @BundledHom.id c hom 𝒞 X X.str
            comp := @fun X Y Z f g => @BundledHom.comp c hom 𝒞 X Y Z X.str Y.str Z.str g f
            comp_id := _
            id_comp := _
            assoc := _ } <;> intros <;> apply 𝒞.hom_ext <;>
    

Proof state:
case refine'_3.a
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
W✝ X✝ Y✝ Z✝ : Bundled c
f✝ : W✝ ⟶ X✝
g✝ : X✝ ⟶ Y✝
h✝ : Y✝ ⟶ Z✝
⊢ toFun 𝒞 W✝.str Z✝.str ((f✝ ≫ g✝) ≫ h✝) = toFun 𝒞 W✝.str Z✝.str (f✝ ≫ g✝ ≫ h✝)

Next tactic:
aesop_cat
/-- A category given by `BundledHom` is a concrete category. -/
instance concreteCategory : ConcreteCategory.{u} (Bundled c)
    where
  forget :=
    { obj := fun X => X
      map := @fun X Y f => 𝒞.toFun X.str Y.str f
      map_id := fun X => 𝒞.id_toFun X.str
      map_comp := fun f g => by 

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ Z✝ : Bundled c
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun X => ↑X, map := fun X Y f => toFun 𝒞 X.str Y.str f }.map (f ≫ g) =
    { obj := fun X => ↑X, map := fun X Y f => toFun 𝒞 X.str Y.str f }.map f ≫
      { obj := fun X => ↑X, map := fun X Y f => toFun 𝒞 X.str Y.str f }.map g

Next tactic:
dsimp
/-- A category given by `BundledHom` is a concrete category. -/
instance concreteCategory : ConcreteCategory.{u} (Bundled c)
    where
  forget :=
    { obj := fun X => X
      map := @fun X Y f => 𝒞.toFun X.str Y.str f
      map_id := fun X => 𝒞.id_toFun X.str
      map_comp := fun f g => by dsimp; 

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ Z✝ : Bundled c
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ toFun 𝒞 X✝.str Z✝.str (f ≫ g) = toFun 𝒞 X✝.str Y✝.str f ≫ toFun 𝒞 Y✝.str Z✝.str g

Next tactic:
erw [𝒞.comp_toFun]
/-- A category given by `BundledHom` is a concrete category. -/
instance concreteCategory : ConcreteCategory.{u} (Bundled c)
    where
  forget :=
    { obj := fun X => X
      map := @fun X Y f => 𝒞.toFun X.str Y.str f
      map_id := fun X => 𝒞.id_toFun X.str
      map_comp := fun f g => by dsimp; erw [𝒞.comp_toFun];

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ Z✝ : Bundled c
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ toFun 𝒞 Y✝.str Z✝.str g ∘ toFun 𝒞 X✝.str Y✝.str f = toFun 𝒞 X✝.str Y✝.str f ≫ toFun 𝒞 Y✝.str Z✝.str g

Next tactic:
rfl
/-- A category given by `BundledHom` is a concrete category. -/
instance concreteCategory : ConcreteCategory.{u} (Bundled c)
    where
  forget :=
    { obj := fun X => X
      map := @fun X Y f => 𝒞.toFun X.str Y.str f
      map_id := fun X => 𝒞.id_toFun X.str
      map_comp := fun f g => by dsimp; erw [𝒞.comp_toFun];rfl }
  forget_faithful := { map_injective := by (

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
⊢ ∀ {X Y : Bundled c},
    Function.Injective (Functor.mk { obj := fun X => ↑X, map := fun X Y f => toFun 𝒞 X.str Y.str f }).map

Next tactic:
intros
/-- A category given by `BundledHom` is a concrete category. -/
instance concreteCategory : ConcreteCategory.{u} (Bundled c)
    where
  forget :=
    { obj := fun X => X
      map := @fun X Y f => 𝒞.toFun X.str Y.str f
      map_id := fun X => 𝒞.id_toFun X.str
      map_comp := fun f g => by dsimp; erw [𝒞.comp_toFun];rfl }
  forget_faithful := { map_injective := by (intros; 

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
X✝ Y✝ : Bundled c
⊢ Function.Injective (Functor.mk { obj := fun X => ↑X, map := fun X Y f => toFun 𝒞 X.str Y.str f }).map

Next tactic:
apply 𝒞.hom_ext
/-- A version of `HasForget₂.mk'` for categories defined using `@BundledHom`. -/
def mkHasForget₂ {d : Type u → Type u} {hom_d : ∀ ⦃α β : Type u⦄ (_ : d α) (_ : d β), Type u}
    [BundledHom hom_d] (obj : ∀ ⦃α⦄, c α → d α)
    (map : ∀ {X Y : Bundled c}, (X ⟶ Y) → (Bundled.map @obj X ⟶ (Bundled.map @obj Y)))
    (h_map : ∀ {X Y : Bundled c} (f : X ⟶ Y), ⇑(map f) = ⇑f) :
    HasForget₂ (Bundled c) (Bundled d) :=
  HasForget₂.mk' (Bundled.map @obj) (fun _ => rfl) map (by
    

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
d : Type u → Type u
hom_d : ⦃α β : Type u⦄ → d α → d β → Type u
inst✝ : BundledHom hom_d
obj : ⦃α : Type u⦄ → c α → d α
map : {X Y : Bundled c} → (X ⟶ Y) → (Bundled.map obj X ⟶ Bundled.map obj Y)
h_map : ∀ {X Y : Bundled c} (f : X ⟶ Y), ⇑(map f) = ⇑f
⊢ ∀ {X Y : Bundled c} {f : X ⟶ Y}, HEq ((forget (Bundled d)).map ((fun {X Y} => map) f)) ((forget (Bundled c)).map f)

Next tactic:
intros X Y f
/-- A version of `HasForget₂.mk'` for categories defined using `@BundledHom`. -/
def mkHasForget₂ {d : Type u → Type u} {hom_d : ∀ ⦃α β : Type u⦄ (_ : d α) (_ : d β), Type u}
    [BundledHom hom_d] (obj : ∀ ⦃α⦄, c α → d α)
    (map : ∀ {X Y : Bundled c}, (X ⟶ Y) → (Bundled.map @obj X ⟶ (Bundled.map @obj Y)))
    (h_map : ∀ {X Y : Bundled c} (f : X ⟶ Y), ⇑(map f) = ⇑f) :
    HasForget₂ (Bundled c) (Bundled d) :=
  HasForget₂.mk' (Bundled.map @obj) (fun _ => rfl) map (by
    intros X Y f
    

Proof state:
c : Type u → Type u
hom : ⦃α β : Type u⦄ → c α → c β → Type u
𝒞 : BundledHom hom
d : Type u → Type u
hom_d : ⦃α β : Type u⦄ → d α → d β → Type u
inst✝ : BundledHom hom_d
obj : ⦃α : Type u⦄ → c α → d α
map : {X Y : Bundled c} → (X ⟶ Y) → (Bundled.map obj X ⟶ Bundled.map obj Y)
h_map : ∀ {X Y : Bundled c} (f : X ⟶ Y), ⇑(map f) = ⇑f
X Y : Bundled c
f : X ⟶ Y
⊢ HEq ((forget (Bundled d)).map ((fun {X Y} => map) f)) ((forget (Bundled c)).map f)

Next tactic:
rw [heq_eq_eq, forget_map_eq_coe, forget_map_eq_coe, h_map f]
instance [SMul N β] [ContinuousConstSMul N β] : SMulCommClass Mᵈᵐᵃ N (α →ₘ[μ] β) where
  smul_comm := by 

Proof state:
M : Type ?u.45390
N : Type ?u.45393
α : Type ?u.45396
β : Type ?u.45406
inst✝⁸ : MeasurableSpace M
inst✝⁷ : MeasurableSpace N
inst✝⁶ : MeasurableSpace α
μ : Measure α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : SMul M α
inst✝³ : MeasurableSMul M α
inst✝² : SMulInvariantMeasure M α μ
inst✝¹ : SMul N β
inst✝ : ContinuousConstSMul N β
⊢ ∀ (m : Mᵈᵐᵃ) (n : N) (a : α →ₘ[μ] β), m • n • a = n • m • a

Next tactic:
rintro _ _ ⟨_⟩
instance [SMul N β] [ContinuousConstSMul N β] : SMulCommClass Mᵈᵐᵃ N (α →ₘ[μ] β) where
  smul_comm := by rintro _ _ ⟨_⟩; 

Proof state:
case mk
M : Type ?u.45390
N : Type ?u.45393
α : Type ?u.45396
β : Type ?u.45406
inst✝⁸ : MeasurableSpace M
inst✝⁷ : MeasurableSpace N
inst✝⁶ : MeasurableSpace α
μ : Measure α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : SMul M α
inst✝³ : MeasurableSMul M α
inst✝² : SMulInvariantMeasure M α μ
inst✝¹ : SMul N β
inst✝ : ContinuousConstSMul N β
m✝ : Mᵈᵐᵃ
n✝ : N
a✝¹ : α →ₘ[μ] β
a✝ : { f // AEStronglyMeasurable f μ }
⊢ m✝ • n✝ • Quot.mk Setoid.r a✝ = n✝ • m✝ • Quot.mk Setoid.r a✝

Next tactic:
rfl
instance [AddMonoid β] [ContinuousAdd β] : DistribSMul Mᵈᵐᵃ (α →ₘ[μ] β) where
  smul_add := by 

Proof state:
M : Type ?u.49886
N : Type ?u.49889
α : Type ?u.49892
β : Type ?u.49902
inst✝⁸ : MeasurableSpace M
inst✝⁷ : MeasurableSpace N
inst✝⁶ : MeasurableSpace α
μ : Measure α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : SMul M α
inst✝³ : MeasurableSMul M α
inst✝² : SMulInvariantMeasure M α μ
inst✝¹ : AddMonoid β
inst✝ : ContinuousAdd β
⊢ ∀ (a : Mᵈᵐᵃ) (x y : α →ₘ[μ] β), a • (x + y) = a • x + a • y

Next tactic:
rintro _ ⟨⟩ ⟨⟩
instance [AddMonoid β] [ContinuousAdd β] : DistribSMul Mᵈᵐᵃ (α →ₘ[μ] β) where
  smul_add := by rintro _ ⟨⟩ ⟨⟩; 

Proof state:
case mk.mk
M : Type ?u.49886
N : Type ?u.49889
α : Type ?u.49892
β : Type ?u.49902
inst✝⁸ : MeasurableSpace M
inst✝⁷ : MeasurableSpace N
inst✝⁶ : MeasurableSpace α
μ : Measure α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : SMul M α
inst✝³ : MeasurableSMul M α
inst✝² : SMulInvariantMeasure M α μ
inst✝¹ : AddMonoid β
inst✝ : ContinuousAdd β
a✝² : Mᵈᵐᵃ
x✝ : α →ₘ[μ] β
a✝¹ : { f // AEStronglyMeasurable f μ }
y✝ : α →ₘ[μ] β
a✝ : { f // AEStronglyMeasurable f μ }
⊢ a✝² • (Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝) = a✝² • Quot.mk Setoid.r a✝¹ + a✝² • Quot.mk Setoid.r a✝

Next tactic:
rfl
instance [Monoid β] [ContinuousMul β] : MulDistribMulAction Mᵈᵐᵃ (α →ₘ[μ] β) where
  smul_one _ := rfl
  smul_mul := by 

Proof state:
M : Type ?u.61364
N : Type ?u.61367
α : Type ?u.61370
β : Type ?u.61380
inst✝⁹ : MeasurableSpace M
inst✝⁸ : MeasurableSpace N
inst✝⁷ : MeasurableSpace α
μ : Measure α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
inst✝³ : MeasurableSMul M α
inst✝² : SMulInvariantMeasure M α μ
inst✝¹ : Monoid β
inst✝ : ContinuousMul β
⊢ ∀ (r : Mᵈᵐᵃ) (x y : α →ₘ[μ] β), r • (x * y) = r • x * r • y

Next tactic:
rintro _ ⟨⟩ ⟨⟩
instance [Monoid β] [ContinuousMul β] : MulDistribMulAction Mᵈᵐᵃ (α →ₘ[μ] β) where
  smul_one _ := rfl
  smul_mul := by rintro _ ⟨⟩ ⟨⟩; 

Proof state:
case mk.mk
M : Type ?u.61364
N : Type ?u.61367
α : Type ?u.61370
β : Type ?u.61380
inst✝⁹ : MeasurableSpace M
inst✝⁸ : MeasurableSpace N
inst✝⁷ : MeasurableSpace α
μ : Measure α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
inst✝³ : MeasurableSMul M α
inst✝² : SMulInvariantMeasure M α μ
inst✝¹ : Monoid β
inst✝ : ContinuousMul β
r✝ : Mᵈᵐᵃ
x✝ : α →ₘ[μ] β
a✝¹ : { f // AEStronglyMeasurable f μ }
y✝ : α →ₘ[μ] β
a✝ : { f // AEStronglyMeasurable f μ }
⊢ r✝ • (Quot.mk Setoid.r a✝¹ * Quot.mk Setoid.r a✝) = r✝ • Quot.mk Setoid.r a✝¹ * r✝ • Quot.mk Setoid.r a✝

Next tactic:
rfl
theorem rat_add_continuous_lemma {ε : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ →
      abv (a₁ + a₂ - (b₁ + b₂)) < ε :=
  ⟨ε / 2, half_pos ε0, fun {a₁ a₂ b₁ b₂} h₁ h₂ => by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
ε : α
ε0 : 0 < ε
a₁ a₂ b₁ b₂ : β
h₁ : abv (a₁ - b₁) < ε / 2
h₂ : abv (a₂ - b₂) < ε / 2
⊢ abv (a₁ + a₂ - (b₁ + b₂)) < ε

Next tactic:
simpa [add_halves, sub_eq_add_neg, add_comm, add_left_comm, add_assoc] using
      lt_of_le_of_lt (abv_add abv _ _) (add_lt_add h₁ h₂)
theorem rat_mul_continuous_lemma {ε K₁ K₂ : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ →
      abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
ε K₁ K₂ : α
ε0 : 0 < ε
⊢ ∃ δ > 0,
    ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε

Next tactic:
have K0 : (0 : α) < max 1 (max K₁ K₂) := lt_of_lt_of_le zero_lt_one (le_max_left _ _)
theorem rat_mul_continuous_lemma {ε K₁ K₂ : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ →
      abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε := by
  have K0 : (0 : α) < max 1 (max K₁ K₂) := lt_of_lt_of_le zero_lt_one (le_max_left _ _)
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
ε K₁ K₂ : α
ε0 : 0 < ε
K0 : 0 < max 1 (max K₁ K₂)
⊢ ∃ δ > 0,
    ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε

Next tactic:
have εK := div_pos (half_pos ε0) K0
theorem rat_mul_continuous_lemma {ε K₁ K₂ : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ →
      abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε := by
  have K0 : (0 : α) < max 1 (max K₁ K₂) := lt_of_lt_of_le zero_lt_one (le_max_left _ _)
  have εK := div_pos (half_pos ε0) K0
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
ε K₁ K₂ : α
ε0 : 0 < ε
K0 : 0 < max 1 (max K₁ K₂)
εK : 0 < ε / 2 / max 1 (max K₁ K₂)
⊢ ∃ δ > 0,
    ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε

Next tactic:
refine' ⟨_, εK, fun {a₁ a₂ b₁ b₂} ha₁ hb₂ h₁ h₂ => _⟩
theorem rat_mul_continuous_lemma {ε K₁ K₂ : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ →
      abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε := by
  have K0 : (0 : α) < max 1 (max K₁ K₂) := lt_of_lt_of_le zero_lt_one (le_max_left _ _)
  have εK := div_pos (half_pos ε0) K0
  refine' ⟨_, εK, fun {a₁ a₂ b₁ b₂} ha₁ hb₂ h₁ h₂ => _⟩
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
ε K₁ K₂ : α
ε0 : 0 < ε
K0 : 0 < max 1 (max K₁ K₂)
εK : 0 < ε / 2 / max 1 (max K₁ K₂)
a₁ a₂ b₁ b₂ : β
ha₁ : abv a₁ < K₁
hb₂ : abv b₂ < K₂
h₁ : abv (a₁ - b₁) < ε / 2 / max 1 (max K₁ K₂)
h₂ : abv (a₂ - b₂) < ε / 2 / max 1 (max K₁ K₂)
⊢ abv (a₁ * a₂ - b₁ * b₂) < ε

Next tactic:
replace ha₁ := lt_of_lt_of_le ha₁ (le_trans (le_max_left _ K₂) (le_max_right 1 _))