I sometimes need to apply a simplification in a branch of an if-then-else without destructing the discriminee.
From Coq Require Import Setoid.
Lemma true_and :
forall P, True /\ P <-> P.
Proof.
firstorder.
Qed.
Goal (forall (b:bool) P Q, if b then True /\ P else Q).
intros.
Fail rewrite (true_and P).
Abort.
In this example rewrite fails (setoid_rewrite too), suggesting to register the following
"subrelation eq (Basics.flip Basics.impl)": seems fair to me"subrelation iff eq": no way!
Why is the rewriting engine so demanding?