Global Instance lforall_lequiv_m:
Proper (pointwise_relation T lequiv ++> lequiv) lforall.
Global Instance lexists_lentails_m:
Proper (pointwise_relation T lentails ++> lentails) lexists.
Global Instance lexists_lequiv_m:
Proper (pointwise_relation T lequiv ++> lequiv) lexists.
Global Instance : Proper (lequiv ==> lequiv ==> iff) lequiv.
Global Instance lequiv_lentails_m : Proper (lequiv ==> lequiv ==> iff) lentails.
Global Instance lentails_lentails_m: Proper (lentails --> lentails ++> impl) lentails.
Global Instance land_lentails_m:
Proper (lentails ++> lentails ++> lentails) land.
Global Instance land_lequiv_m:
Proper (lequiv ==> lequiv ==> lequiv) land.
Global Instance lor_lentails_m:
Proper (lentails ++> lentails ++> lentails) lor.
Global Instance lor_lequiv_m:
Proper (lequiv ==> lequiv ==> lequiv) lor.
Global Instance limpl_lentails_m:
Proper (lentails --> lentails ++> lentails) limpl.
Global Instance limpl_lequiv_m:
Proper (lequiv ==> lequiv ==> lequiv) limpl.
End ILogicMorphisms.
Hint Extern 0 (?x -|- ?x) => reflexivity.
Hint Extern 0 (?P -|- ?Q) => (is_evar P; reflexivity) || (is_evar Q; reflexivity).

(* Specifications: *)
(* TODO: also add lforwardR. *)
Lemma lforwardL {A} `{IL: ILogic A} {Q R}:
Q |-- R -> forall P G,
P |-- Q ->
(P |-- R -> G) ->
G.
Lemma lorA P Q R : (P \\// Q) \\// R -|- P \\// (Q \\// R).
(* Special case of limplAdj/landAdj when there is just ltrue on the lhs *)
Lemma limplValid P Q:
|-- P -->> Q <->
P |-- Q.
(* Left-rule for limpl. This breaks the discipline of the ILogic presentation since the implication is not strictly the top symbol of the left-hand side, but it remains a convenient rule. *)
Lemma limplL P Q CL CR (HP: CL |-- P) (HR: Q //\\ CL |-- CR) :
(P -->> Q) //\\ CL |-- CR.
Lemma limplAdj2 P Q R : P -->> Q -->> R -|- P //\\ Q -->> R.
Lemma landexistsDL1 (f : T -> A) (P : A) :
lexists f //\\ P |-- Exists a, (f a //\\ P).
Lemma landexistsDL2 (f : T -> A) (P : A) :
P //\\ lexists f |-- Exists a, (P //\\ f a).
Lemma landexistsDR1 (f : T -> A) (P : A) :
Exists a, (f a //\\ P) |-- lexists f //\\ P.
Lemma landexistsDR2 (f : T -> A) (P : A) :
Exists a, (P //\\ f a) |-- P //\\ lexists f.
Lemma landexistsD1 (f : T -> A) (P : A) :
(Exists a, f a) //\\ P -|- Exists a, (f a //\\ P).
Lemma lorexistsDL (f : T -> A) (P : A) {H : Inhabited T} :
(Exists a, f a) \\// P |-- Exists a, (f a \\// P).
Lemma lorexistsDR (f : T -> A) (P : A) :
Exists a, (f a \\// P) |-- (Exists a, f a) \\// P.
Lemma lorexistsD (f : T -> A) (P : A) {H : Inhabited T} :
(Exists a, f a) \\// P -|- Exists a, (f a \\// P).
Lemma landforallDL (f : T -> A) (P : A) :
(Forall a, f a) //\\ P |-- Forall a, (f a //\\ P).
Lemma landforallDR {H: Inhabited T} (f : T -> A) (P : A) :
Forall a, (f a //\\ P) |-- (Forall a, f a) //\\ P.
Lemma landforallD (f : T -> A) (P : A) {H : Inhabited T} :
(Forall a, f a) //\\ P -|- Forall a, (f a //\\ P).
Lemma lorforallDL (f : T -> A) (P : A) :
(Forall a, f a) \\// P |-- Forall a, (f a \\// P).
Lemma limplTrue P : ltrue -->> P -|- P.
Lemma limplexistsE (P : T -> A) (Q : A) :
(Exists x, P x) -->> Q -|- Forall x, (P x -->> Q).
Lemma limplforallER (P : T -> A) (Q : A) :
Exists x, (P x -->> Q) |-- (Forall x, P x) -->> Q.