∀ (s : String) (p₀ : s.Pos) (res : Lean.Name) (acc : String) (ucount : ℕ) (q : s.Pos) (v : ℕ),
  p₀ < q →
    (invImage
          (fun x =>
            PSum.casesOn x (fun _x => PSigma.casesOn _x fun p res => PSigma.casesOn res fun res n => p) fun _x =>
              PSum.casesOn _x (fun _x => PSigma.casesOn _x fun p res => p) fun _x =>
                PSigma.casesOn _x fun p₀ res =>
                  PSigma.casesOn res fun res acc => PSigma.casesOn acc fun acc ucount => p₀)
          String.Pos.instWellFoundedRelation).1
      (PSum.inr (PSum.inr ⟨q, ⟨res, ⟨(acc.pushn '_' (ucount / 2)).push (Char.ofNat v), 0⟩⟩⟩))
      (PSum.inr (PSum.inr ⟨p₀, ⟨res, ⟨acc, ucount⟩⟩⟩))