Local Ltac t := solve [right; intros []; intros; breakhyps].Ltac t' i cnti :=
      right; intros [i']; intros [cnti']; intros ?; breakhyps;
      try (assert (i' = i) by congruence; subst i');
      try (assert (cnti' = cnti) by apply proof_irr; subst cnti');
      breakhyps.

Theorem safety_induction Gamma n state : state_invariant Jspec' Gamma (S n) state -> exists state', state_step(ge := globalenv prog) state state' /\ (state_bupd (state_invariant Jspec' Gamma n) state' \/ state_bupd (state_invariant Jspec' Gamma (S n)) state').