Ltac flatten_bool :=
  repeat match goal with
           [ id : (_ && _)%bool = true |- _ ] =>  destruct (andb_prop _ _ id); clear id
         |  [ id : (_ || _)%bool = true |- _ ] =>  destruct (orb_prop _ _ id); clear id
         end.Ltac inv H := inversion H ; try subst ; clear H.

Lemma le_0_iff : forall x y, x <= y <-> 0 <= y - x.