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 KSpure_KSpure i j a b (f : a -> b) (x : a):
KSap (KSpure i j f) (KSpure i j x) = KSpure i j (f x).