Section MODALITIES.
Context `{kf: KripkeFrame}.
(** The box modality asserts that the relation holds at all possible future worlds. *)
Definition klr_box {A B} (l: L) (R: klr W A B): klr W A B :=
fun w x y => forall w', acc l w w' -> R w' x y.
Global Instance klr_box_subrel {A B}:
Monotonic (@klr_box A B) (- ==> (- ==> subrel) ++> (- ==> subrel)).
(** Dually, the diamond modality asserts that the relation holds at some possible future world. Note the order of the premises in our intro rule: we want to first determine what [w'] should be, then attempt to prove [w ~> w']. *)
Definition klr_diam {A B} (l: L) (R: klr W A B): klr W A B :=
fun w x y => exists w', acc l w w' /\ R w' x y.
Global Instance klr_diam_subrel {A B}:
Monotonic (@klr_diam A B) (- ==> (- ==> subrel) ++> (- ==> subrel)).

Lemma klr_diam_relim {A B} l (R: klr W A B) w x y P Q:
(forall w', acc l w w' -> RElim (R w') x y P Q) ->
RElim (klr_diam l R w) x y P Q.