assumption
R : Type
inst✝² : Ring R
inst✝¹ : DecidableEq R
X : Type
inst✝ : DecidableEq X
_x✝ : (s₁ : FormalSum R X) ×' (s₂ : FormalSum R X) ×' ∀ (x : X), coords s₁ x = coords s₂ x
a✝² :
  ∀ (y : (s₁ : FormalSum R X) ×' (s₂ : FormalSum R X) ×' ∀ (x : X), coords s₁ x = coords s₂ x),
    (invImage (fun a => PSigma.casesOn a fun s snd => PSigma.casesOn snd fun s₂ snd => List.length s)
            instWellFoundedRelation).1
        y _x✝ →
      y.1 ≃ y.2.1
s₁ : FormalSum R X
s₂✝ : (s₂ : FormalSum R X) ×' ∀ (x : X), coords s₁ x = coords s₂ x
a✝¹ :
  ∀ (y : (s₁ : FormalSum R X) ×' (s₂ : FormalSum R X) ×' ∀ (x : X), coords s₁ x = coords s₂ x),
    (invImage (fun a => PSigma.casesOn a fun s snd => PSigma.casesOn snd fun s₂ snd => List.length s)
            instWellFoundedRelation).1
        y { fst := s₁, snd := s₂✝ } →
      y.1 ≃ y.2.1
s₂ : FormalSum R X
hyp✝¹ : ∀ (x : X), coords s₁ x = coords s₂ x
a✝ :
  ∀ (y : (s₁ : FormalSum R X) ×' (s₂ : FormalSum R X) ×' ∀ (x : X), coords s₁ x = coords s₂ x),
    (invImage (fun a => PSigma.casesOn a fun s snd => PSigma.casesOn snd fun s₂ snd => List.length s)
            instWellFoundedRelation).1
        y { fst := s₁, snd := { fst := s₂, snd := hyp✝¹ } } →
      y.1 ≃ y.2.1
h : R × X
t : List (R × X)
hyp✝ : ∀ (x : X), coords (h :: t) x = coords s₂ x
x✝¹ :
  ∀ (y : (s₁ : FormalSum R X) ×' (s₂ : FormalSum R X) ×' ∀ (x : X), coords s₁ x = coords s₂ x),
    (invImage (fun a => PSigma.casesOn a fun s snd => PSigma.casesOn snd fun s₂ snd => List.length s)
            instWellFoundedRelation).1
        y { fst := h :: t, snd := { fst := s₂, snd := hyp✝ } } →
      y.1 ≃ y.2.1
a₀ : R
x₀ : X
hyp : ∀ (x : X), coords ((a₀, x₀) :: t) x = coords s₂ x
p : ¬0 = a₀
a₁ : R := coords t x₀
p₁ : ¬0 = a₁
ys : FormalSum R X
eqn : (coords t x₀, x₀) :: ys ≃ t
ineqn : List.length ys < List.length t
s₃ : List (R × X) := (a₀ + a₁, x₀) :: ys
eq₁ : (a₀, x₀) :: (a₁, x₀) :: ys ≃ s₃
eq₂ : (a₀, x₀) :: (a₁, x₀) :: ys ≃ (a₀, x₀) :: t
x✝ : List.length ys + 1 < List.length t + 1
⊢ (invImage (fun a => PSigma.casesOn a fun s snd => PSigma.casesOn snd fun s₂ snd => List.length s)
        instWellFoundedRelation).1
    { fst := s₃, snd := { fst := s₂, snd := (_ : ∀ (x : X), coords s₃ x = coords s₂ x) } }
    { fst := h :: t, snd := { fst := s₂, snd := hyp✝ } }
no goals