#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0), ios_base ::sync_with_stdio(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (int i = 0; i < n; ++i) cin >> a[i];
    bool pos1 = 1;
    bool sharp = 0;
    int i = 0;
    while (i < n && i < n - 1 && a[i] < a[i + 1]) {
      i++;
    }
    long long pos = -1;
    long long mx = 0;
    for (int i = 0; i < n; ++i) {
      if (a[i] >= i) {
        mx = a[i];
        pos = i;
      } else
        break;
    }
    while (pos < n - 1) {
      if (a[pos] > a[pos + 1])
        pos++;
      else {
        a[pos + 1] = a[pos] - 1;
        pos++;
      }
    }
    for (int i = 0; i < n; ++i)
      if (a[i] < 0) pos1 = 0;
    if (pos1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
