l3lab/ntp-mathlib huggingface dataset:
/-- Group topologies on `γ` form a complete lattice, with `⊥` the discrete topology and `⊤` the
indiscrete topology.

The infimum of a collection of group topologies is the topology generated by all their open sets
(which is a group topology).

The supremum of two group topologies `s` and `t` is the infimum of the family of all group
topologies contained in the intersection of `s` and `t`. -/
@[to_additive
  "Group topologies on `γ` form a complete lattice, with `⊥` the discrete topology and
  `⊤` the indiscrete topology.

  The infimum of a collection of group topologies is the topology generated by all their open sets
  (which is a group topology).

  The supremum of two group topologies `s` and `t` is the infimum of the family of all group
  topologies contained in the intersection of `s` and `t`."]
instance : CompleteSemilatticeInf (GroupTopology α) :=
  { inferInstanceAs (InfSet (GroupTopology α)),
    inferInstanceAs (PartialOrder (GroupTopology α)) with
    sInf_le := fun S a haS => toTopologicalSpace_le.1 <| sInf_le ⟨a, haS, rfl⟩
    le_sInf := by
      intro S a hab
      apply (inferInstanceAs (CompleteLattice (TopologicalSpace α))).le_sInf
      

Proof state:
case a
G : Type w
H : Type x
α : Type u
β : Type v
inst✝ : Group α
src✝¹ : InfSet (GroupTopology α) := inferInstanceAs (InfSet (GroupTopology α))
src✝ : PartialOrder (GroupTopology α) := inferInstanceAs (PartialOrder (GroupTopology α))
S : Set (GroupTopology α)
a : GroupTopology α
hab : ∀ b ∈ S, a ≤ b
⊢ ∀ b ∈ toTopologicalSpace '' S, a.toTopologicalSpace ≤ b

Next tactic:
rintro _ ⟨b, hbS, rfl⟩
/-- Group topologies on `γ` form a complete lattice, with `⊥` the discrete topology and `⊤` the
indiscrete topology.

The infimum of a collection of group topologies is the topology generated by all their open sets
(which is a group topology).

The supremum of two group topologies `s` and `t` is the infimum of the family of all group
topologies contained in the intersection of `s` and `t`. -/
@[to_additive
  "Group topologies on `γ` form a complete lattice, with `⊥` the discrete topology and
  `⊤` the indiscrete topology.

  The infimum of a collection of group topologies is the topology generated by all their open sets
  (which is a group topology).

  The supremum of two group topologies `s` and `t` is the infimum of the family of all group
  topologies contained in the intersection of `s` and `t`."]
instance : CompleteSemilatticeInf (GroupTopology α) :=
  { inferInstanceAs (InfSet (GroupTopology α)),
    inferInstanceAs (PartialOrder (GroupTopology α)) with
    sInf_le := fun S a haS => toTopologicalSpace_le.1 <| sInf_le ⟨a, haS, rfl⟩
    le_sInf := by
      intro S a hab
      apply (inferInstanceAs (CompleteLattice (TopologicalSpace α))).le_sInf
      rintro _ ⟨b, hbS, rfl⟩
      

Proof state:
case a.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝ : Group α
src✝¹ : InfSet (GroupTopology α) := inferInstanceAs (InfSet (GroupTopology α))
src✝ : PartialOrder (GroupTopology α) := inferInstanceAs (PartialOrder (GroupTopology α))
S : Set (GroupTopology α)
a : GroupTopology α
hab : ∀ b ∈ S, a ≤ b
b : GroupTopology α
hbS : b ∈ S
⊢ a.toTopologicalSpace ≤ b.toTopologicalSpace

Next tactic:
exact hab b hbS
@[to_additive]
theorem coinduced_continuous {α β : Type*} [t : TopologicalSpace α] [Group β] (f : α → β) :
    Continuous[t, (coinduced f).toTopologicalSpace] f := by
  

Proof state:
G : Type w
H : Type x
α✝ : Type u
β✝ : Type v
inst✝¹ : Group α✝
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : Group β
f : α → β
⊢ Continuous f

Next tactic:
rw [continuous_sInf_rng]
@[to_additive]
theorem coinduced_continuous {α β : Type*} [t : TopologicalSpace α] [Group β] (f : α → β) :
    Continuous[t, (coinduced f).toTopologicalSpace] f := by
  rw [continuous_sInf_rng]
  

Proof state:
G : Type w
H : Type x
α✝ : Type u
β✝ : Type v
inst✝¹ : Group α✝
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : Group β
f : α → β
⊢ ∀ t_1 ∈ toTopologicalSpace '' {b | TopologicalSpace.coinduced f t ≤ b.toTopologicalSpace}, Continuous f

Next tactic:
rintro _ ⟨t', ht', rfl⟩
@[to_additive]
theorem coinduced_continuous {α β : Type*} [t : TopologicalSpace α] [Group β] (f : α → β) :
    Continuous[t, (coinduced f).toTopologicalSpace] f := by
  rw [continuous_sInf_rng]
  rintro _ ⟨t', ht', rfl⟩
  

Proof state:
case intro.intro
G : Type w
H : Type x
α✝ : Type u
β✝ : Type v
inst✝¹ : Group α✝
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : Group β
f : α → β
t' : GroupTopology β
ht' : t' ∈ {b | TopologicalSpace.coinduced f t ≤ b.toTopologicalSpace}
⊢ Continuous f

Next tactic:
exact continuous_iff_coinduced_le.2 ht'
theorem forget₂_map_associator_hom (X Y Z : AlgebraCat.{u} R) :
    (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).hom =
      (α_
        (forget₂ _ (ModuleCat R) |>.obj X)
        (forget₂ _ (ModuleCat R) |>.obj Y)
        (forget₂ _ (ModuleCat R) |>.obj Z)).hom := by
  

Proof state:
R : Type u
inst✝ : CommRing R
X Y Z : AlgebraCat R
⊢ (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).hom =
    (α_ ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X) ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Y)
        ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Z)).hom

Next tactic:
rfl
theorem forget₂_map_associator_inv (X Y Z : AlgebraCat.{u} R) :
    (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).inv =
      (α_
        (forget₂ _ (ModuleCat R) |>.obj X)
        (forget₂ _ (ModuleCat R) |>.obj Y)
        (forget₂ _ (ModuleCat R) |>.obj Z)).inv := by
  

Proof state:
R : Type u
inst✝ : CommRing R
X Y Z : AlgebraCat R
⊢ (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).inv =
    (α_ ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X) ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Y)
        ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Z)).inv

Next tactic:
rfl
set_option maxHeartbeats 800000 in
noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R) :=
  Monoidal.induced
    (forget₂ (AlgebraCat R) (ModuleCat R))
    { μIso := fun X Y => Iso.refl _
      εIso := Iso.refl _
      associator_eq := fun X Y Z => by
        

Proof state:
R : Type u
inst✝ : CommRing R
X Y Z : AlgebraCat R
⊢ (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).hom =
    ((((fun X Y =>
                Iso.refl ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X ⊗ (forget₂ (AlgebraCat R) (ModuleCat R)).obj Y))
              (X ⊗ Y) Z).symm ≪≫
          (((fun X Y =>
                  Iso.refl
                    ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X ⊗ (forget₂ (AlgebraCat R) (ModuleCat R)).obj Y))
                X Y).symm ⊗
            Iso.refl ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Z))) ≪≫
        α_ ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X) ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Y)
            ((forget₂ (AlgebraCat R) (ModuleCat R)).obj Z) ≪≫
          (Iso.refl ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X) ⊗
              (fun X Y =>
                  Iso.refl
                    ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X ⊗ (forget₂ (AlgebraCat R) (ModuleCat R)).obj Y))
                Y Z) ≪≫
            (fun X Y =>
                Iso.refl ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X ⊗ (forget₂ (AlgebraCat R) (ModuleCat R)).obj Y))
              X (Y ⊗ Z)).hom

Next tactic:
dsimp only [forget₂_module_obj, forget₂_map_associator_hom]
set_option maxHeartbeats 800000 in
noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R) :=
  Monoidal.induced
    (forget₂ (AlgebraCat R) (ModuleCat R))
    { μIso := fun X Y => Iso.refl _
      εIso := Iso.refl _
      associator_eq := fun X Y Z => by
        dsimp only [forget₂_module_obj, forget₂_map_associator_hom]
        

Proof state:
R : Type u
inst✝ : CommRing R
X Y Z : AlgebraCat R
⊢ (α_ (ModuleCat.of R ↑X) (ModuleCat.of R ↑Y) (ModuleCat.of R ↑Z)).hom =
    (((Iso.refl (ModuleCat.of R ↑(X ⊗ Y) ⊗ ModuleCat.of R ↑Z)).symm ≪≫
          ((Iso.refl (ModuleCat.of R ↑X ⊗ ModuleCat.of R ↑Y)).symm ⊗ Iso.refl (ModuleCat.of R ↑Z))) ≪≫
        α_ (ModuleCat.of R ↑X) (ModuleCat.of R ↑Y) (ModuleCat.of R ↑Z) ≪≫
          (Iso.refl (ModuleCat.of R ↑X) ⊗ Iso.refl (ModuleCat.of R ↑Y ⊗ ModuleCat.of R ↑Z)) ≪≫
            Iso.refl (ModuleCat.of R ↑X ⊗ ModuleCat.of R ↑(Y ⊗ Z))).hom

Next tactic:
simp only [eqToIso_refl, Iso.refl_trans, Iso.refl_symm, Iso.trans_hom, tensorIso_hom,
          Iso.refl_hom, MonoidalCategory.tensor_id]
set_option maxHeartbeats 800000 in
noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R) :=
  Monoidal.induced
    (forget₂ (AlgebraCat R) (ModuleCat R))
    { μIso := fun X Y => Iso.refl _
      εIso := Iso.refl _
      associator_eq := fun X Y Z => by
        dsimp only [forget₂_module_obj, forget₂_map_associator_hom]
        simp only [eqToIso_refl, Iso.refl_trans, Iso.refl_symm, Iso.trans_hom, tensorIso_hom,
          Iso.refl_hom, MonoidalCategory.tensor_id]
        

Proof state:
R : Type u
inst✝ : CommRing R
X Y Z : AlgebraCat R
⊢ (α_ (ModuleCat.of R ↑X) (ModuleCat.of R ↑Y) (ModuleCat.of R ↑Z)).hom =
    (𝟙 (ModuleCat.of R ↑(X ⊗ Y) ⊗ ModuleCat.of R ↑Z) ≫
        (𝟙 (ModuleCat.of R ↑X ⊗ ModuleCat.of R ↑Y) ⊗ 𝟙 (ModuleCat.of R ↑Z))) ≫
      (α_ (ModuleCat.of R ↑X) (ModuleCat.of R ↑Y) (ModuleCat.of R ↑Z)).hom ≫
        𝟙 (ModuleCat.of R ↑X ⊗ ModuleCat.of R ↑Y ⊗ ModuleCat.of R ↑Z) ≫ 𝟙 (ModuleCat.of R ↑X ⊗ ModuleCat.of R ↑(Y ⊗ Z))

Next tactic:
erw [Category.id_comp, Category.comp_id, MonoidalCategory.tensor_id, Category.id_comp]
set_option maxHeartbeats 800000 in
noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R) :=
  Monoidal.induced
    (forget₂ (AlgebraCat R) (ModuleCat R))
    { μIso := fun X Y => Iso.refl _
      εIso := Iso.refl _
      associator_eq := fun X Y Z => by
        dsimp only [forget₂_module_obj, forget₂_map_associator_hom]
        simp only [eqToIso_refl, Iso.refl_trans, Iso.refl_symm, Iso.trans_hom, tensorIso_hom,
          Iso.refl_hom, MonoidalCategory.tensor_id]
        erw [Category.id_comp, Category.comp_id, MonoidalCategory.tensor_id, Category.id_comp]
      rightUnitor_eq := fun X => by
        

Proof state:
R : Type u
inst✝ : CommRing R
X : AlgebraCat R
⊢ (forget₂ (AlgebraCat R) (ModuleCat R)).map (ρ_ X).hom =
    ((((fun X Y =>
                Iso.refl ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X ⊗ (forget₂ (AlgebraCat R) (ModuleCat R)).obj Y))
              X (𝟙_ (AlgebraCat R))).symm ≪≫
          (Iso.refl ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X) ⊗ (Iso.refl (𝟙_ (ModuleCat R))).symm)) ≪≫
        ρ_ ((forget₂ (AlgebraCat R) (ModuleCat R)).obj X)).hom

Next tactic:
dsimp
set_option maxHeartbeats 800000 in
noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R) :=
  Monoidal.induced
    (forget₂ (AlgebraCat R) (ModuleCat R))
    { μIso := fun X Y => Iso.refl _
      εIso := Iso.refl _
      associator_eq := fun X Y Z => by
        dsimp only [forget₂_module_obj, forget₂_map_associator_hom]
        simp only [eqToIso_refl, Iso.refl_trans, Iso.refl_symm, Iso.trans_hom, tensorIso_hom,
          Iso.refl_hom, MonoidalCategory.tensor_id]
        erw [Category.id_comp, Category.comp_id, MonoidalCategory.tensor_id, Category.id_comp]
      rightUnitor_eq := fun X => by
        dsimp
        

Proof state:
R : Type u
inst✝ : CommRing R
X : AlgebraCat R
⊢ ModuleCat.ofHom (AlgHom.toLinearMap (ρ_ X).hom) =
    (𝟙 (ModuleCat.of R ↑X ⊗ ModuleCat.of R ↑(𝟙_ (AlgebraCat R))) ≫ (𝟙 (ModuleCat.of R ↑X) ⊗ 𝟙 (𝟙_ (ModuleCat R)))) ≫
      (ρ_ (ModuleCat.of R ↑X)).hom

Next tactic:
erw [Category.id_comp, MonoidalCategory.tensor_id, Category.id_comp]
set_option maxHeartbeats 800000 in
noncomputable instance instMonoidalCategory : MonoidalCategory (AlgebraCat.{u} R) :=
  Monoidal.induced
    (forget₂ (AlgebraCat R) (ModuleCat R))
    { μIso := fun X Y => Iso.refl _
      εIso := Iso.refl _
      associator_eq := fun X Y Z => by
        dsimp only [forget₂_module_obj, forget₂_map_associator_hom]
        simp only [eqToIso_refl, Iso.refl_trans, Iso.refl_symm, Iso.trans_hom, tensorIso_hom,
          Iso.refl_hom, MonoidalCategory.tensor_id]
        erw [Category.id_comp, Category.comp_id, MonoidalCategory.tensor_id, Category.id_comp]
      rightUnitor_eq := fun X => by
        dsimp
        erw [Category.id_comp, MonoidalCategory.tensor_id, Category.id_comp]
        

Proof state:
R : Type u
inst✝ : CommRing R
X : AlgebraCat R
⊢ ModuleCat.ofHom (AlgHom.toLinearMap (ρ_ X).hom) = (ρ_ (ModuleCat.of R ↑X)).hom

Next tactic:
exact congr_arg LinearEquiv.toLinearMap <|
          TensorProduct.AlgebraTensorModule.rid_eq_rid R X
variable (R) in
/-- `forget₂ (AlgebraCat R) (ModuleCat R)` as a monoidal functor. -/
def toModuleCatMonoidalFunctor : MonoidalFunctor (AlgebraCat.{u} R) (ModuleCat.{u} R) := by
  

Proof state:
R : Type u
inst✝ : CommRing R
⊢ MonoidalFunctor (AlgebraCat R) (ModuleCat R)

Next tactic:
unfold instMonoidalCategory
variable (R) in
/-- `forget₂ (AlgebraCat R) (ModuleCat R)` as a monoidal functor. -/
def toModuleCatMonoidalFunctor : MonoidalFunctor (AlgebraCat.{u} R) (ModuleCat.{u} R) := by
  unfold instMonoidalCategory
  

Proof state:
R : Type u
inst✝ : CommRing R
⊢ MonoidalFunctor (AlgebraCat R) (ModuleCat R)

Next tactic:
exact Monoidal.fromInduced (forget₂ (AlgebraCat R) (ModuleCat R)) _
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      

Proof state:
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝¹ x✝ : R
s : ↥⊥
h : ↑s * x✝¹ = ↑s * x✝
⊢ x✝¹ * ↑s = x✝ * ↑s

Next tactic:
rcases s with ⟨s, hs⟩
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝¹ x✝ s : R
hs : s ∈ ⊥
h : ↑{ val := s, property := hs } * x✝¹ = ↑{ val := s, property := hs } * x✝
⊢ x✝¹ * ↑{ val := s, property := hs } = x✝ * ↑{ val := s, property := hs }

Next tactic:
rw [Submonoid.mem_bot] at hs
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝¹ x✝ s : R
hs✝ : s ∈ ⊥
hs : s = 1
h : ↑{ val := s, property := hs✝ } * x✝¹ = ↑{ val := s, property := hs✝ } * x✝
⊢ x✝¹ * ↑{ val := s, property := hs✝ } = x✝ * ↑{ val := s, property := hs✝ }

Next tactic:
subst hs
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      subst hs
      

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝¹ x✝ : R
hs : 1 ∈ ⊥
h : ↑{ val := 1, property := hs } * x✝¹ = ↑{ val := 1, property := hs } * x✝
⊢ x✝¹ * ↑{ val := 1, property := hs } = x✝ * ↑{ val := 1, property := hs }

Next tactic:
rw [one_mul, one_mul] at h
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      subst hs
      rw [one_mul, one_mul] at h
      

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝¹ x✝ : R
hs : 1 ∈ ⊥
h : x✝¹ = x✝
⊢ x✝¹ * ↑{ val := 1, property := hs } = x✝ * ↑{ val := 1, property := hs }

Next tactic:
subst h
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      subst hs
      rw [one_mul, one_mul] at h
      subst h
      

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝ : R
hs : 1 ∈ ⊥
⊢ x✝ * ↑{ val := 1, property := hs } = x✝ * ↑{ val := 1, property := hs }

Next tactic:
rfl
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      subst hs
      rw [one_mul, one_mul] at h
      subst h
      rfl⟩
  oreNum r _ := r
  oreDenom _ s := s
  ore_eq _ s := by
    

Proof state:
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝ : R
s : ↥⊥
⊢ x✝ * ↑((fun x s => s) x✝ s) = ↑s * (fun r x => r) x✝ s

Next tactic:
rcases s with ⟨s, hs⟩
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      subst hs
      rw [one_mul, one_mul] at h
      subst h
      rfl⟩
  oreNum r _ := r
  oreDenom _ s := s
  ore_eq _ s := by
    rcases s with ⟨s, hs⟩
    

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝ s : R
hs : s ∈ ⊥
⊢ x✝ * ↑((fun x s => s) x✝ { val := s, property := hs }) =
    ↑{ val := s, property := hs } * (fun r x => r) x✝ { val := s, property := hs }

Next tactic:
rw [Submonoid.mem_bot] at hs
/-- The trivial submonoid is an Ore set. -/
instance oreSetBot : OreSet (⊥ : Submonoid R)
    where
  ore_left_cancel _ _ s h :=
    ⟨s, by
      rcases s with ⟨s, hs⟩
      rw [Submonoid.mem_bot] at hs
      subst hs
      rw [one_mul, one_mul] at h
      subst h
      rfl⟩
  oreNum r _ := r
  oreDenom _ s := s
  ore_eq _ s := by
    rcases s with ⟨s, hs⟩
    rw [Submonoid.mem_bot] at hs
    

Proof state:
case mk
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x✝ s : R
hs✝ : s ∈ ⊥
hs : s = 1
⊢ x✝ * ↑((fun x s => s) x✝ { val := s, property := hs✝ }) =
    ↑{ val := s, property := hs✝ } * (fun r x => r) x✝ { val := s, property := hs✝ }

Next tactic:
simp [hs]
/-- Every submonoid of a commutative monoid is an Ore set. -/
instance (priority := 100) oreSetComm {R} [CommMonoid R] (S : Submonoid R) : OreSet S
    where
  ore_left_cancel m n s h := ⟨s, by 

Proof state:
R✝ : Type u_1
inst✝² : Monoid R✝
S✝ : Submonoid R✝
inst✝¹ : OreSet S✝
R : Type ?u.8072
inst✝ : CommMonoid R
S : Submonoid R
m n : R
s : ↥S
h : ↑s * m = ↑s * n
⊢ m * ↑s = n * ↑s

Next tactic:
rw [mul_comm n s, mul_comm m s, h]
/-- Every submonoid of a commutative monoid is an Ore set. -/
instance (priority := 100) oreSetComm {R} [CommMonoid R] (S : Submonoid R) : OreSet S
    where
  ore_left_cancel m n s h := ⟨s, by rw [mul_comm n s, mul_comm m s, h]⟩
  oreNum r _ := r
  oreDenom _ s := s
  ore_eq r s := by 

Proof state:
R✝ : Type u_1
inst✝² : Monoid R✝
S✝ : Submonoid R✝
inst✝¹ : OreSet S✝
R : Type ?u.8072
inst✝ : CommMonoid R
S : Submonoid R
r : R
s : ↥S
⊢ r * ↑((fun x s => s) r s) = ↑s * (fun r x => r) r s

Next tactic:
rw [mul_comm]
@[to_additive]
theorem lipschitz_with_lipschitz_const_mul :
    ∀ p q : β × β, dist (p.1 * p.2) (q.1 * q.2) ≤ LipschitzMul.C β * dist p q := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
⊢ ∀ (p q : β × β), dist (p.1 * p.2) (q.1 * q.2) ≤ ↑(LipschitzMul.C β) * dist p q

Next tactic:
rw [← lipschitzWith_iff_dist_le_mul]
@[to_additive]
theorem lipschitz_with_lipschitz_const_mul :
    ∀ p q : β × β, dist (p.1 * p.2) (q.1 * q.2) ≤ LipschitzMul.C β * dist p q := by
  rw [← lipschitzWith_iff_dist_le_mul]
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
⊢ LipschitzWith (LipschitzMul.C β) fun p => p.1 * p.2

Next tactic:
exact lipschitzWith_lipschitz_const_mul_edist
@[to_additive]
instance Submonoid.lipschitzMul (s : Submonoid β) : LipschitzMul s where
  lipschitz_mul := ⟨LipschitzMul.C β, by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
s : Submonoid β
⊢ LipschitzWith (LipschitzMul.C β) fun p => p.1 * p.2

Next tactic:
rintro ⟨x₁, x₂⟩ ⟨y₁, y₂⟩
@[to_additive]
instance Submonoid.lipschitzMul (s : Submonoid β) : LipschitzMul s where
  lipschitz_mul := ⟨LipschitzMul.C β, by
    rintro ⟨x₁, x₂⟩ ⟨y₁, y₂⟩
    

Proof state:
case mk.mk
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
s : Submonoid β
x₁ x₂ y₁ y₂ : ↥s
⊢ edist ((fun p => p.1 * p.2) (x₁, x₂)) ((fun p => p.1 * p.2) (y₁, y₂)) ≤ ↑(LipschitzMul.C β) * edist (x₁, x₂) (y₁, y₂)

Next tactic:
convert lipschitzWith_lipschitz_const_mul_edist ⟨(x₁ : β), x₂⟩ ⟨y₁, y₂⟩ using 1
instance Real.hasLipschitzAdd : LipschitzAdd ℝ where
  lipschitz_add := ⟨2, LipschitzWith.of_dist_le_mul <| fun p q => by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
p q : ℝ × ℝ
⊢ dist (p.1 + p.2) (q.1 + q.2) ≤ ↑2 * dist p q

Next tactic:
simp only [Real.dist_eq, Prod.dist_eq, Prod.fst_sub, Prod.snd_sub, NNReal.coe_ofNat,
      add_sub_add_comm, two_mul]
instance Real.hasLipschitzAdd : LipschitzAdd ℝ where
  lipschitz_add := ⟨2, LipschitzWith.of_dist_le_mul <| fun p q => by
    simp only [Real.dist_eq, Prod.dist_eq, Prod.fst_sub, Prod.snd_sub, NNReal.coe_ofNat,
      add_sub_add_comm, two_mul]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
p q : ℝ × ℝ
⊢ |p.1 - q.1 + (p.2 - q.2)| ≤ max |p.1 - q.1| |p.2 - q.2| + max |p.1 - q.1| |p.2 - q.2|

Next tactic:
refine le_trans (abs_add (p.1 - q.1) (p.2 - q.2)) ?_
instance Real.hasLipschitzAdd : LipschitzAdd ℝ where
  lipschitz_add := ⟨2, LipschitzWith.of_dist_le_mul <| fun p q => by
    simp only [Real.dist_eq, Prod.dist_eq, Prod.fst_sub, Prod.snd_sub, NNReal.coe_ofNat,
      add_sub_add_comm, two_mul]
    refine le_trans (abs_add (p.1 - q.1) (p.2 - q.2)) ?_
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
p q : ℝ × ℝ
⊢ |p.1 - q.1| + |p.2 - q.2| ≤ max |p.1 - q.1| |p.2 - q.2| + max |p.1 - q.1| |p.2 - q.2|

Next tactic:
exact add_le_add (le_max_left _ _) (le_max_right _ _)
instance NNReal.hasLipschitzAdd : LipschitzAdd ℝ≥0 where
  lipschitz_add := ⟨LipschitzAdd.C ℝ, by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
⊢ LipschitzWith (LipschitzAdd.C ℝ) fun p => p.1 + p.2

Next tactic:
rintro ⟨x₁, x₂⟩ ⟨y₁, y₂⟩
instance NNReal.hasLipschitzAdd : LipschitzAdd ℝ≥0 where
  lipschitz_add := ⟨LipschitzAdd.C ℝ, by
    rintro ⟨x₁, x₂⟩ ⟨y₁, y₂⟩
    

Proof state:
case mk.mk
α : Type u_1
β : Type u_2
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : Monoid β
inst✝ : LipschitzMul β
x₁ x₂ y₁ y₂ : ℝ≥0
⊢ edist ((fun p => p.1 + p.2) (x₁, x₂)) ((fun p => p.1 + p.2) (y₁, y₂)) ≤ ↑(LipschitzAdd.C ℝ) * edist (x₁, x₂) (y₁, y₂)

Next tactic:
exact lipschitzWith_lipschitz_const_add_edist ⟨(x₁ : ℝ), x₂⟩ ⟨y₁, y₂⟩
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
⊢ Continuous fun p => p.1 • p.2

Next tactic:
rw [Metric.continuous_iff]
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
⊢ ∀ (b : α × β), ∀ ε > 0, ∃ δ > 0, ∀ (a : α × β), dist a b < δ → dist (a.1 • a.2) (b.1 • b.2) < ε

Next tactic:
rintro ⟨a, b⟩ ε ε0