intros[|][|]H1 H2;simpl in *;reflexivity||contradiction. left;trivial. right;
trivial. Qed.

(* Specifications: *)
Lemma if_l:forall(A B:Prop)(C:Type)(H:{A}+{B})(x y:C),
~B->(if H then x else y)=x. intuition. Qed.
Lemma if_r:forall(A B:Prop)(C:Type)(H:{A}+{B})(x y:C),
~A->(if H then x else y)=y. intuition. Qed.