
theorem Th168:
  for G1 being _Graph, G2 being G1-isomorphic _Graph
  for G3 being removeParallelEdges of G1
  for G4 being removeParallelEdges of G2
  holds G4 is G3-isomorphic
proof
  let G1 be _Graph, G2 be G1-isomorphic _Graph;
  let G3 be removeParallelEdges of G1;
  let G4 be removeParallelEdges of G2;
  consider G being PGraphMapping of G1, G2 such that
    A1: G is isomorphism by Def23;
  consider E1 being RepEdgeSelection of G1 such that
    A2: G3 is inducedSubgraph of G1, the_Vertices_of G1, E1 by GLIB_009:def 7;
  consider E2 being RepEdgeSelection of G2 such that
    A3: G4 is inducedSubgraph of G2, the_Vertices_of G2, E2 by GLIB_009:def 7;
  A4: G1.edgesBetween(the_Vertices_of G1) = the_Edges_of G1 &
    G2.edgesBetween(the_Vertices_of G2) = the_Edges_of G2 by GLIB_000:34;
  the_Vertices_of G1 c= the_Vertices_of G1 &
    the_Vertices_of G2 c= the_Vertices_of G2;
  then A5: the_Edges_of G3 = E1 & the_Edges_of G4 = E2
    by A2, A3, A4, GLIB_000:def 37;
  :: define F_V
  A6: the_Vertices_of G3 = the_Vertices_of G1 &
    the_Vertices_of G4 = the_Vertices_of G2 by GLIB_000:def 33;
  then reconsider f=G_V as PartFunc of the_Vertices_of G3, the_Vertices_of G4;
  :: define the surjection h from E(G2) to E2
  defpred P[object,object] means $2 in E2 & [$1,$2] in EdgeAdjEqRel(G2);
  A7: for x,y1,y2 being object st x in the_Edges_of G2 & P[x,y1] & P[x,y2]
    holds y1 = y2
  proof
    let x,y1,y2 be object;
    set v1=(the_Source_of G2).x, v2=(the_Target_of G2).x;
    assume x in the_Edges_of G2;
    then A8: x Joins v1,v2,G2 by GLIB_000:def 13;
    then consider e being object such that
      e Joins v1,v2,G2 & e in E2 and
      A9: for e9 being object st e9 Joins v1,v2,G2 & e9 in E2 holds e9 = e
      by GLIB_009:def 5;
    assume A10: P[x,y1];
    then consider w1,w2 being object such that
      A11: x Joins w1,w2,G2 & y1 Joins w1,w2,G2 by GLIB_009:def 3;
    w1 = v1 & w2 = v2 or w1 = v2 & w2 = v1 by A8, A11, GLIB_000:15;
    then A12: y1 = e by A9, A10, A11, GLIB_000:14;
    assume A13: P[x,y2];
    then consider u1,u2 being object such that
      A14: x Joins u1,u2,G2 & y2 Joins u1,u2,G2 by GLIB_009:def 3;
    u1 = v1 & u2 = v2 or u1 = v2 & u2 = v1 by A8, A14, GLIB_000:15;
    then y2 Joins v1,v2,G2 by A14, GLIB_000:14;
    hence y1 = y2 by A9, A12, A13;
  end;
  A15: for x being object st x in the_Edges_of G2 ex y being object st P[x,y]
  proof
    let x be object;
    set v1=(the_Source_of G2).x, v2=(the_Target_of G2).x;
    assume x in the_Edges_of G2;
    then A16: x Joins v1,v2,G2 by GLIB_000:def 13;
    then consider e being object such that
      A17: e Joins v1,v2,G2 & e in E2 and
      for e9 being object st e9 Joins v1,v2,G2 & e9 in E2 holds e9 = e
      by GLIB_009:def 5;
    take e;
    thus thesis by A16, A17, GLIB_009:def 3;
  end;
  consider h being Function such that
    A18: dom h = the_Edges_of G2 and
    A19: for x being object st x in the_Edges_of G2 holds P[x,h.x]
    from FUNCT_1:sch 2(A7,A15);
  :: define F_E
  set g = (h*G_E)|E1;
  dom h = rng G_E by A1, A18, Def12;
  then A20: dom(h*G_E) = dom G_E & rng(h*G_E) = rng h by RELAT_1:27, 28;
  then A21: dom g = dom G_E /\ E1 by RELAT_1:61
    .= the_Edges_of G1 /\ E1 by A1, Def11
    .= E1 by XBOOLE_1:28;
  now
    let y be object;
    hereby
      assume y in rng g;
      then y in rng h by A20, RELAT_1:70, TARSKI:def 3;
      then consider x being object such that
        A22: x in dom h & y = h.x by FUNCT_1:def 3;
      thus y in E2 by A18, A19, A22;
    end;
    assume A23: y in E2;
    then A24: y in the_Edges_of G2;
    set v1 = (the_Source_of G2).y, v2 = (the_Target_of G2).y;
    A25: y Joins v1,v2,G2 by A24, GLIB_000:def 13;
    then consider e being object such that
      e Joins v1,v2,G2 & e in E2 and
      A26: for e9 being object st e9 Joins v1,v2,G2 & e9 in E2 holds e9 = e
      by GLIB_009:def 5;
    y in rng G_E by A1, A24, Def12;
    then consider x0 being object such that
      A27: x0 in dom G_E & G_E.x0 = y by FUNCT_1:def 3;
    set u1 = (the_Source_of G1).x0, u2 = (the_Target_of G1).x0;
    A28: u1 in dom G_V & u2 in dom G_V by A27, Th5;
    A29: x0 Joins u1,u2,G1 by A27, GLIB_000:def 13;
    then consider x being object such that
      A30: x Joins u1,u2,G1 & x in E1 and
      for e9 being object st e9 Joins u1,u2,G1 & e9 in E1 holds e9 = x
      by GLIB_009:def 5;
    x in the_Edges_of G1 by A30;
    then A31: x in dom G_E by A1, Def11;
    then A32: G_E.x Joins G_V.u1,G_V.u2,G2 by A28, A30, Th4;
    G_E.x0 Joins G_V.u1,G_V.u2,G2 by A27, A28, A29, Th4;
    then G_V.u1 = v1 & G_V.u2 = v2 or G_V.u1 = v2 & G_V.u2 = v1
      by A25, A27, GLIB_000:15;
    then A33: G_E.x Joins v1,v2,G2 by A32, GLIB_000:14;
    A34: G_E.x in the_Edges_of G2 by A33, GLIB_000:def 13;
    then A35: h.(G_E.x) in E2 & [G_E.x,h.(G_E.x)] in EdgeAdjEqRel(G2) by A19;
    then consider w1,w2 being object such that
      A36: G_E.x Joins w1,w2,G2 & h.(G_E.x) Joins w1,w2,G2 by GLIB_009:def 3;
    v1 = w1 & v2 = w2 or v1 = w2 & v2 = w1 by A33, A36, GLIB_000:15;
    then A37: y = e & h.(G_E.x) = e by A23, A25, A26, A35, A36, GLIB_000:14;
    A38: x in dom(h*G_E) by A18, A31, A34, FUNCT_1:11;
    then A39: x in dom g by A30, RELAT_1:57;
    y = (h*G_E).x by A37, A38, FUNCT_1:12
      .= g.x by A30, FUNCT_1:49;
    hence y in rng g by A39, FUNCT_1:def 3;
  end;
  then A40: rng g = E2 by TARSKI:2;
  then reconsider g as PartFunc of the_Edges_of G3, the_Edges_of G4
    by A5, A21, RELSET_1:4;
  :: define F
  now
    hereby
      let e be object;
      set v = (the_Source_of G3).e, w = (the_Target_of G3).e;
      assume e in dom g;
      then e Joins v,w,G3 by GLIB_000:def 13;
      then v in the_Vertices_of G3 & w in the_Vertices_of G3 by GLIB_000:13;
      then v in the_Vertices_of G1 & w in the_Vertices_of G1;
      hence v in dom f & w in dom f by A1, Def11;
    end;
    let e,v,w be object;
    assume A41: e in dom g & v in dom f & w in dom f;
    then A42: e in E1 & e in dom(h*G_E) by RELAT_1:57;
    then A43: e in dom G_E & G_E.e in dom h by FUNCT_1:11;
    assume A44: e Joins v,w,G3;
    v is set & w is set by TARSKI:1;
    then e Joins v,w,G1 by A44, GLIB_000:72;
    then A45: G_E.e Joins f.v,f.w,G2 by A41, A43, Th4;
    A46: h.(G_E.e) in E2 & [G_E.e,h.(G_E.e)] in EdgeAdjEqRel(G2)
      by A18, A19, A43;
    then consider u1,u2 being object such that
      A47: G_E.e Joins u1,u2,G2 & h.(G_E.e) Joins u1,u2,G2 by GLIB_009:def 3;
    h.(G_E.e) Joins f.v,f.w,G2
    proof
      per cases by A45, A47, GLIB_000:15;
      suppose f.v=u1 & f.w=u2;
        hence thesis by A47;
      end;
      suppose f.v=u2 & f.w=u1;
        hence thesis by A47, GLIB_000:14;
      end;
    end;
    then A48: h.(G_E.e) Joins f.v,f.w,G4 by A5, A46, GLIB_000:73;
    g.e = (h*G_E).e by A42, FUNCT_1:49
      .= h.(G_E.e) by A42, FUNCT_1:12;
    hence g.e Joins f.v,f.w,G4 by A48;
  end;
  then reconsider F = [f,g] as PGraphMapping of G3, G4 by Th8;
  :: show that F is isomorphism
  dom f = the_Vertices_of G3 by A1, A6, Def11;
  then A49: F is total by A5, A21;
  rng f = the_Vertices_of G4 by A1, A6, Def12;
  then A50: F is onto by A5, A40;
  now
    let x1,x2 be object;
    assume A51: x1 in dom g & x2 in dom g & g.x1 = g.x2;
    then A52: x1 in E1 & x1 in dom(h*G_E) & x2 in E1 & x2 in dom(h*G_E)
      by RELAT_1:57;
    then A53: x1 in dom G_E & G_E.x1 in dom h & x2 in dom G_E & G_E.x2 in dom h
      by FUNCT_1:11;
    then A54: h.(G_E.x1) in E2 & [G_E.x1,h.(G_E.x1)] in EdgeAdjEqRel(G2) &
      [G_E.x2,h.(G_E.x2)] in EdgeAdjEqRel(G2) by A18, A19;
    then consider v1,v2 being object such that
      A55: G_E.x1 Joins v1,v2,G2 & h.(G_E.x1) Joins v1,v2,G2 by GLIB_009:def 3;
    G_E.x1 in rng G_E by A53, FUNCT_1:3;
    then (the_Source_of G2).(G_E.x1) in rng G_V &
      (the_Target_of G2).(G_E.x1) in rng G_V by Th6;
    then A56: v1 in rng G_V & v2 in rng G_V by A55, GLIB_000:def 13;
    then consider u1 being object such that
      A57: u1 in dom G_V & G_V.u1 = v1 by FUNCT_1:def 3;
    consider u2 being object such that
      A58: u2 in dom G_V & G_V.u2 = v2 by A56, FUNCT_1:def 3;
    A59: x1 Joins u1,u2,G1 by A1, A53, A55, A57, A58, Def15;
    h.(G_E.x1) = (h*G_E).x1 by A52, FUNCT_1:12
      .= g.x2 by A51, A52, FUNCT_1:49
      .= (h*G_E).x2 by A52, FUNCT_1:49
      .= h.(G_E.x2) by A52, FUNCT_1:12;
    then consider w1,w2 being object such that
      A60: G_E.x2 Joins w1,w2,G2 & h.(G_E.x1) Joins w1,w2,G2
      by A54, GLIB_009:def 3;
    G_E.x2 Joins v1,v2,G2
    proof
      per cases by A55, A60, GLIB_000:15;
      suppose v1 = w1 & v2 = w2;
        hence thesis by A60;
      end;
      suppose v1 = w2 & v2 = w1;
        hence thesis by A60, GLIB_000:14;
      end;
    end;
    then A61: x2 Joins u1,u2,G1 by A1, A53, A57, A58, Def15;
    then consider e being object such that
      e Joins u1,u2,G1 & e in E1 and
      A62: for e9 being object st e9 Joins u1,u2,G1 & e9 in E1 holds e9 = e
      by GLIB_009:def 5;
    x1 = e & x2 = e by A52, A59, A61, A62;
    hence x1 = x2;
  end;
  then F is one-to-one by A1, FUNCT_1:def 4;
  hence thesis by A49, A50;
end;
