(* as it is dynamically inferred by simpl *)
Arguments minus !n / m.
simpl.
match goal with |- (match y with O => S x | S _ => _ end = 0) => idtac end.
Abort.
(* we avoid exposing a match *)
Arguments minus n m : simpl nomatch.
simpl.
match goal with |- (0 = 0) => idtac end.
Abort.

Lemma foo x y : S (S x) - S y = 0.