
theorem Th38:
  for G1 being _finite real-weighted WGraph, n being Nat, G2 being
inducedSubgraph of G1, (PRIM:CompSeq(G1).n)`1, (PRIM:CompSeq(G1).n)`2 holds G2
  is Tree-like
proof
  let G1 be _finite real-weighted WGraph;
  set PCS = PRIM:CompSeq(G1);
  defpred P[Nat] means for G2 being inducedSubgraph of G1,(PCS.$1)`1, (PCS.$1)
  `2 holds G2 is Tree-like;
  set G0 = PCS.0, src = the Element of the_Vertices_of G1;
  now
    let n be Nat;
    set Gn = PCS.n, Gn1 = PCS.(n+1);
    set Next = PRIM:NextBestEdges(Gn), e = the Element of Next;
    set G3 = the inducedSubgraph of G1,Gn`1,Gn`2;
A1: Gn1 = PRIM:Step(Gn) by Def17;
A2: Gn`2 c= G1.edgesBetween(Gn`1) by Th30;
    Gn`1 is non empty Subset of the_Vertices_of G1 by Th30;
    then
A3: the_Vertices_of G3 = Gn`1 & the_Edges_of G3 = Gn`2 by A2,GLIB_000:def 37;
    assume
A4: P[n];
    then
A5: G3 is Tree-like;
    now
A6:   G3.order() = G3.size() + 1 by A5,GLIB_002:46;
      let G2 be inducedSubgraph of G1,Gn1`1,Gn1`2;
A7:   Gn1`2c=G1.edgesBetween(Gn1`1) by Th30;
      Gn1`1 is non empty Subset of the_Vertices_of G1 by Th30;
      then
A8:   the_Vertices_of G2 = Gn1`1 by A7,GLIB_000:def 37;
      now
        per cases;
        suppose
          Next = {};
          then Gn = Gn1 by A1,Def15;
          hence G2 is Tree-like by A4;
        end;
        suppose
A9:       Next <> {};
          set GnV = Gn`1, GnVg = the_Vertices_of G1 \ GnV;
A10:      e SJoins GnV, GnVg, G1 by A9,Def13;
A11:      now
            assume
A12:        e in Gn`2;
            then (the_Target_of G1).e in GnV by A2,GLIB_000:31;
            then
A13:        not (the_Target_of G1).e in GnVg by XBOOLE_0:def 5;
            (the_Source_of G1).e in GnV by A2,A12,GLIB_000:31;
            then not (the_Source_of G1).e in GnVg by XBOOLE_0:def 5;
            hence contradiction by A10,A13;
          end;
          consider v being Vertex of G1 such that
A14:      not v in Gn`1 and
A15:      Gn1 = [Gn`1\/{v},Gn`2\/{e}] by A1,A9,Th28;
A16:      card Gn1`1 = card (Gn`1 \/ {v}) by A15
            .= card Gn`1 + 1 by A14,CARD_2:41;
          card Gn1`2 = card (Gn`2 \/ {e}) by A15
            .= card Gn`2 + 1 by A11,CARD_2:41;
          then G2.order() = G2.size() + 1 by A3,A7,A8,A6,A16,GLIB_000:def 37;
          hence G2 is Tree-like by GLIB_002:47;
        end;
      end;
      hence G2 is Tree-like;
    end;
    hence P[n+1];
  end;
  then
A17: for n being Nat st P[n] holds P[n+1];
  G0 = PRIM:Init(G1) by Def17;
  then G0`1 = {src} & G0`2 = {};
  then
A18: P[ 0 ];
  for n being Nat holds P[n] from NAT_1:sch 2(A18,A17);
  hence thesis;
end;
