Section UNKRIPKIFY.
Context `{kf: KripkeFrame}.
Definition rel_kvd {A B} (R: klr W A B): rel A B :=
fun x y => forall w, R w x y.
Global Instance rel_kvd_subrel A B:
Monotonic (@rel_kvd A B) ((- ==> subrel) ++> subrel).
End UNKRIPKIFY.
Global Instance rel_kvd_subrel_params: Params (@rel_kvd) 3.
Defined.
Hint Extern 0 (RIntro _ (rel_kvd _) _ _) =>
eapply rel_kvd_rintro : typeclass_instances.
Hint Extern 1 (RElim (rel_kvd _) _ _ _ _) =>
eapply rel_kvd_relim : typeclass_instances.
Notation "|= R" := (rel_kvd R) (at level 65) : rel_scope.
(** ** Pulling along a Kripke frame morphism *)
Definition klr_pullw {W1 W2 A B} (f: W1 -> W2) (R: klr W2 A B): klr W1 A B :=
fun w => R (f w).
Notation "R @@ [ f ]" := (klr_pullw f R)
(at level 30, right associativity) : klr_scope.
Global Instance klr_pullw_subrel {W1 W2 A B} RW1 RW2:
Monotonic
(@klr_pullw W1 W2 A B)
((RW1 ++> RW2) ++> (RW2 ++> subrel) ++> (RW1 ++> subrel)).
Global Instance klr_pullw_subrel_params:
Params (@klr_pullw) 5.
Defined.
Hint Extern 0 (RIntro _ (klr_pullw _ _ _) _ _) =>
eapply klr_pullw_rintro : typeclass_instances.

Lemma klr_pullw_relim {W1 W2 A B} (f: W1 -> W2) R w (x:A) (y:B) P Q:
RElim (R (f w)) x y P Q ->
RElim (klr_pullw f R w) x y P Q.