Definition KSap i j a b (g : KleeneStore i j (a -> b)) (k : KleeneStore i j a) :
  KleeneStore i j b :=
  kleeneStore (fun v => append_view (P := fun _ => b) (fun v1 v2 => (peek (k:=g) v1) (peek (k:=k) v2)) v)
              (Vector.append (pos g) (pos k)).

Lemma equivalent_KS i j a (dim1 dim2 : nat) (peek1 : Vector.t j dim1 -> a) (peek2 : Vector.t j dim2 -> a) (pos1 : Vector.t i dim1) (pos2 : Vector.t i dim2) (e : dim1 = dim2) : (forall (v1 : Vector.t j dim1) (v2 : Vector.t j dim2), (eq_rect _ _ v1 _ e) = v2 -> peek1 v1 = peek2 v2) -> eq_rect _ _ pos1 _ e = pos2 -> kleeneStore peek1 pos1 = kleeneStore peek2 pos2.