 reserve a,Z1,Z2,Z3 for set,
         x,y,z for object,
         k for Nat;
 reserve S for RelStr;
 reserve P,Q for non empty flat Poset;
 reserve p,p1,p2 for Element of P;
 reserve K for non empty Chain of P;
 reserve X,Y for non empty set;
 reserve D for Subset of X;
 reserve I for Function of X,Y;
 reserve J for Function of [:X,Y:], Y;
 reserve E for Function of X,X;

theorem Threcursive01:
  ex W being continuous Function of FlatConF(X,Y),FlatConF(X,Y)
    st for f being Element of ConFuncs(FlatPoset(X),FlatPoset(Y))
      holds W.f = RecFunc01(f,E,I,J,D)
  proof
    set z = X;
    set r = Y;
    set FX = FlatPoset(X);
    set CX = succ(X);
    set FY = FlatPoset(Y);
    set CY = succ(Y);
    set FlatC = FlatConF(X,Y);
    set CFXY = ConFuncs(FX,FY);
    set CRFXY = ConRelat(FX,FY);
    deffunc H(object) = RecFunc01($1,E,I,J,D);
    ::*** lemma A7
A7: for h being continuous Function of FX,FY holds h in CFXY
    proof
      let h be continuous Function of FX,FY;
      h in Funcs(the carrier of FX,the carrier of FY) by FUNCT_2:8;
      hence thesis;
    end;
    ::*** lemma A8
A8: for h being set st h in CFXY holds h is continuous Function of FX,FY
    proof
      let h be set;
      assume h in CFXY;
      then consider x being Element of
        Funcs(the carrier of FX,the carrier of FY) such that
B1:           h = x & ex g be continuous Function of FX,FY st g=x;
      thus thesis by B1;
    end;
A9: for f being object st f in CFXY holds H(f) in CFXY by A7;
    ex W being Function of CFXY,CFXY st
          for f being object st f in CFXY holds W.f = H(f)
                                    from FUNCT_2:sch 2(A9);
    then consider IT being Function of CFXY,CFXY such that
A10:for f being object st f in CFXY holds IT.f = H(f);
    IT is continuous Function of FlatC,FlatC
      proof
      ::**preparation using lemma A7,A8
B2:   for f being continuous Function of FX,FY holds
           ex g being continuous Function of FX,FY st g = IT.f
      proof
        let f be continuous Function of FX,FY;
        set g = IT.f;
        f in CFXY by A7;
        then reconsider g as continuous Function of FX,FY by A8,FUNCT_2:5;
        take g;
        thus thesis;
      end;
B3:   for f,g being continuous Function of FX,FY st g = IT.f holds
               for x being Element of FX holds
                   g.x = BaseFunc01(x,f.((Flatten E).x),I,J,D)
      proof
        let f,g be continuous Function of FX,FY;
        assume
C1:     g = IT.f;
        for x being Element of FX holds
          g.x = BaseFunc01(x,f.((Flatten E).x),I,J,D)
        proof
          let x be Element of FX;
          g.x = RecFunc01(f,E,I,J,D).x by A7,A10,C1
             .= BaseFunc01(x,f.((Flatten E).x),I,J,D) by DefRecFunc01;
          hence thesis;
        end;
        hence thesis;
      end;
      ::** proof of continuity of IT as Function of CFXY,CFXY
      ::*    so IT is Function of FlatC,FlatC
      reconsider IT as Function of FlatC,FlatC;
      IT is monotone
      proof
        for f1,f2 being Element of FlatC st f1 <= f2
        for g1,g2 being Element of FlatC st g1 = IT.f1 & g2 = IT.f2
          holds g1 <= g2
        proof
          let f1,f2 be Element of FlatC such that
C1:       f1 <= f2;
          let g1,g2 be Element of FlatC such that
C2:       g1 = IT.f1 & g2 = IT.f2;
          consider f10,f20 be Function of FX,FY such that
C401:     f1 = f10 & f2 = f20 & f10 <= f20 by POSET_1:def 7,C1;
          reconsider f10,f20 as continuous Function of FX,FY by C401,A8;
          reconsider g10 = g1 as continuous Function of FX,FY by A8;
          reconsider g20 = g2 as continuous Function of FX,FY by A8;
          for x being Element of FX holds g10.x <= g20.x
          proof
            let x be Element of FX;
            reconsider y = (Flatten E).x as Element of FX;
            set y1 = f10.y;
            set y2 = f20.y;
D1:         g10.x = BaseFunc01(x,y1,I,J,D) by B3,C2,C401;
D2:         g20.x = BaseFunc01(x,y2,I,J,D) by B3,C2,C401;
            per cases by ThFlatten04,C401,YELLOW_2:9;
              suppose y1 = r; then
D000:           not y1 in Y;
                per cases;
                  suppose
D001:               x in D;
                    then g10.x = I.x by D1,DefBaseFunc01;
                    hence thesis by D2,D001,DefBaseFunc01;
                    end;
                  suppose not x in D;
                    then g10.x = r by D000,D1,DefBaseFunc01;
                    hence thesis by LemFlatten02;
                    end;
                end;
              suppose y1 = y2;
                hence thesis by D1,B3,C2,C401;
                end;
            end;
          then
          g10 <= g20 by YELLOW_2:9;
          hence thesis by POSET_1:def 7;
        end;
        hence thesis;
      end;
      then reconsider IT as monotone Function of FlatC,FlatC;
      for F being non empty Chain of FlatC holds IT.(sup F) <= sup (IT.:F)
      proof
        let F be non empty Chain of FlatC;
        reconsider G = IT.:F as non empty Chain of FlatC by POSET_1:1;
        IT.(sup F) <= sup G
          proof
          reconsider F,G as non empty Chain of ConPoset(FX,FY);
          set sf = sup F;
D1:       sf = sup_func(F) by POSET_1:11;
          then reconsider sf as continuous Function of FX,FY;
          set sg = sup G;
D3:       sg = sup_func(G) by POSET_1:11;
          then reconsider sg as continuous Function of FX,FY;
          consider g being continuous Function of FX,FY such that
D5:         g = IT.sf by B2;
          for x being Element of FX holds g.x <= sg.x
            proof
            let x be Element of FX;
            reconsider x1 = (Flatten E).x as Element of FX;
            reconsider M = F-image x1 as non empty Chain of FY;
            consider a be Element of FY such that
D000:       M = {a} or M = {Bottom FY, a} by Thflat01;
D001:       sup M = a by D000,YELLOW_0:39,Thflat0502;
D002:       g.x = BaseFunc01(x,sf.x1,I,J,D) by B3,D5
               .= BaseFunc01(x,a,I,J,D) by D001,POSET_1:def 10,D1;
            a in F-image x1 by TARSKI:def 1,TARSKI:def 2,D000;
            then consider q1 be Element of FY such that
D003:       q1 = a & ex f1 being continuous Function of FX,FY
                   st f1 in F & q1 =f1.x1;
            consider f1 be continuous Function of FX,FY such that
D004:       f1 in F & a =f1.x1 by D003;
            reconsider f01 = f1 as Element of FlatC by A7;
            reconsider g01 = IT.f01 as continuous Function of FX,FY by A8;
D005:       g01.x = g.x by B3,D004,D002;
            reconsider N = G-image x as non empty Chain of FY;
D006:       sg.x = sup N by POSET_1:def 10,D3;
            dom IT = CFXY by FUNCT_2:def 1;
            then [f01,g01] in IT by FUNCT_1:def 2;
            then g01 in IT.:F by RELAT_1:def 13,D004;
            then g01.x in N;
            hence thesis by D005,Thsup01,D006;
          end; then
          g <= sg by YELLOW_2:9;
          hence thesis by D5,POSET_1:def 7;
        end;
        hence thesis;
      end;
      hence thesis by POSET_1:8;
    end;
    then reconsider IT as continuous Function of FlatC,FlatC;
    for f being Element of CFXY holds IT.f = RecFunc01(f,E,I,J,D) by A10;
    hence thesis;
  end;
