#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int inf = 1e9 + 5;
const int nax = 1e5 + 10;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i] < i) {
      for (int j = i; j < n; j++) {
        if (a[j] >= a[j - 1] && a[j - 1] != 0)
          a[j] = a[j - 1] - 1;
        else if (a[j] >= a[j - 1] && a[j - 1] == 0) {
          cout << "No";
          return;
        }
      }
      break;
    }
  }
  cout << "Yes";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long T;
  cin >> T;
  while (T--) {
    solve();
    cout << "\n";
  }
  return 0;
}
