#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j, k, l, t, arr[300009], x;
int main() {
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld", &n);
    k = n;
    j = 0;
    for (i = 0; i < n; i++) scanf("%lld", &arr[i]);
    for (i = 0; i < n; i++) {
      if (arr[i] >= i) {
        k = i;
        m = arr[i];
      } else
        break;
    }
    for (i = n - 1; i >= k; i--) {
      l = n - i - 1;
      if (arr[i] < l) {
        j = 1;
        break;
      }
    }
    if (j)
      printf("No\n");
    else
      printf("Yes\n");
  }
}
