(******************************)
(******************************)
(* Custom lemmas about arrays *)
(******************************)
(******************************)
Definition indx {I : finType} (x : I) := index x (enum I).
Prenex Implicits indx.
(***********************************)
(* Arrays indexed by a finite type *)
(***********************************)
Section Array.
Variables (p : ptr) (I : finType).
(* helper lemmas *)

Lemma takeord T k x (f : {ffun I -> T}) :
take (indx k) (fgraph [ffun y => [eta f with k |-> x] y]) =
take (indx k) (fgraph f).