### coq

#### What are the possible ways to define parallel composition in Coq apart from using list?

```I know how to use the list to define it but expecting something other than this. Because I think it is not possible to prove associativity and commutative property if we define it using list.
```
```Just guessing that you are asking about parallel composition of state machines. There are many ways to model them in Coq's logic, I don't know if lists are the best way...
If you define the steps as propositional relations you can compose two machines "in parallel" by creating a new inductive relation that can take a step either in one of the machines, or in the other.
This is sketch is not the most general way to write it, but hopefully it gets the idea across.
Suppose the machines can take steps between the states A, B, or C. Machine M1 behaves in one way, and M2 in another. I.e. M1 can step from A to B or C, from B to C, and from C to A. M2 can only step from A to C, and from C to A.
Inductive state : Set := A | B | C.
Inductive M1 : state -> state -> Prop :=
s1 : M1 A B | s2 : M1 A C | s3 : M1 B C | s4 : M1 C A.
Inductive M2 : state -> state -> Prop :=
ss1 : M2 A C | ss2 : M2 C A.
The we can create a new step relation for the combined system
Inductive M1M2 : (state*state) -> (state*state) -> Prop :=
| st1 s1 s1' s2: M1 s1 s1' -> M1M2 (s1, s2) (s1', s2) (* M1 takes a step *)
| st2 s1 s2 s2': M2 s2 s2' -> M1M2 (s1, s2) (s1, s2'). (* M2 takes a step *)```

### Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization