reserve x, y, z, X for set,
  m, n for Nat,
  O for Ordinal,
  R, S for Relation;
reserve
  N for with_zero set,
  S for
  standard IC-Ins-separated non empty with_non-empty_values AMI-Struct over N,
  L, l1 for Nat,
  J for Instruction of S,
  F for Subset of NAT;

theorem
  for S being standard halting IC-Ins-separated
    non empty with_non-empty_values AMI-Struct over N holds ExecTree Stop S =
  TrivialInfiniteTree --> 0
proof
  set D = TrivialInfiniteTree;
  let S be standard halting IC-Ins-separated non empty
  with_non-empty_values AMI-Struct over N;
  set M = Stop S;
  set E = ExecTree M;
  defpred R[set] means E.$1 in dom M;
  defpred X[Nat] means dom E-level $1 = D-level $1;
A2: M.0 = halt S by FUNCOP_1:72;
A3: for t being Element of dom E holds card NIC(halt S,E.t) = {0}
  proof
    let t be Element of dom E;
    reconsider Et = E.t as Nat;
    NIC(halt S,Et) = {Et} by AMISTD_1:2;
    hence thesis by CARD_1:30,49;
  end;
A4: for f being Element of dom E st R[f]
  for a being Element of NAT st f^<*a*> in dom E holds R[f^<*a*>]
  proof
    let f be Element of dom E such that
A5: R[f];
A6: M/.(E.f) = M.(E.f) by A5,PARTFUN1:def 6;
    reconsider Ef = E.f as Nat;
A7: E.f = 0 by A5,TARSKI:def 1;
    then NIC(halt S,E.f) = {0} by AMISTD_1:2;
    then canonical_isomorphism_of (RelIncl order_type_of RelIncl
     NIC(M/.(E.f),E.f), RelIncl NIC(M/.(E.f),E.f))
      = 0 .--> Ef
     by A2,A7,A6,CARD_5:38;
    then
A8: canonical_isomorphism_of (RelIncl order_type_of RelIncl
 NIC(M/.(E.f),E.f), RelIncl NIC(M/.(E.f),E.f)).0
  = Ef by FUNCOP_1:72
      .= 0 by A5,TARSKI:def 1;
A9: card NIC(halt S,E.f) = {0} by A3;
    then
A10: 0 in card NIC(M/.(E.f),E.f) by A2,A7,A6,TARSKI:def 1;
A11: succ f = { f^<*k*> where k is Nat: k in card NIC(M/.(E.f)
    ,E.f) } by Def2;
A12: succ f = { f^<*0*> }
    proof
      hereby
        let s be object;
        assume s in succ f;
        then consider k being Nat such that
A13:    s = f^<*k*> and
A14:    k in card NIC(M/.(E.f),E.f) by A11;
        k = 0 by A2,A9,A7,A6,A14,TARSKI:def 1;
        hence s in { f^<*0*> } by A13,TARSKI:def 1;
      end;
      let s be object;
      assume s in { f^<*0*> };
      then s = f^<*0*> by TARSKI:def 1;
      hence thesis by A11,A10;
    end;
    let a be Element of NAT;
    assume f^<*a*> in dom E;
    then f^<*a*> in succ f by TREES_2:12;
    then f^<*a*> = f^<*0*> by A12,TARSKI:def 1;
    then E.(f^<*a*>) = (LocSeq(NIC(M/.(E.f),E.f),S)).0 by A10,Def2
      .= 0 by A10,A8,Def1;
    hence thesis by TARSKI:def 1;
  end;
  E.{} = FirstLoc(M) by Def2;
  then
A15: R[<*>NAT] by VALUED_1:33;
A16: for f being Element of dom E holds R[f] from HILBERT2:sch 1(A15,A4);
A17: for x being object st x in dom E holds (E qua Function).x = 0
  proof
    let x be object;
    assume x in dom E;
    then reconsider x as Element of dom E;
    E.x in dom M by A16;
    hence thesis by TARSKI:def 1;
  end;
A18: for n being Nat st X[n] holds X[n+1]
  proof
    let n be Nat;
    set f0 = n |-> 0;
    set f1 = (n+1) |-> 0;
A19: dom E-level (n+1) = {w where w is Element of dom E: len w = n+1} by
TREES_2:def 6;
A20: len f1 = n+1 by CARD_1:def 7;
    assume
A21: X[n];
    dom E-level (n+1) = {f1}
    proof
      hereby
        let a be object;
        assume a in dom E-level (n+1);
        then consider t1 being Element of dom E such that
A22:    a = t1 and
A23:    len t1 = n+1 by A19;
        reconsider t0 = t1|Seg n as Element of dom E by RELAT_1:59,TREES_1:20;
A24:    succ t0 = { t0^<*k*> where k is Nat:
          k in card NIC(M/.(E.t0),E.t0) } by Def2;
        E.t0 in dom M by A16;
        then
A25:    E.t0 = 0 by TARSKI:def 1;
A26:    card NIC(halt S,E.t0) = {0} & M/.(E.t0) = M.(E.t0) by A3,A16,
PARTFUN1:def 6;
        then
A27:    0 in card NIC(M/.(E.t0),E.t0) by A2,A25,TARSKI:def 1;
A28:    succ t0 = { t0^<*0*> }
        proof
          hereby
            let s be object;
            assume s in succ t0;
            then consider k being Nat such that
A29:        s = t0^<*k*> and
A30:        k in card NIC(M/.(E.t0),E.t0) by A24;
            k = 0 by A2,A25,A26,A30,TARSKI:def 1;
            hence s in { t0^<*0*> } by A29,TARSKI:def 1;
          end;
          let s be object;
          assume s in { t0^<*0*> };
          then s = t0^<*0*> by TARSKI:def 1;
          hence thesis by A24,A27;
        end;
        t1.(n+1) is Nat & t1 = t0^<*t1.(n+1)*> by A23,FINSEQ_3:55;
        then t0^<*t1.(n+1)*> in succ t0 by TREES_2:12;
        then
A31:    t0^<*t1.(n+1)*> = t0^<*0*> by A28,TARSKI:def 1;
A32:     n in NAT by ORDINAL1:def 12;
        n <= n+1 by NAT_1:11;
        then Seg n c= Seg(n+1) by FINSEQ_1:5;
        then Seg n c= dom t1 by A23,FINSEQ_1:def 3;
        then dom t0 = Seg n by RELAT_1:62;
        then dom E-level n = {w where w is Element of dom E: len w = n} & len
        t0 = n by FINSEQ_1:def 3,TREES_2:def 6,A32;
        then
A33:    t0 in dom E-level n;
A34:    dom E-level n = {f0} by A21,TREES_2:39;
        for k being Nat st 1 <= k & k <= len t1 holds t1.k = f1.k
        proof
          let k be Nat;
          assume 1 <= k & k <= len t1;
          then
A35:      k in Seg(n+1) by A23,FINSEQ_1:1;
          now
            per cases by A35,FINSEQ_2:7;
            suppose
A36:          k in Seg n;
              hence t1.k = t0.k by FUNCT_1:49
                .= f0.k by A34,A33,TARSKI:def 1
                .= 0 by A36,FUNCOP_1:7;
            end;
            suppose
              k = n+1;
              hence t1.k = 0 by A31,FINSEQ_2:17;
            end;
          end;
          hence thesis by A35,FUNCOP_1:7;
        end;
        then t1 = f1 by A20,A23,FINSEQ_1:14;
        hence a in {f1} by A22,TARSKI:def 1;
      end;
      defpred P[Nat] means $1 |-> 0 in dom E;
      let a be object;
A37:  for n being Nat st P[n] holds P[n+1]
      proof
        let n be Nat;
        assume P[n];
        then reconsider t = n |-> 0 as Element of dom E;
A38:    succ t = { t^<*k*> where k is Nat:
          k in card NIC(M/.(E.t),E.t) } by Def2;
        E.t in dom M by A16;
        then
A39:    E.t = 0 by TARSKI:def 1;
        card NIC(halt S,E.t) = {0} & M/.(E.t) = M.(E.t)
           by A3,A16,PARTFUN1:def 6;
        then 0 in card NIC(M/.(E.t),E.t) by A2,A39,TARSKI:def 1;
        then t^<*0*> in succ t by A38;
        then t^<*0*> in dom E;
        hence thesis by FINSEQ_2:60;
      end;
A40:  P[0] by TREES_1:22;
      for n being Nat holds P[n] from NAT_1:sch 2(A40,A37);
      then
A41:  f1 is Element of dom E;
      assume a in {f1};
      then a = f1 by TARSKI:def 1;
      hence thesis by A19,A20,A41;
    end;
    hence thesis by TREES_2:39;
  end;
  dom E-level 0 = {{}} by TREES_9:44
    .= D-level 0 by TREES_9:44;
  then
A42: X[0];
  for x being Nat holds X[x] from NAT_1:sch 2(A42,A18);
  then dom E = D by TREES_2:38;
  hence thesis by A17,FUNCOP_1:11;
end;
