#include <bits/stdc++.h>
using namespace std;
long long t, n, ar[300005];
int main() {
  cin >> t;
  while (t--) {
    long long flag = 1;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> ar[i];
    long long inc = 1;
    for (int i = 0; i < n; i++) {
      if (inc && ar[i] < i) {
        inc = 0;
        if (ar[i] == ar[i - 1]) ar[i]--;
        if (ar[i] < 0) flag = 0;
        continue;
      }
      if (!inc) {
        if (ar[i] >= ar[i - 1]) ar[i] = ar[i - 1] - 1;
        if (ar[i] < 0) flag = 0;
      }
    }
    if (flag)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
