reserve IIG for monotonic Circuit-like non void non empty ManySortedSign;
reserve SCS for non-empty Circuit of IIG;
reserve s for State of SCS;
reserve iv for InputValues of SCS;

theorem Th13:
  for k being Nat st for v being Vertex of IIG st depth
  (v,SCS) <= k holds s.v = IGValue(v,iv) holds for v1 being Vertex of IIG st
  depth(v1,SCS) <= k+1 holds (Following s).v1 = IGValue(v1,iv)
proof
  let k be Nat such that
A1: for v being Vertex of IIG st depth(v,SCS) <= k holds s.v = IGValue(v ,iv);
  let v be Vertex of IIG such that
A2: depth(v,SCS) <= k+1;
  v in the carrier of IIG;
  then
A3: v in InputVertices IIG \/ InnerVertices IIG by XBOOLE_1:45;
  per cases by A3,XBOOLE_0:def 3;
  suppose
A4: v in InputVertices IIG;
    then
A5: depth(v,SCS) = 0 by CIRCUIT1:18;
    thus (Following s).v = s.v by A4,Def5
      .= IGValue(v,iv) by A1,A5,NAT_1:2;
  end;
  suppose
A6: v in InnerVertices IIG;
    set F = Eval SCS;
    set X = the Sorts of SCS;
    set U1 = FreeEnv SCS;
    set o = action_at v;
    set taofo =the_arity_of o;
    deffunc F(Nat) = IGTree((taofo/.$1) qua Vertex of IIG, iv);
    consider p being FinSequence such that
A7: len p = len the_arity_of o and
A8: for k being Nat st k in dom p holds p.k = F(k) from FINSEQ_1:sch
    2;
A9: for k being Element of NAT st k in dom p holds p.k = F(k) by A8;
A10: now
      let k be Nat;
      assume k in dom p;
      then p.k = IGTree(taofo/.k, iv) by A8;
      hence p.k in (the Sorts of U1).((the_arity_of o)/.k);
    end;
    U1 = MSAlgebra (# FreeSort(X), FreeOper(X) #) by MSAFREE:def 14;
    then
A11: Den(o,U1) = (FreeOper X).o by MSUALG_1:def 6
      .= DenOp(o,X) by MSAFREE:def 13;
    reconsider ods = o depends_on_in s as Function;
A12: F is_homomorphism U1, SCS by MSAFREE2:def 9;
    dom the Arity of IIG = the carrier' of IIG by FUNCT_2:def 1;
    then
A13: ((the Sorts of SCS)# * the Arity of IIG).o = (the Sorts of SCS)#.((
    the Arity of IIG).o) by FUNCT_1:13
      .= (the Sorts of SCS)#.(the_arity_of o) by MSUALG_1:def 1
      .= product ((the Sorts of SCS) * the_arity_of o) by FINSEQ_2:def 5;
A14: dom p = dom the_arity_of o by A7,FINSEQ_3:29;
    reconsider p as Element of Args(o,U1) by A7,A10,MSAFREE2:5;
A15: U1 = MSAlgebra (# FreeSort(X), FreeOper(X) #) & Args(o,U1) = ((the
    Sorts of U1)# * the Arity of IIG).o by MSAFREE:def 14,MSUALG_1:def 4;
    then reconsider p9 = p as FinSequence of TS(DTConMSA(X)) by MSAFREE:8;
    Sym(o,X) ==> roots p9 by A15,MSAFREE:10;
    then
A16: Den(o,U1).p = (Sym(o,X))-tree p9 by A11,MSAFREE:def 12
      .= [o,the carrier of IIG]-tree p9 by MSAFREE:def 9
      .= IGTree(v,iv) by A6,A9,A14,Th9;
    reconsider Fp = F#p as Function;
A17: Args(o,SCS) = ((the Sorts of SCS)# * the Arity of IIG).o by MSUALG_1:def 4
;
    now
      dom the Sorts of SCS = the carrier of IIG & rng the_arity_of o c=
      the carrier of IIG by FINSEQ_1:def 4,PARTFUN1:def 2;
      hence dom the_arity_of o = dom ((the Sorts of SCS) * the_arity_of o) by
RELAT_1:27
        .= dom Fp by A13,A17,CARD_3:9;
      dom s = the carrier of IIG & rng the_arity_of o c= the carrier of
      IIG by CIRCUIT1:3,FINSEQ_1:def 4;
      hence dom the_arity_of o = dom (s * the_arity_of o) by RELAT_1:27
        .= dom ods by CIRCUIT1:def 3;
      let x be object;
      reconsider v1 = (the_arity_of o)/.x as Element of IIG;
      assume
A18:  x in dom the_arity_of o;
      then reconsider x9 = x as Element of NAT;
A19:  v1 = (the_arity_of o).x9 by A18,PARTFUN1:def 6;
      then v1 in rng the_arity_of o by A18,FUNCT_1:def 3;
      then depth(v1,SCS) < k+1 by A2,A6,CIRCUIT1:19,XXREAL_0:2;
      then
A20:  depth(v1,SCS) <= k by NAT_1:13;
      thus Fp.x = (F.v1).(p9.x9) by A14,A18,MSUALG_3:def 6
        .= IGValue(v1,iv) by A8,A14,A18
        .= s.v1 by A1,A20
        .= (s * (the_arity_of o)).x by A18,A19,FUNCT_1:13
        .= ods.x by CIRCUIT1:def 3;
    end;
    then F#p = o depends_on_in s by FUNCT_1:2;
    hence (Following s).v = Den(o,SCS).(F#p) by A6,Def5
      .= (F.(the_result_sort_of o)).(Den(o,U1).p) by A12,MSUALG_3:def 7
      .= IGValue(v,iv) by A6,A16,MSAFREE2:def 7;
  end;
end;
