
theorem Th40:
  for G2 being _Graph, V being set, G1 being addLoops of G2, V
  holds G1 is connected iff G2 is connected
proof
  let G2 be _Graph, V be set, G1 be addLoops of G2, V;
  hereby
    assume A1: G1 is connected;
    now
      let u,v be Vertex of G2;
      u is Vertex of G1 & v is Vertex of G1 by Th15;
      then consider W1 being Walk of G1 such that
        A2: W1 is_Walk_from u,v by A1, GLIB_002:def 1;
      set P1 = the Path of W1;
      per cases by Th37;
      suppose P1 is Path of G2;
        then reconsider P2 = P1 as Walk of G2;
        take P2;
        P1 is_Walk_from u,v by A2, GLIB_001:160;
        hence P2 is_Walk_from u,v by GLIB_001:19;
      end;
      suppose ex w,e being object st e Joins w,w,G1 & P1 = G1.walkOf(w,e,w);
        then consider w,e being object such that
          A3: e Joins w,w,G1 & P1 = G1.walkOf(w,e,w);
        A4: P1.first() = w & P1.last() = w by A3, GLIB_001:15;
        P1 is_Walk_from u,v by A2, GLIB_001:160;
        then A5: P1.first() = u & P1.last() = v by GLIB_001:def 23;
        reconsider W2 = G2.walkOf(u) as Walk of G2;
        take W2;
        thus W2 is_Walk_from u,v by A4, A5, GLIB_001:13;
      end;
    end;
    hence G2 is connected by GLIB_002:def 1;
  end;
  assume A6: G2 is connected;
  now
    let u,v be Vertex of G1;
    u is Vertex of G2 & v is Vertex of G2 by Th15;
    then consider W2 being Walk of G2 such that
      A7: W2 is_Walk_from u,v by A6, GLIB_002:def 1;
    G2 is Subgraph of G1 by GLIB_006:57;
    then reconsider W1 = W2 as Walk of G1 by GLIB_001:167;
    take W1;
    thus W1 is_Walk_from u,v by A7, GLIB_001:19;
  end;
  hence G1 is connected by GLIB_002:def 1;
end;
