Ltac mydestruct H := 
    match goal with
      |- if ?c then _ else _ = _ => destruct c as [ H | H ]; try omega; auto
    end.

(* Specifications: *)
Theorem split_interval : { g : nat -> nat & { h | (forall j, j <= n -> g j <= n) /\ (forall j, j <= n -> h j <= n) /\ (forall j, g (h j) = j) /\ (forall j, h (g j) = j) /\ g i = n } }.