
theorem Th33:
  for G being _finite real-weighted WGraph, n being Nat holds (
  PRIM:CompSeq(G).n)`1 c= G.reachableFrom(the Element of the_Vertices_of G)
proof
  let G be _finite real-weighted WGraph;
  set src = the Element of the_Vertices_of G;
  defpred P[Nat] means (PRIM:CompSeq(G).$1)`1 c=
  G.reachableFrom(the Element of
  the_Vertices_of G);
  set G0 = PRIM:CompSeq(G).0;
  G0 = PRIM:Init(G) by Def17;
  then
A1: G0`1 = {src};
A2: now
    let n be Nat;
    assume
A3: P[n];
    set Gn = PRIM:CompSeq(G).n, Gn1 = PRIM:CompSeq(G).(n+1);
    set Next = PRIM:NextBestEdges(Gn), e = the Element of Next;
    set sc = (the_Source_of G).e, tar = (the_Target_of G).e;
A4: Gn1 = PRIM:Step(Gn) by Def17;
    now
      per cases;
      suppose
        Next = {};
        hence P[n+1] by A3,A4,Def15;
      end;
      suppose
A5:     Next <> {} & sc in Gn`1;
        then Gn1 = [Gn`1 \/ {tar}, Gn`2 \/ {e}] by A4,Def15;
        then
A6:     Gn1`1 = Gn`1 \/ {tar};
A7:     e in Next by A5;
        now
          let v be object;
          assume
A8:       v in Gn1`1;
          now
            per cases by A6,A8,XBOOLE_0:def 3;
            suppose
              v in Gn`1;
              hence v in G.reachableFrom(src) by A3;
            end;
            suppose
              v in {tar};
              then v = tar by TARSKI:def 1;
              then e Joins sc,v,G by A7;
              hence v in G.reachableFrom(src) by A3,A5,GLIB_002:10;
            end;
          end;
          hence v in G.reachableFrom(src);
        end;
        hence P[n+1] by TARSKI:def 3;
      end;
      suppose
A9:     Next <> {} & not sc in Gn`1;
        then Gn1 = [Gn`1 \/ {sc}, Gn`2 \/ {e}] by A4,Def15;
        then
A10:    Gn1`1 = Gn`1 \/ {sc};
A11:    e SJoins Gn`1, the_Vertices_of G \ Gn`1, G by A9,Def13;
        then
A12:    e in the_Edges_of G;
A13:    tar in Gn`1 by A9,A11;
        now
          let v be object;
          assume
A14:      v in Gn1`1;
          now
            per cases by A10,A14,XBOOLE_0:def 3;
            suppose
              v in Gn`1;
              hence v in G.reachableFrom(src) by A3;
            end;
            suppose
              v in {sc};
              then v = sc by TARSKI:def 1;
              then e Joins tar,v,G by A12;
              hence v in G.reachableFrom(src) by A3,A13,GLIB_002:10;
            end;
          end;
          hence v in G.reachableFrom(src);
        end;
        hence P[n+1] by TARSKI:def 3;
      end;
    end;
    hence P[n+1];
  end;
  src in G.reachableFrom(src) by GLIB_002:9;
  then
A15: P[ 0 ] by A1,ZFMISC_1:31;
  for n being Nat holds P[n] from NAT_1:sch 2(A15,A2);
  hence thesis;
end;
