. rw [List.length_map, List.length_pmap]
case refine_2.hl
m n : Nat
l : List (Fin (n + 1))
h : ¬last n ∈ l
⊢ List.length l =
    List.length
      (List.map castSucc
        (List.pmap (fun i hi => { val := ↑i, isLt := hi }) l (_ : ∀ (i : Fin (n + 1)), i ∈ l → ↑i < n)))

case refine_2.h
m n : Nat
l : List (Fin (n + 1))
h : ¬last n ∈ l
⊢ ∀ (n_1 : Nat) (h₁ : n_1 < List.length l)
    (h₂ :
      n_1 <
        List.length
          (List.map castSucc
            (List.pmap (fun i hi => { val := ↑i, isLt := hi }) l (_ : ∀ (i : Fin (n + 1)), i ∈ l → ↑i < n)))),
    List.get l { val := n_1, isLt := h₁ } =
      List.get
        (List.map castSucc
          (List.pmap (fun i hi => { val := ↑i, isLt := hi }) l (_ : ∀ (i : Fin (n + 1)), i ∈ l → ↑i < n)))
        { val := n_1, isLt := h₂ }
case refine_2.h
m n : Nat
l : List (Fin (n + 1))
h : ¬last n ∈ l
⊢ ∀ (n_1 : Nat) (h₁ : n_1 < List.length l)
    (h₂ :
      n_1 <
        List.length
          (List.map castSucc
            (List.pmap (fun i hi => { val := ↑i, isLt := hi }) l (_ : ∀ (i : Fin (n + 1)), i ∈ l → ↑i < n)))),
    List.get l { val := n_1, isLt := h₁ } =
      List.get
        (List.map castSucc
          (List.pmap (fun i hi => { val := ↑i, isLt := hi }) l (_ : ∀ (i : Fin (n + 1)), i ∈ l → ↑i < n)))
        { val := n_1, isLt := h₂ }