reserve V for Universe,
  a,b,x,y,z,x9,y9 for Element of V,
  X for Subclass of V,
  o,p,q,r,s,t,u,a1,a2,a3,A,B,C,D for set,
  K,L,M for Ordinal,
  n for Element of omega,
  fs for finite Subset of omega,
  e,g,h for Function,
  E for non empty set,
  f for Function of VAR,E,
  k,k1 for Element of NAT,
  v1,v2,v3 for Element of VAR,
  H,H9 for ZF-formula;

theorem Th19:
  X is closed_wrt_A1-A7 & E in X implies for H st Diagram(H,E) in
  X holds Diagram('not' H,E) in X
proof
  assume that
A1: X is closed_wrt_A1-A7 and
A2: E in X;
  reconsider m=E as Element of V by A2;
  let H such that
A3: Diagram(H,E) in X;
  set fs=code Free(H);
A4: fs=code Free('not' H) by ZF_LANG1:60;
  now
    let p be object;
A5: now
      assume p in Diagram('not' H,E);
      then consider f such that
A6:   p=(f*decode)|fs and
A7:   f in St('not' H,E) by A4,Def4;
      thus p in Funcs(fs,E) by A6,Lm3;
      thus not p in Diagram(H,E)
      proof
        assume not thesis;
        then
        ex g being Function of VAR,E st p=(g*decode)|fs & g in St(H,E) by Def4;
        then f in St(H,E) by A6,Lm10;
        hence contradiction by A7,ZF_MODEL:4;
      end;
    end;
    now
      assume that
A8:   p in Funcs(fs,E) and
A9:   not p in Diagram(H,E);
      consider e such that
A10:  p=e and
      dom e = fs and
      rng e c= E by A8,FUNCT_2:def 2;
      consider f such that
A11:  e=(f*decode)|fs by A8,A10,Lm11;
      not f in St(H,E) by A9,A10,A11,Def4;
      then Free('not' H)=Free(H) & f in St('not' H,E) by ZF_LANG1:60,ZF_MODEL:4
;
      hence p in Diagram('not' H,E) by A10,A11,Def4;
    end;
    hence p in Diagram('not' H,E) iff p in Funcs(fs,E) & not p in Diagram(H,E)
    by A5;
  end;
  then
A12: Diagram('not' H,E)=Funcs(fs,E)\Diagram(H,E) by XBOOLE_0:def 5;
  Funcs(fs,m) in X by A1,A2,Th9;
  hence thesis by A1,A3,A12,Th4;
end;
