#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int N = 3e5 + 5, inf = 1e9 + 5;
int n, m;
int a[N];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
    int ok = 1, p = -1;
    for (int i = 0; i < n; ++i) {
      if (a[i] < i) {
        if (a[i] >= a[i - 1]) --a[i];
        if (n - 1 - i > a[i]) ok = 0;
      }
    }
    puts(ok ? "Yes" : "No");
  }
  return 0;
}
