Definition NegRel (A : Set) (R : Rel A) (x y : A) := ~ R x y.Definition ProdRel (A B : Set) (R : Rel A) (S : Rel B) 
  (x y : A * B) := R (fst x) (fst y) /\ S (snd x) (snd y).Definition leq (a b : A) := ~ lt b a.Definition GBarlR := GRBar (A * B) (ProdRel A B leq R).Definition sndL := map (fun p : A * B => snd p).Definition MinD :=
  Min (A * B) (fun p q : A * B => lt (fst p) (fst q)) (ProdRel A B leq R).Definition prod_lt (a b : A * B) := lt (fst a) (fst b).

Lemma keylem_cor : WR (A * B) (ProdRel A B leq R).