#include <bits/stdc++.h>
int a[300010];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    int flag = 0;
    int x = 0;
    int m = n;
    for (int i = 1; i <= n; i++) {
      if (x == 0 && a[i] < i - 1) {
        x = 1;
        if (a[i] < n - i || n - i >= a[i - 1]) {
          flag = 1;
          break;
        }
      } else if (x == 1) {
        if (a[i] < n - i) {
          flag = 1;
          break;
        }
      }
    }
    if (flag == 1) {
      printf("No\n");
    } else {
      printf("Yes\n");
    }
  }
}
