
theorem Th99:
  for G being _finite chordal _Graph, a, b being Vertex of G st a
<> b & not a,b are_adjacent for S being VertexSeparator of a,b st S is minimal
  for H being removeVertices of G,S, a1 being Vertex of H st a = a1 ex c being
  Vertex of G st c in H.reachableFrom(a1) & for x being Vertex of G st x in S
  holds c,x are_adjacent
proof
  let G be _finite chordal _Graph, a, b be Vertex of G such that
A1: a <> b and
A2: not a,b are_adjacent;
  let S be VertexSeparator of a,b such that
A3: S is minimal;
  let H be removeVertices of G,S, a1 be Vertex of H such that
A4: a = a1;
  assume
A5: for c being Vertex of G holds not c in H.reachableFrom(a1) or ex x
  being Vertex of G st x in S & not c,x are_adjacent;
  per cases;
  suppose
    S is empty;
    then not ex x being Vertex of G st x in S & not a,x are_adjacent;
    hence contradiction by A4,A5,GLIB_002:9;
  end;
  suppose
    S is non empty;
    then reconsider S as non empty Subset of the_Vertices_of G;
    set A = H.reachableFrom(a1);
    deffunc F(set) = card (G.AdjacentSet({$1}) /\ S);
    set M = { F(x) where x is Vertex of G : x in A };
A6: now
      let x be object;
      assume x in M;
      then ex y being Vertex of G st x = card (G.AdjacentSet({y}) /\ S) & y
      in A;
      hence x is natural;
    end;
A7: A is finite;
A8: M is finite from FRAENKEL:sch 21(A7);
    a in A by A4,GLIB_002:9;
    then card (G.AdjacentSet({a}) /\ S) in M;
    then reconsider M as finite non empty natural-membered set by A8,A6,
MEMBERED:def 6;
    set Ga = the inducedSubgraph of H,A;
A9: the_Vertices_of Ga = A by GLIB_000:def 37;
    max M in M by XXREAL_2:def 8;
    then consider c being Vertex of G such that
A10: max M = card (G.AdjacentSet({c}) /\ S) and
A11: c in A;
    set gcs = G.AdjacentSet({c}) /\ S;
A12: A/\S = {} by A1,A2,Th74;
    set Gs = the inducedSubgraph of G,S;
    set tVG = the_Vertices_of G;
A13: 2*0+1 is odd;
    not a in S by A1,A2,Def8;
    then
A14: tVG\S is non empty Subset of tVG by XBOOLE_0:def 5;
    the_Vertices_of H c= tVG;
    then reconsider A as non empty Subset of tVG by XBOOLE_1:1;
    now
      let x be object such that
A15:  x in A;
      not x in S by A12,A15,XBOOLE_0:def 4;
      hence x in tVG \ S by A15,XBOOLE_0:def 5;
    end;
    then A c= tVG \ S;
    then reconsider Ga as inducedSubgraph of G,A by A14,Th29;
    consider y being Vertex of G such that
A16: y in S and
A17: not c,y are_adjacent by A5,A11;
A18: not y in A by A16,A12,XBOOLE_0:def 4;
    set Ay = A\/{y};
    set Gay = the inducedSubgraph of G,Ay;
    y in {y} by TARSKI:def 1;
    then
A19: y in Ay by XBOOLE_0:def 3;
    c in Ay by A11,XBOOLE_0:def 3;
    then reconsider ca = c, ya = y as Vertex of Gay by A19,GLIB_000:def 37;
    ex yaa being Vertex of G st yaa in A & y,yaa are_adjacent by A1,A2,A3,A4
,A16,Th81;
    then y in G.AdjacentSet(the_Vertices_of Ga) by A9,A18;
    then Gay is connected by Th56;
    then consider Wa being Walk of Gay such that
A20: Wa is_Walk_from ca,ya;
    consider P being Path of Gay such that
A21: P is_Walk_from Wa.first(),Wa.last() and
A22: P is minlength by Th38;
    Wa.first() = ca by A20;
    then
A23: P.first() = ca by A21;
    Wa.last() = ya by A20;
    then
A24: P.last() = y by A21;
    c <> y by A11,A16,A12,XBOOLE_0:def 4;
    then P is non trivial by A23,A24,GLIB_001:127;
    then
A25: len P >= 3 by GLIB_001:125;
A26: now
      assume len P < 2*2+1;
      then len P <= 5-2 by Th3;
      then
A27:  len P = 3 by A25,XXREAL_0:1;
      then 2*0+1 < len P;
      then P.(1+1) Joins P.1,P.(1+2),Gay by GLIB_001:def 3;
      then P.2 Joins c,y,G by A23,A24,A27,GLIB_000:72;
      hence contradiction by A17;
    end;
    then 5 + -2 <= len P + -2 by XREAL_1:7;
    then reconsider j = len P - 2*1 as odd Element of NAT by INT_1:3,XXREAL_0:2
;
    set d = P.j;
A28: j < len P by XREAL_1:44;
A29: now
      assume d = y;
      then len P - 2 = 1 by A24,A28,GLIB_001:def 28;
      then len P = 1 + 2;
      hence contradiction by A26;
    end;
A30: not y in G.AdjacentSet({c}) by A17,Th51;
A31: the_Vertices_of Gay = Ay by GLIB_000:def 37;
A32: P.j in the_Vertices_of Gay by A28,GLIB_001:7;
    then
A33: d in A or d in {y} by A31,XBOOLE_0:def 3;
    reconsider d as Vertex of G by A32;
    set gds = G.AdjacentSet({d}) /\ S;
    P.(j+1) Joins d,P.(len P-2+2),Gay by A28,GLIB_001:def 3;
    then
A34: P.(j+1) Joins d,y,G by A24,GLIB_000:72;
    then d,y are_adjacent;
    then
A35: y in G.AdjacentSet({d}) by A29,Th51;
    then
A36: y in G.AdjacentSet({d}) /\ S by A16,XBOOLE_0:def 4;
    now
      assume
A37:  gcs c= gds;
      not y in gcs by A30,XBOOLE_0:def 4;
      then gcs c< gds by A36,A37;
      then
A38:  card gcs < card gds by TREES_1:6;
      card gds in M by A33,A29,TARSKI:def 1;
      hence contradiction by A10,A38,XXREAL_2:def 8;
    end;
    then consider x being object such that
A39: x in G.AdjacentSet({c}) /\ S and
A40: not x in G.AdjacentSet({d}) /\ S;
A41: x in S by A39,XBOOLE_0:def 4;
    then
A42: not x in G.AdjacentSet({d}) by A40,XBOOLE_0:def 4;
    reconsider x as Vertex of G by A39;
    defpred Pmax[Nat] means $1 in dom P & $1 is odd & $1 < len P &
      ex e being object st e Joins x,P.($1),G;
A43: for k being Nat st Pmax[k] holds k <= len P;
A44: not x in A by A12,A41,XBOOLE_0:def 4;
A45: 1 < len P by A26,XXREAL_0:2;
    then
A46: 1 in dom P by FINSEQ_3:25;
    x in G.AdjacentSet({c}) by A39,XBOOLE_0:def 4;
    then c,x are_adjacent by Th51;
    then ex e being object st e Joins x,P.1,G by A23,Def3;
    then
A47: ex k being Nat st Pmax[k] by A45,A46,A13;
    consider k being Nat such that
A48: Pmax[k] and
A49: for i being Nat st Pmax[i] holds k >= i from NAT_1:sch 6(A43,A47);
    reconsider k as odd Element of NAT by A48;
    set Q1 = P.cut(k,j);
    reconsider Q=Q1 as Path of G by GLIB_001:175;
A50: k <= j by A48,Th3;
A51: j < len P by XREAL_1:44;
    then
A52: Q1 is minlength by A22,A50,Th41;
A53: len Q + k = j + 1 by A50,A51,GLIB_001:36;
A54: now
      let i be odd Nat such that
A55:  i in dom Q and
A56:  i <> 1;
      1 <= i by A55,FINSEQ_3:25;
      then 1+-1 <= i+-1 by XREAL_1:7;
      then reconsider i1 = i-1 as even Element of NAT by INT_1:3;
      reconsider ki1= k+i1 as odd Element of NAT;
A57:  i+-1 < i+-0 by XREAL_1:8;
      i <= len Q by A55,FINSEQ_3:25;
      then
A58:  i1 < len Q by A57,XXREAL_0:2;
      then
A59:  ki1 in dom P by A50,A51,GLIB_001:36;
A60:  len P+-1 < len P+-0 by XREAL_1:8;
      assume
A61:  ex e being object st e Joins Q.i,x,G;
      i1+k < len P - 1 - k + k by A53,A58,XREAL_1:8;
      then
A62:  ki1 < len P by A60,XXREAL_0:2;
A63:  Q.(i1+1) = P.(ki1) by A50,A51,A58,GLIB_001:36;
      now
        assume i1 <> 0;
        then k+0 < k + i1 by XREAL_1:8;
        hence contradiction by A49,A61,A63,A59,A62,GLIB_000:14;
      end;
      hence contradiction by A56;
    end;
    set cc = Q.first(), dd = Q.last();
A64: Q1.first() = P.k by A50,A51,GLIB_001:37;
    then
A65: x,cc are_adjacent by A48;
A66: x <> y by A16,A35,A40,XBOOLE_0:def 4;
    then
A67: not x in {y} by TARSKI:def 1;
    reconsider xs=x, ys=y as Vertex of Gs by A16,A41,GLIB_000:def 37;
    Gs is complete by A1,A2,A3,Th97;
    then xs,ys are_adjacent by A66;
    then consider ej being object such that
A68: ej Joins xs,ys,Gs;
    ej Joins x,y,G by A68,GLIB_000:72;
    then
A69: x,y are_adjacent;
A70: Q1.last() = P.j by A50,A51,GLIB_001:37;
    then
A71: Q.last() = P.j;
    d <> x by A12,A33,A29,A41,TARSKI:def 1,XBOOLE_0:def 4;
    then
A72: not d,x are_adjacent by A42,Th51;
    then
A73: Q.first() <> Q.last() by A48,A64,A70,Def3;
    then
A74: Q is open;
A75: Q.vertices() = Q1.vertices() by GLIB_001:98;
    then dd in Q1.vertices() by GLIB_001:88;
    then
A76: dd <> x by A31,A44,A67,XBOOLE_0:def 3;
A77: now
A78:  2*0+1 <= k by ABIAN:12;
      then
A79:  len P.cut(1,k) + 1 = k + 1 by A48,GLIB_001:36;
      assume P.k = P.(len P);
      then P.cut(1,k) is_Walk_from P.first(),P.last() by A48,A78,GLIB_001:37;
      hence contradiction by A22,A48,A79;
    end;
A80: now
      let v be set such that
A81:  v in Q.vertices();
      consider n being odd Element of NAT such that
A82:  n <= len Q and
A83:  Q.n = v by A81,GLIB_001:87;
      1 <= n by ABIAN:12;
      then 1+-1 <= n+-1 by XREAL_1:7;
      then reconsider n1 = n-1 as even Element of NAT by INT_1:3;
      reconsider kn1 = k+n1 as odd Element of NAT;
A84:  len P+-1 < len P+-0 by XREAL_1:8;
      n+-1 < n+-0 by XREAL_1:8;
      then
A85:  n1 < len Q by A82,XXREAL_0:2;
      then k+n1 < len P - 1 - k + k by A53,XREAL_1:8;
      then
A86:  kn1 < len P by A84,XXREAL_0:2;
A87:  Q.(n1+1) = P.(kn1) by A50,A51,A85,GLIB_001:36;
      now
A88:    1 <= k by ABIAN:12;
        assume
A89:    v = y;
        then
A90:    k+(n+-1) = 1 by A24,A83,A87,A86,GLIB_001:def 28;
A91:    now
          assume 1 < n;
          then 1+1 <= n by NAT_1:13;
          then 2+1 <= k+n by A88,XREAL_1:7;
          hence contradiction by A90;
        end;
        1 <= n by ABIAN:12;
        hence contradiction by A24,A77,A64,A83,A89,A91,XXREAL_0:1;
      end;
      then
A92:  not v in {y} by TARSKI:def 1;
      Q.vertices() c= P.vertices() by A50,A51,A75,GLIB_001:94;
      then v in P.vertices() by A81;
      hence v in A by A31,A92,XBOOLE_0:def 3;
    end;
    cc in Q1.vertices() by A75,GLIB_001:88;
    then
A93: cc <> x by A31,A44,A67,XBOOLE_0:def 3;
    dd,y are_adjacent by A34,A70;
    then consider R being Path of G such that
A94: len R = 7 and
A95: R.length() = 3 and
A96: R.vertices() = {dd,y,x,cc} and
A97: R.1 = dd and
A98: R.3 = y and
A99: R.5 = x and
A100: R.7 = cc by A24,A29,A66,A69,A77,A64,A70,A76,A93,A65,Th47;
A101: R is non trivial by A94,GLIB_001:126;
A102: Q.edges() misses R.edges()
    proof
      assume not Q.edges() misses R.edges();
      then Q.edges() /\ R.edges() <> {};
      then consider e being object such that
A103: e in Q.edges() /\ R.edges() by XBOOLE_0:def 1;
A104: e in Q.edges() by A103,XBOOLE_0:def 4;
      e in R.edges() by A103,XBOOLE_0:def 4;
      then consider n being even Element of NAT such that
A105: 1 <= n and
A106: n <= 7 and
A107: R.n = e by A94,GLIB_001:99;
      per cases by A105,A106,Th13;
      suppose
A108:   n = 2;
        2*0+1 < len R by A94;
        then R.(1+1) Joins R.1,R.(1+2),G by GLIB_001:def 3;
        then y in Q.vertices() by A98,A104,A107,A108,GLIB_001:105;
        then y in A by A80;
        hence contradiction by A16,A12,XBOOLE_0:def 4;
      end;
      suppose
A109:   n = 4;
        2*1+1 < len R by A94;
        then R.(3+1) Joins R.3,R.(3+2),G by GLIB_001:def 3;
        then y in Q.vertices() by A98,A104,A107,A109,GLIB_001:105;
        then y in A by A80;
        hence contradiction by A16,A12,XBOOLE_0:def 4;
      end;
      suppose
A110:   n = 6;
        2*2+1 < len R by A94;
        then R.(5+1) Joins R.5,R.(5+2),G by GLIB_001:def 3;
        then x in Q.vertices() by A99,A104,A107,A110,GLIB_001:105;
        then x in A by A80;
        hence contradiction by A12,A41,XBOOLE_0:def 4;
      end;
    end;
    now
      let v be object such that
A111: v in {Q.first(), Q.last()};
      per cases by A111,TARSKI:def 2;
      suppose
A112:   v = cc;
        then
A113:   v in Q.vertices() by GLIB_001:88;
        v in R.vertices() by A94,A100,A112,GLIB_001:87;
        hence v in Q.vertices() /\ R.vertices() by A113,XBOOLE_0:def 4;
      end;
      suppose
A114:   v = dd;
        2*0+1 <= len R by A94;
        then
A115:   v in R.vertices() by A97,A114,GLIB_001:87;
        v in Q.vertices() by A114,GLIB_001:88;
        hence v in Q.vertices() /\ R.vertices() by A115,XBOOLE_0:def 4;
      end;
    end;
    then
A116: {Q.first(),Q.last()} c= Q.vertices()/\R.vertices();
    now
      let v be object such that
A117: v in Q.vertices() /\ R.vertices();
      v in {dd,y,x,cc} by A96,A117,XBOOLE_0:def 4;
      then
A118: v = dd or v = y or v = x or v = cc by ENUMSET1:def 2;
      v in Q.vertices() by A117,XBOOLE_0:def 4;
      then v in A by A80;
      hence v in {Q.first(), Q.last()} by A16,A12,A41,A118,TARSKI:def 2
,XBOOLE_0:def 4;
    end;
    then Q.vertices() /\ R.vertices() c= {Q.first(), Q.last()};
    then
A119: Q.vertices() /\ R.vertices() = { Q.first(), Q.last() } by A116;
A120: now
      let i be odd Nat such that
A121: i in dom Q and
A122: i <> len Q;
      1 <= i by A121,FINSEQ_3:25;
      then 1+-1 <= i+-1 by XREAL_1:7;
      then reconsider i1 = i-1 as even Element of NAT by INT_1:3;
      reconsider ki1= k+i1 as odd Element of NAT;
A123: i+-1 < i+-0 by XREAL_1:8;
A124: i <= len Q by A121,FINSEQ_3:25;
      then
A125: i1 < len Q by A123,XXREAL_0:2;
      then ki1 in dom P by A50,A51,GLIB_001:36;
      then
A126: ki1 <= len P by FINSEQ_3:25;
      then
A127: P.(ki1) in Ay by A31,GLIB_001:7;
      now
A128:   len P - k + -1 < len P - k by XREAL_1:30;
        assume ki1 = len P;
        hence contradiction by A53,A124,A123,A128,XXREAL_0:2;
      end;
      then ki1 < len P by A126,XXREAL_0:1;
      then
A129: ki1+2 <= len P by Th4;
      ki1+2 <> len P by A53,A122;
      then
A130: ki1+2 < len P by A129,XXREAL_0:1;
A131: P.(len P) in Ay by A31,GLIB_001:7;
      assume
A132: ex e being object st e Joins Q.i,y,G;
      Q.(i1+1) = P.(ki1) by A50,A51,A125,GLIB_001:36;
      hence contradiction by A22,A24,A132,A130,A127,A131,Th19,Th39;
    end;
A133: Q.first() = P.k by A64;
    P.k <> P.j by A72,A48,Def3;
    then
A134: Q is non trivial by A133,A71,GLIB_001:127;
    then Q.length() <> 0;
    then
A135: Q.length() >= 0+1 by NAT_1:13;
    set C = Q.append(R);
A136: R.first() = dd by A97;
    then
A137: C.(len Q+6) = R.(6+1) by A94,GLIB_001:33;
A138: C.(len Q+4) = R.(4+1) by A94,A136,GLIB_001:33;
A139: C.(len Q+2) = R.(2+1) by A94,A136,GLIB_001:33;
    C.length() = Q.length() + 3 by A95,A136,Th28;
    then C.length() >= 1 + 3 by A135,XREAL_1:7;
    then
A140: C.length() > 3 by NAT_1:13;
A141: R.last() = cc by A94,A100;
    then
A142: R is open by A73,A136;
    then C is Cycle-like by A74,A136,A141,A101,A102,A119,Th27;
    then C is chordal by A140,Def11;
    then consider m, n being odd Nat such that
A143: m+2 < n and
A144: n <= len C and
    C.m <> C.n and
A145: ex e being object st e Joins C.m,C.n,G and
A146: C is Cycle-like implies not (m=1 & n = len C) & not (m=1 & n =
    len C-2) & not (m=3 & n = len C) by Th83;
    consider e being object such that
A147: e Joins C.m,C.n,G by A145;
A148: len C +1+-1 = len Q + len R+-1 by A136,GLIB_001:28;
A149: n <= len Q or n = len Q+2 or n = len Q+4 or n = len Q+6
    proof
      per cases;
      suppose
        n <= len Q;
        hence thesis;
      end;
      suppose
        n > len Q;
        then
A150:   len Q +2 <= n by Th4;
        per cases by A150,XXREAL_0:1;
        suppose
          len Q +2 = n;
          hence thesis;
        end;
        suppose
          len Q +2 < n;
          then
A151:     len Q +2+2 <= n by Th4;
          per cases by A151,XXREAL_0:1;
          suppose
            len Q +4 = n;
            hence thesis;
          end;
          suppose
            len Q +2*2 < n;
            then len Q +4+2 <= n by Th4;
            hence thesis by A94,A148,A144,XXREAL_0:1;
          end;
        end;
      end;
    end;
A152: 1 <= m by ABIAN:12;
    per cases by A149;
    suppose
A153: n <= len Q;
A154: m+0 <= m+2 by XREAL_1:7;
      m+2 <= len Q by A143,A153,XXREAL_0:2;
      then m <= len Q by A154,XXREAL_0:2;
      then m in dom Q by A152,FINSEQ_3:25;
      then
A155: Q.m = C.m by GLIB_001:32;
      1 <= n by ABIAN:12;
      then n in dom Q by A153,FINSEQ_3:25;
      then Q.n = C.n by GLIB_001:32;
      hence contradiction by A52,A143,A147,A153,A155,Th40;
    end;
    suppose
A156: n = len Q + 2;
      then m < len Q by A143,XREAL_1:6;
      then
A157: m in dom Q by A152,FINSEQ_3:25;
      then e Joins Q.m,y,G by A98,A139,A147,A156,GLIB_001:32;
      hence contradiction by A120,A143,A156,A157;
    end;
    suppose
A158: n = len Q + 4;
      then m+2+2 <= len Q+4 by A143,Th4;
      then m+4 <= len Q +4;
      then m <= len Q by XREAL_1:6;
      then
A159: m in dom Q by A152,FINSEQ_3:25;
      then
A160: e Joins Q.m,x,G by A99,A138,A147,A158,GLIB_001:32;
      per cases by A152,XXREAL_0:1;
      suppose
        1 = m;
        hence contradiction by A74,A94,A136,A141,A101,A142,A102,A119,A148,A146
,A158,Th27;
      end;
      suppose
        1 < m;
        hence contradiction by A54,A159,A160;
      end;
    end;
    suppose
A161: n = len Q +6;
      then m+2+2 <= len Q+6 by A143,Th4;
      then m+4 <= len Q +2+4;
      then
A162: m <= len Q +2 by XREAL_1:6;
      per cases by A162,XXREAL_0:1;
      suppose
A163:   m < len Q +2;
        now
          assume 1+2 >= m;
          then m< 2*1+1 by A74,A94,A136,A141,A101,A142,A102,A119,A148,A146,A161
,Th27,XXREAL_0:1;
          then m <= 3-2 by Th3;
          then m < 1 by A74,A94,A136,A141,A101,A142,A102,A119,A148,A146,A161
,Th27,XXREAL_0:1;
          hence contradiction by ABIAN:12;
        end;
        then
A164:   2*0+1+2 < m;
A165:   m <= len Q by A163,Th4;
        then m in dom Q by A152,FINSEQ_3:25;
        then C.m = Q.m by GLIB_001:32;
        hence contradiction by A52,A100,A137,A147,A161,A165,A164,Th40,
GLIB_000:14;
      end;
      suppose
A166:   m = len Q + 2;
        3 <= len Q by A134,GLIB_001:125;
        then 1 <= len Q by XXREAL_0:2;
        then
A167:   2*0+1 in dom Q by FINSEQ_3:25;
        1 <> len Q by A72,A48,A64,A70,Def3;
        hence contradiction by A120,A98,A100,A137,A139,A147,A161,A166,A167,
GLIB_000:14;
      end;
    end;
  end;
end;
