#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using pii = pair<int, int>;
using graph = vector<vi>;
void go() {
  int n;
  cin >> n;
  vi A(n);
  for (int& i : A) cin >> i;
  vi left(n, 0), right(n, 0);
  for (int i = 0; i < n && A[i] >= i; i++) left[i] = i;
  for (int i = n - 1; i >= 0 && A[i] >= (n - 1 - i); i--) right[i] = n - 1 - i;
  bool poss = false;
  for (int i = 0; i < n - 1; i++) {
    if ((left[i] == i && right[i + 1] == n - 1 - (i + 1))) {
      if (left[i] == right[i + 1]) {
        if (A[i] > left[i] || A[i + 1] > right[i + 1]) poss = true;
      } else {
        poss = true;
      }
    }
  }
  if (poss || n == 1)
    cout << "Yes\n";
  else
    cout << "No\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) go();
  return 0;
}
