Goal forall (w x y z: string), w <> x -> (if (eqb_string w x) then y else z) = z.
Proof.
intros.
rewrite false_eqb_string by trivial.
reflexivity.
Qed.
false_eqb_string
is a rather trivial proof principle. I'd like to use it implicitly, via autorewrite
or similar. Unfortunately, if I add Hint Rewrite false_eqb_string
, then any subterm of the form eqb_string _ _
gets rewritten, and the assumption _ <> _
added to goals, even when that's not a sensible thing to do.
How can I make rewrite false_eqb_string by trivial
happen automatically, without mentioning it by name?