reserve E, x, y, X for set;
reserve A, B, C for Subset of E^omega;
reserve a, b for Element of E^omega;
reserve i, k, l, kl, m, n, mn for Nat;

theorem Th31:
  A |^ (m, n) = {<%>E} iff m <= n & A = {<%>E} or m = 0 & n = 0 or
  m = 0 & A = {}
proof
  thus A |^ (m, n) = {<%>E} implies m <= n & A = {<%>E} or m = 0 & n = 0 or m
  = 0 & A = {}
  proof
    assume that
A1: A |^ (m, n) = {<%>E} and
A2: ( m > n or A <> {<%>E})&( m <> 0 or n <> 0) &( m <> 0 or A <> {});
    per cases by A2;
    suppose
      m > n;
      hence contradiction by A1,Th21;
    end;
    suppose
A3:   m <= n & A <> {<%>E} & (m <> 0 or n <> 0 & A <> {} );
      per cases by A3;
      suppose
A4:     m <> 0;
        per cases;
        suppose
          A = {};
          hence contradiction by A1,A4,Th21;
        end;
        suppose
          A <> {};
          then ex x being object st x in A & x <> <%>E by A3,ZFMISC_1:35;
          hence contradiction by A1,A4,Th30;
        end;
      end;
      suppose
A5:     n <> 0 & A <> {};
        then ex x being object st x in A & x <> <%>E by A3,ZFMISC_1:35;
        hence contradiction by A1,A5,Th30;
      end;
    end;
  end;
  assume
A6: m <= n & A = {<%>E} or m = 0 & n = 0 or m = 0 & A = {};
  per cases by A6;
  suppose
A7: m <= n & A = {<%>E};
A8: now
      let x be object;
      assume x in {<%>E};
      then
A9:   x in {<%>E} |^ m by FLANG_1:29;
      {<%>E} |^ m c= {<%>E} |^ (m, n) by A7,Th20;
      hence x in A |^ (m, n) by A7,A9;
    end;
    now
      let x be object;
      assume x in A |^ (m, n);
      then ex k st m <= k & k <= n & x in {<%>E} |^ k by A7,Th19;
      hence x in {<%>E} by FLANG_1:29;
    end;
    hence thesis by A8,TARSKI:2;
  end;
  suppose
A10: m = 0 & n = 0;
    A |^ (0, 0) = A |^ 0 by Th22
      .= {<%>E} by FLANG_1:29;
    hence thesis by A10;
  end;
  suppose
A11: m = 0 & A = {};
    now
      let x be object;
      assume x in A |^ (1, n);
      then ex k st 1 <= k & k <= n & x in A |^ k by Th19;
      hence contradiction by A11,FLANG_1:27;
    end;
    then
A12: A |^ (1, n) = {} by XBOOLE_0:def 1;
    A |^ (0, n) = A |^ (0, 0) \/ A |^ (0 + 1, n) by Th25
      .= A |^ 0 \/ A |^ (0 + 1, n) by Th22
      .= {<%>E} by A12,FLANG_1:29;
    hence thesis by A11;
  end;
end;
