Definition in_int p q r := p <= r /\ r < q.

(* Specifications: *)
Lemma in_int_intro : forall p q r, p <= r -> r < q -> in_int p q r.
#[local]
Hint Resolve in_int_intro: core.
Lemma in_int_lt : forall p q r, in_int p q r -> p < q.
Lemma in_int_p_Sq :
forall p q r, in_int p (S q) r -> in_int p q r \/ r = q.
Lemma in_int_S : forall p q r, in_int p q r -> in_int p (S q) r.
#[local]
Hint Resolve in_int_S: core.
Lemma in_int_Sp_q : forall p q r, in_int (S p) q r -> in_int p q r.
#[local]
Hint Immediate in_int_Sp_q: core.
Lemma between_in_int :
forall k l, between k l -> forall r, in_int k l r -> P r.
Lemma in_int_between :
forall k l, k <= l -> (forall r, in_int k l r -> P r) -> between k l.
Lemma exists_in_int :
forall k l, exists_between k l -> exists2 m : nat, in_int k l m & Q m.
Lemma in_int_exists : forall k l r, in_int k l r -> Q r -> exists_between k l.
Lemma between_or_exists :
forall k l,
k <= l ->
(forall n:nat, in_int k l n -> P n \/ Q n) ->
between k l \/ exists_between k l.
Lemma between_not_exists :
forall k l,
between k l ->
(forall n:nat, in_int k l n -> P n -> ~ Q n) -> ~ exists_between k l.