 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;
 reserve D for Subset of X;
 reserve I,I1,I2 for Function of X,Y;
 reserve J,J1,J2 for Function of [:X,Y,Y:], Y;
 reserve E1,E2 for Function of X,X;

theorem Threcursive0101:
  ex W being continuous Function of
            [:FlatConF(X,Y),FlatConF(X,Y):],FlatConF(X,Y)
     st for f being set
             st f in [:ConFuncs(FlatPoset(X),FlatPoset(Y)),
                       ConFuncs(FlatPoset(X),FlatPoset(Y)):]
            holds W.f = RecFunc02(f`1,f`2,E1,E2,I,J,D)
  proof
    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);
    set FlatC2 = [:FlatC,FlatC:];
    set CFXY2 = [:CFXY,CFXY:];
    set CRFXY2 = ["CRFXY,CRFXY"];
A6: the carrier of FlatC2 = CFXY2 &
         the InternalRel of FlatC2 = CRFXY2 by YELLOW_3:def 2;
    deffunc H(object) = RecFunc02($1`1,$1`2,E1,E2,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;
A801:for h being Element of FlatC2 holds
      ex h1,h2 being continuous Function of FX,FY st h = [h1,h2]
    proof
      let h be Element of FlatC2;
   B1:h is Element of CFXY2 by YELLOW_3:def 2;
      reconsider h1 = h`1, h2 = h`2 as continuous Function of FX,FY by A8;
      take h1,h2;
      consider xx,y being object such that
hh:   xx in CFXY & y in CFXY & h = [xx,y] by ZFMISC_1:def 2,B1;
      thus thesis by hh;
    end;
A9: for f being object st f in CFXY2 holds H(f) in CFXY by A7;
    ex W being Function of CFXY2,CFXY st
     for f being object st f in CFXY2 holds W.f = H(f) from FUNCT_2:sch 2(A9);
    then consider IT being Function of CFXY2,CFXY such that
A10:for f being object st f in CFXY2 holds IT.f = H(f);
    IT is continuous Function of FlatC2,FlatC
    proof
      ::**preparation using lemma A7,A8
B1:   for f1,f2 being continuous Function of FX,FY holds
             IT.[f1,f2] = H([f1,f2])
      proof
        let f1,f2 be continuous Function of FX,FY;
        set f = [f1,f2];
        f1 in CFXY & f2 in CFXY by A7;
        then f in CFXY2 by ZFMISC_1:def 2;
        hence thesis by A10;
      end;
B2:  for f1,f2 being continuous Function of FX,FY holds
            ex g being continuous Function of FX,FY st g = IT.[f1,f2]
      proof
        let f1,f2 be continuous Function of FX,FY;
        set f = [f1,f2];
        f1 in CFXY & f2 in CFXY by A7;
        then C1:f in CFXY2 by ZFMISC_1:def 2;
        reconsider g = IT.f as continuous Function of FX,FY
          by A8,C1,FUNCT_2:5;
        take g;
        thus thesis;
      end;
B3:  for f1,f2 being continuous Function of FX,FY
         for g being continuous Function of FX,FY st g = IT.[f1,f2] holds
           for x being Element of FX holds
              ((g.x =
               BaseFunc02(x,f1.((Flatten E1).x),f2.((Flatten E2).x),I,J,D))
                 &
               (x in D implies g.x = I.x))
     proof
       let f1,f2 be continuous Function of FX,FY;
       let g be continuous Function of FX,FY;
       assume
C1:    g = IT.[f1,f2];
       let x be Element of FX;
       [f1,f2]`1 = f1 & [f1,f2]`2 = f2; then
       g.x= RecFunc02(f1,f2,E1,E2,I,J,D).x by B1,C1
         .= BaseFunc02(x,f1.((Flatten E1).x),f2.((Flatten E2).x),I,J,D)
                       by DefRecFunc02;
       hence thesis by DefBaseFunc02;
     end;
      ::** proof of continuity of IT
      ::* IT being Function of CFXY2,CFXY,
      ::*    so IT be considered as Function of FlatC2,FlatC
      reconsider IT as Function of FlatC2,FlatC by A6;
      IT is monotone
      proof
        let f1,f2 be Element of FlatC2 such that
C1:     f1 <= f2;
        let g1,g2 be Element of FlatC such that
C2:     g1 = IT.f1 & g2 = IT.f2;
        reconsider f101 = f1`1, f102 = f1`2, f201 = f2`1, f202 = f2`2
          as Element of FlatC;
        [f101,f201] in CRFXY by ORDERS_2:def 5,C1,YELLOW_3:12;
        then consider f1011,f2011 be Function of FX,FY such that
        C301:f101 = f1011 & f201 = f2011 &
                         f1011 <= f2011 by POSET_1:def 7;
        reconsider f1011,f2011 as continuous Function of FX,FY by C301,A8;
        [f102,f202] in CRFXY by ORDERS_2:def 5,C1,YELLOW_3:12;
        then consider f1021,f2021 be Function of FX,FY such that
        C401:f102 = f1021 & f202 = f2021 &
                         f1021 <= f2021 by POSET_1:def 7;
        reconsider f1021,f2021 as continuous Function of FX,FY by C401,A8;
        reconsider g10 = g1, 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 y01 = (Flatten E1).x, y02 = (Flatten E2).x
            as Element of FX;
          set y1 = f1011.y01;
          set y2 = f2011.y01;
          set y3 = f1021.y02;
          set y4 = f2021.y02;
          f1 in the carrier of [:FlatC,FlatC:]; then
          f1 in [:the carrier of FlatC,the carrier of FlatC:]
            by YELLOW_3:def 2; then
          consider xx,y being object such that
hh:       xx in the carrier of FlatC & y in the carrier of FlatC &
            f1 = [xx,y] by ZFMISC_1:def 2;
D1:       g10 = IT.[f1011,f1021] by C2,C401,hh,C301;
D101:     g10.x = BaseFunc02(x,y1,y3,I,J,D) by B3,C2,C401,hh,C301;
          f2 in the carrier of [:FlatC,FlatC:]; then
          f2 in [:the carrier of FlatC,the carrier of FlatC:]
            by YELLOW_3:def 2; then
          consider xx,y being object such that
hh:       xx in the carrier of FlatC & y in the carrier of FlatC &
            f2 = [xx,y] by ZFMISC_1:def 2;
D2:       g20 = IT.[f2011,f2021] by C2,C401,C301,hh;
          per cases by ThFlatten04,C301,YELLOW_2:9;
            suppose y1 = Y; then
D301:         not y1 in Y;
              per cases;
                suppose
D302:             x in D;
                  then g10.x = I.x by D1,B3;
                  hence thesis by D2,B3,D302;
                end;
                suppose not x in D;
                  then g10.x = Y by D301,D101,DefBaseFunc02;
                  hence thesis by LemFlatten02;
                end;
              end;
            suppose
D304:         y1 = y2;
              per cases by C401,YELLOW_2:9,ThFlatten04;
                suppose y3 = Y; then
D305:             not y3 in Y;
                  per cases;
                    suppose
D306:                 x in D;
                      then g10.x = I.x by D1,B3;
                      hence thesis by D2,B3,D306;
                    end;
                    suppose not x in D;
                      then g10.x = Y by D305,D101,DefBaseFunc02;
                      hence thesis by LemFlatten02;
                     end;
                  end;
                suppose y3 = y4;
                  hence thesis by D101,C2,C401,C301,hh,B3,D304;
                end;
              end;
          end; then
        g10 <= g20 by YELLOW_2:9;
        hence thesis by POSET_1:def 7;
      end;
      then reconsider IT as monotone Function of FlatC2,FlatC;
      for F being non empty Chain of FlatC2 holds IT.(sup F) <= sup (IT.:F)
      proof
        let F be non empty Chain of FlatC2;
        reconsider G = IT.:F as non empty Chain of FlatC by POSET_1:1;
        IT.(sup F) <= sup G
        proof
          reconsider
           F as non empty Chain of [:ConPoset(FX,FY),ConPoset(FX,FY):];
          reconsider G as non empty Chain of ConPoset(FX,FY);
D101:     sup (proj1 F) = sup_func(proj1 F) by POSET_1:11;
          then reconsider sf1 = sup (proj1 F) as continuous Function of FX,FY;
D102:     sup (proj2 F) = sup_func(proj2 F) by POSET_1:11;
          then reconsider sf2 = sup (proj2 F) as continuous Function of FX,FY;
D103:     sup F = [sf1, sf2] by YELLOW_3:46,LemProdPoset06;
          set sg = sup G;
D3:       sg = sup_func(G) by POSET_1:11;
          then reconsider sg as continuous Function of FX,FY;
D4:       for x being Element of FX st x in D holds sg.x = I.x
          proof
            let x be Element of FX;
            assume
D401:       x in D;
            reconsider N = G-image x as non empty Chain of FY;
            set h = the Element of G;
            reconsider h as continuous Function of FX,FY by A8;
            reconsider hx = h.x as Element of FY;
D402:       hx in N;
            consider f be Element of CFXY2 such that
D403:         f in F & h = IT.f by FUNCT_2:65;
            reconsider f as Element of FlatC2 by D403;
            consider f1,f2 being continuous Function of FX,FY such that
D404:         f =[f1,f2] by A801;
D405:       hx = I.x by B3,D401,D403,D404;
            then hx in Y by FUNCT_2:5,D401;
            then hx <> Y;
            then sup N = hx by ThFlatten04,D402,Thsup01;
            hence thesis by D405,POSET_1:def 10,D3;
          end;
          consider g being continuous Function of FX,FY such that
D5:         g = IT.[sf1,sf2] by B2;
          for x being Element of FX holds g.x <= sg.x
            proof::**************
            let x be Element of FX;
            reconsider x1 = (Flatten E1).x, x2 = (Flatten E2).x
              as Element of FX;
            reconsider M1 = proj1 F -image x1, M2 = proj2 F -image x2
              as non empty Chain of FY;
            consider a1 be Element of FY such that
E401:       M1 = {a1} or M1 = {Bottom FY, a1} by Thflat01;
E402:       sup M1 = a1
            proof
              per cases by E401;
              suppose M1 = {a1};
                hence thesis by YELLOW_0:39;
              end;
              suppose M1 = {Bottom FY,a1};
                hence thesis by Thflat0502;
              end;
            end;
            consider a2 be Element of FY such that
E403:       M2 = {a2} or M2 = {Bottom FY, a2} by Thflat01;
E404:       sup M2 = a2
            proof
              per cases by E403;
              suppose M2 = {a2};
                hence thesis by YELLOW_0:39;
              end;
              suppose M2 = {Bottom FY,a2};
                hence thesis by Thflat0502;
              end;
            end;
E0:         sf1.x1 = a1 & sf2.x2 = a2
                       by POSET_1:def 10,D101,D102,E402,E404;
E1:         g.x = BaseFunc02(x,a1,a2,I,J,D) by B3,D5,E0;
E500:       a1 in proj1 F-image x1 & a2 in proj2 F-image x2
                                  by TARSKI:def 1,TARSKI:def 2,E401,E403;
            consider q1 be Element of FY such that
E501:         q1 = a1 & ex f1 being continuous Function of FX,FY
                   st f1 in proj1 F & q1 =f1.x1 by E500;
            consider q2 be Element of FY such that
E502:         q2 = a2 & ex f2 being continuous Function of FX,FY
                   st f2 in proj2 F & q2 =f2.x2 by E500;
            per cases;
              suppose
E503:           not x in D;
                per cases;
                  suppose
E504:             a1 <> Y & a2 <> Y;
                  ex f1,f2 be continuous Function of FX,FY st
                      [f1,f2] in F & a1 =f1.x1 & a2 =f2.x2
                 proof
                   consider f1,f2 be continuous Function of FX,FY such that
E600:              f1 in proj1 F & a1 =f1.x1 &
                   f2 in proj2 F & a2 =f2.x2 by E501,E502;
                   consider f12 be object such that
E601:                [f1,f12] in F by E600,XTUPLE_0:def 12;
                   [f1,f12]`2 in CFXY by MCART_1:10,A6,E601;
                   then reconsider f12 as continuous Function of FX,FY by A8;
                   consider f21 be object such that
E602:              [f21,f2] in F by E600,XTUPLE_0:def 13;
                   [f21,f2]`1 in CFXY by MCART_1:10,A6,E602;
                   then reconsider f21 as continuous Function of FX,FY by A8;
                   reconsider f1F = f1, f12F = f12, f2F = f2, f21F = f21
                                    as Element of FlatC by A7;
                   reconsider h1 = [f1F,f12F], h2 = [f21F,f2F] as Element of F
                                    by E601,E602;
                   reconsider h1,h2 as Element of FlatC2;
                   per cases by ORDERS_2:11;
                     suppose h1 <= h2;
                       then f1F <= f21F by YELLOW_3:11;
                       then consider f,g being Function of FX,FY such that
                  G001:f1=f & f21=g & f <= g by POSET_1:def 7;
                       take f21,f2;
                       thus thesis by E602,E600,E504,
                         ThFlatten04,YELLOW_2:9,G001;
                       end;
                     suppose h2 <= h1;
                       then f2F <= f12F by YELLOW_3:11;
                       then consider f,g being Function of FX,FY such that
                       G001:f2=f & f12=g & f <= g by POSET_1:def 7;
                       take f1,f12;
                       thus thesis by E601,E600,E504,ThFlatten04,
                         YELLOW_2:9,G001;
                       end;
                     end;
                  then consider f1,f2 be continuous Function of FX,FY such that
E6:                 [f1,f2] in F & a1 =f1.x1 & a2 =f2.x2;
                  f1 in CFXY & f2 in CFXY by A7;
                  then reconsider f01 = [f1,f2] as Element of FlatC2
                                                      by ZFMISC_1:def 2,A6;
                  reconsider g01 = IT.f01 as continuous Function of FX,FY
                                                       by A8;
E7:               g01.x = g.x by B3,E6,E1;
                  reconsider N = G-image x as non empty Chain of FY;
E9:               sg.x = sup N by POSET_1:def 10,D3;
                  dom IT = CFXY2 by FUNCT_2:def 1;
                  then [f01,g01] in IT by FUNCT_1:def 2,A6;
                  then g01 in IT.:F by RELAT_1:def 13,E6;
                  then g01.x in N;
                  hence thesis by E7,Thsup01,E9;
                end;
                suppose a1 = Y or a2 = Y;
                  then not (a1 in Y & a2 in Y);
                  then g.x = Y by E1,DefBaseFunc02,E503;
                  hence thesis by LemFlatten02;
                end;
                end;
              suppose
E506:           x in D;
                then sg.x = I.x by D4 .= g.x by E506,B3,D5;
                hence thesis;
              end;
            end;::***********g.x <= sg.x
            then g <= sg by YELLOW_2:9;
            hence thesis by D5,D103,POSET_1:def 7;
          end;
          hence thesis;
        end;
        hence thesis by POSET_1:8;
      end;
    then reconsider IT as continuous Function of FlatC2,FlatC;
    for f being set st f in CFXY2
      holds IT.f = RecFunc02(f`1,f`2,E1,E2,I,J,D) by A10;
    hence thesis;
  end;
