
theorem Th76:
  for G being _finite _Graph, n being Nat, x being set st not x in
dom ((MCS:CSeq(G)).n)`1 holds (((MCS:CSeq(G)).n)`2).x = card (G.AdjacentSet({x}
  ) /\ (dom ((MCS:CSeq(G)).n)`1))
proof
  let G be _finite _Graph, n be Nat;
  set CN = (MCS:CSeq(G)).n;
  set VLN = CN`1;
  defpred P[Nat] means for x being set st not x in dom ((MCS:CSeq(G)).$1)`1
holds (((MCS:CSeq(G)).$1)`2).x = card (G.AdjacentSet({x}) /\ (dom ((MCS:CSeq(G)
  ).$1)`1));
A1: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A2: P[k];
    set CS1 = (MCS:CSeq(G)).(k+1);
    set CSK = (MCS:CSeq(G)).k;
    set VLK = CSK`1;
    set VK2 = CSK`2;
    set VL1 = CS1`1;
    set V12 = CS1`2;
A3: k <= k+1 by XREAL_1:38;
    per cases;
    suppose
A4:   G.order() <= k;
      then
A5:   VK2 = V12 by A3,Th67;
      VLK = VL1 by A3,A4,Th67;
      hence thesis by A2,A5;
    end;
    suppose
A6:   k < G.order();
      set VL = (MCS:CSeq(G))``1;
A7:   G.order() = (MCS:CSeq(G)).Lifespan() by Th70;
A8:   VLK = VL.k by Def24;
A9:   (MCS:CSeq(G)).Lifespan() = VL.Lifespan() by Th72;
A10:  VL1 = VL.(k+1) by Def24;
      consider w being Vertex of G such that
A11:  w = MCS:PickUnnumbered(CSK) and
A12:  for v being set holds (v in G.AdjacentSet({w}) & not v in dom
VLK implies V12.v = VK2.v + 1) & (not v in G.AdjacentSet({w}) or v in dom VLK
      implies V12.v = VK2.v) by A6,Th75;
      w = (MCS:CSeq(G)``1).PickedAt(k) by A6,A11,Th74;
      then
A13:  dom CS1`1 = (dom CSK`1) \/ {w} by A6,A7,A8,A10,A9,Th11;
      now
        let x be set such that
A14:    not x in dom VL1;
A15:    not x in dom VLK by A13,A14,XBOOLE_0:def 3;
        then
A16:    card (G.AdjacentSet({x}) /\ dom VLK) = VK2.x by A2;
        per cases;
        suppose
A17:      x in G.AdjacentSet({w}) & not x in dom VLK;
          set GAS = G.AdjacentSet({x});
          w in GAS by A17,CHORD:53;
          then
A18:      {w} c= GAS by ZFMISC_1:31;
A19:      GAS /\ dom VL1 = (GAS /\ dom VLK) \/ (GAS /\ {w}) by A13,XBOOLE_1:23
            .= (GAS /\ dom VLK) \/ {w} by A18,XBOOLE_1:28;
          dom VLK <> the_Vertices_of G by A6,Th69;
          then not w in dom VLK by A11,Th59;
          then
A20:      not w in GAS /\ dom VLK by XBOOLE_0:def 4;
          V12.x = VK2.x + 1 by A12,A17;
          hence card (G.AdjacentSet({x}) /\ dom VL1) = V12.x by A16,A20,A19,
CARD_2:41;
        end;
        suppose
A21:      not x in G.AdjacentSet({w}) or x in dom VLK;
          set GAS = G.AdjacentSet({x});
A22:      not w in GAS by A13,A14,A21,CHORD:53,XBOOLE_0:def 3;
A23:      now
            assume GAS /\ {w} = {w};
            then w in GAS /\ {w} by TARSKI:def 1;
            hence contradiction by A22,XBOOLE_0:def 4;
          end;
          GAS /\ {w} c= {w} by XBOOLE_1:17;
          then GAS /\ {w} in bool {w};
          then
A24:      GAS /\ {w} in { {}, {w} } by ZFMISC_1:24;
A25:      V12.x = VK2.x by A12,A21;
          GAS /\ dom VL1 = (GAS /\ dom VLK) \/ (GAS /\ {w}) by A13,XBOOLE_1:23
            .= (GAS /\ dom VLK) \/ {} by A24,A23,TARSKI:def 2
            .= GAS /\ dom VLK;
          hence card (G.AdjacentSet({x}) /\ dom VL1) = V12.x by A2,A15,A25;
        end;
      end;
      hence thesis;
    end;
  end;
  now
    set C0 = (MCS:CSeq(G)).0;
    let x be set;
    set VL0 = C0`1;
    set V20 = C0`2;
    assume not x in dom VL0;
A26: C0 = MCS:Init(G) by Def25;
    dom VL0 = {} by A26;
    hence V20.x = card (G.AdjacentSet({x}) /\ dom VL0) by A26;
  end;
  then
A27: P[ 0 ];
A28: for k being Nat holds P[k] from NAT_1:sch 2(A27,A1);
  let x be set;
  assume not x in dom VLN;
  hence thesis by A28;
end;
