reserve x,y for set;
reserve N for PT_net_Str;

theorem
  for N being Pnet for X being Subset of Elements(N) for x being Element
of Elements(N) holds Elements(N) <> {} implies (x in Input(N,X) iff (x in X & x
  in the carrier of N or ex y being Element of Elements(N) st y in X & y in the
  carrier' of N & pre N,y,x))
proof
  let N be Pnet;
  let X be Subset of Elements(N);
  let x be Element of Elements(N);
A1: (x in X & x in the carrier of N or ex y being Element of Elements(N) st
  y in X & y in the carrier' of N & pre N,y,x) implies x in Input(N,X)
  proof
A2: (ex y being Element of Elements(N) st y in X & y in the carrier'
    of N & pre N,y,x) implies x in Input(N,X)
    proof
      given y being Element of Elements(N) such that
A3:   y in X and
A4:   y in the carrier' of N and
A5:   pre N,y,x;
      [x,y] in Flow N by A5;
      then x in Pre(N,y) by A4,Def6;
      then
A6:   x in enter(N,y) by A4,Def8;
      enter(N,y) in Entr(N,X) by A3,Th21;
      hence thesis by A6,TARSKI:def 4;
    end;
A7: x in X & x in the carrier of N implies x in Input(N,X)
    proof
      assume that
A8:   x in X and
A9:   x in the carrier of N;
      enter(N,x) = {x} & {x} c= Elements(N) by A9,Def8,ZFMISC_1:31;
      then
A10:  {x} in Entr(N,X) by A8,Def13;
      x in {x} by TARSKI:def 1;
      hence thesis by A10,TARSKI:def 4;
    end;
    assume x in X & x in the carrier of N or ex y being Element of Elements(N
    ) st y in X & y in the carrier' of N & pre N,y,x;
    hence thesis by A7,A2;
  end;
  assume
A11: Elements(N) <> {};
  x in Input(N,X) implies x in X & x in the carrier of N or ex y being
  Element of Elements(N) st y in X & y in the carrier' of N & pre N,y,x
  proof
    assume x in Input(N,X);
    then ex y being set st x in y & y in Entr(N,X) by TARSKI:def 4;
    then consider y being set such that
A12: y in Entr(N,X) and
A13: x in y;
    consider z being Element of Elements(N) such that
A14: z in X and
A15: y = enter(N,z) by A12,Def13;
A16: z in the carrier' of N implies y = Pre(N,z) by A15,Def8;
A17: z in the carrier' of N implies ex y being Element of Elements(N)
    st y in X & y in the carrier' of N & pre N,y,x
    proof
      assume
A18:  z in the carrier' of N;
      take z;
      [x,z] in Flow N by A13,A16,A18,Def6;
      hence thesis by A14,A18;
    end;
A19: z in the carrier of N or z in the carrier' of N by A11,XBOOLE_0:def 3;
    z in the carrier of N implies y = {z} by A15,Def8;
    hence thesis by A13,A14,A19,A17,TARSKI:def 1;
  end;
  hence thesis by A1;
end;
