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

theorem Th25:
  [a,b] in ClosedProd(R,A,B)\OpenProd(R,A,B) iff
     a in Day(R,A) & b in Day(R,A)&
     (born(R,a) = A & born(R,b) = B or born(R,a) = B & born(R,b) = A)
proof
  thus [a,b] in ClosedProd(R,A,B)\OpenProd(R,A,B) implies
    a in Day(R,A) & b in Day(R,A)&
    (born(R,a) = A & born(R,b) = B or born(R,a) = B & born(R,b) = A)
  proof
    assume A1:[a,b] in ClosedProd(R,A,B)\OpenProd(R,A,B);
    then A2:[a,b] in ClosedProd(R,A,B) & not [a,b] in OpenProd(R,A,B)
    by XBOOLE_0:def 5;
    A3:a in Day(R,A) & b in Day(R,A) by ZFMISC_1:87,A1;
    then per cases by A2,Def10;
    suppose born(R,a) in A & born(R,b) in A;
      hence thesis by A2,A3,Def9;
    end;
    suppose A4:born(R,a) = A & born(R,b) c= B;
      then not born(R,b) in B by A2,A3,Def9;
      then B c= born(R,b) by ORDINAL1:16;
      hence thesis by A1, ZFMISC_1:87,A4,XBOOLE_0:def 10;
    end;
    suppose A5:born(R,a) c= B & born(R,b) = A;
      then not born(R,a) in B by A2,A3,Def9;
      then B c= born(R,a) by ORDINAL1:16;
      hence thesis by A1,ZFMISC_1:87,A5,XBOOLE_0:def 10;
    end;
  end;
  assume that A6: a in Day(R,A) & b in Day(R,A) and
  A7:  born(R,a) = A & born(R,b) = B or born(R,a) = B & born(R,b) = A;
  A8:not [a,b] in OpenProd(R,A,B)
  proof
    assume [a,b] in OpenProd(R,A,B);
    then (born(R,a) in A & born(R,b) in A) or
    (born(R,a) = A & born(R,b) in B) or
    (born(R,a) in B & born(R,b) = A) by A6,Def9;
    hence thesis by A7;
  end;
  [a,b] in ClosedProd(R,A,B) by A6,A7,Def10;
  hence thesis by A8,XBOOLE_0:def 5;
end;
