(** ** Inverse relation *)

(** We use [flip] as our inversion relator. To this end we
  characterize its variance and introduce an [RElim] rule. *)

Global Instance flip_subrel {A B}:
  Monotonic (@flip A B Prop) (subrel ++> subrel).Global Instance flip_subrel_params:
  Params (@flip) 3.

(* Specifications: *)
Lemma flip_rintro {A B} (R: rel A B) m n: RIntro (R n m) (flip R) m n.
Lemma flip_relim {A B} (R: rel A B) m n P Q: RElim R n m P Q -> RElim (flip R) m n P Q.
Lemma flip_rdestruct {A B} (R: rel A B) T: RDestruct R T -> RDestruct (flip R) (fun P => T (flip P)).