intuition.
simpl.
eapply in_getUnique.
eapply in_flatten.
econstructor.
split.
eapply in_map_iff.
econstructor.
split.
eauto.
eauto.
trivial.
Qed.
Local Open Scope comp_scope.
Definition maybeBind(A B : Type)(opt_a : option A)(f : A -> B) : option B :=
match opt_a with
| None => None
| Some a => Some (f a)
end.
Inductive OracleComp : Set -> Set -> Set -> Type :=
| OC_Query : forall (A B : Set), A -> OracleComp A B B
| OC_Run : forall (A B C A' B' S : Set),
EqDec S ->
EqDec B ->
EqDec A ->
OracleComp A B C ->
(S -> A -> OracleComp A' B' (B * S)) ->
S ->
OracleComp A' B' (C * S)
| OC_Ret : forall A B C, Comp C -> OracleComp A B C
| OC_Bind : forall A B C C', OracleComp A B C -> (C -> OracleComp A B C') -> OracleComp A B C'.

Theorem oc_base_exists : forall (A B C : Set), OracleComp A B C -> (A -> B) -> C.
induction 1; intuition; simpl in *.