fact: Fixpoint replace2_Index2 {m : nat} {As : Vector.t A m} {Bs : ilist2 As} (i2l : i2list C Bs) (n : Fin.t m) (new_c : C (ith2 Bs n)) : i2list C Bs := match n in Fin.t m return forall (As : Vector.t A m) (Bs : ilist2 As), i2list C Bs -> C (ith2 Bs n) -> i2list C Bs with | Fin.F1 k => fun As Bs i2l new_c => Vector.caseS (fun n As => forall (Bs : ilist2 As), i2list C Bs -> C (ith2 Bs (@Fin.F1 n)) -> i2list C Bs) (fun a' n' As' (Bs' : ilist2 (a' :: As')) i2l' new_c => i2cons new_c (prim_snd i2l') ) As Bs i2l new_c | Fin.FS k n'' => fun As Bs i2l new_c => Vector.caseS (fun n' As => forall (i : Fin.t n') (Bs'' : ilist2 As), i2list C Bs'' -> C (ith2 Bs'' (@Fin.FS n' i)) -> i2list C Bs'') (fun a' n' As' n'' (Bs' : ilist2 (a' :: As')) i2l' new_c => i2cons (prim_fst i2l') (replace2_Index2 (prim_snd i2l') n'' new_c)) As n'' Bs i2l new_c end As Bs i2l new_c.
imports: Coq.Lists.List Coq.Strings.String Coq.Arith.Arith Fiat.Common.ilist Fiat.Common.ilist2