l3lab/ntp-mathlib huggingface dataset:
instance functorHasRightDual [RightRigidCategory D] (F : C ⥤ D) : HasRightDual F where
  rightDual :=
    { obj := fun X => (F.obj X)ᘁ
      map := fun f => (F.map (inv f))ᘁ
      map_comp := fun f g => by simp [comp_rightAdjointMate] }
  exact :=
    { evaluation' :=
        { app := fun X => ε_ _ _
          naturality := fun X Y f => by
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.42, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : RightRigidCategory D
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (Functor.mk { obj := fun X => (F.obj X)ᘁ, map := fun {X Y} f => F.map (inv f)ᘁ } ⊗ F).map f ≫
      (fun X => ε_ (F.obj X) ((Functor.mk { obj := fun X => (F.obj X)ᘁ, map := fun {X Y} f => F.map (inv f)ᘁ }).obj X))
        Y =
    (fun X => ε_ (F.obj X) ((Functor.mk { obj := fun X => (F.obj X)ᘁ, map := fun {X Y} f => F.map (inv f)ᘁ }).obj X))
        X ≫
      (𝟙_ (C ⥤ D)).map f

Next tactic:
dsimp
instance functorHasRightDual [RightRigidCategory D] (F : C ⥤ D) : HasRightDual F where
  rightDual :=
    { obj := fun X => (F.obj X)ᘁ
      map := fun f => (F.map (inv f))ᘁ
      map_comp := fun f g => by simp [comp_rightAdjointMate] }
  exact :=
    { evaluation' :=
        { app := fun X => ε_ _ _
          naturality := fun X Y f => by
            dsimp
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.42, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : RightRigidCategory D
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (F.map (inv f)ᘁ ⊗ F.map f) ≫ ε_ (F.obj Y) (F.obj Y)ᘁ = ε_ (F.obj X) (F.obj X)ᘁ ≫ 𝟙 (𝟙_ D)

Next tactic:
rw [Category.comp_id, Functor.map_inv, ← id_tensor_comp_tensor_id, Category.assoc,
              rightAdjointMate_comp_evaluation, ← Category.assoc, ← id_tensor_comp,
              IsIso.hom_inv_id, tensor_id, Category.id_comp]
instance functorHasLeftDual [LeftRigidCategory D] (F : C ⥤ D) : HasLeftDual F where
  leftDual :=
    { obj := fun X => ᘁ(F.obj X)
      map := fun f => ᘁ(F.map (inv f))
      map_comp := fun f g => by 

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.40927, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : LeftRigidCategory D
F : C ⥤ D
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }.map (f ≫ g) =
    { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }.map f ≫
      { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }.map g

Next tactic:
simp [comp_leftAdjointMate]
instance functorHasLeftDual [LeftRigidCategory D] (F : C ⥤ D) : HasLeftDual F where
  leftDual :=
    { obj := fun X => ᘁ(F.obj X)
      map := fun f => ᘁ(F.map (inv f))
      map_comp := fun f g => by simp [comp_leftAdjointMate] }
  exact :=
    { evaluation' :=
        { app := fun X => ε_ _ _
          naturality := fun X Y f => by
            dsimp
            rw [Category.comp_id, Functor.map_inv, ← tensor_id_comp_id_tensor, Category.assoc,
              leftAdjointMate_comp_evaluation, ← Category.assoc, ← comp_tensor_id,
              IsIso.hom_inv_id, tensor_id, Category.id_comp] }
      coevaluation' :=
        { app := fun X => η_ _ _
          naturality := fun X Y f => by
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.40927, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : LeftRigidCategory D
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (𝟙_ (C ⥤ D)).map f ≫
      (fun X => η_ ((Functor.mk { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }).obj X) (F.obj X))
        Y =
    (fun X => η_ ((Functor.mk { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }).obj X) (F.obj X))
        X ≫
      (Functor.mk { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) } ⊗ F).map f

Next tactic:
dsimp
instance functorHasLeftDual [LeftRigidCategory D] (F : C ⥤ D) : HasLeftDual F where
  leftDual :=
    { obj := fun X => ᘁ(F.obj X)
      map := fun f => ᘁ(F.map (inv f))
      map_comp := fun f g => by simp [comp_leftAdjointMate] }
  exact :=
    { evaluation' :=
        { app := fun X => ε_ _ _
          naturality := fun X Y f => by
            dsimp
            rw [Category.comp_id, Functor.map_inv, ← tensor_id_comp_id_tensor, Category.assoc,
              leftAdjointMate_comp_evaluation, ← Category.assoc, ← comp_tensor_id,
              IsIso.hom_inv_id, tensor_id, Category.id_comp] }
      coevaluation' :=
        { app := fun X => η_ _ _
          naturality := fun X Y f => by
            dsimp
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.40927, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : LeftRigidCategory D
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ 𝟙 (𝟙_ D) ≫ η_ (ᘁ(F.obj Y)) (F.obj Y) = η_ (ᘁ(F.obj X)) (F.obj X) ≫ ((ᘁF.map (inv f)) ⊗ F.map f)

Next tactic:
rw [Functor.map_inv, Category.id_comp, ← tensor_id_comp_id_tensor, ← Category.assoc,
              coevaluation_comp_leftAdjointMate, Category.assoc, ← id_tensor_comp,
              IsIso.inv_hom_id, tensor_id, Category.comp_id]
instance functorHasLeftDual [LeftRigidCategory D] (F : C ⥤ D) : HasLeftDual F where
  leftDual :=
    { obj := fun X => ᘁ(F.obj X)
      map := fun f => ᘁ(F.map (inv f))
      map_comp := fun f g => by simp [comp_leftAdjointMate] }
  exact :=
    { evaluation' :=
        { app := fun X => ε_ _ _
          naturality := fun X Y f => by
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.40927, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : LeftRigidCategory D
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (F ⊗ Functor.mk { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }).map f ≫
      (fun X => ε_ ((Functor.mk { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }).obj X) (F.obj X))
        Y =
    (fun X => ε_ ((Functor.mk { obj := fun X => ᘁ(F.obj X), map := fun {X Y} f => ᘁF.map (inv f) }).obj X) (F.obj X))
        X ≫
      (𝟙_ (C ⥤ D)).map f

Next tactic:
dsimp
instance functorHasLeftDual [LeftRigidCategory D] (F : C ⥤ D) : HasLeftDual F where
  leftDual :=
    { obj := fun X => ᘁ(F.obj X)
      map := fun f => ᘁ(F.map (inv f))
      map_comp := fun f g => by simp [comp_leftAdjointMate] }
  exact :=
    { evaluation' :=
        { app := fun X => ε_ _ _
          naturality := fun X Y f => by
            dsimp
            

Proof state:
C : Type u_1
D : Type u_2
inst✝³ : Groupoid C
inst✝² : Category.{?u.40927, u_2} D
inst✝¹ : MonoidalCategory D
inst✝ : LeftRigidCategory D
F : C ⥤ D
X Y : C
f : X ⟶ Y
⊢ (F.map f ⊗ ᘁF.map (inv f)) ≫ ε_ (ᘁ(F.obj Y)) (F.obj Y) = ε_ (ᘁ(F.obj X)) (F.obj X) ≫ 𝟙 (𝟙_ D)

Next tactic:
rw [Category.comp_id, Functor.map_inv, ← tensor_id_comp_id_tensor, Category.assoc,
              leftAdjointMate_comp_evaluation, ← Category.assoc, ← comp_tensor_id,
              IsIso.hom_inv_id, tensor_id, Category.id_comp]
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
⊢ (fun i => (r a (last N))⁻¹ * r a i) i ≤
        dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i)
          ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j) ∧
      (fun i => (r a (last N))⁻¹ * r a i) j ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) i ∨
    (fun i => (r a (last N))⁻¹ * r a i) j ≤
        dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j)
          ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i) ∧
      (fun i => (r a (last N))⁻¹ * r a i) i ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) j

Next tactic:
rcases a.h i j hij with (H | H)
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · 

Proof state:
case inl
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ (fun i => (r a (last N))⁻¹ * r a i) i ≤
        dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i)
          ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j) ∧
      (fun i => (r a (last N))⁻¹ * r a i) j ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) i ∨
    (fun i => (r a (last N))⁻¹ * r a i) j ≤
        dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j)
          ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i) ∧
      (fun i => (r a (last N))⁻¹ * r a i) i ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) j

Next tactic:
left
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      

Proof state:
case inl.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ (fun i => (r a (last N))⁻¹ * r a i) i ≤
      dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i)
        ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j) ∧
    (fun i => (r a (last N))⁻¹ * r a i) j ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) i

Next tactic:
constructor
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · 

Proof state:
case inl.h.left
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ (fun i => (r a (last N))⁻¹ * r a i) i ≤
    dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i)
      ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j)

Next tactic:
rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        

Proof state:
case inl.h.left
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ (fun i => (r a (last N))⁻¹ * r a i) i ≤ (r a (last N))⁻¹ * ‖c a i - c a (last N) - (c a j - c a (last N))‖

Next tactic:
refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        

Proof state:
case inl.h.left
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ r a i ≤ ‖c a i - c a (last N) - (c a j - c a (last N))‖

Next tactic:
rw [dist_eq_norm] at H
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        

Proof state:
case inl.h.left
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ ‖c a i - c a j‖ ∧ r a j ≤ τ * r a i
⊢ r a i ≤ ‖c a i - c a (last N) - (c a j - c a (last N))‖

Next tactic:
convert H.1 using 2
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        

Proof state:
case h.e'_4.h.e'_3
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ ‖c a i - c a j‖ ∧ r a j ≤ τ * r a i
⊢ c a i - c a (last N) - (c a j - c a (last N)) = c a i - c a j

Next tactic:
abel
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · 

Proof state:
case inl.h.right
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ (fun i => (r a (last N))⁻¹ * r a i) j ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) i

Next tactic:
rw [← mul_assoc, mul_comm τ, mul_assoc]
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · rw [← mul_assoc, mul_comm τ, mul_assoc]
        

Proof state:
case inl.h.right
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ (fun i => (r a (last N))⁻¹ * r a i) j ≤ (r a (last N))⁻¹ * (τ * r a i)

Next tactic:
refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · rw [← mul_assoc, mul_comm τ, mul_assoc]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        

Proof state:
case inl.h.right
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a i ≤ dist (c a i) (c a j) ∧ r a j ≤ τ * r a i
⊢ r a j ≤ τ * r a i

Next tactic:
exact H.2
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · rw [← mul_assoc, mul_comm τ, mul_assoc]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        exact H.2
    · 

Proof state:
case inr
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a j ≤ dist (c a j) (c a i) ∧ r a i ≤ τ * r a j
⊢ (fun i => (r a (last N))⁻¹ * r a i) i ≤
        dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i)
          ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j) ∧
      (fun i => (r a (last N))⁻¹ * r a i) j ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) i ∨
    (fun i => (r a (last N))⁻¹ * r a i) j ≤
        dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j)
          ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i) ∧
      (fun i => (r a (last N))⁻¹ * r a i) i ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) j

Next tactic:
right
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · rw [← mul_assoc, mul_comm τ, mul_assoc]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        exact H.2
    · right
      

Proof state:
case inr.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a j ≤ dist (c a j) (c a i) ∧ r a i ≤ τ * r a j
⊢ (fun i => (r a (last N))⁻¹ * r a i) j ≤
      dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j)
        ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i) ∧
    (fun i => (r a (last N))⁻¹ * r a i) i ≤ τ * (fun i => (r a (last N))⁻¹ * r a i) j

Next tactic:
constructor
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · rw [← mul_assoc, mul_comm τ, mul_assoc]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        exact H.2
    · right
      constructor
      · 

Proof state:
case inr.h.left
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a j ≤ dist (c a j) (c a i) ∧ r a i ≤ τ * r a j
⊢ (fun i => (r a (last N))⁻¹ * r a i) j ≤
    dist ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) j)
      ((fun i => (r a (last N))⁻¹ • (c a i - c a (last N))) i)

Next tactic:
rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
/-- Rescaling a satellite configuration in a vector space, to put the basepoint at `0` and the base
radius at `1`. -/
def centerAndRescale : SatelliteConfig E N τ where
  c i := (a.r (last N))⁻¹ • (a.c i - a.c (last N))
  r i := (a.r (last N))⁻¹ * a.r i
  rpos i := mul_pos (inv_pos.2 (a.rpos _)) (a.rpos _)
  h i j hij := by
    rcases a.h i j hij with (H | H)
    · left
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        rw [dist_eq_norm] at H
        convert H.1 using 2
        abel
      · rw [← mul_assoc, mul_comm τ, mul_assoc]
        refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)
        exact H.2
    · right
      constructor
      · rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs,
          abs_of_nonneg (inv_nonneg.2 (a.rpos _).le)]
        

Proof state:
case inr.h.left
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
N : ℕ
τ : ℝ
a : SatelliteConfig E N τ
i j : Fin (Nat.succ N)
hij : i ≠ j
H : r a j ≤ dist (c a j) (c a i) ∧ r a i ≤ τ * r a j
⊢ (fun i => (r a (last N))⁻¹ * r a i) j ≤ (r a (last N))⁻¹ * ‖c a j - c a (last N) - (c a i - c a (last N))‖

Next tactic:
refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (a.rpos _).le)