@@ -81,16 +81,22 @@ Codomain m (Mor i) = snd $ index i m
8181PetriPath : Nat -> Nat -> Type
8282PetriPath places k = Tree (Fin places) (Fin k)
8383
84+ goodPetriSMC : (spec : PetriSpec k) -> StrictMonoidalCategory
85+ goodPetriSMC spec = goodHypergraphSMC (Fin k)
86+ (\ m => fst $ index m (Edges spec))
87+ (\ m => snd $ index m (Edges spec))
88+
8489goodMapping : (spec : PetriSpec k) -> (path : PetriPath (Places spec) k)
85- -> Maybe (mor (cat (goodHypergraphSMC (Fin k)
86- (\ m => fst $ index m (Edges spec))
87- (\ m => snd $ index m (Edges spec))))
88- (Domain (Edges spec) path)
89- (Codomain (Edges spec) path))
90+ -> Maybe (mor (cat (goodPetriSMC spec))
91+ (Domain (Edges spec) path)
92+ (Codomain (Edges spec) path))
9093goodMapping s (Tensor x y) = do
9194 x' <- goodMapping s x
9295 y' <- goodMapping s y
93- pure $ Element (getWitness x' `add` getWitness y') (VComp (getProof x') (getProof y'))
96+ pure $ mapMor (tensor (goodPetriSMC s))
97+ (Domain (Edges s) x, Domain (Edges s) y)
98+ (Codomain (Edges s) x, Codomain (Edges s) y)
99+ (MkProductMorphism x' y')
94100goodMapping s (Sequence x y) {k} = do
95101 x' <- goodMapping s x
96102 y' <- goodMapping s y
@@ -104,11 +110,9 @@ goodMapping s (Sequence x y) {k} = do
104110 GoodHypergraph)
105111 }
106112 p y'
107- in pure $ Element ( Hypergraph . compose (getWitness x') (getWitness y' ' )) (HComp (getProof x ' ) (getProof y'' ))
113+ in pure $ compose (cat (goodPetriSMC s )) _ _ _ x' y''
108114 No _ => Nothing
109-
115+ goodMapping s (Id x) = Just $ identity (cat (goodPetriSMC s)) [x]
110116goodMapping s (Sym a b) = Just $ Element (permutation (swap [a] [b]))
111117 (GoodHypergraphCategory.Permutation (Ins (Ins Nil HereS) (ThereS HereS)))
112- goodMapping s (Id x) = Just $ Element (Hypergraph.identity [x])
113- (GoodHypergraphCategory.Permutation (Ins Nil HereS))
114118goodMapping s (Mor x) = Just $ Element (Hypergraph.singleton x) (Singleton x)
0 commit comments