Theorem: Besicovitch.TauPackage.color_lt
File: Mathlib/MeasureTheory/Covering/Besicovitch.lean

tactic: induction' i using Ordinal.induction with i IH
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i : Ordinal
hi : i < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
⊢ color p i < N

tactic: let A : Set ℕ :=
  ⋃ (j : { j // j < i })
    (_ : (closedBall (p.c (p.index j)) (p.r (p.index j)) ∩
      closedBall (p.c (p.index i)) (p.r (p.index i))).Nonempty),
    {p.color j}
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
⊢ color p i < N

tactic: have color_i : p.color i = sInf (univ \ A) := by rw [color]
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
⊢ color p i < N

tactic: rw [color_i]
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
⊢ color p i < N

tactic: have N_mem : N ∈ univ \ A := by
  simp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall,
    not_and, mem_univ, mem_diff, Subtype.exists, Subtype.coe_mk]
  intro j ji _
  exact (IH j ji (ji.trans hi)).ne'
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
⊢ sInf (univ \ A) < N

tactic: intro Inf_eq_N
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
⊢ sInf (univ \ A) ≠ N

tactic: have :
  ∀ k, k < N → ∃ j, j < i ∧
    (closedBall (p.c (p.index j)) (p.r (p.index j)) ∩
      closedBall (p.c (p.index i)) (p.r (p.index i))).Nonempty ∧ k = p.color j := by
  intro k hk
  rw [← Inf_eq_N] at hk
  have : k ∈ A := by
    simpa only [true_and_iff, mem_univ, Classical.not_not, mem_diff] using
      Nat.not_mem_of_lt_sInf hk
  simp [and_assoc, -exists_and_left] at this
  simpa only [exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall, Subtype.exists,
    Subtype.coe_mk]
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
⊢ False

tactic: choose! g hg using this
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
this :
  ∀ (k : ℕ),
    k < N →
      ∃ j,
        j < i ∧
          Set.Nonempty
              (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
                closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
            k = color p j
⊢ False

tactic: let G : ℕ → Ordinal := fun n => if n = N then i else g n
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
⊢ False

tactic: have fGn :
    ∀ n, n ≤ N →
      p.c (p.index (G n)) ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r (p.index (G n)) := by
  intro n hn
  have :
    p.index (G n) =
      Classical.epsilon fun t => p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t :=
    by rw [index]; rfl
  rw [this]
  have : ∃ t, p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t := by
    simpa only [not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] using
      not_mem_of_lt_csInf (G_lt_last n hn) (OrderBot.bddBelow _)
  exact Classical.epsilon_spec this
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
⊢ False

tactic: exact hN.false sc
state_before: case h
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
sc : SatelliteConfig α N p.τ :=
  { c := fun k => BallPackage.c p.toBallPackage (index p (G ↑k)),
    r := fun k => BallPackage.r p.toBallPackage (index p (G ↑k)),
    rpos := (_ : ∀ (k : Fin (Nat.succ N)), 0 < BallPackage.r p.toBallPackage (index p (G ↑k))),
    h :=
      (_ :
        ∀ (a b : Fin (Nat.succ N)),
          a ≠ b →
            (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
                  dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
                    ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧
                (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
                  p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨
              (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
                  dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)
                    ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧
                (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
                  p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b),
    hlast :=
      (_ :
        ∀ (a : Fin (N + 1)),
          a < last N →
            BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
                dist (BallPackage.c p.toBallPackage (index p (G ↑a)))
                  (BallPackage.c p.toBallPackage (index p (G ↑(last N)))) ∧
              BallPackage.r p.toBallPackage (index p (G ↑(last N))) ≤
                p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))),
    inter :=
      (_ :
        ∀ (a : Fin (N + 1)),
          a < last N →
            dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
                ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤
              (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +
                (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)) }
⊢ False

tactic: rw [color]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
⊢ color p i = sInf (univ \ A)

tactic: simp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall,
  not_and, mem_univ, mem_diff, Subtype.exists, Subtype.coe_mk]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
⊢ N ∈ univ \ A

tactic: intro j ji _
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
⊢ ∀ (x : Ordinal),
    x < i →
      Set.Nonempty
          (closedBall (BallPackage.c p.toBallPackage (index p x)) (BallPackage.r p.toBallPackage (index p x)) ∩
            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) →
        ¬N = color p x

tactic: exact (IH j ji (ji.trans hi)).ne'
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
j : Ordinal
ji : j < i
a✝ :
  Set.Nonempty
    (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
      closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))
⊢ ¬N = color p j

tactic: rcases(csInf_le (OrderBot.bddBelow (univ \ A)) N_mem).lt_or_eq with (H | H)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
this : sInf (univ \ A) ≠ N
⊢ sInf (univ \ A) < N

tactic: exact H
state_before: case inl
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
this : sInf (univ \ A) ≠ N
H : sInf (univ \ A) < N
⊢ sInf (univ \ A) < N

tactic: exact (this H).elim
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
this : sInf (univ \ A) ≠ N
H : sInf (univ \ A) = N
⊢ sInf (univ \ A) < N

tactic: intro k hk
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
⊢ ∀ (k : ℕ),
    k < N →
      ∃ j,
        j < i ∧
          Set.Nonempty
              (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
                closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
            k = color p j

tactic: rw [← Inf_eq_N] at hk
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
k : ℕ
hk : k < N
⊢ ∃ j,
    j < i ∧
      Set.Nonempty
          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
        k = color p j

tactic: have : k ∈ A := by
  simpa only [true_and_iff, mem_univ, Classical.not_not, mem_diff] using
    Nat.not_mem_of_lt_sInf hk
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
k : ℕ
hk : k < sInf (univ \ A)
⊢ ∃ j,
    j < i ∧
      Set.Nonempty
          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
        k = color p j

tactic: simp [and_assoc, -exists_and_left] at this
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
k : ℕ
hk : k < sInf (univ \ A)
this : k ∈ A
⊢ ∃ j,
    j < i ∧
      Set.Nonempty
          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
        k = color p j

tactic: simpa only [exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall, Subtype.exists,
  Subtype.coe_mk]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
k : ℕ
hk : k < sInf (univ \ A)
this :
  ∃ a,
    a < i ∧
      Set.Nonempty
          (closedBall (BallPackage.c p.toBallPackage (index p a)) (BallPackage.r p.toBallPackage (index p a)) ∩
            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
        k = color p a
⊢ ∃ j,
    j < i ∧
      Set.Nonempty
          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩
            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
        k = color p j

tactic: simpa only [true_and_iff, mem_univ, Classical.not_not, mem_diff] using
  Nat.not_mem_of_lt_sInf hk
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
k : ℕ
hk : k < sInf (univ \ A)
⊢ k ∈ A

tactic: intro n hn
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
⊢ ∀ (n : ℕ), n ≤ N → color p (G n) = n

tactic: rcases hn.eq_or_lt with (rfl | H)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
n : ℕ
hn : n ≤ N
⊢ color p (G n) = n

tactic: simp only
state_before: case inl
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
i : Ordinal
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
g : ℕ → Ordinal
n : ℕ
hN : IsEmpty (SatelliteConfig α n p.τ)
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < n
N_mem : n ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = n
hg :
  ∀ (k : ℕ),
    k < n →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n_1 => if n_1 = n then i else g n_1
hn : n ≤ n
⊢ color p (G n) = n

tactic: simp only [color_i, Inf_eq_N, if_true, eq_self_iff_true]
state_before: case inl
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
i : Ordinal
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
g : ℕ → Ordinal
n : ℕ
hN : IsEmpty (SatelliteConfig α n p.τ)
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < n
N_mem : n ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = n
hg :
  ∀ (k : ℕ),
    k < n →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n_1 => if n_1 = n then i else g n_1
hn : n ≤ n
⊢ color p (if True then i else g n) = n

tactic: simp only
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
n : ℕ
hn : n ≤ N
H : n < N
⊢ color p (G n) = n

tactic: simp only [H.ne, (hg n H).right.right.symm, if_false]
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
n : ℕ
hn : n ≤ N
H : n < N
⊢ color p (if n = N then i else g n) = n

tactic: intro n hn
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
⊢ ∀ (n : ℕ), n ≤ N → G n < lastStep p

tactic: rcases hn.eq_or_lt with (rfl | H)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
n : ℕ
hn : n ≤ N
⊢ G n < lastStep p

tactic: simp only
state_before: case inl
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
i : Ordinal
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
g : ℕ → Ordinal
n : ℕ
hN : IsEmpty (SatelliteConfig α n p.τ)
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < n
N_mem : n ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = n
hg :
  ∀ (k : ℕ),
    k < n →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n_1 => if n_1 = n then i else g n_1
color_G : ∀ (n_1 : ℕ), n_1 ≤ n → color p (G n_1) = n_1
hn : n ≤ n
⊢ G n < lastStep p

tactic: simp only [hi, if_true, eq_self_iff_true]
state_before: case inl
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
i : Ordinal
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
g : ℕ → Ordinal
n : ℕ
hN : IsEmpty (SatelliteConfig α n p.τ)
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < n
N_mem : n ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = n
hg :
  ∀ (k : ℕ),
    k < n →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n_1 => if n_1 = n then i else g n_1
color_G : ∀ (n_1 : ℕ), n_1 ≤ n → color p (G n_1) = n_1
hn : n ≤ n
⊢ (if True then i else g n) < lastStep p

tactic: simp only
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
n : ℕ
hn : n ≤ N
H : n < N
⊢ G n < lastStep p

tactic: simp only [H.ne, (hg n H).left.trans hi, if_false]
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
n : ℕ
hn : n ≤ N
H : n < N
⊢ (if n = N then i else g n) < lastStep p

tactic: intro n hn
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
⊢ ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))

tactic: have :
  p.index (G n) =
    Classical.epsilon fun t => p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t :=
  by rw [index]; rfl
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
⊢ ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
    R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))

tactic: rw [this]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
this :
  index p (G n) =
    Classical.epsilon fun t =>
      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t
⊢ ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
    R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))

tactic: have : ∃ t, p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t := by
  simpa only [not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] using
    not_mem_of_lt_csInf (G_lt_last n hn) (OrderBot.bddBelow _)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
this :
  index p (G n) =
    Classical.epsilon fun t =>
      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t
⊢ ¬BallPackage.c p.toBallPackage
          (Classical.epsilon fun t =>
            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t) ∈
        iUnionUpTo p (G n) ∧
    R p (G n) ≤
      p.τ *
        BallPackage.r p.toBallPackage
          (Classical.epsilon fun t =>
            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t)

tactic: exact Classical.epsilon_spec this
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
this✝ :
  index p (G n) =
    Classical.epsilon fun t =>
      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t
this : ∃ t, ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t
⊢ ¬BallPackage.c p.toBallPackage
          (Classical.epsilon fun t =>
            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t) ∈
        iUnionUpTo p (G n) ∧
    R p (G n) ≤
      p.τ *
        BallPackage.r p.toBallPackage
          (Classical.epsilon fun t =>
            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t)

tactic: rw [index]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
⊢ index p (G n) =
    Classical.epsilon fun t =>
      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t

tactic: rfl
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
⊢ (Classical.epsilon fun b =>
      (¬BallPackage.c p.toBallPackage b ∈
            ⋃ (j : { j // j < G n }),
              ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j))) ∧
        (⨆ (b :
            { b //
              ¬BallPackage.c p.toBallPackage b ∈
                  ⋃ (j : { j // j < G n }),
                    ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) }),
            BallPackage.r p.toBallPackage ↑b) ≤
          p.τ * BallPackage.r p.toBallPackage b) =
    Classical.epsilon fun t =>
      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t

tactic: simpa only [not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] using
  not_mem_of_lt_csInf (G_lt_last n hn) (OrderBot.bddBelow _)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
n : ℕ
hn : n ≤ N
this :
  index p (G n) =
    Classical.epsilon fun t =>
      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t
⊢ ∃ t, ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t

tactic: intro a b G_lt
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
⊢ ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))

tactic: have ha : (a : ℕ) ≤ N := Nat.lt_succ_iff.1 a.2
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
      dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
    BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))

tactic: have hb : (b : ℕ) ≤ N := Nat.lt_succ_iff.1 b.2
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
      dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
    BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))

tactic: constructor
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
      dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
    BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))

tactic: have := (fGn b hb).1
state_before: case left
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
    dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b)))

tactic: simp only [iUnionUpTo, not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le,
  Subtype.exists, Subtype.coe_mk] at this
state_before: case left
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
this : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑b)
⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
    dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b)))

tactic: simpa only [dist_comm, mem_ball, not_lt] using this (G a) G_lt
state_before: case left
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
this :
  ∀ (x : Ordinal),
    (x < if ↑b = N then i else g ↑b) →
      ¬BallPackage.c p.toBallPackage (index p (if ↑b = N then i else g ↑b)) ∈
          ball (BallPackage.c p.toBallPackage (index p x)) (BallPackage.r p.toBallPackage (index p x))
⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
    dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b)))

tactic: apply le_trans _ (fGn a ha).2
state_before: case right
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))

tactic: have B : p.c (p.index (G b)) ∉ p.iUnionUpTo (G a) := by
  intro H; exact (fGn b hb).1 (p.monotone_iUnionUpTo G_lt.le H)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ R p (G ↑a)

tactic: let b' : { t // p.c t ∉ p.iUnionUpTo (G a) } := ⟨p.index (G b), B⟩
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ R p (G ↑a)

tactic: apply @le_ciSup _ _ _ (fun t : { t // p.c t ∉ p.iUnionUpTo (G a) } => p.r t) _ b'
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
b' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }
⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ R p (G ↑a)

tactic: refine' ⟨p.r_bound, fun t ht => _⟩
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
b' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }
⊢ BddAbove (range fun t => BallPackage.r p.toBallPackage ↑t)

tactic: simp only [exists_prop, mem_range, Subtype.exists, Subtype.coe_mk] at ht
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
b' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }
t : ℝ
ht : t ∈ range fun t => BallPackage.r p.toBallPackage ↑t
⊢ t ≤ p.r_bound

tactic: rcases ht with ⟨u, hu⟩
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
b' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }
t : ℝ
ht :
  ∃ a_1,
    ¬BallPackage.c p.toBallPackage a_1 ∈ iUnionUpTo p (if ↑a = N then i else g ↑a) ∧
      BallPackage.r p.toBallPackage a_1 = t
⊢ t ≤ p.r_bound

tactic: rw [← hu.2]
state_before: case intro
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
b' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }
t : ℝ
u : β
hu : ¬BallPackage.c p.toBallPackage u ∈ iUnionUpTo p (if ↑a = N then i else g ↑a) ∧ BallPackage.r p.toBallPackage u = t
⊢ t ≤ p.r_bound

tactic: exact p.r_le _
state_before: case intro
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
B : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
b' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }
t : ℝ
u : β
hu : ¬BallPackage.c p.toBallPackage u ∈ iUnionUpTo p (if ↑a = N then i else g ↑a) ∧ BallPackage.r p.toBallPackage u = t
⊢ BallPackage.r p.toBallPackage u ≤ p.r_bound

tactic: intro H
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
⊢ ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)

tactic: exact (fGn b hb).1 (p.monotone_iUnionUpTo G_lt.le H)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
a b : Fin (Nat.succ N)
G_lt : G ↑a < G ↑b
ha : ↑a ≤ N
hb : ↑b ≤ N
H : BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)
⊢ False

tactic: intro a b a_ne_b
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
⊢ ∀ (i j : Fin (Nat.succ N)),
    i ≠ j →
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ≤
            dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i)
              ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) j) ∧
          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) j ≤
            p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ∨
        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) j ≤
            dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) j)
              ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i) ∧
          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ≤
            p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) j

tactic: wlog G_le : G a ≤ G b generalizing a b
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b

tactic: exact Or.inl (Gab a b G_lt)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
G_le : G ↑a ≤ G ↑b
G_lt : G ↑a < G ↑b
⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b

tactic: exact (this b a a_ne_b.symm (le_of_not_le G_le)).symm
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
this :
  ∀ (a b : Fin (Nat.succ N)),
    a ≠ b →
      G ↑a ≤ G ↑b →
        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
              dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
                ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧
            (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
              p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨
          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
              dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)
                ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧
            (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
              p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b
G_le : ¬G ↑a ≤ G ↑b
⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤
        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b

tactic: rcases G_le.lt_or_eq with (H | H)
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
G_le : G ↑a ≤ G ↑b
⊢ G ↑a < G ↑b

tactic: have A : (a : ℕ) ≠ b := Fin.val_injective.ne a_ne_b
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
G_le : G ↑a ≤ G ↑b
H : G ↑a = G ↑b
⊢ G ↑a < G ↑b

tactic: rw [← color_G a (Nat.lt_succ_iff.1 a.2), ← color_G b (Nat.lt_succ_iff.1 b.2), H] at A
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A✝ : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A✝)
N_mem : N ∈ univ \ A✝
Inf_eq_N : sInf (univ \ A✝) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
G_le : G ↑a ≤ G ↑b
H : G ↑a = G ↑b
A : ↑a ≠ ↑b
⊢ G ↑a < G ↑b

tactic: exact (A rfl).elim
state_before: case inr
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A✝ : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A✝)
N_mem : N ∈ univ \ A✝
Inf_eq_N : sInf (univ \ A✝) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
G_le : G ↑a ≤ G ↑b
H : G ↑a = G ↑b
A : color p (G ↑b) ≠ color p (G ↑b)
⊢ G ↑a < G ↑b

tactic: exact H
state_before: case inl
α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a b : Fin (Nat.succ N)
a_ne_b : a ≠ b
G_le : G ↑a ≤ G ↑b
H : G ↑a < G ↑b
⊢ G ↑a < G ↑b

tactic: intro a ha
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
⊢ ∀ (i : Fin (N + 1)),
    i < last N →
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ≤
          dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i)
            ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧
        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤
          p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i

tactic: have I : (a : ℕ) < N := ha
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
        ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤
      p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a

tactic: have : G a < G (Fin.last N) := by dsimp; simp [I.ne, (hg a I).1]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
        ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤
      p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a

tactic: exact Gab _ _ this
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
this : G ↑a < G ↑(last N)
⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤
      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
        ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤
      p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a

tactic: dsimp
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
⊢ G ↑a < G ↑(last N)

tactic: simp [I.ne, (hg a I).1]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
⊢ (if ↑a = N then i else g ↑a) < if N = N then i else g N

tactic: intro a ha
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
⊢ ∀ (i : Fin (N + 1)),
    i < last N →
      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i)
          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤
        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i +
          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)

tactic: have I : (a : ℕ) < N := ha
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)

tactic: have J : G (Fin.last N) = i := by dsimp; simp only [if_true, eq_self_iff_true]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)

tactic: have K : G a = g a := by dsimp; simp [I.ne, (hg a I).1]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
J : G ↑(last N) = i
⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)

tactic: convert dist_le_add_of_nonempty_closedBall_inter_closedBall (hg _ I).2.1
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
J : G ↑(last N) = i
K : G ↑a = g ↑a
⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)
      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤
    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +
      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)

tactic: dsimp
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
⊢ G ↑(last N) = i

tactic: simp only [if_true, eq_self_iff_true]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
⊢ (if N = N then i else g N) = i

tactic: dsimp
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
J : G ↑(last N) = i
⊢ G ↑a = g ↑a

tactic: simp [I.ne, (hg a I).1]
state_before: α : Type u_1
inst✝¹ : MetricSpace α
β : Type u
inst✝ : Nonempty β
p : TauPackage β α
i✝ : Ordinal
hi✝ : i✝ < lastStep p
N : ℕ
hN : IsEmpty (SatelliteConfig α N p.τ)
i : Ordinal
IH : ∀ (k : Ordinal), k < i → k < lastStep p → color p k < N
hi : i < lastStep p
A : Set ℕ :=
  ⋃ (j : { j // j < i }) (_ :
    Set.Nonempty
      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩
        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),
    {color p ↑j}
color_i : color p i = sInf (univ \ A)
N_mem : N ∈ univ \ A
Inf_eq_N : sInf (univ \ A) = N
g : ℕ → Ordinal
hg :
  ∀ (k : ℕ),
    k < N →
      g k < i ∧
        Set.Nonempty
            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))
                (BallPackage.r p.toBallPackage (index p (g k))) ∩
              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧
          k = color p (g k)
G : ℕ → Ordinal := fun n => if n = N then i else g n
color_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n
G_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p
fGn :
  ∀ (n : ℕ),
    n ≤ N →
      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧
        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))
Gab :
  ∀ (a b : Fin (Nat.succ N)),
    G ↑a < G ↑b →
      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤
          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧
        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))
a : Fin (N + 1)
ha : a < last N
I : ↑a < N
J : G ↑(last N) = i
⊢ (if ↑a = N then i else g ↑a) = g ↑a