intuition.
eapply leRat_trans.
eapply oc_eventProb; intuition.
eauto.
rewrite H4.
rewrite mult_1_l.
rewrite plus_0_r.
intuition.
Qed.
Local Open Scope nat_scope.

Theorem qam_count :
forall (A B C : Set)(c : OracleComp A B C)(q : nat),
queries_at_most c q ->
forall (S : Set)(count : S -> nat)(eqds : EqDec S)(o : S -> A -> Comp (B * S))(s : S),
(forall a b x y,
In (a, b) (getSupport (o x y)) ->
count b <= 1 + (count x)) ->
count s = 0 ->
forall a b,
In (a, b) (getSupport (c _ _ o s)) ->
count b <= q.