fact: Definition expand_list_helper {A} (default : A) (ls : list A) (n : nat) (idx : nat) : list A := nat_rect (fun _ => nat -> list A) (fun _ => nil) (fun n' rec_call idx => cons (List.nth_default default ls idx) (rec_call (S idx))) n idx.
imports: Coq.ZArith.ZArith Coq.Lists.List Coq.Setoids.Setoid Coq.Classes.Morphisms Coq.QArith.QArith_base Coq.QArith.Qreduction Coq.QArith.Qround