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_id i j a (k : KleeneStore i j a) : KSap (KSpure i j (fun x => x)) k = k.