(* more hints to be added later on into this database *)

Ltac lift_idx :=
  first [ rewrite @lift_idx_recent by solve [ omega | eauto with lift_idx_hints ]
        | rewrite @lift_idx_old by omega ].Ltac lift_idx_in h :=
  first [ rewrite @lift_idx_recent in h by solve [ omega | eauto with lift_idx_hints ]
        | rewrite @lift_idx_old in h by omega ].Ltac lift_idx_all :=
  first [ rewrite @lift_idx_recent in * by solve [ omega | eauto with lift_idx_hints ]
        | rewrite @lift_idx_old in * by omega ].(* This tactic finds an occurrence of [lift _ _ _] at type [nat] and
   examines both cases. *)

Ltac destruct_lift_idx :=
  match goal with |- context[@lift nat _ _ ?y ?x] =>
    destruct (le_gt_dec y x); lift_idx
  end.(* Our definition of [lift] at type [nat] satisfies the properties listed above. *)

Instance LiftVar_idx: @LiftVar nat _ _.Instance LiftZero_idx: @LiftZero nat _.Instance LiftInjective_idx: @LiftInjective nat _.Instance LiftLift_idx: @LiftLift nat _.Instance LiftLiftFuse_idx: @LiftLiftFuse nat _.

Lemma subst_idx_miss_2: forall `{Var V} v k x, k < x -> subst_idx v k x = var (x - 1).