intros.
eapply (@comp_spec_eq_trans_l _ _ _ _ RndT (x <-$ RndT; ret x)).
eapply comp_spec_eq_symm.
eapply comp_spec_right_ident.
eapply comp_spec_seq.
trivial.
trivial.
eapply comp_spec_symm.
eapply (comp_spec_iso (fun b => T_op b x) (fun b => T_op b (T_inverse x))); intuition.
rewrite op_assoc.
rewrite inverse_l_ident.
eauto.
rewrite op_assoc.
rewrite inverse_r_ident.
eauto.
eapply all_in_support; eauto.
intuition.
subst.
eapply comp_spec_eq_refl.
Qed.
End OTP.
(* OTP for bitstrings with xor *)
Section xor_OTP.
Variable n : nat.

(* Specifications: *)
Theorem xor_OTP:
forall (x : Bvector n),
comp_spec eq (Rnd n) (r <-$ Rnd n; ret (BVxor n x r)).