:: PNPROC_1 semantic presentation

theorem Th1: :: PNPROC_1:1
for b1 being Nat
for b2 being set st b1 > 0 holds
{[b1,b2]} is FinSubsequence
proof end;

Lemma2: for b1 being FinSubsequence st Seq b1 = {} holds
b1 = {}
proof end;

theorem Th2: :: PNPROC_1:2
for b1 being FinSubsequence holds
( b1 = {} iff Seq b1 = {} )
proof end;

theorem Th3: :: PNPROC_1:3
for b1 being Nat
for b2 being set
for b3 being FinSubsequence st b3 = {[b1,b2]} holds
Seq b3 = <*b2*>
proof end;

registration
cluster -> finite set ;
coherence
for b1 being FinSubsequence holds b1 is finite
proof end;
end;

theorem Th4: :: PNPROC_1:4
for b1 being set
for b2 being FinSubsequence st Seq b2 = <*b1*> holds
ex b3 being Nat st b2 = {[b3,b1]}
proof end;

theorem Th5: :: PNPROC_1:5
for b1, b2, b3, b4 being set holds
( not {[b1,b2],[b3,b4]} is FinSequence or ( b1 = 1 & b3 = 1 & b2 = b4 ) or ( b1 = 1 & b3 = 2 ) or ( b1 = 2 & b3 = 1 ) )
proof end;

theorem Th6: :: PNPROC_1:6
for b1, b2 being set holds <*b1,b2*> = {[1,b1],[2,b2]}
proof end;

Lemma8: for b1, b2, b3 being Nat st ( ( 1 <= b1 & b1 <= b3 ) or ( b3 + 1 <= b1 & b1 <= b3 + b2 ) ) holds
( 1 <= b1 & b1 <= b3 + b2 )
proof end;

theorem Th7: :: PNPROC_1:7
for b1 being FinSubsequence holds Card b1 = len (Seq b1)
proof end;

Lemma10: for b1, b2 being set holds
( ( for b3 being set st b3 in b1 holds
not b3 in b2 ) iff b1 misses b2 )
proof end;

theorem Th8: :: PNPROC_1:8
for b1, b2 being Relation st dom b1 misses dom b2 holds
b1 misses b2
proof end;

theorem Th9: :: PNPROC_1:9
for b1, b2 being set
for b3, b4 being Relation st b1 misses b2 holds
b3 | b1 misses b4 | b2
proof end;

Lemma13: for b1 being FinSubsequence holds dom (Seq b1) = dom (Sgm (dom b1))
proof end;

Lemma14: for b1 being FinSubsequence holds rng b1 = rng (Seq b1)
proof end;

theorem Th10: :: PNPROC_1:10
for b1, b2, b3 being Function st b1 c= b3 & b2 c= b3 & b1 misses b2 holds
dom b1 misses dom b2
proof end;

theorem Th11: :: PNPROC_1:11
for b1 being set
for b2 being Relation holds b1 | b2 c= b2 | (b2 " b1)
proof end;

theorem Th12: :: PNPROC_1:12
for b1 being set
for b2 being Function holds b1 | b2 = b2 | (b2 " b1)
proof end;

definition
let c1 be set ;
mode marking of c1 -> Function means :Def1: :: PNPROC_1:def 1
( dom a2 = a1 & rng a2 c= NAT );
existence
ex b1 being Function st
( dom b1 = c1 & rng b1 c= NAT )
proof end;
end;

:: deftheorem Def1 defines marking PNPROC_1:def 1 :
for b1 being set
for b2 being Function holds
( b2 is marking of b1 iff ( dom b2 = b1 & rng b2 c= NAT ) );

notation
let c1 be set ;
let c2 be marking of c1;
let c3 be set ;
synonym c2 multitude_of c3 for c1 . c2;
end;

definition
let c1 be set ;
let c2 be marking of c1;
let c3 be set ;
redefine func multitude_of as c2 multitude_of c3 -> Nat;
coherence
c3 multitude_of is Nat
proof end;
redefine func multitude_of as c2 . c3 -> Nat;
coherence
c3 multitude_of is Nat
proof end;
end;

scheme :: PNPROC_1:sch 1
s1{ F1() -> set , F2( set ) -> Nat } :
ex b1 being marking of F1() st
for b2 being set st b2 in F1() holds
b1 multitude_of b2 = F2(b2)
proof end;

definition
let c1 be set ;
let c2, c3 be marking of c1;
redefine pred = as c2 = c3 means :: PNPROC_1:def 2
for b1 being set st b1 in a1 holds
a2 multitude_of b1 = a3 multitude_of b1;
compatibility
( c2 = c3 iff for b1 being set st b1 in c1 holds
c2 multitude_of b1 = c3 multitude_of b1 )
proof end;
end;

:: deftheorem Def2 defines = PNPROC_1:def 2 :
for b1 being set
for b2, b3 being marking of b1 holds
( b2 = b3 iff for b4 being set st b4 in b1 holds
b2 multitude_of b4 = b3 multitude_of b4 );

definition
let c1 be set ;
func {$} c1 -> marking of a1 equals :: PNPROC_1:def 3
a1 --> 0;
coherence
c1 --> 0 is marking of c1
proof end;
end;

:: deftheorem Def3 defines {$} PNPROC_1:def 3 :
for b1 being set holds {$} b1 = b1 --> 0;

definition
let c1 be set ;
let c2, c3 be marking of c1;
pred c2 c= c3 means :Def4: :: PNPROC_1:def 4
for b1 being set st b1 in a1 holds
a2 multitude_of b1 <= a3 multitude_of b1;
reflexivity
for b1 being marking of c1
for b2 being set st b2 in c1 holds
b1 multitude_of b2 <= b1 multitude_of b2
;
end;

:: deftheorem Def4 defines c= PNPROC_1:def 4 :
for b1 being set
for b2, b3 being marking of b1 holds
( b2 c= b3 iff for b4 being set st b4 in b1 holds
b2 multitude_of b4 <= b3 multitude_of b4 );

Lemma19: for b1, b2 being set st b1 in b2 holds
({$} b2) multitude_of b1 = 0
proof end;

theorem Th13: :: PNPROC_1:13
for b1 being set
for b2 being marking of b1 holds {$} b1 c= b2
proof end;

theorem Th14: :: PNPROC_1:14
for b1 being set
for b2, b3, b4 being marking of b1 st b2 c= b3 & b3 c= b4 holds
b2 c= b4
proof end;

definition
let c1 be set ;
let c2, c3 be marking of c1;
func c2 + c3 -> marking of a1 means :Def5: :: PNPROC_1:def 5
for b1 being set st b1 in a1 holds
a4 multitude_of b1 = (a2 multitude_of b1) + (a3 multitude_of b1);
existence
ex b1 being marking of c1 st
for b2 being set st b2 in c1 holds
b1 multitude_of b2 = (c2 multitude_of b2) + (c3 multitude_of b2)
proof end;
uniqueness
for b1, b2 being marking of c1 st ( for b3 being set st b3 in c1 holds
b1 multitude_of b3 = (c2 multitude_of b3) + (c3 multitude_of b3) ) & ( for b3 being set st b3 in c1 holds
b2 multitude_of b3 = (c2 multitude_of b3) + (c3 multitude_of b3) ) holds
b1 = b2
proof end;
commutativity
for b1, b2, b3 being marking of c1 st ( for b4 being set st b4 in c1 holds
b1 multitude_of b4 = (b2 multitude_of b4) + (b3 multitude_of b4) ) holds
for b4 being set st b4 in c1 holds
b1 multitude_of b4 = (b3 multitude_of b4) + (b2 multitude_of b4)
;
end;

:: deftheorem Def5 defines + PNPROC_1:def 5 :
for b1 being set
for b2, b3, b4 being marking of b1 holds
( b4 = b2 + b3 iff for b5 being set st b5 in b1 holds
b4 multitude_of b5 = (b2 multitude_of b5) + (b3 multitude_of b5) );

theorem Th15: :: PNPROC_1:15
for b1 being set
for b2 being marking of b1 holds b2 + ({$} b1) = b2
proof end;

definition
let c1 be set ;
let c2, c3 be marking of c1;
assume E23: c3 c= c2 ;
func c2 - c3 -> marking of a1 means :Def6: :: PNPROC_1:def 6
for b1 being set st b1 in a1 holds
a4 multitude_of b1 = (a2 multitude_of b1) - (a3 multitude_of b1);
existence
ex b1 being marking of c1 st
for b2 being set st b2 in c1 holds
b1 multitude_of b2 = (c2 multitude_of b2) - (c3 multitude_of b2)
proof end;
uniqueness
for b1, b2 being marking of c1 st ( for b3 being set st b3 in c1 holds
b1 multitude_of b3 = (c2 multitude_of b3) - (c3 multitude_of b3) ) & ( for b3 being set st b3 in c1 holds
b2 multitude_of b3 = (c2 multitude_of b3) - (c3 multitude_of b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def6 defines - PNPROC_1:def 6 :
for b1 being set
for b2, b3 being marking of b1 st b3 c= b2 holds
for b4 being marking of b1 holds
( b4 = b2 - b3 iff for b5 being set st b5 in b1 holds
b4 multitude_of b5 = (b2 multitude_of b5) - (b3 multitude_of b5) );

theorem Th16: :: PNPROC_1:16
for b1 being set
for b2, b3 being marking of b1 holds b2 c= b2 + b3
proof end;

theorem Th17: :: PNPROC_1:17
for b1 being set
for b2 being marking of b1 holds b2 - ({$} b1) = b2
proof end;

theorem Th18: :: PNPROC_1:18
for b1 being set
for b2, b3, b4 being marking of b1 st b2 c= b3 & b3 c= b4 holds
b4 - b3 c= b4 - b2
proof end;

theorem Th19: :: PNPROC_1:19
for b1 being set
for b2, b3 being marking of b1 holds (b2 + b3) - b3 = b2
proof end;

theorem Th20: :: PNPROC_1:20
for b1 being set
for b2, b3, b4 being marking of b1 st b2 c= b3 & b3 c= b4 holds
b3 - b2 c= b4 - b2
proof end;

theorem Th21: :: PNPROC_1:21
for b1 being set
for b2, b3, b4 being marking of b1 st b2 c= b3 holds
(b3 + b4) - b2 = (b3 - b2) + b4
proof end;

theorem Th22: :: PNPROC_1:22
for b1 being set
for b2, b3 being marking of b1 st b2 c= b3 & b3 c= b2 holds
b2 = b3
proof end;

theorem Th23: :: PNPROC_1:23
for b1 being set
for b2, b3, b4 being marking of b1 holds (b2 + b3) + b4 = b2 + (b3 + b4)
proof end;

theorem Th24: :: PNPROC_1:24
for b1 being set
for b2, b3, b4, b5 being marking of b1 st b2 c= b3 & b4 c= b5 holds
b2 + b4 c= b3 + b5
proof end;

theorem Th25: :: PNPROC_1:25
for b1 being set
for b2, b3 being marking of b1 st b2 c= b3 holds
b3 - b2 c= b3
proof end;

theorem Th26: :: PNPROC_1:26
for b1 being set
for b2, b3, b4, b5 being marking of b1 st b2 c= b3 & b4 c= b5 & b5 c= b2 holds
b2 - b5 c= b3 - b4
proof end;

theorem Th27: :: PNPROC_1:27
for b1 being set
for b2, b3 being marking of b1 st b2 c= b3 holds
b3 = (b3 - b2) + b2
proof end;

theorem Th28: :: PNPROC_1:28
for b1 being set
for b2, b3 being marking of b1 holds (b2 + b3) - b2 = b3
proof end;

theorem Th29: :: PNPROC_1:29
for b1 being set
for b2, b3, b4 being marking of b1 st b2 + b3 c= b4 holds
(b4 - b2) - b3 = b4 - (b2 + b3)
proof end;

theorem Th30: :: PNPROC_1:30
for b1 being set
for b2, b3, b4 being marking of b1 st b2 c= b3 & b3 c= b4 holds
b4 - (b3 - b2) = (b4 - b3) + b2
proof end;

theorem Th31: :: PNPROC_1:31
for b1 being set
for b2 being marking of b1 holds b2 in Funcs b1,NAT
proof end;

theorem Th32: :: PNPROC_1:32
for b1, b2 being set st b1 in Funcs b2,NAT holds
b1 is marking of b2
proof end;

definition
let c1 be set ;
mode transition of c1 -> set means :Def7: :: PNPROC_1:def 7
ex b1, b2 being marking of a1 st a2 = [b1,b2];
existence
ex b1 being set ex b2, b3 being marking of c1 st b1 = [b2,b3]
proof end;
end;

:: deftheorem Def7 defines transition PNPROC_1:def 7 :
for b1 being set
for b2 being set holds
( b2 is transition of b1 iff ex b3, b4 being marking of b1 st b2 = [b3,b4] );

notation
let c1 be set ;
let c2 be transition of c1;
synonym Pre c2 for c1 `1 ;
synonym Post c2 for c1 `2 ;
end;

definition
let c1 be set ;
let c2 be transition of c1;
redefine func Pre as Pre c2 -> marking of a1;
coherence
Pre is marking of c1
proof end;
redefine func Post as Post c2 -> marking of a1;
coherence
Post is marking of c1
proof end;
end;

definition
let c1 be set ;
let c2 be marking of c1;
let c3 be transition of c1;
func fire c3,c2 -> marking of a1 equals :Def8: :: PNPROC_1:def 8
(a2 - (Pre a3)) + (Post a3) if Pre a3 c= a2
otherwise a2;
coherence
( ( Pre c3 c= c2 implies (c2 - (Pre c3)) + (Post c3) is marking of c1 ) & ( not Pre c3 c= c2 implies c2 is marking of c1 ) )
;
consistency
for b1 being marking of c1 holds verum
;
end;

:: deftheorem Def8 defines fire PNPROC_1:def 8 :
for b1 being set
for b2 being marking of b1
for b3 being transition of b1 holds
( ( Pre b3 c= b2 implies fire b3,b2 = (b2 - (Pre b3)) + (Post b3) ) & ( not Pre b3 c= b2 implies fire b3,b2 = b2 ) );

theorem Th33: :: PNPROC_1:33
for b1 being set
for b2 being marking of b1
for b3, b4 being transition of b1 st (Pre b3) + (Pre b4) c= b2 holds
fire b4,(fire b3,b2) = (((b2 - (Pre b3)) - (Pre b4)) + (Post b3)) + (Post b4)
proof end;

definition
let c1 be set ;
let c2 be transition of c1;
func fire c2 -> Function means :Def9: :: PNPROC_1:def 9
( dom a3 = Funcs a1,NAT & ( for b1 being marking of a1 holds a3 . b1 = fire a2,b1 ) );
existence
ex b1 being Function st
( dom b1 = Funcs c1,NAT & ( for b2 being marking of c1 holds b1 . b2 = fire c2,b2 ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = Funcs c1,NAT & ( for b3 being marking of c1 holds b1 . b3 = fire c2,b3 ) & dom b2 = Funcs c1,NAT & ( for b3 being marking of c1 holds b2 . b3 = fire c2,b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def9 defines fire PNPROC_1:def 9 :
for b1 being set
for b2 being transition of b1
for b3 being Function holds
( b3 = fire b2 iff ( dom b3 = Funcs b1,NAT & ( for b4 being marking of b1 holds b3 . b4 = fire b2,b4 ) ) );

theorem Th34: :: PNPROC_1:34
for b1 being set
for b2 being transition of b1 holds rng (fire b2) c= Funcs b1,NAT
proof end;

theorem Th35: :: PNPROC_1:35
for b1 being set
for b2 being marking of b1
for b3, b4 being transition of b1 holds fire b3,(fire b4,b2) = ((fire b3) * (fire b4)) . b2
proof end;

definition
let c1 be set ;
mode Petri_net of c1 -> non empty set means :Def10: :: PNPROC_1:def 10
for b1 being set st b1 in a2 holds
b1 is transition of a1;
existence
ex b1 being non empty set st
for b2 being set st b2 in b1 holds
b2 is transition of c1
proof end;
end;

:: deftheorem Def10 defines Petri_net PNPROC_1:def 10 :
for b1 being set
for b2 being non empty set holds
( b2 is Petri_net of b1 iff for b3 being set st b3 in b2 holds
b3 is transition of b1 );

definition
let c1 be set ;
let c2 be Petri_net of c1;
redefine mode Element as Element of c2 -> transition of a1;
coherence
for b1 being Element of c2 holds b1 is transition of c1
by Def10;
end;

definition
let c1 be set ;
let c2 be Petri_net of c1;
mode firing-sequence of a2 is Element of a2 * ;
end;

definition
let c1 be set ;
let c2 be Petri_net of c1;
let c3 be firing-sequence of c2;
func fire c3 -> Function means :Def11: :: PNPROC_1:def 11
ex b1 being Function-yielding FinSequence st
( a4 = compose b1,(Funcs a1,NAT ) & len b1 = len a3 & ( for b2 being Nat st b2 in dom a3 holds
b1 . b2 = fire (a3 /. b2) ) );
existence
ex b1 being Functionex b2 being Function-yielding FinSequence st
( b1 = compose b2,(Funcs c1,NAT ) & len b2 = len c3 & ( for b3 being Nat st b3 in dom c3 holds
b2 . b3 = fire (c3 /. b3) ) )
proof end;
uniqueness
for b1, b2 being Function st ex b3 being Function-yielding FinSequence st
( b1 = compose b3,(Funcs c1,NAT ) & len b3 = len c3 & ( for b4 being Nat st b4 in dom c3 holds
b3 . b4 = fire (c3 /. b4) ) ) & ex b3 being Function-yielding FinSequence st
( b2 = compose b3,(Funcs c1,NAT ) & len b3 = len c3 & ( for b4 being Nat st b4 in dom c3 holds
b3 . b4 = fire (c3 /. b4) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def11 defines fire PNPROC_1:def 11 :
for b1 being set
for b2 being Petri_net of b1
for b3 being firing-sequence of b2
for b4 being Function holds
( b4 = fire b3 iff ex b5 being Function-yielding FinSequence st
( b4 = compose b5,(Funcs b1,NAT ) & len b5 = len b3 & ( for b6 being Nat st b6 in dom b3 holds
b5 . b6 = fire (b3 /. b6) ) ) );

theorem Th36: :: PNPROC_1:36
for b1 being set
for b2 being Petri_net of b1 holds fire (<*> b2) = id (Funcs b1,NAT )
proof end;

theorem Th37: :: PNPROC_1:37
for b1 being set
for b2 being Petri_net of b1
for b3 being Element of b2 holds fire <*b3*> = fire b3
proof end;

theorem Th38: :: PNPROC_1:38
for b1 being set
for b2 being Petri_net of b1
for b3 being Element of b2 holds (fire b3) * (id (Funcs b1,NAT )) = fire b3
proof end;

theorem Th39: :: PNPROC_1:39
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being Element of b2 holds fire <*b3,b4*> = (fire b4) * (fire b3)
proof end;

theorem Th40: :: PNPROC_1:40
for b1 being set
for b2 being Petri_net of b1
for b3 being firing-sequence of b2 holds
( dom (fire b3) = Funcs b1,NAT & rng (fire b3) c= Funcs b1,NAT )
proof end;

theorem Th41: :: PNPROC_1:41
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being firing-sequence of b2 holds fire (b3 ^ b4) = (fire b4) * (fire b3)
proof end;

theorem Th42: :: PNPROC_1:42
for b1 being set
for b2 being Petri_net of b1
for b3 being Element of b2
for b4 being firing-sequence of b2 holds fire (b4 ^ <*b3*>) = (fire b3) * (fire b4)
proof end;

definition
let c1 be set ;
let c2 be Petri_net of c1;
let c3 be firing-sequence of c2;
let c4 be marking of c1;
func fire c3,c4 -> marking of a1 equals :: PNPROC_1:def 12
(fire a3) . a4;
coherence
(fire c3) . c4 is marking of c1
proof end;
end;

:: deftheorem Def12 defines fire PNPROC_1:def 12 :
for b1 being set
for b2 being Petri_net of b1
for b3 being firing-sequence of b2
for b4 being marking of b1 holds fire b3,b4 = (fire b3) . b4;

definition
let c1 be set ;
let c2 be Petri_net of c1;
mode process of a2 is Subset of (a2 * );
end;

registration
cluster FinSequence-like -> finite FinSubsequence-like set ;
coherence
for b1 being Function st b1 is FinSequence-like holds
b1 is FinSubsequence-like
by FINSEQ_1:68;
end;

definition
let c1 be set ;
let c2 be Petri_net of c1;
let c3, c4 be process of c2;
func c3 before c4 -> process of a2 equals :: PNPROC_1:def 13
{ (b1 ^ b2) where B is firing-sequence of a2, B is firing-sequence of a2 : ( b1 in a3 & b2 in a4 ) } ;
coherence
{ (b1 ^ b2) where B is firing-sequence of c2, B is firing-sequence of c2 : ( b1 in c3 & b2 in c4 ) } is process of c2
proof end;
end;

:: deftheorem Def13 defines before PNPROC_1:def 13 :
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being process of b2 holds b3 before b4 = { (b5 ^ b6) where B is firing-sequence of b2, B is firing-sequence of b2 : ( b5 in b3 & b6 in b4 ) } ;

registration
let c1 be set ;
let c2 be Petri_net of c1;
let c3, c4 be non empty process of c2;
cluster a3 before a4 -> non empty ;
coherence
not c3 before c4 is empty
proof end;
end;

theorem Th43: :: PNPROC_1:43
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being process of b2 holds (b3 \/ b4) before b5 = (b3 before b5) \/ (b4 before b5)
proof end;

theorem Th44: :: PNPROC_1:44
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being process of b2 holds b3 before (b4 \/ b5) = (b3 before b4) \/ (b3 before b5)
proof end;

theorem Th45: :: PNPROC_1:45
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being firing-sequence of b2 holds {b3} before {b4} = {(b3 ^ b4)}
proof end;

theorem Th46: :: PNPROC_1:46
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being firing-sequence of b2 holds {b3,b4} before {b5} = {(b3 ^ b5),(b4 ^ b5)}
proof end;

theorem Th47: :: PNPROC_1:47
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being firing-sequence of b2 holds {b3} before {b4,b5} = {(b3 ^ b4),(b3 ^ b5)}
proof end;

definition
let c1 be set ;
let c2 be Petri_net of c1;
let c3, c4 be process of c2;
func c3 concur c4 -> process of a2 equals :: PNPROC_1:def 14
{ b1 where B is firing-sequence of a2 : ex b1, b2 being FinSubsequence st
( b1 = b2 \/ b3 & b2 misses b3 & Seq b2 in a3 & Seq b3 in a4 )
}
;
coherence
{ b1 where B is firing-sequence of c2 : ex b1, b2 being FinSubsequence st
( b1 = b2 \/ b3 & b2 misses b3 & Seq b2 in c3 & Seq b3 in c4 )
}
is process of c2
proof end;
commutativity
for b1, b2, b3 being process of c2 st b1 = { b4 where B is firing-sequence of c2 : ex b1, b2 being FinSubsequence st
( b4 = b5 \/ b6 & b5 misses b6 & Seq b5 in b2 & Seq b6 in b3 )
}
holds
b1 = { b4 where B is firing-sequence of c2 : ex b1, b2 being FinSubsequence st
( b4 = b5 \/ b6 & b5 misses b6 & Seq b5 in b3 & Seq b6 in b2 )
}
proof end;
end;

:: deftheorem Def14 defines concur PNPROC_1:def 14 :
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being process of b2 holds b3 concur b4 = { b5 where B is firing-sequence of b2 : ex b1, b2 being FinSubsequence st
( b5 = b6 \/ b7 & b6 misses b7 & Seq b6 in b3 & Seq b7 in b4 )
}
;

theorem Th48: :: PNPROC_1:48
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being process of b2 holds (b3 \/ b4) concur b5 = (b3 concur b5) \/ (b4 concur b5)
proof end;

theorem Th49: :: PNPROC_1:49
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being Element of b2 holds {<*b3*>} concur {<*b4*>} = {<*b3,b4*>,<*b4,b3*>}
proof end;

theorem Th50: :: PNPROC_1:50
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being Element of b2 holds {<*b3*>,<*b4*>} concur {<*b5*>} = {<*b3,b5*>,<*b4,b5*>,<*b5,b3*>,<*b5,b4*>}
proof end;

theorem Th51: :: PNPROC_1:51
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being process of b2 holds (b3 before b4) before b5 = b3 before (b4 before b5)
proof end;

definition
let c1 be FinSubsequence;
let c2 be Nat;
set c3 = { (c2 + b1) where B is Nat : b1 in dom c1 } ;
func c2 Shift c1 -> FinSubsequence means :Def15: :: PNPROC_1:def 15
( dom a3 = { (a2 + b1) where B is Nat : b1 in dom a1 } & ( for b1 being Nat st b1 in dom a1 holds
a3 . (a2 + b1) = a1 . b1 ) );
existence
ex b1 being FinSubsequence st
( dom b1 = { (c2 + b2) where B is Nat : b2 in dom c1 } & ( for b2 being Nat st b2 in dom c1 holds
b1 . (c2 + b2) = c1 . b2 ) )
proof end;
uniqueness
for b1, b2 being FinSubsequence st dom b1 = { (c2 + b3) where B is Nat : b3 in dom c1 } & ( for b3 being Nat st b3 in dom c1 holds
b1 . (c2 + b3) = c1 . b3 ) & dom b2 = { (c2 + b3) where B is Nat : b3 in dom c1 } & ( for b3 being Nat st b3 in dom c1 holds
b2 . (c2 + b3) = c1 . b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def15 defines Shift PNPROC_1:def 15 :
for b1 being FinSubsequence
for b2 being Nat
for b3 being FinSubsequence holds
( b3 = b2 Shift b1 iff ( dom b3 = { (b2 + b4) where B is Nat : b4 in dom b1 } & ( for b4 being Nat st b4 in dom b1 holds
b3 . (b2 + b4) = b1 . b4 ) ) );

theorem Th52: :: PNPROC_1:52
for b1 being FinSubsequence holds 0 Shift b1 = b1
proof end;

theorem Th53: :: PNPROC_1:53
for b1, b2 being Nat
for b3 being FinSubsequence holds (b1 + b2) Shift b3 = b1 Shift (b2 Shift b3)
proof end;

theorem Th54: :: PNPROC_1:54
for b1 being Nat
for b2 being FinSequence st b2 <> {} holds
dom (b1 Shift b2) = { b3 where B is Nat : ( b1 + 1 <= b3 & b3 <= b1 + (len b2) ) }
proof end;

theorem Th55: :: PNPROC_1:55
for b1 being Nat
for b2 being FinSubsequence holds
( b2 = {} iff b1 Shift b2 = {} )
proof end;

theorem Th56: :: PNPROC_1:56
for b1 being Nat
for b2 being FinSubsequence ex b3 being FinSubsequence st
( dom b3 = dom b2 & rng b3 = dom (b1 Shift b2) & ( for b4 being Nat st b4 in dom b2 holds
b3 . b4 = b1 + b4 ) & b3 is one-to-one )
proof end;

Lemma55: for b1 being Nat
for b2 being FinSequence ex b3 being FinSequence st
( dom b3 = dom b2 & rng b3 = dom (b1 Shift b2) & ( for b4 being Nat st b4 in dom b2 holds
b3 . b4 = b1 + b4 ) & b3 is one-to-one )
proof end;

theorem Th57: :: PNPROC_1:57
for b1 being Nat
for b2 being FinSubsequence holds Card b2 = Card (b1 Shift b2)
proof end;

theorem Th58: :: PNPROC_1:58
for b1 being Nat
for b2 being FinSequence holds dom b2 = dom (Seq (b1 Shift b2))
proof end;

theorem Th59: :: PNPROC_1:59
for b1, b2 being Nat
for b3 being FinSequence st b1 in dom b3 holds
(Sgm (dom (b2 Shift b3))) . b1 = b2 + b1
proof end;

theorem Th60: :: PNPROC_1:60
for b1, b2 being Nat
for b3 being FinSequence st b1 in dom b3 holds
(Seq (b2 Shift b3)) . b1 = b3 . b1
proof end;

theorem Th61: :: PNPROC_1:61
for b1 being Nat
for b2 being FinSequence holds Seq (b1 Shift b2) = b2
proof end;

theorem Th62: :: PNPROC_1:62
for b1, b2 being FinSequence holds dom (b1 \/ ((len b1) Shift b2)) = Seg ((len b1) + (len b2))
proof end;

theorem Th63: :: PNPROC_1:63
for b1 being Nat
for b2 being FinSequence
for b3 being FinSubsequence st len b2 <= b1 holds
dom b2 misses dom (b1 Shift b3)
proof end;

theorem Th64: :: PNPROC_1:64
for b1, b2 being FinSequence holds b1 ^ b2 = b1 \/ ((len b1) Shift b2)
proof end;

theorem Th65: :: PNPROC_1:65
for b1 being Nat
for b2 being FinSequence
for b3 being FinSubsequence st b1 >= len b2 holds
b2 misses b1 Shift b3
proof end;

theorem Th66: :: PNPROC_1:66
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5 being process of b2 holds (b3 concur b4) concur b5 = b3 concur (b4 concur b5)
proof end;

theorem Th67: :: PNPROC_1:67
for b1 being set
for b2 being Petri_net of b1
for b3, b4 being process of b2 holds b3 before b4 c= b3 concur b4
proof end;

theorem Th68: :: PNPROC_1:68
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5, b6 being process of b2 st b3 c= b4 & b5 c= b6 holds
b3 before b5 c= b4 before b6
proof end;

theorem Th69: :: PNPROC_1:69
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5, b6 being process of b2 st b3 c= b4 & b5 c= b6 holds
b3 concur b5 c= b4 concur b6
proof end;

Lemma65: for b1, b2 being FinSequence
for b3, b4 being FinSubsequence st b3 c= b1 & b4 c= b2 holds
dom (b3 \/ ((len b1) Shift b4)) c= dom (b1 ^ b2)
proof end;

Lemma66: for b1 being FinSequence
for b2, b3 being FinSubsequence st b2 c= b1 holds
b2 misses (len b1) Shift b3
proof end;

Lemma67: for b1 being Nat
for b2, b3 being FinSubsequence st b3 c= b2 holds
dom (b1 Shift b3) c= dom (b1 Shift b2)
proof end;

theorem Th70: :: PNPROC_1:70
for b1 being Nat
for b2, b3 being FinSubsequence st b3 c= b2 holds
b1 Shift b3 c= b1 Shift b2
proof end;

theorem Th71: :: PNPROC_1:71
for b1, b2 being FinSequence holds (len b1) Shift b2 c= b1 ^ b2
proof end;

theorem Th72: :: PNPROC_1:72
for b1 being Nat
for b2, b3 being FinSubsequence st dom b2 misses dom b3 holds
dom (b1 Shift b2) misses dom (b1 Shift b3)
proof end;

theorem Th73: :: PNPROC_1:73
for b1 being Nat
for b2, b3, b4 being FinSubsequence st b2 = b3 \/ b4 & b3 misses b4 holds
(b1 Shift b3) \/ (b1 Shift b4) = b1 Shift b2
proof end;

theorem Th74: :: PNPROC_1:74
for b1 being Nat
for b2 being FinSubsequence holds dom (Seq b2) = dom (Seq (b1 Shift b2))
proof end;

theorem Th75: :: PNPROC_1:75
for b1, b2 being Nat
for b3 being FinSubsequence st b1 in dom (Seq b3) holds
ex b4 being Nat st
( b4 = (Sgm (dom b3)) . b1 & (Sgm (dom (b2 Shift b3))) . b1 = b2 + b4 )
proof end;

theorem Th76: :: PNPROC_1:76
for b1, b2 being Nat
for b3 being FinSubsequence st b1 in dom (Seq b3) holds
(Seq (b2 Shift b3)) . b1 = (Seq b3) . b1
proof end;

theorem Th77: :: PNPROC_1:77
for b1 being Nat
for b2 being FinSubsequence holds Seq b2 = Seq (b1 Shift b2)
proof end;

theorem Th78: :: PNPROC_1:78
for b1, b2 being Nat
for b3 being FinSubsequence st dom b3 c= Seg b1 holds
dom (b2 Shift b3) c= Seg (b2 + b1)
proof end;

theorem Th79: :: PNPROC_1:79
for b1 being FinSequence
for b2, b3 being FinSubsequence st b2 c= b1 holds
ex b4 being FinSubsequence st b4 = b2 \/ ((len b1) Shift b3)
proof end;

Lemma78: for b1, b2 being FinSequence
for b3, b4 being FinSubsequence st b4 <> {} & b3 c= b1 & b4 c= b2 holds
Sgm ((dom b3) \/ (dom ((len b1) Shift b4))) = (Sgm (dom b3)) ^ (Sgm (dom ((len b1) Shift b4)))
proof end;

theorem Th80: :: PNPROC_1:80
for b1, b2 being FinSequence
for b3, b4 being FinSubsequence st b3 c= b1 & b4 c= b2 holds
ex b5 being FinSubsequence st
( b5 = b3 \/ ((len b1) Shift b4) & dom (Seq b5) = Seg ((len (Seq b3)) + (len (Seq b4))) )
proof end;

theorem Th81: :: PNPROC_1:81
for b1, b2 being FinSequence
for b3, b4 being FinSubsequence st b3 c= b1 & b4 c= b2 holds
ex b5 being FinSubsequence st
( b5 = b3 \/ ((len b1) Shift b4) & dom (Seq b5) = Seg ((len (Seq b3)) + (len (Seq b4))) & Seq b5 = (Seq b3) \/ ((len (Seq b3)) Shift (Seq b4)) )
proof end;

theorem Th82: :: PNPROC_1:82
for b1, b2 being FinSequence
for b3, b4 being FinSubsequence st b3 c= b1 & b4 c= b2 holds
ex b5 being FinSubsequence st
( b5 = b3 \/ ((len b1) Shift b4) & (Seq b3) ^ (Seq b4) = Seq b5 )
proof end;

theorem Th83: :: PNPROC_1:83
for b1 being set
for b2 being Petri_net of b1
for b3, b4, b5, b6 being process of b2 holds (b3 concur b4) before (b5 concur b6) c= (b3 before b5) concur (b4 before b6)
proof end;

registration
let c1 be set ;
let c2 be Petri_net of c1;
let c3, c4 be non empty process of c2;
cluster a3 concur a4 -> non empty ;
coherence
not c3 concur c4 is empty
proof end;
end;

definition
let c1 be set ;
let c2 be Petri_net of c1;
func NeutralProcess c2 -> non empty process of a2 equals :: PNPROC_1:def 16
{(<*> a2)};
coherence
{(<*> c2)} is non empty process of c2
;
end;

:: deftheorem Def16 defines NeutralProcess PNPROC_1:def 16 :
for b1 being set
for b2 being Petri_net of b1 holds NeutralProcess b2 = {(<*> b2)};

definition
let c1 be set ;
let c2 be Petri_net of c1;
let c3 be Element of c2;
func ElementaryProcess c3 -> non empty process of a2 equals :: PNPROC_1:def 17
{<*a3*>};
coherence
{<*c3*>} is non empty process of c2
;
end;

:: deftheorem Def17 defines ElementaryProcess PNPROC_1:def 17 :
for b1 being set
for b2 being Petri_net of b1
for b3 being Element of b2 holds ElementaryProcess b3 = {<*b3*>};

theorem Th84: :: PNPROC_1:84
for b1 being set
for b2 being Petri_net of b1
for b3 being process of b2 holds (NeutralProcess b2) before b3 = b3
proof end;

theorem Th85: :: PNPROC_1:85
for b1 being set
for b2 being Petri_net of b1
for b3 being process of b2 holds b3 before (NeutralProcess b2) = b3
proof end;

theorem Th86: :: PNPROC_1:86
for b1 being set
for b2 being Petri_net of b1
for b3 being process of b2 holds (NeutralProcess b2) concur b3 = b3
proof end;