Fixpoint hPosLoop3 (n:nat) (xlist: list int) (old: list val): list val :=
    match n with
      O => old
    | S m => let j:= Z.of_nat m in
                let s := hPosLoop3 m xlist old in
                let five := Znth (5*j) xlist in
                let six := Znth (6+j) xlist in
                UpdateOut (UpdateOut s (4*j) five) (16+4*j) six
       end.

Lemma hposLoop3_length xlist old: forall n, (16+4*Z.of_nat n<Zlength old) -> Zlength (hPosLoop3 n xlist old) = Zlength old.