reserve G, G2 for _Graph, V, E for set,
  v for object;

theorem
  for G3 being _Graph, v being object, V being set, v1 being Vertex of G3
  for e being object, G2 being addAdjVertexAll of G3,v,V
  st V c= the_Vertices_of G3 & not v in the_Vertices_of G3 & not v1 in V &
    not e in the_Edges_of G2
  for G1 being _Graph
  st G1 is addEdge of G2,v1,e,v or G1 is addEdge of G2,v,e,v1
  holds G1 is addAdjVertexAll of G3,v,V \/ {v1}
proof
  let G3 be _Graph, v be object, V be set, v1 be Vertex of G3, e be object;
  let G2 be addAdjVertexAll of G3,v,V;
  assume that
    A1: V c= the_Vertices_of G3 & not v in the_Vertices_of G3 and
    A2: not v1 in V & not e in the_Edges_of G2;
  :: show the cardinality property
  consider E being set such that
    A3: card V = card E & E misses the_Edges_of G3 &
    the_Edges_of G2 = the_Edges_of G3 \/ E and
    A4: for v1 being object st v1 in V ex e1 being object st e1 in E &
      e1 Joins v1,v,G2 &
      for e2 being object st e2 Joins v1,v,G2 holds e1 = e2 by A1, Def4;
  consider f being Function such that
    A5: f is one-to-one & dom f = E & rng f = V
      by WELLORD2:def 4,A3,CARD_1:5;
  set f1 = f +* (e .--> v1);
  reconsider E1 = E \/ {e}, V1 = V \/ {v1} as set;
  A6: dom f1 = dom f \/ dom (e .--> v1) by FUNCT_4:def 1
    .= dom f \/ dom ({e} --> v1) by FUNCOP_1:def 9
    .= E1 by A5;
  e is set & v1 is set by TARSKI:1;
  then A7: rng (e .--> v1) = {v1} by FUNCOP_1:88;
  then A8: rng f \/ rng (e .--> v1) = V \/ {v1} by A5;
  rng f /\ rng (e .--> v1) = {}
  proof
    assume A9: rng f /\ rng (e .--> v1) <> {};
    set x = the Element of rng f /\ rng (e .--> v1);
    x in V & x in {v1} by XBOOLE_0:def 4,A5,A7,A9;
    hence contradiction by A2, TARSKI:def 1;
  end;
  then A10: f1 is one-to-one by A5, XBOOLE_0:def 7, FUNCT_4:92;
  for w being object holds w in rng f \/ rng (e .--> v1) implies w in rng f1
  proof
    let w be object;
    assume w in rng f \/ rng (e .--> v1);
    then per cases by XBOOLE_0:def 3;
    suppose w in rng f;
      then consider x being object such that
        A11: x in dom f & w = f.x by FUNCT_1:def 3;
      x in E by A5, A11;
      then x <> e by A2, A3, XBOOLE_0:def 3;
      then A13: f1.x = w by A11, FUNCT_4:83;
      x in E1 by A5,A11,XBOOLE_0:def 3;
      hence w in rng f1 by A6, A13, FUNCT_1:def 3;
    end;
    suppose w in rng (e .--> v1);
      hence thesis by FUNCT_4:18, TARSKI:def 3;
    end;
  end;
  then A14: rng f \/ rng (e .--> v1) c= rng f1 by TARSKI:def 3;
  rng f1 c= rng f \/ rng (e .--> v1) by FUNCT_4:17;
  then rng f1 = rng f \/ rng (e .--> v1) by A14, XBOOLE_0:def 10;
  then A15: card E1 = card V1 by A8, A10, A6, WELLORD2:def 4, CARD_1:5;
  :: show other E properties
  A16: the_Edges_of G2 /\ {e} = {} by A2, ZFMISC_1:50, XBOOLE_0:def 7;
  the_Edges_of G3 c= the_Edges_of G2 by GLIB_006:def 9;
  then the_Edges_of G3 /\ {e} c= the_Edges_of G2 /\ {e} by XBOOLE_1:26;
  then A17: the_Edges_of G3 /\ {e} = {} by A16;
  the_Edges_of G3 /\ E1 = the_Edges_of G3 /\ {e} by XBOOLE_1:78,A3;
  then A18: E1 misses the_Edges_of G3 by A17, XBOOLE_0:def 7;
  A19: the_Edges_of G3 \/ E1 = the_Edges_of G2 \/ {e} by A3, XBOOLE_1:4;
  v is Vertex of G2 & v1 is Vertex of G3 by A1, Th50;
  then A20: v in the_Vertices_of G2 & v1 is Vertex of G2 by GLIB_006:68;
  A21: V1 c= the_Vertices_of G3 by A1, XBOOLE_1:8;
  let G1 be _Graph;
  :: the rest of the properties has to be shown step by step
  assume G1 is addEdge of G2,v1,e,v or G1 is addEdge of G2,v,e,v1;
  then per cases;
  suppose A22: G1 is addEdge of G2,v1,e,v;
    then A23: the_Vertices_of G1 = the_Vertices_of G2 &
      the_Edges_of G1 = the_Edges_of G2 \/ {e} &
      the_Source_of G1 = the_Source_of G2 +* (e .--> v1) &
      the_Target_of G1 = the_Target_of G2 +* (e .--> v)
      by A20, A2, GLIB_006:def 11;
    A24: G1 is Supergraph of G3 by A22, GLIB_006:62;
    now
      thus the_Vertices_of G1 = the_Vertices_of G3 \/ {v} by A23,A1, Def4;
      hereby
        let e3 be object;
        thus not e3 Joins v,v,G1
        proof
          assume A25: e3 Joins v,v,G1;
          then per cases by A22, GLIB_006:72;
          suppose e3 Joins v,v,G2;
            hence contradiction by A1, Def4;
          end;
          suppose not e3 in the_Edges_of G2;
            then v1 = v by A2, A20, A22, A25, GLIB_006:107;
            hence contradiction by A1;
          end;
        end;
        let v3 be object;
        thus not v3 in V1 implies not e3 Joins v3,v,G1
        proof
          assume not v3 in V1;
          then A26: not v3 in V & not v3 in {v1} by XBOOLE_0:def 3;
          assume A27: e3 Joins v3,v,G1;
          then per cases by A22, GLIB_006:72;
          suppose e3 Joins v3,v,G2;
            hence contradiction by A1, A26, Def4;
          end;
          suppose not e3 in the_Edges_of G2;
            then per cases by A2, A20, A22, A27, GLIB_006:107;
            suppose v3 = v1 & v = v;
              hence contradiction by A26, TARSKI:def 1;
            end;
            suppose v3 = v & v = v1;
              hence contradiction by A1;
            end;
          end;
        end;
        let v2 be object;
        assume A28: v3 <> v & v2 <> v & e3 DJoins v3,v2,G1;
        then per cases by A24, GLIB_006:71;
        suppose e3 DJoins v3,v2,G3;
          hence e3 DJoins v3,v2,G3;
        end;
        suppose not e3 in the_Edges_of G3;
          per cases by A22, A28, GLIB_006:71;
          suppose e3 DJoins v3,v2,G2;
            hence e3 DJoins v3,v2,G3 by A28, A1, Def4;
          end;
          suppose A29: not e3 in the_Edges_of G2;
            e3 Joins v3,v2,G1 by A28, GLIB_000:16;
            then (v3 = v1 & v2 = v) or (v3 = v & v2 = v1)
              by A2, A20, A22, A29, GLIB_006:107;
            hence e3 DJoins v3,v2,G3 by A28; :: by contradiction
          end;
        end;
      end;
      take E1;
      thus card V1 = card E1 by A15;
      thus E1 misses the_Edges_of G3 by A18;
      thus the_Edges_of G1 = the_Edges_of G3 \/ E1 by A19, A23;
      let v3 be object;
      assume A30: v3 in V1;
      thus ex e1 being object st e1 in E1 & e1 Joins v3,v,G1 &
        for e2 being object st e2 Joins v3,v,G1 holds e1 = e2
      proof
        per cases by A30, XBOOLE_0:def 3;
        suppose A31: v3 in V;
          then consider e1 being object such that
            A32: e1 in E & e1 Joins v3,v,G2 and
            A33: for e2 being object st e2 Joins v3,v,G2 holds e1 = e2 by A4;
          take e1;
          thus e1 in E1 by A32, XBOOLE_0:def 3;
          v3 is set & v is set by TARSKI:1;
          hence e1 Joins v3,v,G1 by A22, A32, GLIB_006:70;
          let e2 be object;
          assume A34: e2 Joins v3,v,G1;
          then per cases by A22, GLIB_006:72;
          suppose e2 Joins v3,v,G2;
            hence e1 = e2 by A33;
          end;
          suppose not e2 in the_Edges_of G2;
            then per cases by A2, A20, A22, A34, GLIB_006:107;
            suppose v3 = v1 & v = v;
              hence thesis by A2, A31; :: by contradiction
            end;
            suppose v3 = v & v = v1;
              hence thesis by A1; :: by contradiction
            end;
          end;
        end;
        suppose v3 in {v1};
          then A35: v3 = v1 by TARSKI:def 1;
          take e;
          e in {e} by TARSKI:def 1;
          hence e in E1 by XBOOLE_0:def 3;
          e DJoins v1,v,G1 by A2, A20, A22, GLIB_006:105;
          hence e Joins v3,v,G1 by A35, GLIB_000:16;
          let e2 be object;
          assume A36: e2 Joins v3,v,G1;
          then per cases by A22, GLIB_006:72, A35;
          suppose e2 Joins v1,v,G2;
            hence thesis by A2, A1, Def4; :: by contradiction (not v1 in V)
          end;
          suppose not e2 in the_Edges_of G2;
            hence e = e2 by A2, A20, A22, A36, GLIB_006:106;
          end;
        end;
      end;
    end;
    hence thesis by A24, A21, A1, Def4;
  end;
  suppose A37: G1 is addEdge of G2,v,e,v1;
    then A38: the_Vertices_of G1 = the_Vertices_of G2 &
      the_Edges_of G1 = the_Edges_of G2 \/ {e} &
      the_Source_of G1 = the_Source_of G2 +* (e .--> v) &
      the_Target_of G1 = the_Target_of G2 +* (e .--> v1)
      by A20, A2, GLIB_006:def 11;
    A39: G1 is Supergraph of G3 by A37, GLIB_006:62;
    now
      thus the_Vertices_of G1 = the_Vertices_of G3 \/ {v} by A1, A38, Def4;
      hereby
        let e3 be object;
        thus not e3 Joins v,v,G1
        proof
          assume A40: e3 Joins v,v,G1;
          then per cases by A37, GLIB_006:72;
          suppose e3 Joins v,v,G2;
            hence contradiction by A1, Def4;
          end;
          suppose not e3 in the_Edges_of G2;
            then v1 = v by A2, A20, A37, A40, GLIB_006:107;
            hence contradiction by A1;
          end;
        end;
        let v3 be object;
        thus not v3 in V1 implies not e3 Joins v3,v,G1
        proof
          assume not v3 in V1;
          then A41: not v3 in V & not v3 in {v1} by XBOOLE_0:def 3;
          assume A42: e3 Joins v3,v,G1;
          then per cases by A37, GLIB_006:72;
          suppose e3 Joins v3,v,G2;
            hence contradiction by A1, A41, Def4;
          end;
          suppose not e3 in the_Edges_of G2;
            then per cases by A2, A20, A37, A42, GLIB_006:107;
            suppose v3 = v & v = v1;
              hence contradiction by A1;
            end;
            suppose v3 = v1 & v = v;
              hence contradiction by A41, TARSKI:def 1;
            end;
          end;
        end;
        let v2 be object;
        assume A43: v3 <> v & v2 <> v & e3 DJoins v3,v2,G1;
        then per cases by A39, GLIB_006:71;
        suppose e3 DJoins v3,v2,G3;
          hence e3 DJoins v3,v2,G3;
        end;
        suppose not e3 in the_Edges_of G3;
          per cases by A37, A43, GLIB_006:71;
          suppose e3 DJoins v3,v2,G2;
            hence e3 DJoins v3,v2,G3 by A43, A1, Def4;
          end;
          suppose A44: not e3 in the_Edges_of G2;
            e3 Joins v3,v2,G1 by A43, GLIB_000:16;
            then (v3 = v & v2 = v1) or (v3 = v1 & v2 = v)
              by A2, A20, A37, A44, GLIB_006:107;
            hence e3 DJoins v3,v2,G3 by A43; :: by contradiction
          end;
        end;
      end;
      take E1;
      thus card V1 = card E1 by A15;
      thus E1 misses the_Edges_of G3 by A18;
      thus the_Edges_of G1 = the_Edges_of G3 \/ E1 by A19, A38;
      let v3 be object;
      assume A45: v3 in V1;
      thus ex e1 being object st e1 in E1 & e1 Joins v3,v,G1 &
        for e2 being object st e2 Joins v3,v,G1 holds e1 = e2
      proof
        per cases by A45, XBOOLE_0:def 3;
        suppose A46: v3 in V;
          then consider e1 being object such that
            A47: e1 in E & e1 Joins v3,v,G2 and
            A48: for e2 being object st e2 Joins v3,v,G2 holds e1 = e2 by A4;
          take e1;
          thus e1 in E1 by A47, XBOOLE_0:def 3;
          v3 is set & v is set by TARSKI:1;
          hence e1 Joins v3,v,G1 by A37, A47, GLIB_006:70;
          let e2 be object;
          assume A49: e2 Joins v3,v,G1;
          then per cases by A37, GLIB_006:72;
          suppose e2 Joins v3,v,G2;
            hence e1 = e2 by A48;
          end;
          suppose not e2 in the_Edges_of G2;
            then per cases by A2, A20, A37, A49, GLIB_006:107;
            suppose v3 = v & v = v1;
              hence thesis by A1; :: by contradiction
            end;
            suppose v3 = v1 & v = v;
              hence thesis by A2, A46; :: by contradiction
            end;
          end;
        end;
        suppose v3 in {v1};
          then A50: v3 = v1 by TARSKI:def 1;
          take e;
          e in {e} by TARSKI:def 1;
          hence e in E1 by XBOOLE_0:def 3;
          e DJoins v,v1,G1 by A2, A20, A37, GLIB_006:105;
          hence e Joins v3,v,G1 by A50, GLIB_000:16;
          let e2 be object;
          assume A51: e2 Joins v3,v,G1;
          then per cases by A50, A37, GLIB_006:72;
          suppose e2 Joins v1,v,G2;
            hence thesis by A2, A1, Def4; :: by contradiction (not v1 in V)
          end;
          suppose not e2 in the_Edges_of G2;
            hence e = e2 by A2, A20, A37, A51, GLIB_006:106;
          end;
        end;
      end;
    end;
    hence thesis by A39, A21, A1, Def4;
  end;
end;
