## Plain containers and linear logic…

As Hank pointed out, the SMCC structure of our “interaction systems” can be backported to plain containers. This is quite interesting because, even if as an object, a plain container is a particular interaction system (with the set of states being ), the notion of morphisms are quite different. (For interaction systems, we identify morphisms “extensionally” and as a result, all the container morphisms are equal when seen as interaction system morphisms.)

Interaction systems form a model for full linear logic with the following proviso:
* we have classical linear logic only when the ambient category is and the meta theory is classical
* there are complications when dealing with the bang of an interaction system since this requires quotienting sets. (I guess we would need a notion of interaction system on a setoid rather than on a simple set…)

There is a small degeneracy in that the product (”with” in the LL terminology) and coproduct (”plus” in the LL terminology) coincide. I don’t care since without that, interpreting the differential -calculus would have been possible!

The question is now to see if we can backport some of those features into plain containers. I first though the answer was no, but I am not sure any more. More precisely, it looks that we can get a model of intuitionistic LL with plain containers, but the additive operations (plus and with) do not correspond to the one on interaction systems!

For example, it is not possible to define my (co)product on containers, but there are products and coproduct for containers. Interestingly enough, those product and coproduct do correspond to operation on interaction systems which I haven’t found applications for.
(Hmmm… That’s not entirely true: the coproduct of containers corresponds to the product of topological spaces, but that is another story.)

Also, product and coproduct are different. (No hope of getting a denotational model for the simply typed differential -calculus there…)

Since we have (indexed) coproducts and finite tensors, it shouldn’t be difficult to construct the container . Using setoids rather than sets, it should then be possible to add some quotient and obtain .

A shape in is given by a finite multiset of shapes in ; and a position from shape is given by a finite multiset of position . (Some care is needed to define this correctly.)

Does it make sense to any of you? I would more or less expect this construction to be the free comonoid generated by , and it wouldn’t be surprising to obtain a model for full intuitionistic LL…

One last thing about the container : since I only pretend to modeling ILL, any container can be used as the interpretation of ; however, the container is particularly well-suited, if only because we have (I think) .
(Recall: is the LL notation for coproduct and is LL notation for product. “” is shorthand for (see Hank’s posting).)

Of course, the miracle of the extensional, set-based version does work any more: this object will not be dualizing…

### 4 Responses to “Plain containers and linear logic…”

1. Hank Says:

About representing multisets in type theory, one option
seems to be as a quotient of
(here the second “n” is being used for the set “Fin(b)” or
.

About Pierre’s suggestion for a bang on plain containers, I take
it the idea is that

(1)

an angel’s move (shape) in the bang of a contrainer is a multiset of angel’s moves (shapes) in the unbagged container . We now have to arrange that the set of positions for a shape does not depend on the particular order in which a shape is given.

(2)

a demon’s response (position) to an angel’s move is (represented by) a permutation p of dom(a), and a function . Equality of representations is modulo permutations.

It is as iff the angel has an inexhaustible supply of slave devices
to which she can issue as many commands in parallel as she likes
(possibly none). But she has to wait for all the responses.

What does one have to show about this? That C! is the free comonoid generated by C? What is this in layman’s
terms?

2. Hank Says:

I don’t completely understand “all the container morphisms are equal when seen as interaction system morphisms”. The relation between these two
kinds of morphisms seems very subtle. It seems to me that a dependent
container morphism (one with a *function* mapping high-level sorts to
low-level sorts) is the same as an interaction system morphism which happens to be (the graph of) a total function.

I can see, I think, that several different container morphisms can “satisfy” extensionally the same simulation relation, but not that all container morphisms are extensionally equal.

3. PierreH Says:

the easiest is probably to use setoids and define , where is just the “quotient” of modulo permutations of lists.

(Of course, we must require that the family of shapes is a family of setoids, indexed by a setoid: it must respect equality… This gets very messy…)

Then, an action/shape is just given by a tuple , and a reaction/position is just a tuple of , where each is a position in shape .

Note that this is not the same as the bang defined on interaction systems, since the number of actions/shapes is not determined by the state. In particular, while iterating the container, the number of shapes can change.

That is the free comonoid just means that it is the “smallest” such comonoid:
(1) there is an arrow
(2) there is an arrow
Those arrows satisfy some commutativity and associativity diagrams, and are universal in some sense (”free”).

A more abstract way to look at it is by saying that the functor from the category of containers to the category of -comonoids is adjoint to the obvious forgetful functor from -comonoids to the containers…

All of this seems very important to LL people, but I have to admit I don’t have strong intuitions about them…

About the link between container morphisms and simulations between interaction systems: the relation seems very subtle. When I wrote that container morphisms are all “equal” I had the “classical” notion of simulation: usual relations. In the case of containers, the set of states are trivial: . There is only one non-empty relation between two such sets: .

In a constructive setting, this is far more complex than that!

4. Hank Says:

Concerning setoids, the “Container Gang” before the Coming of Hancock, have a paper Constructing Polymorphic Programs with Quotient Types from 2004 explaining the East Midlands take on quotienting the positions. (You probably have had a look.)

Conor has some further ideas that must be somehow related about putting well-orders on positions, that are somewhere in this blog. They both seem
to involve putting some structure on positions.

I am very curious about the relations between containers with quotients and “species of structures” a la Fiore/Joyal/.. . Species seem very oriented towards data-structures with a finite number of distinguishable positions.