(* Higher Order *)

Instance testSuchThat_Disj {A B : Type} (P : A -> Prop) (Q : B -> Prop)
         (prop : A -> B -> Prop)
         `{Checkable (forall a, P a -> forall b, prop a b)} 
         `{Checkable (forall b, Q b -> forall a, prop a b)} :
  Checkable (forall a b, P a \/ Q b -> prop a b) :=
  {| checker f := 
       disjoin (Datatypes.cons (checker (fun a P b => f a b _ ))
               (Datatypes.cons (checker (fun b Q a => f a b _))
                Datatypes.nil)) |}.

(* Specifications: *)
Lemma or_example : forall n m : nat, n = 0 \/ m = 0 -> n * m = 0.
Lemma or_intro : forall A B : Prop, A -> A \/ B.
Lemma zero_or_succ : forall n : nat, n = 0 \/ n = S (pred n).
Lemma mult_eq_0 : forall n m, n * m = 0 -> n = 0 \/ m = 0.
Theorem or_commut : forall P Q : Prop, P \/ Q -> Q \/ P.