+The **_Collections Ontology (CO)_** is an ontology for defining unordered collections (sets and bags) and ordered collections (or lists).
+
+
+
+The main class of CO is `co:Collection`, i.e. a group of objects that can be considered as a whole.
+Each collection is linked to the objects it contains by means of the property `co:element` (with `co:elementOf` as its inverse), and to the number of objects it contains by means of the property `co:size`.
+A collection has exactly one size.
+
+CO defines three kinds of collections:
+
+- `co:Set`, an unordered collection that cannot contain duplicate elements;
+- `co:Bag`, an unordered collection that can contain the same element more than once;
+- `co:List`, a bag in which the elements are ordered.
+
+Since the same object can be in a bag more than once, a bag is not only linked to its elements.
+Each occurrence of an object in a bag is a `co:Item`, and each list item in a list is a `co:ListItem`, which is a subclass of `co:Item`.
+
+
+
+A `co:Set` is the simplest collection of CO.
+A set is directly linked to each of its members by means of `co:element`.
+No item is necessary, since each object can be in a set only once.
+The size of a set is the number of its elements.
+
+
+
+A `co:Bag` is linked to its items by means of `co:item`.
+Each `co:Item` is one occurrence of an object in the bag, and it is linked to that object by means of the functional property `co:itemContent`.
+An item cannot be the content of another item.
+Two items of the same bag can have the same content: this is how a bag contains duplicates.
+
+The property chain `co:item o co:itemContent` is a subproperty of `co:element`.
+Thus, the elements of a bag are inferred from its items.
+The size of a bag is the number of its items, not the number of its distinct elements.
+
+
+
+A `co:List` is a bag in which all the items are `co:ListItem`s.
+A list has at most one first item (`co:firstItem`) and at most one last item (`co:lastItem`).
+
+Each list item has exactly one position in the list, starting from 1, specified by means of `co:index`.
+Each list item is linked to the list item that immediately follows it by means of `co:nextItem`, and to the list item that immediately precedes it by means of `co:previousItem`.
+The property chain `co:item o co:nextItem` is a subproperty of `co:item`. Thus, it is sufficient to specify the first item of a list and the chain of `co:nextItem` relations: all the other items of the list are inferred.
+
+CO also includes some SWRL rules that complete the description of a list:
+
+- the index of a list item is the index of its previous item plus one;
+- two items of the same list with consecutive indexes are linked by `co:nextItem`;
+- the item of a list with index 1 is the first item of the list;
+- the size of a list is the index of its last item, and the item whose index is equal to the size of the list is the last item of the list;
+- a list item that is preceded or followed by itself raises an error (`error:hasError`).
+
+## Examples of use
+
+In the following subsections, we introduce some examples to showcase how to use CO.
+
+The prefixes that are used in all the examples provided below are defined as follows:
+
+ @prefix : <http://www.sparontologies.net/example/> .
+ @prefix co: <http://purl.org/co/> .
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+### A reading list as a set
+
+A reading list contains two papers.
+The order of the papers is not relevant and each paper is in the reading list only once.
+Thus, the reading list is a `co:Set` that is linked to its members with `co:element`.
+
+ :reading-list a co:Set ;
+ co:element :paper-1 , :paper-2 ;
+ co:size "2"^^xsd:nonNegativeInteger .
+
+### In-text citations as a bag
+
+The text of an article cites `:paper-1` twice and `:paper-2` once.
+The order of the citations is not relevant, but the number of times each paper is cited is.
+Thus, the citations are a `co:Bag` of three `co:Item`s: each item is one occurrence, and `co:itemContent` links the item to the cited paper.
+The statements `:citations co:element :paper-1 , :paper-2` are inferred by means of the property chain `co:item o co:itemContent`.
+
+ :citations a co:Bag ;
+ co:item :citation-1 ,
+ :citation-2 ,
+ :citation-3 ;
+ co:size "3"^^xsd:nonNegativeInteger .
+
+ :citation-1 a co:Item ;
+ co:itemContent :paper-1 .
+
+ :citation-2 a co:Item ;
+ co:itemContent :paper-2 .
+
+ :citation-3 a co:Item ;
+ co:itemContent :paper-1 .
+
+### The authors of a paper as a list
+
+A paper has three authors, and their order is relevant.
+Thus, the authors are a `co:List` of three `co:ListItem`s.
+Each list item has a position (`co:index`), refers to one author (`co:itemContent`) and is linked to the list item that follows it (`co:nextItem`).
+
+ :authors a co:List ;
+ co:firstItem :author-1 ;
+ co:item :author-1 , :author-2 , :author-3 ;
+ co:lastItem :author-3 ;
+ co:size "3"^^xsd:nonNegativeInteger .
+
+ :author-1 a co:ListItem ;
+ co:index "1"^^xsd:positiveInteger ;
+ co:itemContent :alice ;
+ co:nextItem :author-2 .
+
+ :author-2 a co:ListItem ;
+ co:index "2"^^xsd:positiveInteger ;
+ co:itemContent :bob ;
+ co:nextItem :author-3 .
+
+ :author-3 a co:ListItem ;
+ co:index "3"^^xsd:positiveInteger ;
+ co:itemContent :carol .
+
+## Competency Questions
+
+CO can be used for answering several questions related to different ways entities can be grouped into aggregates and organized into collections.
+In the following subsections, some of them are introduced together with their respective SPARQL queries.
+
+The prefixes that are used in all the SPARQL queries provided below are defined as follows:
+
+ PREFIX : <http://www.sparontologies.net/example/>
+ PREFIX co: <http://purl.org/co/>
+
+### CQ1
+
+What are the entities that belong to a collection?
+
+ SELECT DISTINCT ?collection ?element
+ WHERE {
+ ?collection co:element|co:item/co:itemContent ?element .
+ }
+
+### CQ2
+
+How many times does each entity appear in a bag?
+
+ SELECT ?element (COUNT(?item) AS ?occurrences)
+ WHERE {
+ :citations co:item ?item .
+ ?item co:itemContent ?element .
+ }
+ GROUP BY ?element
+
+### CQ3
+
+What is the size of a collection?
+
+ SELECT ?collection ?size
+ WHERE {
+ ?collection co:size ?size .
+ }
+
+### CQ4
+
+What are the first entity and the last entity of a list?
+
+ SELECT ?first ?last
+ WHERE {
+ :authors co:firstItem/co:itemContent ?first ;
+ co:lastItem/co:itemContent ?last .
+ }
+
+### CQ5
+
+Which entity is at a given position of a list?
+
+ SELECT ?element
+ WHERE {
+ :authors co:item ?item .
+ ?item co:index ?index ;
+ co:itemContent ?element .
+ FILTER (?index = 2)
+ }
+
+