
theorem Th48:    :: :: Mchromatic:    :: even when n = 0 or n = 1 and then
                       :: Mycielskian n = 2 is compl(P_3) (Thanks Lorna)
                       :: and if we continue we have disconnected graphs.
for n being Nat, R being irreflexive NatRelStr of n
 holds chromatic# Mycielskian R = 1 + chromatic# R
proof
 let n be Nat, R be irreflexive NatRelStr of n;
 set cR = the carrier of R, iR = the InternalRel of R; set cnR = chromatic# R;
 set MR = Mycielskian R; set cnMR = chromatic# MR;
 set cMR = the carrier of MR, iMR = the InternalRel of MR;
A1: cR = Segm n by Def7;
A2: ex C being finite Coloring of MR st card C = 1+cnR proof
      consider C being finite Coloring of R such that
  A3: card C = cnR by Def3;
      defpred P[object,object] means
       ex D1 being set st D1 = $1 &
        $2 = { m+n where m is Element of NAT : m in D1 };
  A4: for e being object st e in C ex u being object st P[e,u]
       proof let e be object such that
       e in C;
         reconsider ee = e as set by TARSKI:1;
        take u = { m+n where m is Element of NAT : m in ee };
        thus thesis;
       end;
      consider r being Function such that dom r = C and
  A5: for e being object st e in C holds P[e,r.e] from CLASSES1:sch 1(A4);
      set D = { d \/ r.d where d is Element of C : d in C };
  A6: card D = card C proof
        per cases;
        suppose A7: D is empty;
           now assume C is non empty;
               then consider c being object such that
           A8: c in C;
         reconsider c as set by TARSKI:1;
               c \/ r.c in D by A8;
             hence contradiction by A7;
           end;
          hence thesis by A7;
        end;
        suppose A9: D is non empty;
            defpred R[object,object] means
            ex D1 being set st D1 = $1 & $2 = D1 \/ r.$1;
A10: for e being object st e in C ex u being object st R[e,u]
       proof let e be object such that
      e in C;
        reconsider ee=e as set by TARSKI:1;
        take u = ee \/ r.e;
        thus thesis;
       end;
            consider s being Function such that
        A11: dom s = C and
A12: for e being object st e in C holds R[e,s.e] from CLASSES1:sch 1(A10);
        A13: rng s c= D proof
             let y be object;
             assume y in rng s;
               then consider x being object such that
           A14: x in dom s and
           A15: y = s.x by FUNCT_1:def 3;
              reconsider x as set by TARSKI:1;
              R[x,s.x] by A14,A11,A12;
              then y = x \/ r.x by A15;
             hence y in D by A14,A11;
           end;
           then reconsider s as Function of C, D by A11,FUNCT_2:2;
            D c= rng s proof
              let x be object;
              assume x in D;
                then consider c being Element of C such that
              A16: x = c \/ r.c and
              A17: c in C;
              R[c,s.c] by A17,A12;
              then x = s.c by A16;
              hence x in rng s by A17,A11,FUNCT_1:def 3;
            end;
            then rng s = D by A13;
            then
         A18: s is onto by FUNCT_2:def 3;
            s is one-to-one proof
              let x1,x2 be object such that
            A19: x1 in dom s and
            A20: x2 in dom s and
            A21: s.x1 = s.x2;
             reconsider x1, x2 as set by TARSKI:1;
              R[x1,s.x1] by A19,A12;
              then
            A22: s.x1 = x1 \/ r.x1;
              R[x2,s.x2] by A20,A12;
              then
            A23: s.x2 = x2 \/ r.x2;
A24:            x1 c= x2 proof
                let x be object;
                assume A25: x in x1;
                  A26: x in s.x1 by A22,A25,XBOOLE_0:def 3;
                  per cases by A26,A21,A23,XBOOLE_0:def 3;
                  suppose x in x2;
                    hence thesis;
                  end;
                  suppose
A27:                  x in r.x2;
                    P[x2,r.x2] by A5,A20;
                    then x in { m+n where m is Element of NAT : m in x2 }
                                 by A27;
                    then consider m being Element of NAT such that
                  A28: x = m+n and m in x2;
                      m+n in Segm(0+n) by A25,A28,A19,A11,A1;
                      then m+n < 0+n by NAT_1:44;
                    hence thesis by XREAL_1:6;
                  end;
              end;
              x2 c= x1 proof
                let x be object;
                assume A29: x in x2;
                  A30: x in s.x2 by A23,A29,XBOOLE_0:def 3;
                  per cases by A30,A21,A22,XBOOLE_0:def 3;
                  suppose x in x1;
                    hence thesis;
                  end;
                  suppose
A31:                  x in r.x1;
                    P[x1,r.x1] by A5,A19;
                    then x in { m+n where m is Element of NAT : m in x1 }
                                 by A31;
                    then consider m being Element of NAT such that
                  A32: x = m+n and m in x1;
                      m+n in Segm(0+n) by A29,A32,A20,A11,A1;
                     then m+n < 0+n by NAT_1:44;
                    hence thesis by XREAL_1:6;
                  end;
              end;
       hence thesis by A24,XBOOLE_0:def 10;
            end;
         hence thesis by A18,A9,EULER_1:11;
        end;
      end;
       then
  A33: D is finite;
      set E = D \/ {{2*n}};
  A34: union E c= cMR proof
         let x be object;
         assume x in union E;
         then consider Y being set such that
       A35: x in Y and
       A36: Y in E by TARSKI:def 4;
         per cases by A36,XBOOLE_0:def 3;
         suppose Y in D;
           then consider d being Element of C such that
         A37: Y = d \/ r.d and
         A38: d in C;
             P[d,r.d] by A38,A5;
             then
         A39: r.d = { m+n where m is Element of NAT : m in d };
           per cases by A35,A37,XBOOLE_0:def 3;
           suppose A40: x in d;
             then x in Segm n by A38,A1;
             then reconsider a = x as Nat;
                a in Segm n by A40,A38,A1;
                then a < n by NAT_1:44;
                then a+0 < n+n by XREAL_1:8;
                then a < 2*n+1 by NAT_1:13;
                then a in Segm(2*n+1) by NAT_1:44;
             hence x in cMR by Def7;
           end;
           suppose x in r.d;
             then consider m being Element of NAT such that
           A41: x = m+n and
           A42: m in d by A39;
                 m in Segm n by A42,A38,A1;
               then m < n by NAT_1:44;
               then m+n < n+n by XREAL_1:6;
               then m+n < 2*n + 1 by NAT_1:13;
               then x in Segm(2*n+1) by A41,NAT_1:44;
             hence x in cMR by Def7;
           end;
         end;
         suppose Y in {{2*n}};
           then Y = {2*n} by TARSKI:def 1;
           then A43: x = 2*n by A35,TARSKI:def 1;
             2*n < 2*n+1 by NAT_1:13;
             then 2*n in Segm(2*n+1) by NAT_1:44;
           hence x in cMR by A43,Def7;
         end;
       end;
  A44: E c= bool cMR proof
       let X be object;
    reconsider XX=X as set by TARSKI:1;
       assume A45: X in E;
           XX c= cMR proof
             let x be object;
             assume x in XX;
             then x in union E by A45,TARSKI:def 4;
             hence x in cMR by A34;
           end;
         hence X in bool cMR;
       end;
  A46: union E = cMR proof
       thus union E c= cMR by A34;
       thus cMR c= union E proof
         let x be object;
         assume x in cMR;
            then A47: x in Segm(2*n+1) by Def7;
            then reconsider a = x as Nat;
            a < 2*n+1 by A47,NAT_1:44;
            then A48: a <= 2*n by NAT_1:13;
         per cases;
         suppose a < n;
           then a in Segm n by NAT_1:44;
           then a in union C by A1,EQREL_1:def 4;
            then consider c being set such that
         A49: a in c and
         A50: c in C by TARSKI:def 4;
         A51: x in c \/ r.c by A49,XBOOLE_0:def 3;
               c \/ r.c in D by A50;
               then c \/ r.c in E by XBOOLE_0:def 3;
             hence x in union E by A51,TARSKI:def 4;
         end;
         suppose A52: a >= n;
           per cases by A48,XXREAL_0:1;
           suppose A53: a < n+n;
             consider b being Nat such that
           A54: a = n + b by A52,NAT_1:10;
               reconsider b as Element of NAT by ORDINAL1:def 12;
               b < n by A54,A53,XREAL_1:6;
               then b in Segm n by NAT_1:44;
               then b in union C by EQREL_1:def 4,A1;
               then consider c being set such that
           A55: b in c and
           A56: c in C by TARSKI:def 4;
               P[c,r.c] by A56,A5;
            then r.c = { m+n where m is Element of NAT : m in c };
               then a in r.c by A55,A54;
               then A57: x in c \/ r.c by XBOOLE_0:def 3;
               c \/ r.c in D by A56;
               then c \/ r.c in E by XBOOLE_0:def 3;
             hence x in union E by A57,TARSKI:def 4;
           end;
           suppose a = 2*n;
             then A58: a in {2*n} by TARSKI:def 1;
               {2*n} in {{2*n}} by TARSKI:def 1;
               then {2*n} in E by XBOOLE_0:def 3;
             hence x in union E by A58,TARSKI:def 4;
           end;
         end;
       end;
      end;
      now let A be Subset of cMR such that
      A59: A in E;
       thus A<>{} proof
         per cases by A59,XBOOLE_0:def 3;
         suppose A in D;
           then consider d being Element of C such that
         A60: A = d \/ r.d and
         A61: d in C;
             d <> {} by A61;
           hence thesis by A60;
         end;
         suppose A in {{2*n}};
           hence thesis by TARSKI:def 1;
         end;
       end;
       let B be Subset of cMR such that
      A62: B in E;
       assume A63: A <> B;
       assume A meets B;
         then consider x being object such that
       A64: x in A and
       A65: x in B by XBOOLE_0:3;
         per cases by A59,A62,XBOOLE_0:def 3;
         suppose that A66: A in D and A67: B in D;
             consider d being Element of C such that
         A68: A = d \/ r.d and
         A69: d in C by A66;
             consider e being Element of C such that
         A70: B = e \/ r.e and
         A71: e in C by A67;
           per cases by A68,A70,A64,A65,XBOOLE_0:def 3;
           suppose x in d & x in e;
               then d meets e by XBOOLE_0:3;
               then d = e by A69,A71,EQREL_1:def 4;
             hence contradiction by A68,A70,A63;
           end;
           suppose that A72: x in d and A73: x in r.e;
              P[e,r.e] by A71,A5;
              then x in { m+n where m is Element of NAT : m in e }
                      by A73;
               then consider mb being Element of NAT such that
             A74: x = mb+n and mb in e;
               mb+n in Segm(n+0) by A74,A72,A69,A1;
              then mb+n < n+0 by NAT_1:44;
             hence contradiction by XREAL_1:6;
           end;
           suppose that A75: x in r.d and A76: x in e;
              P[d,r.d] by A69,A5;
              then x in { m+n where m is Element of NAT : m in d }
                  by A75;
               then consider ma being Element of NAT such that
             A77: x = ma+n and ma in d;
                ma+n in Segm(n+0) by A77,A76,A71,A1;
              then ma+n < n+0 by NAT_1:44;
             hence contradiction by XREAL_1:6;
           end;
           suppose that A78: x in r.d and A79: x in r.e;
               P[d,r.d] by A69,A5;
               then x in { m+n where m is Element of NAT : m in d }
                  by A78;
               then consider ma being Element of NAT such that
             A80: x = ma+n and
             A81: ma in d;
               P[e,r.e] by A71,A5;
               then x in { m+n where m is Element of NAT : m in e }
                   by A79;
               then consider mb being Element of NAT such that
             A82: x = mb+n and
             A83: mb in e;
               d meets e by A80,A82,A81,A83,XBOOLE_0:3;
               then d = e by A69,A71,EQREL_1:def 4;
             hence contradiction by A68,A70,A63;
           end;
         end;
         suppose that A84: A in D and A85: B in {{2*n}};
              B = {2*n} by A85,TARSKI:def 1;
             then A86: x = 2*n by A65,TARSKI:def 1;
             consider d being Element of C such that
         A87: A = d \/ r.d and
         A88: d in C by A84;
             per cases by A87,A64,XBOOLE_0:def 3;
             suppose x in d;
               then n+n in Segm n by A88,A1,A86;
               then n+n < n by NAT_1:44;
               hence contradiction by NAT_1:11;
             end;
             suppose
A89:             x in r.d;
               P[d,r.d] by A88,A5;
               then x in { m+n where m is Element of NAT : m in d }
                 by A89;
               then consider m being Element of NAT such that
             A90: x = m+n and
             A91: m in d;
                 m in n by A91,A88,A1;
               hence contradiction by A90,A86;
             end;
         end;
         suppose that A92: A in {{2*n}} and A93: B in D;
             A = {2*n} by A92,TARSKI:def 1;
             then A94: x = 2*n by A64,TARSKI:def 1;
             consider d being Element of C such that
         A95: B = d \/ r.d and
         A96: d in C by A93;
             per cases by A95,A65,XBOOLE_0:def 3;
             suppose x in d;
               then n+n in Segm n by A96,A1,A94;
               then n+n < n by NAT_1:44;
               hence contradiction by NAT_1:11;
             end;
             suppose
A97:            x in r.d;
              P[d,r.d] by A96,A5;
               then x in { m+n where m is Element of NAT : m in d }
                 by A97;
               then consider m being Element of NAT such that
             A98: x = m+n and
             A99: m in d;
                 m in n by A99,A96,A1;
               hence contradiction by A98,A94;
             end;
         end;
         suppose A in {{2*n}} & B in {{2*n}};
           then A = {2*n} & B = {2*n} by TARSKI:def 1;
          hence contradiction by A63;
         end;
      end;
      then reconsider E as a_partition of cMR by A44,A46,EQREL_1:def 4;
      now
        let x be set;
        assume A100: x in E;
        per cases by A100,XBOOLE_0:def 3;
        suppose x in D;
           then consider d being Element of C such that
        A101: x = d \/ r.d and
        A102: d in C;
             reconsider d as Subset of R by A102;
            P[d,r.d] by A102,A5;
            then
        A103: r.d = { m+n where m is Element of NAT : m in d };
        A104: x c= cMR proof
             let a be object;
             assume A105: a in x;
             per cases by A101,A105,XBOOLE_0:def 3;
             suppose A106: a in d;
               then a in Segm n by A1;
               then reconsider ap1 = a as Nat;
              ap1 in Segm n by A106,A1;
              then
             A107: ap1 < n by NAT_1:44;
                 n <= n+n by NAT_1:12;
                 then ap1 < n+n by A107,XXREAL_0:2;
                 then ap1 < 2*n+1 by NAT_1:13;
                 then a in Segm(2*n+1) by NAT_1:44;
               hence a in cMR by Def7;
             end;
             suppose a in r.d;
                 then consider am being Element of NAT such that
             A108: a = am+n and
             A109: am in d by A103;
                 am in Segm n by A109,A1;
                then am < n by NAT_1:44;
                 then am+n < n+n by XREAL_1:6;
                 then am+n < 2*n+1 by NAT_1:13;
                 then a in Segm(2*n+1) by A108,NAT_1:44;
               hence a in cMR by Def7;
             end;
            end;

        A110: now let x be Nat;
               assume x in r.d;
               then consider m being Element of NAT such that
             A111: x = m+n and
             A112: m in d by A103;
               thus n <= x by A111,NAT_1:11;
                 m in Segm n by A112,A1;
                 then m < n by NAT_1:44;
               then m+n < n+n by XREAL_1:6;
               hence x < 2*n by A111;
             end;
        A113: d is stable by DILWORTH:def 12;
           now
             let a, b be Element of MR such that
           A114: a in x and
           A115: b in x and
           A116: a <> b and
           A117: a <= b or b <= a;
           A118: [a,b] in iMR or [b,a] in iMR by A117,ORDERS_2:def 5;
                per cases by A114,A115,A101,XBOOLE_0:def 3;
             suppose A119: a in d & b in d;
               then A120: [a,b] in iR or [b,a] in iR by A1,A118,Th40;
               reconsider a, b as Element of R by A119;
               a <= b or b <= a by A120,ORDERS_2:def 5;
              hence contradiction by A119,A116,A113;
             end;
             suppose that A121: a in d and A122: b in r.d;
                 consider bm being Element of NAT such that
             A123: b = bm+n and
             A124: bm in d by A122,A103;
                 a in Segm n by A121,A1;
                 then reconsider ap1 = a as Nat;
             A125: [ap1,bm] in iR or [bm,ap1] in iR by A118,Th42,Th43,A123,A121
,A1;
                reconsider bmp1 = bm, a as Element of R by A124,A121;
             A126: bmp1 <= a or a <= bmp1 by A125,ORDERS_2:def 5;
                bmp1 <> a by A125,A121,NECKLACE:def 5;
               hence contradiction by A126,A124,A121,A113;
             end;
             suppose that A127: a in r.d and A128: b in d;
                 consider am being Element of NAT such that
             A129: a = am+n and
             A130: am in d by A127,A103;
                 b in Segm n by A128,A1;
               then reconsider bp1 = b as Nat;
             A131: [am,bp1] in iR or [bp1,am] in iR by A118,Th42,Th43,A129,A128
,A1;
                 reconsider amp1 = am, b as Element of R by A130,A128;
             A132: amp1 <= b or b <= amp1 by A131,ORDERS_2:def 5;
                amp1 <> b by A131,A128,NECKLACE:def 5;
               hence contradiction by A132,A130,A128,A113;
             end;
             suppose that A133: a in r.d and A134: b in r.d;
                 consider am being Element of NAT such that
             A135: a = am+n and am in d by A133,A103;
                 consider bm being Element of NAT such that
             A136: b = bm+n and bm in d by A134,A103;
                 n <= am+n & am+n < 2*n & n <= bm+n & bm+n < 2*n
                    by A133,A134,A135,A136,A110;
               hence contradiction by A135,A136,A118,Th38;
             end;
           end;
          hence x is StableSet of MR by A104,DILWORTH:def 2;
        end;
        suppose x in {{2*n}};
          then A137: x = {2*n} by TARSKI:def 1;
           2*n < 2*n+1 by NAT_1:13;
           then 2*n in Segm(2*n+1) by NAT_1:44;
           then A138: 2*n in cMR by Def7;
                x is Subset of MR by A137,A138,SUBSET_1:33;
          hence x is StableSet of MR by A137;
        end;
      end;
      then reconsider E as Coloring of MR by DILWORTH:def 12;
      take E;
      now assume {2*n} in D;
          then consider d being Element of C such that
      A139: {2*n} = d \/ r.d and
      A140: d in C;
      A141: 2*n in d \/ r.d by A139,TARSKI:def 1;
        per cases by A141,XBOOLE_0:def 3;
        suppose  2*n in d;
            then 2*n in cR by A140;
            then 2*n in Segm n by Def7;
            then n+n < n by NAT_1:44;
          hence contradiction by NAT_1:11;
        end;
        suppose
A142:        2*n in r.d;
          P[d,r.d] by A140,A5;
          then 2*n in { m+n where m is Element of NAT : m in d }
             by A142;
          then consider m being Element of NAT such that
        A143: 2*n = m+n and
        A144: m in d;
            m in cR by A140,A144;
            then m in n by Def7;
          hence contradiction by A143;
        end;
      end;
      hence card E = 1 + cnR by A6,A33,A3,CARD_2:41;
  end;
  for C being finite Coloring of MR holds 1+cnR <= card C proof
       :: Is Lorna's construction simpler to formalise?
       :: (Showing that the color of 2*n cannot appear in R)
    let E be finite Coloring of MR;
    assume 1+cnR > card E;
      then A145: cnR >= card E by NAT_1:13;
      A146: cnMR <= card E by Def3;
      then A147: cnMR <= cnR by A145,XXREAL_0:2;
           n <= n+n by NAT_1:11;
        then n < 2*n+1 by NAT_1:13;
        then Segm n c= Segm(2*n+1) by NAT_1:39;
        then reconsider S = n as Subset of MR by Def7;
      A148: R = subrelstr S by Th45;
        then cnR <= cnMR by Th47;
      then cnR = cnMR by A147,XXREAL_0:1;
      then A149: card E = cnR by A145,A146,XXREAL_0:1;
        reconsider C = E |(S) as Coloring of R by A148,Th10;
      A150: card C >= cnR by Def3;
      A151:  card C <= card E by Th8;
      then A152: card C = cnR by A149,A150,XXREAL_0:1;
           2*n < 2*n+1 by NAT_1:13;
      then 2*n in Segm(2*n+1) by NAT_1:44;
      then 2*n in cMR by Def7;
      then 2*n in union E by EQREL_1:def 4;
      then consider e being set such that
   A153: 2*n in e and
   A154: e in E by TARSKI:def 4;
        reconsider e as Subset of MR by A154;
        reconsider n2 = 2*n as Element of MR by A153,A154;
        set se = e /\ S;
       e meets S by A149,A152,A154,Th9;
       then A155: se in C by A154;
         then consider mp1 being Element of R such that
   A156: mp1 in se  and
   A157: for d being Element of C st d <> se
         ex w being Element of R st w in Adjacent(mp1) & w in d
              by A151,A149,A150,Th31,XXREAL_0:1;
      mp1 in Segm n by A156,A155;
      then reconsider m = mp1 as Nat;
      set mn = m+n;
      A158: 0+n <= mn by XREAL_1:6;
         m in Segm n by A156,A155;
         then m < n by NAT_1:44;
      then A159: mn < n+n by XREAL_1:6;
      then mn < 2*n+1 by NAT_1:13;
      then A160: mn in Segm(2*n+1) by NAT_1:44;
      then mn in cMR by Def7;
      then mn in union E by EQREL_1:def 4;
      then consider f being set such that
   A161: mn in f and
   A162: f in E by TARSKI:def 4;
      reconsider f as Subset of MR by A162;
      reconsider mnp1 = mn as Element of MR by A160,Def7;
   A163: now assume A164: e <> f;
          set sf = f /\ S;
          f meets S by A149,A152,A162,Th9;
          then A165: sf in C by A162;
      A166: sf c= f by XBOOLE_1:17;
          now
           assume A167: sf = se;
              sf <> {} by A165;
              then consider x being object such that
           A168: x in sf by XBOOLE_0:def 1;
               se c= e by XBOOLE_1:17;
               then e meets f by A167,A168,A166,XBOOLE_0:3;
           hence contradiction by A164,A162,A154,EQREL_1:def 4;
          end;
          then consider wp1 being Element of R such that
      A169: wp1 in Adjacent(mp1) and
      A170: wp1 in sf by A165,A157;
          wp1 in Segm n by A170,A165;
         then reconsider w = wp1 as Nat;
       w in Segm n by A170,A165;
       then
      A171: w < n by NAT_1:44;
          mp1 < wp1 or wp1 < mp1 by A169,Def6;
          then mp1 <= wp1 or wp1 <= mp1 by ORDERS_2:def 6;
          then [m, w] in iR or [w, m] in iR by ORDERS_2:def 5;
          then A172: [m+n, w] in iMR or [w, m+n] in iMR by Th41;
          reconsider wp2 = wp1 as Element of MR by A170;
          f is stable by A162,DILWORTH:def 12;
          then not wp2 <= mnp1 & not mnp1 <= wp2
                              by A171,A158,A170,A166,A161;
       hence contradiction by A172,ORDERS_2:def 5;
      end;
   A173: [mn,2*n] in iMR by A159,A158,Th44;
      e is stable by A154,DILWORTH:def 12;
      then not mnp1 <= n2 & not n2 <= mnp1 by A153,A161,A163,A159;
    hence contradiction by A173,ORDERS_2:def 5;
  end;
 hence chromatic# Mycielskian R = 1 + chromatic# R by A2,Def3;
end;
