simp only [undedup]
case cons
α : Type u_1
s : Setoid α
inst✝ : DecidableRel Setoid.r
xs✝ : List α
x : α
xs : List α
ih : ∀ (i : (List.dedup s xs).Index), dedup s (undedup s i) = i
i : (List.dedup s (x :: xs)).Index
⊢ dedup s (undedup s i) = i
case cons
α : Type u_1
s : Setoid α
inst✝ : DecidableRel Setoid.r
xs✝ : List α
x : α
xs : List α
ih : ∀ (i : (List.dedup s xs).Index), dedup s (undedup s i) = i
i : (List.dedup s (x :: xs)).Index
⊢ dedup s
      (if h : Logic.Any (List.map (Setoid.r x) xs) then (undedup s (⋯ ▸ i)).tail
      else
        match ⋯ ▸ i with
        | head => head
        | i.tail => (undedup s i).tail) =
    i