
theorem MyFunc6:
  for k1,k2 being Element of REAL,
      Omega being non empty set st Omega={1,2,3,4} holds
  for Sigma being SigmaField of Omega,
      I being non empty real-membered set,
      MyFunc being ManySortedSigmaField of I,Sigma st
      MyFunc.1=Special_SigmaField1 &
      MyFunc.2=Special_SigmaField2 &
      MyFunc.3=Trivial-SigmaField {1,2,3,4} holds
        for eli being Element of I st eli=2 holds
    ex f being Function of Omega,REAL st
     f.1=k1 & f.2=k1 & f.3=k2 & f.4=k2 &
     f is (El_Filtration(eli,MyFunc),Borel_Sets)-random_variable-like
 proof
   let k1,k2 be Element of REAL;
   let Omega be non empty set;
   assume A0: Omega={1,2,3,4};
   let Sigma be SigmaField of Omega;
   let I be non empty real-membered set;
   let MyFunc be ManySortedSigmaField of I,Sigma;
   assume A2: MyFunc.1=Special_SigmaField1 & MyFunc.2=Special_SigmaField2 &
              MyFunc.3=Trivial-SigmaField {1,2,3,4};
   let eli be Element of I;
   assume A4: eli=2;
   consider f being Function of Omega,REAL such that
   A3: f.1=k1 & f.2=k1 & f.3=k2 & f.4=k2 by A0,MYF30;
   take f;
  set i=eli;
    for x being set holds f"x in El_Filtration(i,MyFunc)
    proof
     let x be set;
      f"x in MyFunc.i
      proof
       f"x in {{},{1,2},{3,4},{1,2,3,4}}
       proof
         f"x={} or f"x={1,2} or f"x={3,4} or f"x={1,2,3,4}
         proof
         per cases;
         suppose INITSUPP: k1 in x;
          per cases;
          suppose JSUPP1: k2 in x;
            for z being object holds z in {1,2,3,4} iff
              ex y being object st [z,y] in f & y in x
            proof
             let z be object;
             I1: z in {1,2,3,4} implies
                  ex y being object st [z,y] in f & y in x
             proof
              assume ASSJ0: z in {1,2,3,4}; then
              L1: z in dom f by FUNCT_2:def 1,A0;
               per cases by ASSJ0,ENUMSET1:def 2;
               suppose z=1 or z = 2; then
               [z,k1] in f & k1 in x by A3,INITSUPP,L1,FUNCT_1:1;
               hence thesis;
               end;
               suppose z=3 or z = 4; then
               f.z=k2 & k2 in x & z in dom f
                by A3,JSUPP1,ASSJ0,FUNCT_2:def 1,A0; then
               [z,k2] in f & k2 in x by FUNCT_1:1;
               hence thesis;
               end;
             end;
             (ex y being object st [z,y] in f & y in x) implies
              z in {1,2,3,4}
             proof
              given y being object such that ASSJ0: [z,y] in f & y in x;
              z in dom f & y=f.z by ASSJ0, FUNCT_1:1;
              hence thesis by A0;
             end;
            hence thesis by I1;
            end;
           hence thesis by RELAT_1:def 14;
          end;
          suppose JSUPP2: not k2 in x;
           for z being object holds
            z in {1,2} iff ex y being object st [z,y] in f & y in x
           proof
            let z be object;
            I1: z in {1,2} implies
                  ex y being object st [z,y] in f & y in x
            proof
             assume z in {1,2}; then
S2:          z = 1 or z = 2 by TARSKI:def 2; then
             z in Omega by ENUMSET1:def 2,A0; then
S1:          z in dom f by FUNCT_2:def 1;
             [z,k1] in f by S1,S2,A3,FUNCT_1:1;
             hence thesis by INITSUPP;
            end;
            (ex y being object st [z,y] in f & y in x) implies z in {1,2}
            proof
             given y being object such that
             M1: [z,y] in f & y in x;
             z in dom f by M1,FUNCT_1:1; then
             z=1 or z=2 or z=3 or z=4 by A0,ENUMSET1:def 2;
             hence thesis by JSUPP2,M1,FUNCT_1:1,A3,TARSKI:def 2;
             end;
            hence thesis by I1;
            end;
           hence thesis by RELAT_1:def 14;
           end;
          end;
         suppose INITSUPP: not k1 in x;
          per cases;
          suppose JSUPP1: k2 in x;
            for z being object holds z in {3,4} iff
              ex y being object st [z,y] in f & y in x
            proof
             let z be object;
             I1: z in {3,4} implies ex y being object st [z,y] in f & y in x
             proof
              assume z in {3,4}; then
              J1: z = 3 or z = 4 by TARSKI:def 2; then
              z in {1,2,3,4} by ENUMSET1:def 2; then
              z in dom f by FUNCT_2:def 1, A0; then
              [z,k2] in f by J1,A3,FUNCT_1:1;
              hence thesis by JSUPP1;
             end;
             (ex y being object st [z,y] in f & y in x) implies
              z in {3,4}
             proof
              given y being object such that ASSJ0: [z,y] in f & y in x;
                OO0: y=k1 or y=k2
                proof
                 z in dom f by ASSJ0,FUNCT_1:1; then
                 z = 1 or z = 2 or z = 3 or z = 4 by ENUMSET1:def 2,A0;
                 hence thesis by A3,ASSJ0,FUNCT_1:1;
                end;
                Z10: k2=f.z
                proof
                 per cases by OO0;
                 suppose y=k1;
                 hence thesis by INITSUPP,ASSJ0;
                 end;
                 suppose y=k2;
                 hence thesis by ASSJ0,FUNCT_1:1;
                 end;
                end;
                z=3 or z=4
                proof
                  assume ZZ1: z<>3 & z<>4;
                  z in dom f by ASSJ0,FUNCT_1:1;
                  hence thesis by Z10,ZZ1,A3,INITSUPP,
                    JSUPP1,ENUMSET1:def 2,A0;
                end;
             hence thesis by TARSKI:def 2;
             end;
            hence thesis by I1;
            end;
           hence thesis by RELAT_1:def 14;
          end;
          suppose JSUPP2: not k2 in x;
           for z being object holds
            z in {} iff ex y being object st [z,y] in f & y in x
           proof
            let z be object;
            (ex y being object st [z,y] in f & y in x) implies z in {}
            proof
             given y being object such that
              M1: [z,y] in f & y in x;
              z in dom f & y =f.z & y <> k2 by M1,FUNCT_1:1,JSUPP2;
             hence thesis by INITSUPP,M1,A3,A0,ENUMSET1:def 2;
             end;
            hence thesis;
           end;
           hence thesis by RELAT_1:def 14;
           end;
         end;
        end;
        hence thesis by ENUMSET1:def 2;
       end;
       hence thesis by A4,A2;
       end;
     hence thesis;
    end;
    hence thesis by A3;
 end;
