-- Module: Mathlib.Topology.EMetricSpace.PairReduction
Goal:
T : Type u_1
inst : PseudoEMetricSpace T
a c : ℝ≥0∞
J : Finset T
inst_1 : DecidableEq T
E : Type u_2
inst_2 : PseudoEMetricSpace E
ha : 1 < a
f : T → E
s : T
hs : s ∈ J
t : T
ht : t ∈ J
hst : edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) ≤ c
hJ : J.Nonempty
P : (l : ℕ) → Prop := fun (l : ℕ) ↦ s ∈ (logSizeBallSeq J hJ a c l).finset ∧ t ∈ (logSizeBallSeq J hJ a c l).finset
l : ℕ := Nat.findGreatest P (#J - 1)
hsV : s ∈ (logSizeBallSeq J hJ a c l).finset
htV : t ∈ (logSizeBallSeq J hJ a c l).finset
inr :
  ∀
    (this :
      ∀ (s : T) (hs : s ∈ J) (t : T) (ht : t ∈ J)
        (hst : edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) ≤ c),
        let P : (l : ℕ) → Prop := fun (l : ℕ) ↦
          s ∈ (logSizeBallSeq J hJ a c l).finset ∧ t ∈ (logSizeBallSeq J hJ a c l).finset;
        let l := Nat.findGreatest P (#J - 1);
        ∀ (hsV : s ∈ (logSizeBallSeq J hJ a c l).finset) (htV : t ∈ (logSizeBallSeq J hJ a c l).finset)
          (h : s ∉ (logSizeBallSeq J hJ a c (l + 1)).finset),
          edist (f (↑(Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) : T))
              (f
                (↑(↑(Subtype.mk (p := fun (t : ↥J) ↦ edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) t ≤ c)
                          (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) hst) :
                      ↥J) :
                  T)) ≤
            HMul.hMul (α := ℝ≥0∞) 2 (⨆ (p : ↥(pairSet J a c)), edist (f (↑p : T × T).1) (f (↑p : T × T).2)))
    (h : ¬s ∉ (logSizeBallSeq J hJ a c (l + 1)).finset),
    edist (f (↑(Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) : T))
        (f
          (↑(↑(Subtype.mk (p := fun (t : ↥J) ↦ edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) t ≤ c)
                    (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) hst) :
                ↥J) :
            T)) ≤
      HMul.hMul (α := ℝ≥0∞) 2 (⨆ (p : ↥(pairSet J a c)), edist (f (↑p : T × T).1) (f (↑p : T × T).2))
wlog :
  ∀ (s : T) (hs : s ∈ J) (t : T) (ht : t ∈ J)
    (hst : edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) ≤ c),
    let P : (l : ℕ) → Prop := fun (l : ℕ) ↦
      s ∈ (logSizeBallSeq J hJ a c l).finset ∧ t ∈ (logSizeBallSeq J hJ a c l).finset;
    let l := Nat.findGreatest P (#J - 1);
    ∀ (hsV : s ∈ (logSizeBallSeq J hJ a c l).finset) (htV : t ∈ (logSizeBallSeq J hJ a c l).finset)
      (h : s ∉ (logSizeBallSeq J hJ a c (l + 1)).finset),
      edist (f (↑(Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) : T))
          (f
            (↑(↑(Subtype.mk (p := fun (t : ↥J) ↦ edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) t ≤ c)
                      (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) hst) :
                  ↥J) :
              T)) ≤
        HMul.hMul (α := ℝ≥0∞) 2 (⨆ (p : ↥(pairSet J a c)), edist (f (↑p : T × T).1) (f (↑p : T × T).2))
⊢ edist (f (↑(Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) : T))
      (f
        (↑(↑(Subtype.mk (p := fun (t : ↥J) ↦ edist (Subtype.mk (p := fun (x : T) ↦ x ∈ J) s hs) t ≤ c)
                  (Subtype.mk (p := fun (x : T) ↦ x ∈ J) t ht) hst) :
              ↥J) :
          T)) ≤
    HMul.hMul (α := ℝ≥0∞) 2 (⨆ (p : ↥(pairSet J a c)), edist (f (↑p : T × T).1) (f (↑p : T × T).2))

Tactic:
wlog h : s ∉ (logSizeBallSeq J hJ a c (l + 1)).finset generalizing s t

Premises used: HAdd.hAdd, PairReduction.logSizeBallSeq, PairReduction.logSizeBallStruct.finset, OfNat.ofNat