reserve A,A1,A2,B,B1,B2,C,O for Ordinal,
      R,S for Relation,
      a,b,c,o,l,r for object;

theorem Th27:
  (ex R st R preserves_No_Comparison_on OpenProd(R,A,{}) &
       R c= OpenProd(R,A,{}))
    implies ex S st S preserves_No_Comparison_on ClosedProd(S,A,B) &
             S c= ClosedProd(S,A,B)
proof
  assume A1:ex R be Relation st R preserves_No_Comparison_on OpenProd(R,A,{})&
  R c= OpenProd(R,A,{});
  defpred P[Ordinal] means
  ex R be Relation st R preserves_No_Comparison_on ClosedProd(R,A,$1) &
  R c= ClosedProd(R,A,$1);
  A2: for D be Ordinal st for C be Ordinal st C in D holds P[C] holds P[D]
  proof
    let D be Ordinal such that A3: for C be Ordinal st C in D holds P[C];
    per cases;
    suppose A4:D={};
      consider R be Relation such that
      A5:R preserves_No_Comparison_on OpenProd(R,A,{}) &
      R c= OpenProd(R,A,{}) by A1;
      ex S be Relation st R c= S &
      S preserves_No_Comparison_on ClosedProd(S,A,{}) &
      S c= ClosedProd(S,A,{}) by Th26,A5;
      hence thesis by A4;
    end;
    suppose A6: D<>{};
      defpred Q[object,object] means for B be Ordinal st B =$1
      ex R be Relation st $2=R &
      R preserves_No_Comparison_on ClosedProd(R,A,B) &
      R c= ClosedProd(R,A,B);
      A7:for e be object st e in D ex u be object st Q[e,u]
      proof
        let e be object such that A8: e in D;
        reconsider E=e as Ordinal by A8;
        consider R be Relation such that
        A9: R preserves_No_Comparison_on ClosedProd(R,A,E) &
          R c= ClosedProd(R,A,E) by A3,A8;
        take R;
        thus thesis by A9;
      end;
      consider Lr be Function such that A10:dom Lr = D &
      for e being object st e in D holds Q[e,Lr.e] from CLASSES1:sch 1(A7);
      reconsider Lr as Sequence by A10,ORDINAL1:def 7;
      defpred R[object,object] means
      for B be Ordinal, R be Relation st B =$1 & R = Lr.B holds
      $2 = ClosedProd(R,A,B);
      A11:for e be object st e in D ex u be object st R[e,u]
      proof
        let e be object such that A12: e in D;
        reconsider E=e as Ordinal by A12;
        consider R be Relation such that
        A13:Lr.E=R & R preserves_No_Comparison_on ClosedProd(R,A,E) &
          R c= ClosedProd(R,A,E)by A12,A10;
        take ClosedProd(R,A,E);
        thus thesis by A13;
      end;
      consider Lp be Function such that A14:dom Lp = D &
      for e being object st e in D holds R[e,Lp.e] from CLASSES1:sch 1(A11);
      reconsider Lp as Sequence by A14,ORDINAL1:def 7;
      A15:for E be Ordinal st E in dom Lp holds
      (ex a,b be Ordinal,R be Relation st R=Lr.E & Lp.E=ClosedProd(R,a,b)) &
      Lr.E is Relation &
      (for R be Relation st R=Lr.E holds
       R preserves_No_Comparison_on Lp.E & R c= Lp.E)
      proof
        let E be Ordinal such that A16: E in dom Lp;
        consider R be Relation such that
        A17:Lr.E=R & R preserves_No_Comparison_on ClosedProd(R,A,E) &
        R c= ClosedProd(R,A,E) by A16,A10,A14;
        thus thesis by A17,A16,A14;
      end;
      then reconsider RR = union rng Lr as Relation by A14,A10,Th24;
      A18: RR preserves_No_Comparison_on union rng Lp & RR c= union rng Lp
        by A15,A14,A10,Th24;
      A19:union rng Lp c= OpenProd(RR,A,D)
      proof
        let x be object;
        assume x in union rng Lp;
        then consider Y be set such that
        A20:x in Y & Y in rng Lp by TARSKI:def 4;
        consider E be object such that
        A21:  E in dom Lp & Y = Lp.E by A20,FUNCT_1:def 3;
        reconsider E as Ordinal by A21;
        reconsider R=Lr.E as Relation by A21,A15;
        A22:Lp.E = ClosedProd(R,A,E) by A21,A14;
        then RR /\ [:BeforeGames A,BeforeGames A:] =
        R /\ [:BeforeGames A,BeforeGames A:] by A15,A14,A10,Th24,A21;
        then A23:x in ClosedProd(RR,A,E) by A20,A21,A22,Th15;
        ClosedProd(RR,A,E) c= OpenProd(RR,A,D) by Th18,A21,A14;
        hence thesis by A23;
      end;
      OpenProd(RR,A,D) c=union rng Lp
      proof
        let x,y be object such that A24:[x,y] in OpenProd(RR,A,D);
        A25: x in Day(RR,A) & y in Day(RR,A) by A24,ZFMISC_1:87;
        then per cases by A24,Def9;
        suppose A26: born(RR,x) in A & born(RR,y) in A;
          consider B be object such that A27: B in D by A6,XBOOLE_0:def 1;
          reconsider B as Ordinal by A27;
          consider R be Relation such that
          A28:Lr.B=R & R preserves_No_Comparison_on ClosedProd(R,A,B) &
          R c= ClosedProd(R,A,B) by A27,A10;
          A29: Lp.B = ClosedProd(R,A,B) by A27,A28,A14;
          then RR /\ [:BeforeGames A,BeforeGames A:] =
          R /\ [:BeforeGames A,BeforeGames A:]
            by A27,A28,A15,A14,A10,Th24;
          then A30:ClosedProd(RR,A,B) = ClosedProd(R,A,B) by Th15;
          A31:[x,y] in ClosedProd(RR,A,B) by A26,A25,Def10;
          Lp.B in rng Lp by A27,A14,FUNCT_1:def 3;
          hence thesis by A30,A29,A31,TARSKI:def 4;
        end;
        suppose A32: born(RR,x) = A & born(RR,y) in D;
          set B=born(RR,y);
          consider R be Relation such that
          A33:Lr.B=R & R preserves_No_Comparison_on ClosedProd(R,A,B) &
          R c= ClosedProd(R,A,B) by A32,A10;
          A34: Lp.B = ClosedProd(R,A,B) by A33,A32,A14;
          then RR /\ [:BeforeGames A,BeforeGames A:] =
          R /\ [:BeforeGames A,BeforeGames A:]
          by A32,A33,A15,A14,A10,Th24;
          then A35:ClosedProd(RR,A,B) = ClosedProd(R,A,B) by Th15;
          A36:[x,y] in ClosedProd(RR,A,B) by A32,A25,Def10;
          Lp.B in rng Lp by A32,A14,FUNCT_1:def 3;
          hence thesis by A35,A34,A36,TARSKI:def 4;
        end;
        suppose A37: born(RR,x) in D & born(RR,y) = A;
          set B=born(RR,x);
          consider R be Relation such that
          A38:Lr.B=R & R preserves_No_Comparison_on ClosedProd(R,A,B) &
          R c= ClosedProd(R,A,B) by A37,A10;
          A39: Lp.B = ClosedProd(R,A,B) by A38,A37,A14;
          then RR /\ [:BeforeGames A,BeforeGames A:] =
          R /\ [:BeforeGames A,BeforeGames A:]
          by A37,A38,A15,A14,A10,Th24;
          then A40:ClosedProd(RR,A,B) = ClosedProd(R,A,B) by Th15;
          A41:[x,y] in ClosedProd(RR,A,B) by A37,A25,Def10;
          Lp.B in rng Lp by A37,A14,FUNCT_1:def 3;
          hence thesis by A40,A39,A41,TARSKI:def 4;
        end;
      end;
      then OpenProd(RR,A,D) = union rng Lp by A19,XBOOLE_0:def 10;
      then ex R be Relation st RR c= R &
      R preserves_No_Comparison_on ClosedProd(R,A,D) &
      R c= ClosedProd(R,A,D) by A18,Th26;
      hence thesis;
    end;
  end;
  for D be Ordinal holds P[D] from ORDINAL1:sch 2(A2);
  hence thesis;
end;
