fact: Definition rect2 {A B} (P:forall {n}, vec A n -> vec B n -> Type) (bas : P vec_nil vec_nil) (recvec : forall {n v1 v2}, P v1 v2 -> forall a b, P (a ## v1) (b ## v2)) := fix rect2_fix {n} (v1 : vec A n) : forall v2 : vec B n, P v1 v2 := match v1 with | vec_nil => fun v2 => case0 _ bas v2 | h1 ## t1 => fun v2 => caseS' v2 (fun v2' => P (h1##t1) v2') (fun h2 t2 => recvec (rect2_fix t1 t2) h1 h2) end.
imports: Arith Lia List Permutation Undecidability.Shared.Libs.DLW.Utils(utils) Undecidability.Shared.Libs.DLW.Vec(pos)