
theorem
  for G1, G2 being _Graph, F being PGraphMapping of G1, G2
  holds F is directed iff
    the_Source_of G2 * F_E = F_V * ((the_Source_of G1)|dom F_E) &
      the_Target_of G2 * F_E = F_V * ((the_Target_of G1)|dom F_E)
proof
  let G1, G2 be _Graph, F be PGraphMapping of G1, G2;
  hereby
    assume F is directed;
    then A1: for e being object st e in dom F_E
      holds (the_Source_of G2).(F_E.e) = F_V.((the_Source_of G1).e) &
        (the_Target_of G2).(F_E.e) = F_V.((the_Target_of G1).e) by Th13;
    for x being object holds x in dom (the_Source_of G2 * F_E)
      iff x in dom (F_V * ((the_Source_of G1)|dom F_E))
    proof
      let x be object;
      hereby
        assume x in dom (the_Source_of G2 * F_E);
        then A2: x in dom F_E by FUNCT_1:11;
        then x in the_Edges_of G1;
        then x in dom the_Source_of G1 by FUNCT_2:def 1;
        then A3: x in dom ((the_Source_of G1)|dom F_E) by A2, RELAT_1:57;
        (the_Source_of G1).x in dom F_V by A2, Th5;
        then ((the_Source_of G1)|dom F_E).x in dom F_V by A2, FUNCT_1:49;
        hence x in dom (F_V * ((the_Source_of G1)|dom F_E)) by A3, FUNCT_1:11;
      end;
      assume x in dom (F_V * ((the_Source_of G1)|dom F_E));
      then x in dom ((the_Source_of G1)|dom F_E) by FUNCT_1:11;
      then A4: x in dom (the_Source_of G1) & x in dom F_E by RELAT_1:57;
      then F_E.x in the_Edges_of G2 by PARTFUN1:4;
      then F_E.x in dom (the_Source_of G2) by FUNCT_2:def 1;
      hence thesis by A4, FUNCT_1:11;
    end;
    then A5: dom (the_Source_of G2 * F_E)
      = dom (F_V * ((the_Source_of G1)|dom F_E)) by TARSKI:2;
    for x being object st x in dom (the_Source_of G2 * F_E) holds
      (the_Source_of G2 * F_E).x = (F_V * ((the_Source_of G1)|dom F_E)).x
    proof
      let x be object;
      assume A6: x in dom (the_Source_of G2 * F_E);
      then A7: x in dom F_E by FUNCT_1:11;
      A8: x in dom ((the_Source_of G1)|dom F_E) by A5, A6, FUNCT_1:11;
      thus (the_Source_of G2 * F_E).x
         = (the_Source_of G2).(F_E.x) by A6, FUNCT_1:12
        .= F_V.((the_Source_of G1).x) by A1, A7
        .= F_V.(((the_Source_of G1)|dom F_E).x) by A8, FUNCT_1:47
        .= (F_V * ((the_Source_of G1)|dom F_E)).x by A8, FUNCT_1:13;
    end;
    hence the_Source_of G2 * F_E = F_V * ((the_Source_of G1)|dom F_E)
      by A5, FUNCT_1:2;
    for x being object holds x in dom (the_Target_of G2 * F_E)
      iff x in dom (F_V * ((the_Target_of G1)|dom F_E))
    proof
      let x be object;
      hereby
        assume x in dom (the_Target_of G2 * F_E);
        then A9: x in dom F_E by FUNCT_1:11;
        then x in the_Edges_of G1;
        then x in dom the_Target_of G1 by FUNCT_2:def 1;
        then A10: x in dom ((the_Target_of G1)|dom F_E) by A9, RELAT_1:57;
        (the_Target_of G1).x in dom F_V by A9, Th5;
        then ((the_Target_of G1)|dom F_E).x in dom F_V by A9, FUNCT_1:49;
        hence x in dom (F_V * ((the_Target_of G1)|dom F_E)) by A10, FUNCT_1:11;
      end;
      assume x in dom (F_V * ((the_Target_of G1)|dom F_E));
      then x in dom ((the_Target_of G1)|dom F_E) by FUNCT_1:11;
      then A11: x in dom (the_Target_of G1) & x in dom F_E by RELAT_1:57;
      then F_E.x in the_Edges_of G2 by PARTFUN1:4;
      then F_E.x in dom (the_Target_of G2) by FUNCT_2:def 1;
      hence thesis by A11, FUNCT_1:11;
    end;
    then A12: dom (the_Target_of G2 * F_E)
      = dom (F_V * ((the_Target_of G1)|dom F_E)) by TARSKI:2;
    for x being object st x in dom (the_Target_of G2 * F_E) holds
      (the_Target_of G2 * F_E).x = (F_V * ((the_Target_of G1)|dom F_E)).x
    proof
      let x be object;
      assume A13: x in dom (the_Target_of G2 * F_E);
      then A14: x in dom F_E by FUNCT_1:11;
      x in dom (F_V * ((the_Target_of G1)|dom F_E)) by A12, A13;
      then A15: x in dom ((the_Target_of G1)|dom F_E) by FUNCT_1:11;
      thus (the_Target_of G2 * F_E).x
         = (the_Target_of G2).(F_E.x) by A13, FUNCT_1:12
        .= F_V.((the_Target_of G1).x) by A1, A14
        .= F_V.(((the_Target_of G1)|dom F_E).x) by A15, FUNCT_1:47
        .= (F_V * ((the_Target_of G1)|dom F_E)).x by A15, FUNCT_1:13;
    end;
    hence the_Target_of G2 * F_E = F_V * ((the_Target_of G1)|dom F_E)
      by A12, FUNCT_1:2;
  end;
  assume A16: the_Source_of G2 * F_E = F_V * ((the_Source_of G1)|dom F_E) &
    the_Target_of G2 * F_E = F_V * ((the_Target_of G1)|dom F_E);
  now
    let x be object;
    assume A17: x in dom F_E;
    then x in the_Edges_of G1;
    then x in dom the_Source_of G1 & x in dom the_Target_of G1
      by FUNCT_2:def 1;
    then A18: x in dom ((the_Source_of G1)|dom F_E) &
      x in dom ((the_Target_of G1)|dom F_E) by A17, RELAT_1:57;
    thus (the_Source_of G2).(F_E.x)
       = (the_Source_of G2 * F_E).x by A17, FUNCT_1:13
      .= F_V.(((the_Source_of G1)|dom F_E).x) by A16, A18, FUNCT_1:13
      .= F_V.((the_Source_of G1).x) by A17, FUNCT_1:49;
    thus (the_Target_of G2).(F_E.x)
       = (the_Target_of G2 * F_E).x by A17, FUNCT_1:13
      .= F_V.(((the_Target_of G1)|dom F_E).x) by A16, A18, FUNCT_1:13
      .= F_V.((the_Target_of G1).x) by A17, FUNCT_1:49;
  end;
  hence thesis by Th13;
end;
