:: PETRI semantic presentation

definition
let c1, c2 be non empty set ;
let c3 be non empty Relation of c1,c2;
redefine mode Element as Element of c3 -> Element of [:a1,a2:];
coherence
for b1 being Element of c3 holds b1 is Element of [:c1,c2:]
proof end;
end;

definition
attr a1 is strict;
struct PT_net_Str -> ;
aggr PT_net_Str(# Places, Transitions, S-T_Arcs, T-S_Arcs #) -> PT_net_Str ;
sel Places c1 -> non empty set ;
sel Transitions c1 -> non empty set ;
sel S-T_Arcs c1 -> non empty Relation of the Places of a1,the Transitions of a1;
sel T-S_Arcs c1 -> non empty Relation of the Transitions of a1,the Places of a1;
end;

definition
let c1 be PT_net_Str ;
mode place of a1 is Element of the Places of a1;
mode places of a1 is Element of the Places of a1;
mode transition of a1 is Element of the Transitions of a1;
mode transitions of a1 is Element of the Transitions of a1;
mode S-T_arc of a1 is Element of the S-T_Arcs of a1;
mode T-S_arc of a1 is Element of the T-S_Arcs of a1;
end;

definition
let c1 be PT_net_Str ;
let c2 be S-T_arc of c1;
redefine func `1 as c2 `1 -> place of a1;
coherence
c2 `1 is place of c1
proof end;
redefine func `2 as c2 `2 -> transition of a1;
coherence
c2 `2 is transition of c1
proof end;
end;

definition
let c1 be PT_net_Str ;
let c2 be T-S_arc of c1;
redefine func `1 as c2 `1 -> transition of a1;
coherence
c2 `1 is transition of c1
proof end;
redefine func `2 as c2 `2 -> place of a1;
coherence
c2 `2 is place of c1
proof end;
end;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Places of c1;
func *' c2 -> Subset of the Transitions of a1 equals :: PETRI:def 1
{ b1 where B is transition of a1 : ex b1 being T-S_arc of a1ex b2 being place of a1 st
( b3 in a2 & b2 = [b1,b3] )
}
;
coherence
{ b1 where B is transition of c1 : ex b1 being T-S_arc of c1ex b2 being place of c1 st
( b3 in c2 & b2 = [b1,b3] )
}
is Subset of the Transitions of c1
proof end;
correctness
;
func c2 *' -> Subset of the Transitions of a1 equals :: PETRI:def 2
{ b1 where B is transition of a1 : ex b1 being S-T_arc of a1ex b2 being place of a1 st
( b3 in a2 & b2 = [b3,b1] )
}
;
coherence
{ b1 where B is transition of c1 : ex b1 being S-T_arc of c1ex b2 being place of c1 st
( b3 in c2 & b2 = [b3,b1] )
}
is Subset of the Transitions of c1
proof end;
correctness
;
end;

:: deftheorem Def1 defines *' PETRI:def 1 :
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds *' b2 = { b3 where B is transition of b1 : ex b1 being T-S_arc of b1ex b2 being place of b1 st
( b5 in b2 & b4 = [b3,b5] )
}
;

:: deftheorem Def2 defines *' PETRI:def 2 :
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds b2 *' = { b3 where B is transition of b1 : ex b1 being S-T_arc of b1ex b2 being place of b1 st
( b5 in b2 & b4 = [b5,b3] )
}
;

theorem Th1: :: PETRI:1
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds *' b2 = { (b3 `1 ) where B is T-S_arc of b1 : b3 `2 in b2 }
proof end;

theorem Th2: :: PETRI:2
for b1 being PT_net_Str
for b2 being Subset of the Places of b1
for b3 being set holds
( b3 in *' b2 iff ex b4 being T-S_arc of b1ex b5 being place of b1 st
( b5 in b2 & b4 = [b3,b5] ) )
proof end;

theorem Th3: :: PETRI:3
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds b2 *' = { (b3 `2 ) where B is S-T_arc of b1 : b3 `1 in b2 }
proof end;

theorem Th4: :: PETRI:4
for b1 being PT_net_Str
for b2 being Subset of the Places of b1
for b3 being set holds
( b3 in b2 *' iff ex b4 being S-T_arc of b1ex b5 being place of b1 st
( b5 in b2 & b4 = [b5,b3] ) )
proof end;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Transitions of c1;
func *' c2 -> Subset of the Places of a1 equals :: PETRI:def 3
{ b1 where B is place of a1 : ex b1 being S-T_arc of a1ex b2 being transition of a1 st
( b3 in a2 & b2 = [b1,b3] )
}
;
coherence
{ b1 where B is place of c1 : ex b1 being S-T_arc of c1ex b2 being transition of c1 st
( b3 in c2 & b2 = [b1,b3] )
}
is Subset of the Places of c1
proof end;
correctness
;
func c2 *' -> Subset of the Places of a1 equals :: PETRI:def 4
{ b1 where B is place of a1 : ex b1 being T-S_arc of a1ex b2 being transition of a1 st
( b3 in a2 & b2 = [b3,b1] )
}
;
coherence
{ b1 where B is place of c1 : ex b1 being T-S_arc of c1ex b2 being transition of c1 st
( b3 in c2 & b2 = [b3,b1] )
}
is Subset of the Places of c1
proof end;
correctness
;
end;

:: deftheorem Def3 defines *' PETRI:def 3 :
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1 holds *' b2 = { b3 where B is place of b1 : ex b1 being S-T_arc of b1ex b2 being transition of b1 st
( b5 in b2 & b4 = [b3,b5] )
}
;

:: deftheorem Def4 defines *' PETRI:def 4 :
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1 holds b2 *' = { b3 where B is place of b1 : ex b1 being T-S_arc of b1ex b2 being transition of b1 st
( b5 in b2 & b4 = [b5,b3] )
}
;

theorem Th5: :: PETRI:5
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1 holds *' b2 = { (b3 `1 ) where B is S-T_arc of b1 : b3 `2 in b2 }
proof end;

theorem Th6: :: PETRI:6
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1
for b3 being set holds
( b3 in *' b2 iff ex b4 being S-T_arc of b1ex b5 being transition of b1 st
( b5 in b2 & b4 = [b3,b5] ) )
proof end;

theorem Th7: :: PETRI:7
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1 holds b2 *' = { (b3 `2 ) where B is T-S_arc of b1 : b3 `1 in b2 }
proof end;

theorem Th8: :: PETRI:8
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1
for b3 being set holds
( b3 in b2 *' iff ex b4 being T-S_arc of b1ex b5 being transition of b1 st
( b5 in b2 & b4 = [b5,b3] ) )
proof end;

theorem Th9: :: PETRI:9
for b1 being PT_net_Str holds *' ({} the Places of b1) = {}
proof end;

theorem Th10: :: PETRI:10
for b1 being PT_net_Str holds ({} the Places of b1) *' = {}
proof end;

theorem Th11: :: PETRI:11
for b1 being PT_net_Str holds *' ({} the Transitions of b1) = {}
proof end;

theorem Th12: :: PETRI:12
for b1 being PT_net_Str holds ({} the Transitions of b1) *' = {}
proof end;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Places of c1;
attr a2 is Deadlock-like means :: PETRI:def 5
*' a2 is Subset of (a2 *' );
end;

:: deftheorem Def5 defines Deadlock-like PETRI:def 5 :
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds
( b2 is Deadlock-like iff *' b2 is Subset of (b2 *' ) );

definition
let c1 be PT_net_Str ;
attr a1 is With_Deadlocks means :: PETRI:def 6
ex b1 being Subset of the Places of a1 st b1 is Deadlock-like;
end;

:: deftheorem Def6 defines With_Deadlocks PETRI:def 6 :
for b1 being PT_net_Str holds
( b1 is With_Deadlocks iff ex b2 being Subset of the Places of b1 st b2 is Deadlock-like );

registration
cluster With_Deadlocks PT_net_Str ;
existence
ex b1 being PT_net_Str st b1 is With_Deadlocks
proof end;
end;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Places of c1;
attr a2 is Trap-like means :: PETRI:def 7
a2 *' is Subset of (*' a2);
end;

:: deftheorem Def7 defines Trap-like PETRI:def 7 :
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds
( b2 is Trap-like iff b2 *' is Subset of (*' b2) );

definition
let c1 be PT_net_Str ;
attr a1 is With_Traps means :: PETRI:def 8
ex b1 being Subset of the Places of a1 st b1 is Trap-like;
end;

:: deftheorem Def8 defines With_Traps PETRI:def 8 :
for b1 being PT_net_Str holds
( b1 is With_Traps iff ex b2 being Subset of the Places of b1 st b2 is Trap-like );

registration
cluster With_Traps PT_net_Str ;
existence
ex b1 being PT_net_Str st b1 is With_Traps
proof end;
end;

definition
let c1, c2 be non empty set ;
let c3 be non empty Relation of c1,c2;
redefine func ~ as c3 ~ -> non empty Relation of a2,a1;
coherence
c3 ~ is non empty Relation of c2,c1
proof end;
end;

definition
let c1 be PT_net_Str ;
func c1 .: -> strict PT_net_Str equals :: PETRI:def 9
PT_net_Str(# the Places of a1,the Transitions of a1,(the T-S_Arcs of a1 ~ ),(the S-T_Arcs of a1 ~ ) #);
correctness
coherence
PT_net_Str(# the Places of c1,the Transitions of c1,(the T-S_Arcs of c1 ~ ),(the S-T_Arcs of c1 ~ ) #) is strict PT_net_Str
;
;
end;

:: deftheorem Def9 defines .: PETRI:def 9 :
for b1 being PT_net_Str holds b1 .: = PT_net_Str(# the Places of b1,the Transitions of b1,(the T-S_Arcs of b1 ~ ),(the S-T_Arcs of b1 ~ ) #);

theorem Th13: :: PETRI:13
for b1 being PT_net_Str holds (b1 .: ) .: = PT_net_Str(# the Places of b1,the Transitions of b1,the S-T_Arcs of b1,the T-S_Arcs of b1 #) ;

theorem Th14: :: PETRI:14
for b1 being PT_net_Str holds
( the Places of b1 = the Places of (b1 .: ) & the Transitions of b1 = the Transitions of (b1 .: ) & the S-T_Arcs of b1 ~ = the T-S_Arcs of (b1 .: ) & the T-S_Arcs of b1 ~ = the S-T_Arcs of (b1 .: ) ) ;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Places of c1;
func c2 .: -> Subset of the Places of (a1 .: ) equals :: PETRI:def 10
a2;
coherence
c2 is Subset of the Places of (c1 .: )
;
end;

:: deftheorem Def10 defines .: PETRI:def 10 :
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds b2 .: = b2;

definition
let c1 be PT_net_Str ;
let c2 be place of c1;
func c2 .: -> place of (a1 .: ) equals :: PETRI:def 11
a2;
coherence
c2 is place of (c1 .: )
;
end;

:: deftheorem Def11 defines .: PETRI:def 11 :
for b1 being PT_net_Str
for b2 being place of b1 holds b2 .: = b2;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Places of (c1 .: );
func .: c2 -> Subset of the Places of a1 equals :: PETRI:def 12
a2;
coherence
c2 is Subset of the Places of c1
;
end;

:: deftheorem Def12 defines .: PETRI:def 12 :
for b1 being PT_net_Str
for b2 being Subset of the Places of (b1 .: ) holds .: b2 = b2;

definition
let c1 be PT_net_Str ;
let c2 be place of (c1 .: );
func .: c2 -> place of a1 equals :: PETRI:def 13
a2;
coherence
c2 is place of c1
;
end;

:: deftheorem Def13 defines .: PETRI:def 13 :
for b1 being PT_net_Str
for b2 being place of (b1 .: ) holds .: b2 = b2;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Transitions of c1;
func c2 .: -> Subset of the Transitions of (a1 .: ) equals :: PETRI:def 14
a2;
coherence
c2 is Subset of the Transitions of (c1 .: )
;
end;

:: deftheorem Def14 defines .: PETRI:def 14 :
for b1 being PT_net_Str
for b2 being Subset of the Transitions of b1 holds b2 .: = b2;

definition
let c1 be PT_net_Str ;
let c2 be transition of c1;
func c2 .: -> transition of (a1 .: ) equals :: PETRI:def 15
a2;
coherence
c2 is transition of (c1 .: )
;
end;

:: deftheorem Def15 defines .: PETRI:def 15 :
for b1 being PT_net_Str
for b2 being transition of b1 holds b2 .: = b2;

definition
let c1 be PT_net_Str ;
let c2 be Subset of the Transitions of (c1 .: );
func .: c2 -> Subset of the Transitions of a1 equals :: PETRI:def 16
a2;
coherence
c2 is Subset of the Transitions of c1
;
end;

:: deftheorem Def16 defines .: PETRI:def 16 :
for b1 being PT_net_Str
for b2 being Subset of the Transitions of (b1 .: ) holds .: b2 = b2;

definition
let c1 be PT_net_Str ;
let c2 be transition of (c1 .: );
func .: c2 -> transition of a1 equals :: PETRI:def 17
a2;
coherence
c2 is transition of c1
;
end;

:: deftheorem Def17 defines .: PETRI:def 17 :
for b1 being PT_net_Str
for b2 being transition of (b1 .: ) holds .: b2 = b2;

theorem Th15: :: PETRI:15
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds (b2 .: ) *' = *' b2
proof end;

theorem Th16: :: PETRI:16
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds *' (b2 .: ) = b2 *'
proof end;

theorem Th17: :: PETRI:17
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds
( b2 is Deadlock-like iff b2 .: is Trap-like )
proof end;

theorem Th18: :: PETRI:18
for b1 being PT_net_Str
for b2 being Subset of the Places of b1 holds
( b2 is Trap-like iff b2 .: is Deadlock-like )
proof end;

theorem Th19: :: PETRI:19
for b1 being PT_net_Str
for b2 being transition of b1
for b3 being Subset of the Places of b1 holds
( b2 in b3 *' iff *' {b2} meets b3 )
proof end;

theorem Th20: :: PETRI:20
for b1 being PT_net_Str
for b2 being transition of b1
for b3 being Subset of the Places of b1 holds
( b2 in *' b3 iff {b2} *' meets b3 )
proof end;