#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000000 + 7;
const long long int N = 1000000 + 6;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long int cnt = 0, i = 0;
    for (; i < n; i++) {
      if (a[i] < i) {
        cnt++;
        break;
      }
    }
    if (cnt == 0) {
      cout << "Yes\n";
      continue;
    }
    long long int j = n - 1;
    for (; j >= i; j--) {
      if (a[j] < n - j - 1) {
        cnt++;
        break;
      }
    }
    if (cnt == 1 && (a[i - 1] == n - i - 1)) {
      cout << "No\n";
      continue;
    };
    if (cnt == 1) {
      cout << "Yes\n";
      continue;
    }
    cout << "No\n";
  }
}
