#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
      cin >> v[i];
    }
    int i;
    bool poss = 1;
    for (i = 0; i < n; i++)
      if (v[i] < i) break;
    i--;
    for (int j = i; j < n - 1; j++) {
      if (v[j + 1] >= v[j]) v[j + 1] = v[j] - 1;
      if (v[j + 1] < 0) {
        poss = 0;
        break;
      }
    }
    if (poss)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
