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 lt_le_iff : forall x, 0 < x <-> 0 <= x - 1.