assumption
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
_x✝ : (ys : List (κ × ν)) ×' (x : κ) ×' (_ : x ∈ map Prod.fst ys) ×' κ
a✝³ :
  ∀ (y : (ys : List (κ × ν)) ×' (x : κ) ×' (_ : x ∈ map Prod.fst ys) ×' κ),
    (invImage
            (fun a =>
              PSigma.casesOn a fun ys snd => PSigma.casesOn snd fun x snd => PSigma.casesOn snd fun hx snd => length ys)
            instWellFoundedRelation).1
        y _x✝ →
      y.2.1 = y.2.2.2 ∨ y.2.1 ∈ map Prod.fst (groupByKey (matchKey y.1 y.2.2.2).snd)
ys✝ : List (κ × ν)
x✝¹ : (x : κ) ×' (_ : x ∈ map Prod.fst ys✝) ×' κ
a✝² :
  ∀ (y : (ys : List (κ × ν)) ×' (x : κ) ×' (_ : x ∈ map Prod.fst ys) ×' κ),
    (invImage
            (fun a =>
              PSigma.casesOn a fun ys snd => PSigma.casesOn snd fun x snd => PSigma.casesOn snd fun hx snd => length ys)
            instWellFoundedRelation).1
        y { fst := ys✝, snd := x✝¹ } →
      y.2.1 = y.2.2.2 ∨ y.2.1 ∈ map Prod.fst (groupByKey (matchKey y.1 y.2.2.2).snd)
x : κ
hx✝¹ : (_ : x ∈ map Prod.fst ys✝) ×' κ
a✝¹ :
  ∀ (y : (ys : List (κ × ν)) ×' (x : κ) ×' (_ : x ∈ map Prod.fst ys) ×' κ),
    (invImage
            (fun a =>
              PSigma.casesOn a fun ys snd => PSigma.casesOn snd fun x snd => PSigma.casesOn snd fun hx snd => length ys)
            instWellFoundedRelation).1
        y { fst := ys✝, snd := { fst := x, snd := hx✝¹ } } →
      y.2.1 = y.2.2.2 ∨ y.2.1 ∈ map Prod.fst (groupByKey (matchKey y.1 y.2.2.2).snd)
hx✝ : x ∈ map Prod.fst ys✝
k : κ
a✝ :
  ∀ (y : (ys : List (κ × ν)) ×' (x : κ) ×' (_ : x ∈ map Prod.fst ys) ×' κ),
    (invImage
            (fun a =>
              PSigma.casesOn a fun ys snd => PSigma.casesOn snd fun x snd => PSigma.casesOn snd fun hx snd => length ys)
            instWellFoundedRelation).1
        y { fst := ys✝, snd := { fst := x, snd := { fst := hx✝, snd := k } } } →
      y.2.1 = y.2.2.2 ∨ y.2.1 ∈ map Prod.fst (groupByKey (matchKey y.1 y.2.2.2).snd)
h : ¬x = k
k' : κ
v : ν
ys : List (κ × ν)
hx : x ∈ map Prod.fst ((k', v) :: ys)
x✝ :
  ∀ (y : (ys : List (κ × ν)) ×' (x : κ) ×' (_ : x ∈ map Prod.fst ys) ×' κ),
    (invImage
            (fun a =>
              PSigma.casesOn a fun ys snd => PSigma.casesOn snd fun x snd => PSigma.casesOn snd fun hx snd => length ys)
            instWellFoundedRelation).1
        y { fst := (k', v) :: ys, snd := { fst := x, snd := { fst := hx, snd := k } } } →
      y.2.1 = y.2.2.2 ∨ y.2.1 ∈ map Prod.fst (groupByKey (matchKey y.1 y.2.2.2).snd)
h_term : length (matchKey ys k).snd < Nat.succ (length ys)
h_term' : length ys < Nat.succ (length ys)
hkneq : ¬k' = k
h✝¹ : (_ : k' = k ∨ ¬k' = k) = (_ : k' = k ∨ ¬k' = k)
hxneq : ¬x = k'
h✝ : (_ : x = k' ∨ ¬x = k') = (_ : x = k' ∨ ¬x = k')
this : x ∈ map Prod.fst (matchKey ys k).snd
⊢ (invImage
        (fun a =>
          PSigma.casesOn a fun ys snd => PSigma.casesOn snd fun x snd => PSigma.casesOn snd fun hx snd => length ys)
        instWellFoundedRelation).1
    { fst := (matchKey ys k).snd, snd := { fst := x, snd := { fst := this, snd := k' } } }
    { fst := (k', v) :: ys, snd := { fst := x, snd := { fst := hx, snd := k } } }
no goals