Article NET_1, MML version 4.99.1005

:: NET_1:structnot 1 => NET_1:struct 1
definition
  struct() Net(#
    Places -> set,
    Transitions -> set,
    Flow -> Relation-like set
  #);
end;

:: NET_1:attrnot 1 => NET_1:attr 1
definition
  let a1 be Net;
  attr a1 is strict;
end;

:: NET_1:exreg 1
registration
  cluster strict Net;
end;

:: NET_1:aggrnot 1 => NET_1:aggr 1
definition
  let a1, a2 be set;
  let a3 be Relation-like set;
  aggr Net(#a1,a2,a3#) -> strict Net;
end;

:: NET_1:selnot 1 => NET_1:sel 1
definition
  let a1 be Net;
  sel the Places of a1 -> set;
end;

:: NET_1:selnot 2 => NET_1:sel 2
definition
  let a1 be Net;
  sel the Transitions of a1 -> set;
end;

:: NET_1:selnot 3 => NET_1:sel 3
definition
  let a1 be Net;
  sel the Flow of a1 -> Relation-like set;
end;

:: NET_1:attrnot 2 => NET_1:attr 2
definition
  let a1 be Net;
  attr a1 is Petri means
    the Places of a1 misses the Transitions of a1 &
     the Flow of a1 c= [:the Places of a1,the Transitions of a1:] \/ [:the Transitions of a1,the Places of a1:];
end;

:: NET_1:dfs 1
definiens
  let a1 be Net;
To prove
     a1 is Petri
it is sufficient to prove
  thus the Places of a1 misses the Transitions of a1 &
     the Flow of a1 c= [:the Places of a1,the Transitions of a1:] \/ [:the Transitions of a1,the Places of a1:];

:: NET_1:def 1
theorem
for b1 being Net holds
      b1 is Petri
   iff
      the Places of b1 misses the Transitions of b1 &
       the Flow of b1 c= [:the Places of b1,the Transitions of b1:] \/ [:the Transitions of b1,the Places of b1:];

:: NET_1:prednot 1 => NET_1:attr 2
notation
  let a1 be Net;
  synonym a1 is_Petri_net for Petri;
end;

:: NET_1:funcnot 1 => NET_1:func 1
definition
  let a1 be Net;
  func Elements A1 -> set equals
    (the Places of a1) \/ the Transitions of a1;
end;

:: NET_1:def 2
theorem
for b1 being Net holds
   Elements b1 = (the Places of b1) \/ the Transitions of b1;

:: NET_1:th 7
theorem
for b1 being set
for b2 being Net
      st Elements b2 <> {} & b1 is Element of Elements b2 & b1 is not Element of the Places of b2
   holds b1 is Element of the Transitions of b2;

:: NET_1:th 8
theorem
for b1 being set
for b2 being Net
      st b1 is Element of the Places of b2 & the Places of b2 <> {}
   holds b1 is Element of Elements b2;

:: NET_1:th 9
theorem
for b1 being set
for b2 being Net
      st b1 is Element of the Transitions of b2 & the Transitions of b2 <> {}
   holds b1 is Element of Elements b2;

:: NET_1:funcreg 1
registration
  cluster Net(#{},{},{}#) -> strict Petri;
end;

:: NET_1:exreg 2
registration
  cluster strict Petri Net;
end;

:: NET_1:modenot 1
definition
  mode Pnet is Petri Net;
end;

:: NET_1:th 11
theorem
for b1 being set
for b2 being Petri Net
      st b1 in the Places of b2
   holds not b1 in the Transitions of b2;

:: NET_1:th 12
theorem
for b1, b2 being set
for b3 being Petri Net
      st [b1,b2] in the Flow of b3 & b1 in the Transitions of b3
   holds b2 in the Places of b3;

:: NET_1:th 13
theorem
for b1, b2 being set
for b3 being Petri Net
      st [b1,b2] in the Flow of b3 & b2 in the Transitions of b3
   holds b1 in the Places of b3;

:: NET_1:th 14
theorem
for b1, b2 being set
for b3 being Petri Net
      st [b1,b2] in the Flow of b3 & b1 in the Places of b3
   holds b2 in the Transitions of b3;

:: NET_1:th 15
theorem
for b1, b2 being set
for b3 being Petri Net
      st [b1,b2] in the Flow of b3 & b2 in the Places of b3
   holds b1 in the Transitions of b3;

:: NET_1:prednot 2 => NET_1:pred 1
definition
  let a1 be Petri Net;
  let a2, a3 be set;
  pred pre A1,A2,A3 means
    [a3,a2] in the Flow of a1 & a2 in the Transitions of a1;
end;

:: NET_1:dfs 3
definiens
  let a1 be Petri Net;
  let a2, a3 be set;
To prove
     pre a1,a2,a3
it is sufficient to prove
  thus [a3,a2] in the Flow of a1 & a2 in the Transitions of a1;

:: NET_1:def 5
theorem
for b1 being Petri Net
for b2, b3 being set holds
   pre b1,b2,b3
iff
   [b3,b2] in the Flow of b1 & b2 in the Transitions of b1;

:: NET_1:prednot 3 => NET_1:pred 2
definition
  let a1 be Petri Net;
  let a2, a3 be set;
  pred post A1,A2,A3 means
    [a2,a3] in the Flow of a1 & a2 in the Transitions of a1;
end;

:: NET_1:dfs 4
definiens
  let a1 be Petri Net;
  let a2, a3 be set;
To prove
     post a1,a2,a3
it is sufficient to prove
  thus [a2,a3] in the Flow of a1 & a2 in the Transitions of a1;

:: NET_1:def 6
theorem
for b1 being Petri Net
for b2, b3 being set holds
   post b1,b2,b3
iff
   [b2,b3] in the Flow of b1 & b2 in the Transitions of b1;

:: NET_1:funcnot 2 => NET_1:func 2
definition
  let a1 be Net;
  let a2 be Element of Elements a1;
  func Pre(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 in Elements a1 & [b1,a2] in the Flow of a1;
end;

:: NET_1:def 7
theorem
for b1 being Net
for b2 being Element of Elements b1
for b3 being set holds
      b3 = Pre(b1,b2)
   iff
      for b4 being set holds
            b4 in b3
         iff
            b4 in Elements b1 & [b4,b2] in the Flow of b1;

:: NET_1:funcnot 3 => NET_1:func 3
definition
  let a1 be Net;
  let a2 be Element of Elements a1;
  func Post(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 in Elements a1 & [a2,b1] in the Flow of a1;
end;

:: NET_1:def 8
theorem
for b1 being Net
for b2 being Element of Elements b1
for b3 being set holds
      b3 = Post(b1,b2)
   iff
      for b4 being set holds
            b4 in b3
         iff
            b4 in Elements b1 & [b2,b4] in the Flow of b1;

:: NET_1:th 16
theorem
for b1 being Petri Net
for b2 being Element of Elements b1 holds
   Pre(b1,b2) c= Elements b1;

:: NET_1:th 17
theorem
for b1 being Petri Net
for b2 being Element of Elements b1 holds
   Pre(b1,b2) c= Elements b1;

:: NET_1:th 18
theorem
for b1 being Petri Net
for b2 being Element of Elements b1 holds
   Post(b1,b2) c= Elements b1;

:: NET_1:th 19
theorem
for b1 being Petri Net
for b2 being Element of Elements b1 holds
   Post(b1,b2) c= Elements b1;

:: NET_1:th 20
theorem
for b1 being set
for b2 being Petri Net
for b3 being Element of Elements b2
      st b3 in the Transitions of b2
   holds    b1 in Pre(b2,b3)
   iff
      pre b2,b3,b1;

:: NET_1:th 21
theorem
for b1 being set
for b2 being Petri Net
for b3 being Element of Elements b2
      st b3 in the Transitions of b2
   holds    b1 in Post(b2,b3)
   iff
      post b2,b3,b1;

:: NET_1:funcnot 4 => NET_1:func 4
definition
  let a1 be Petri Net;
  let a2 be Element of Elements a1;
  assume Elements a1 <> {};
  func enter(A1,A2) -> set means
    (a2 in the Places of a1 implies it = {a2}) & (a2 in the Transitions of a1 implies it = Pre(a1,a2));
end;

:: NET_1:def 9
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
   st Elements b1 <> {}
for b3 being set holds
      b3 = enter(b1,b2)
   iff
      (b2 in the Places of b1 implies b3 = {b2}) & (b2 in the Transitions of b1 implies b3 = Pre(b1,b2));

:: NET_1:th 22
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
      st Elements b1 <> {} & enter(b1,b2) <> {b2}
   holds enter(b1,b2) = Pre(b1,b2);

:: NET_1:th 23
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
      st Elements b1 <> {}
   holds enter(b1,b2) c= Elements b1;

:: NET_1:th 24
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
      st Elements b1 <> {}
   holds enter(b1,b2) c= Elements b1;

:: NET_1:funcnot 5 => NET_1:func 5
definition
  let a1 be Petri Net;
  let a2 be Element of Elements a1;
  assume Elements a1 <> {};
  func exit(A1,A2) -> set means
    (a2 in the Places of a1 implies it = {a2}) & (a2 in the Transitions of a1 implies it = Post(a1,a2));
end;

:: NET_1:def 10
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
   st Elements b1 <> {}
for b3 being set holds
      b3 = exit(b1,b2)
   iff
      (b2 in the Places of b1 implies b3 = {b2}) & (b2 in the Transitions of b1 implies b3 = Post(b1,b2));

:: NET_1:th 25
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
      st Elements b1 <> {} & exit(b1,b2) <> {b2}
   holds exit(b1,b2) = Post(b1,b2);

:: NET_1:th 26
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
      st Elements b1 <> {}
   holds exit(b1,b2) c= Elements b1;

:: NET_1:th 27
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
      st Elements b1 <> {}
   holds exit(b1,b2) c= Elements b1;

:: NET_1:funcnot 6 => NET_1:func 6
definition
  let a1 be Petri Net;
  let a2 be Element of Elements a1;
  func field(A1,A2) -> set equals
    (enter(a1,a2)) \/ exit(a1,a2);
end;

:: NET_1:def 11
theorem
for b1 being Petri Net
for b2 being Element of Elements b1 holds
   field(b1,b2) = (enter(b1,b2)) \/ exit(b1,b2);

:: NET_1:funcnot 7 => NET_1:func 7
definition
  let a1 be Net;
  let a2 be Element of the Transitions of a1;
  func Prec(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 in the Places of a1 & [b1,a2] in the Flow of a1;
end;

:: NET_1:def 12
theorem
for b1 being Net
for b2 being Element of the Transitions of b1
for b3 being set holds
      b3 = Prec(b1,b2)
   iff
      for b4 being set holds
            b4 in b3
         iff
            b4 in the Places of b1 & [b4,b2] in the Flow of b1;

:: NET_1:funcnot 8 => NET_1:func 8
definition
  let a1 be Net;
  let a2 be Element of the Transitions of a1;
  func Postc(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 in the Places of a1 & [a2,b1] in the Flow of a1;
end;

:: NET_1:def 13
theorem
for b1 being Net
for b2 being Element of the Transitions of b1
for b3 being set holds
      b3 = Postc(b1,b2)
   iff
      for b4 being set holds
            b4 in b3
         iff
            b4 in the Places of b1 & [b2,b4] in the Flow of b1;

:: NET_1:funcnot 9 => NET_1:func 9
definition
  let a1 be Petri Net;
  let a2 be set;
  func Entr(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 c= Elements a1 &
           (ex b2 being Element of Elements a1 st
              b2 in a2 & b1 = enter(a1,b2));
end;

:: NET_1:def 14
theorem
for b1 being Petri Net
for b2, b3 being set holds
   b3 = Entr(b1,b2)
iff
   for b4 being set holds
         b4 in b3
      iff
         b4 c= Elements b1 &
          (ex b5 being Element of Elements b1 st
             b5 in b2 & b4 = enter(b1,b5));

:: NET_1:funcnot 10 => NET_1:func 10
definition
  let a1 be Petri Net;
  let a2 be set;
  func Ext(A1,A2) -> set means
    for b1 being set holds
          b1 in it
       iff
          b1 c= Elements a1 &
           (ex b2 being Element of Elements a1 st
              b2 in a2 & b1 = exit(a1,b2));
end;

:: NET_1:def 15
theorem
for b1 being Petri Net
for b2, b3 being set holds
   b3 = Ext(b1,b2)
iff
   for b4 being set holds
         b4 in b3
      iff
         b4 c= Elements b1 &
          (ex b5 being Element of Elements b1 st
             b5 in b2 & b4 = exit(b1,b5));

:: NET_1:th 28
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
for b3 being set
      st Elements b1 <> {} & b3 c= Elements b1 & b2 in b3
   holds enter(b1,b2) in Entr(b1,b3);

:: NET_1:th 29
theorem
for b1 being Petri Net
for b2 being Element of Elements b1
for b3 being set
      st Elements b1 <> {} & b3 c= Elements b1 & b2 in b3
   holds exit(b1,b2) in Ext(b1,b3);

:: NET_1:funcnot 11 => NET_1:func 11
definition
  let a1 be Petri Net;
  let a2 be set;
  func Input(A1,A2) -> set equals
    union Entr(a1,a2);
end;

:: NET_1:def 16
theorem
for b1 being Petri Net
for b2 being set holds
   Input(b1,b2) = union Entr(b1,b2);

:: NET_1:funcnot 12 => NET_1:func 12
definition
  let a1 be Petri Net;
  let a2 be set;
  func Output(A1,A2) -> set equals
    union Ext(a1,a2);
end;

:: NET_1:def 17
theorem
for b1 being Petri Net
for b2 being set holds
   Output(b1,b2) = union Ext(b1,b2);

:: NET_1:th 30
theorem
for b1 being Petri Net
for b2, b3 being set
      st Elements b1 <> {} & b3 c= Elements b1
   holds    b2 in Input(b1,b3)
   iff
      ex b4 being Element of Elements b1 st
         b4 in b3 & b2 in enter(b1,b4);

:: NET_1:th 31
theorem
for b1 being Petri Net
for b2, b3 being set
      st Elements b1 <> {} & b3 c= Elements b1
   holds    b2 in Output(b1,b3)
   iff
      ex b4 being Element of Elements b1 st
         b4 in b3 & b2 in exit(b1,b4);

:: NET_1:th 32
theorem
for b1 being Petri Net
for b2 being Element of bool Elements b1
for b3 being Element of Elements b1
      st Elements b1 <> {}
   holds    b3 in Input(b1,b2)
   iff
      ((b3 in b2 implies not b3 in the Places of b1) implies ex b4 being Element of Elements b1 st
         b4 in b2 & b4 in the Transitions of b1 & pre b1,b4,b3);

:: NET_1:th 33
theorem
for b1 being Petri Net
for b2 being Element of bool Elements b1
for b3 being Element of Elements b1
      st Elements b1 <> {}
   holds    b3 in Output(b1,b2)
   iff
      ((b3 in b2 implies not b3 in the Places of b1) implies ex b4 being Element of Elements b1 st
         b4 in b2 & b4 in the Transitions of b1 & post b1,b4,b3);