
theorem :: The Connection Between Tournament Spaces and Orders
  for P being non empty PreferenceSpace holds
    P is tournament-like iff
      CharRel P is connected antisymmetric total
    proof
      let P be non empty PreferenceSpace;
A1:   P is tournament-like implies CharRel P is connected antisymmetric
        total
      proof
        assume
Z0:     P is tournament-like;
w0:     the PrefRel of P is asymmetric by PrefDef;
        for x, y being object st x <> y & x in field (CharRel P) &
          y in field (CharRel P) holds [x,y] in CharRel P or [y,x] in CharRel P
        proof
          let x,y be object;
          assume
W1:       x <> y;
t1:       (the PrefRel of P) \/ (the PrefRel of P)~ \/
            (id the carrier of P) \/ {}
            = nabla the carrier of P by Z0,PrefDef;
T2:       not [x,y] in id the carrier of P & not [y,x] in id the carrier of P
            by W1, RELAT_1:def 10;
          assume x in field (CharRel P) & y in field (CharRel P); then
          [x,y] in [:the carrier of P, the carrier of P:] &
            [y,x] in [:the carrier of P, the carrier of P:]
              by ZFMISC_1:87; then
          [x,y] in (the PrefRel of P) \/ (the PrefRel of P)~ &
            [y,x] in (the PrefRel of P) \/ (the PrefRel of P)~
              by t1,T2, XBOOLE_0:def 3; then
          [x,y] in the PrefRel of P or [x,y] in (the PrefRel of P)~ &
            [y,x] in the PrefRel of P or [y,x] in (the PrefRel of P)~
              by XBOOLE_0:def 3; then
          [x,y] in the PrefRel of P or [y,x] in the PrefRel of P
            by RELAT_1:def 7;
          hence thesis by XBOOLE_0:def 3;
        end;
        hence CharRel P is connected by LemCon;
        dom CharRel P = dom (the PrefRel of P) \/ dom (the ToleranceRel of P)
            by XTUPLE_0:23
          .= the carrier of P by XBOOLE_1:12,Z0;
        hence thesis by w0,PARTFUN1:def 2,Z0,Lemma16;
      end;
      CharRel P is connected total antisymmetric implies
        P is tournament-like
      proof
        assume
S1:     CharRel P is connected;
        assume
S3:     CharRel P is total;
        assume
S2:     CharRel P is antisymmetric;
        set PP = the PrefRel of P, J = the ToleranceRel of P,
          X = the carrier of P, I = the InternalRel of P;
        set RT = PP \/ J;
KK:     RT = CharRel P;
kk:     dom RT = X by PARTFUN1:def 2,S3; then
k1:     dom RT \/ rng RT = X by XBOOLE_1:12;
B0:     (PP \/ J) /\ (PP \/ J)~ c= id dom RT by RELAT_2:22,S2;
        for x,y being object holds
          [x,y] in id X implies [x,y] in (PP \/ J) /\ (PP \/ J)~
        proof
          let x,y be object;
          assume
n1:       [x,y] in id X; then
N1:       x in X & x = y by RELAT_1:def 10;
          assume not [x,y] in (PP \/ J) /\ (PP \/ J)~; then
          not ([x,y] in (PP \/ J) & [x,y] in (PP \/ J)~)
            by XBOOLE_0:def 4; then
          not ([x,y] in (PP \/ J) & [x,y] in (PP~ \/ J~)) by RELAT_1:23; then
          not (([x,y] in PP or [x,y] in J) & ([x,y] in PP~ or [x,y] in J~))
            by XBOOLE_0:def 3; then
N2:       not [x,x] in J by N1,RELAT_1:def 7;
          J is total by PrefDef; then
N3:       dom J = X by PARTFUN1:def 2;
          field J = dom J \/ rng J
            .= X by N3,XBOOLE_1:12; then
N4:       x in field J by n1,RELAT_1:def 10;
          J is reflexive by PrefDef;
          hence contradiction by N2,N4,RELAT_2:def 1,def 9;
        end; then
        id X c= (PP \/ J) /\ (PP \/ J)~ by RELAT_1:def 3; then
B1:     (PP \/ J) /\ (PP \/ J)~ = id X by B0,XBOOLE_0:def 10,kk;
Y1:     (PP \/ J)~ = PP~ \/ J~ by RELAT_1:23;
        J is symmetric by PrefDef; then
        (PP \/ J) /\ (PP~ \/ J) = id X by B1,Y1,RELAT_2:13; then
Y3:     PP /\ PP~ \/ J = id X by XBOOLE_1:24;
        PP is asymmetric by PrefDef; then
a3:     PP /\ PP~ = {} by Lemma17,XBOOLE_0:def 7;
        [:field RT,field RT:] = RT \/ RT~ \/ id field RT by S1,ConField; then
df:     [:X,X:] = J \/ (J \/ (PP \/ RT~)) by XBOOLE_1:4,a3,k1,Y3
               .= (J \/ J) \/ (PP \/ RT~) by XBOOLE_1:4
               .= RT \/ RT~ by XBOOLE_1:4;
        I = RT` /\ (RT~)` by KK,Th2; then
        I = ({}[:X,X:])`` by df,XBOOLE_1:53
         .= {}[:X,X:];
        hence thesis by a3,Y3;
      end;
      hence thesis by A1;
    end;
