l3lab/ntp-mathlib huggingface dataset:
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    

Proof state:
case a
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
j : J
⊢ (forget₂ (ModuleCat R) AddCommGroupCat).map
      ((colimitCocone F).ι.app j ≫
        (fun s =>
            homMk
              (colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s))
              (_ :
                ∀ (r : R),
                  colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                        ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
                      (smul s.pt) r =
                    (smul (colimitCocone F).pt) r ≫
                      colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                        ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)))
          s) =
    (forget₂ (ModuleCat R) AddCommGroupCat).map (s.ι.app j)

Next tactic:
exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ m =
    (fun s =>
        homMk
          (colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
            ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s))
          (_ :
            ∀ (r : R),
              colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                    ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
                  (smul s.pt) r =
                (smul (colimitCocone F).pt) r ≫
                  colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                    ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)))
      s

Next tactic:
apply (forget₂ _ AddCommGroupCat).map_injective
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    

Proof state:
case a
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ (forget₂ (ModuleCat R) AddCommGroupCat).map m =
    (forget₂ (ModuleCat R) AddCommGroupCat).map
      ((fun s =>
          homMk
            (colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
              ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s))
            (_ :
              ∀ (r : R),
                colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                      ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
                    (smul s.pt) r =
                  (smul (colimitCocone F).pt) r ≫
                    colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                      ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)))
        s)

Next tactic:
apply colimit.hom_ext
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    apply colimit.hom_ext
    

Proof state:
case a.w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ ∀ (j : J),
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ (forget₂ (ModuleCat R) AddCommGroupCat).map m =
      colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
        (forget₂ (ModuleCat R) AddCommGroupCat).map
          ((fun s =>
              homMk
                (colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                  ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s))
                (_ :
                  ∀ (r : R),
                    colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                          ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
                        (smul s.pt) r =
                      (smul (colimitCocone F).pt) r ≫
                        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                          ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)))
            s)

Next tactic:
intro j
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    apply colimit.hom_ext
    intro j
    

Proof state:
case a.w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ (forget₂ (ModuleCat R) AddCommGroupCat).map m =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (forget₂ (ModuleCat R) AddCommGroupCat).map
        ((fun s =>
            homMk
              (colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s))
              (_ :
                ∀ (r : R),
                  colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                        ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
                      (smul s.pt) r =
                    (smul (colimitCocone F).pt) r ≫
                      colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                        ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)))
          s)

Next tactic:
erw [colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    apply colimit.hom_ext
    intro j
    erw [colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j]
    

Proof state:
case a.w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ (forget₂ (ModuleCat R) AddCommGroupCat).map m =
    ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s).ι.app j

Next tactic:
dsimp
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    apply colimit.hom_ext
    intro j
    erw [colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j]
    dsimp
    

Proof state:
case a.w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ LinearMap.toAddMonoidHom m =
    LinearMap.toAddMonoidHom (s.ι.app j)

Next tactic:
rw [← hm]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    exact colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j
  uniq s m hm := by
    apply (forget₂ _ AddCommGroupCat).map_injective
    apply colimit.hom_ext
    intro j
    erw [colimit.ι_desc ((forget₂ _ AddCommGroupCat).mapCocone s) j]
    dsimp
    rw [← hm]
    

Proof state:
case a.w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
hm : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ LinearMap.toAddMonoidHom m =
    LinearMap.toAddMonoidHom ((colimitCocone F).ι.app j ≫ m)

Next tactic:
rfl
example (R : Type u) [Ring R] : HasCoequalizers (ModuleCat.{u} R) := by
  

Proof state:
R✝ : Type w
inst✝² : Ring R✝
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R✝
R : Type u
inst✝ : Ring R
⊢ HasCoequalizers (ModuleCat R)

Next tactic:
infer_instance
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  

Proof state:
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
⊢ IsConformalMap f ↔ ∃ c, 0 < c ∧ ∀ (u v : E), inner (f u) (f v) = c * inner u v

Next tactic:
constructor
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · 

Proof state:
case mp
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
⊢ IsConformalMap f → ∃ c, 0 < c ∧ ∀ (u v : E), inner (f u) (f v) = c * inner u v

Next tactic:
rintro ⟨c₁, hc₁, li, rfl⟩
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    

Proof state:
case mp.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
c₁ : ℝ
hc₁ : c₁ ≠ 0
li : E →ₗᵢ[ℝ] F
⊢ ∃ c,
    0 < c ∧ ∀ (u v : E), inner ((c₁ • toContinuousLinearMap li) u) ((c₁ • toContinuousLinearMap li) v) = c * inner u v

Next tactic:
refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
    

Proof state:
case mp.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
c₁ : ℝ
hc₁ : c₁ ≠ 0
li : E →ₗᵢ[ℝ] F
u v : E
⊢ inner ((c₁ • toContinuousLinearMap li) u) ((c₁ • toContinuousLinearMap li) v) = c₁ * c₁ * inner u v

Next tactic:
simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
      coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
    simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
      coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
  · 

Proof state:
case mpr
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
⊢ (∃ c, 0 < c ∧ ∀ (u v : E), inner (f u) (f v) = c * inner u v) → IsConformalMap f

Next tactic:
rintro ⟨c₁, hc₁, huv⟩
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
    simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
      coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
  · rintro ⟨c₁, hc₁, huv⟩
    

Proof state:
case mpr.intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
c₁ : ℝ
hc₁ : 0 < c₁
huv : ∀ (u v : E), inner (f u) (f v) = c₁ * inner u v
⊢ IsConformalMap f

Next tactic:
obtain ⟨c, hc, rfl⟩ : ∃ c : ℝ, 0 < c ∧ c₁ = c * c
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
    simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
      coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
  · rintro ⟨c₁, hc₁, huv⟩
    obtain ⟨c, hc, rfl⟩ : ∃ c : ℝ, 0 < c ∧ c₁ = c * c
    

Proof state:
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
c₁ : ℝ
hc₁ : 0 < c₁
huv : ∀ (u v : E), inner (f u) (f v) = c₁ * inner u v
⊢ ∃ c, 0 < c ∧ c₁ = c * c
case mpr.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
c : ℝ
hc : 0 < c
hc₁ : 0 < c * c
huv : ∀ (u v : E), inner (f u) (f v) = c * c * inner u v
⊢ IsConformalMap f

Next tactic:
exact ⟨Real.sqrt c₁, Real.sqrt_pos.2 hc₁, (Real.mul_self_sqrt hc₁.le).symm⟩
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
    simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
      coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
  · rintro ⟨c₁, hc₁, huv⟩
    obtain ⟨c, hc, rfl⟩ : ∃ c : ℝ, 0 < c ∧ c₁ = c * c
    exact ⟨Real.sqrt c₁, Real.sqrt_pos.2 hc₁, (Real.mul_self_sqrt hc₁.le).symm⟩
    

Proof state:
case mpr.intro.intro.intro.intro
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
c : ℝ
hc : 0 < c
hc₁ : 0 < c * c
huv : ∀ (u v : E), inner (f u) (f v) = c * c * inner u v
⊢ IsConformalMap f

Next tactic:
refine' ⟨c, hc.ne', (c⁻¹ • f : E →ₗ[ℝ] F).isometryOfInner fun u v => _, _⟩
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that
`⟪f u, f v⟫ = c * ⟪u, v⟫` for all `u`, `v`. -/
theorem isConformalMap_iff (f : E →L[ℝ] F) :
    IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by
  constructor
  · rintro ⟨c₁, hc₁, li, rfl⟩
    refine' ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => _⟩
    simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
      coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
  · rintro ⟨c₁, hc₁, huv⟩
    obtain ⟨c, hc, rfl⟩ : ∃ c : ℝ, 0 < c ∧ c₁ = c * c
    exact ⟨Real.sqrt c₁, Real.sqrt_pos.2 hc₁, (Real.mul_self_sqrt hc₁.le).symm⟩
    refine' ⟨c, hc.ne', (c⁻¹ • f : E →ₗ[ℝ] F).isometryOfInner fun u v => _, _⟩
    · 

Proof state:
case mpr.intro.intro.intro.intro.refine'_1
E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace ℝ E
inst✝ : InnerProductSpace ℝ F
f : E →L[ℝ] F
c : ℝ
hc : 0 < c
hc₁ : 0 < c * c
huv : ∀ (u v : E), inner (f u) (f v) = c * c * inner u v
u v : E
⊢ inner ((c⁻¹ • ↑f) u) ((c⁻¹ • ↑f) v) = inner u v

Next tactic:
simp only [real_inner_smul_left, real_inner_smul_right, huv, mul_assoc, coe_smul,
        inv_mul_cancel_left₀ hc.ne', LinearMap.smul_apply, ContinuousLinearMap.coe_coe]