|
| 1 | +<CD xmlns="http://www.openmath.org/OpenMathCD"> |
| 2 | + |
| 3 | + <CDName>graph3</CDName> |
| 4 | + <CDBase>http://www.openmath.org/cd</CDBase> |
| 5 | + <CDURL>http://www.openmath.org/cd/graph3.ocd</CDURL> |
| 6 | + <CDReviewDate>2019-01-05</CDReviewDate> |
| 7 | + <CDStatus>experimental</CDStatus> |
| 8 | + <CDDate>2018-12-28</CDDate> |
| 9 | + <CDVersion>0</CDVersion> |
| 10 | + <CDRevision>2</CDRevision> |
| 11 | + |
| 12 | + <CDComment> |
| 13 | + Author: Wouter Termont |
| 14 | + SourceURL: https://github.com/OpenMath/CDs |
| 15 | + </CDComment> |
| 16 | + |
| 17 | + <CDComment> |
| 18 | + This document is distributed in the hope that it will be useful, |
| 19 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 21 | + |
| 22 | + The copyright holder grants you permission to redistribute this |
| 23 | + document freely as a verbatim copy. Furthermore, the copyright |
| 24 | + holder permits you to develop any derived work from this document |
| 25 | + provided that the following conditions are met. |
| 26 | + a) The derived work acknowledges the fact that it is derived from |
| 27 | + this document, and maintains a prominent reference in the |
| 28 | + work to the original source. |
| 29 | + b) The fact that the derived work is not the original OpenMath |
| 30 | + document is stated prominently in the derived work. Moreover if |
| 31 | + both this document and the derived work are Content Dictionaries |
| 32 | + then the derived work must include a different CDName element, |
| 33 | + chosen so that it cannot be confused with any works adopted by |
| 34 | + the OpenMath Society. In particular, if there is a Content |
| 35 | + Dictionary Group whose name is, for example, `math' containing |
| 36 | + Content Dictionaries named `math1', `math2' etc., then you should |
| 37 | + not name a derived Content Dictionary `mathN' where N is an integer. |
| 38 | + However you are free to name it `private_mathN' or some such. This |
| 39 | + is because the names `mathN' may be used by the OpenMath Society |
| 40 | + for future extensions. |
| 41 | + c) The derived work is distributed under terms that allow the |
| 42 | + compilation of derived works, but keep paragraphs a) and b) |
| 43 | + intact. The simplest way to do this is to distribute the derived |
| 44 | + work under the OpenMath license, but this is not a requirement. |
| 45 | + If you have questions about this license please contact the OpenMath |
| 46 | + society at http://www.openmath.org. |
| 47 | + </CDComment> |
| 48 | + |
| 49 | + <Description> |
| 50 | + This CD defines symbols for handling mixed graphs, multigraphs and labeled graphs. |
| 51 | + Authored by Wouter Termont. |
| 52 | + May have to be merged with the graph1 and graph2 CDs. |
| 53 | + </Description> |
| 54 | + |
| 55 | + <CDDefinition> |
| 56 | + <Name>mixedgraph</Name> |
| 57 | + <Description> |
| 58 | + This symbol represents a mixed graph. It takes three arguments: the vertex set of the graph, the set of undirected edges, and the set of directed edges (a.k.a. arrows or arcs). |
| 59 | + The vertices can be arbitrary OpenMath objects. Each undirected edge should be a set consisting of two vertices; each directed edge should be a list consisting of two vertices. |
| 60 | + </Description> |
| 61 | + |
| 62 | + <Example> |
| 63 | + A simple chain graph. |
| 64 | + |
| 65 | + <OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0"> |
| 66 | + <OMA> |
| 67 | + <OMS cd="graph3" name="mixedgraph"/> |
| 68 | + <OMA> |
| 69 | + <OMS cd="set1" name="set"/> |
| 70 | + <OMI>1</OMI> |
| 71 | + <OMI>2</OMI> |
| 72 | + <OMI>3</OMI> |
| 73 | + </OMA> |
| 74 | + <OMA> |
| 75 | + <OMS cd="set1" name="set"/> |
| 76 | + <OMA> |
| 77 | + <OMS cd="set1" name="set"/> |
| 78 | + <OMI>1</OMI> |
| 79 | + <OMI>2</OMI> |
| 80 | + </OMA> |
| 81 | + </OMA> |
| 82 | + <OMA> |
| 83 | + <OMS cd="set1" name="set"/> |
| 84 | + <OMA> |
| 85 | + <OMS cd="list1" name="list"/> |
| 86 | + <OMI>2</OMI> |
| 87 | + <OMI>3</OMI> |
| 88 | + </OMA> |
| 89 | + <OMA> |
| 90 | + <OMS cd="list1" name="list"/> |
| 91 | + <OMI>3</OMI> |
| 92 | + <OMI>1</OMI> |
| 93 | + </OMA> |
| 94 | + </OMA> |
| 95 | + </OMA> |
| 96 | + </OMOBJ> |
| 97 | + </Example> |
| 98 | + </CDDefinition> |
| 99 | + |
| 100 | + <CDDefinition> |
| 101 | + <Name>labelledgraph</Name> |
| 102 | + <Description> |
| 103 | + This symbol represents a labelled (mixed) graph. It takes three arguments: the vertex set of the graph, the set of labelled undirected edges, and the set of labelled directed edges (a.k.a. arrows or arcs). Both vertices and labels can be arbitrary OpenMath objects. Each undirected edge should be a set consisting of two vertices; each directed edge should be a list consisting of two vertices. |
| 104 | + </Description> |
| 105 | + |
| 106 | + <Example> |
| 107 | + The logical graph corresponding to a traditional Aristotelian square. |
| 108 | + |
| 109 | + <OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0"> |
| 110 | + <OMA> |
| 111 | + <OMS cd="graph3" name="labelledgraph"/> |
| 112 | + <OMA> |
| 113 | + <OMS cd="set1" name="set"/> |
| 114 | + <OMSTR>A</OMSTR> |
| 115 | + <OMSTR>E</OMSTR> |
| 116 | + <OMSTR>I</OMSTR> |
| 117 | + <OMSTR>O</OMSTR> |
| 118 | + </OMA> |
| 119 | + <OMA> |
| 120 | + <OMS cd="set1" name="set"/> |
| 121 | + <OMA> |
| 122 | + <OMS cd="ecc" name="Pair"/> |
| 123 | + <OMA> |
| 124 | + <OMS cd="set1" name="set"/> |
| 125 | + <OMSTR>A</OMSTR> |
| 126 | + <OMSTR>E</OMSTR> |
| 127 | + </OMA> |
| 128 | + <OMSTR>C</OMSTR> |
| 129 | + </OMA> |
| 130 | + <OMA> |
| 131 | + <OMS cd="ecc" name="Pair"/> |
| 132 | + <OMA> |
| 133 | + <OMS cd="set1" name="set"/> |
| 134 | + <OMSTR>A</OMSTR> |
| 135 | + <OMSTR>O</OMSTR> |
| 136 | + </OMA> |
| 137 | + <OMSTR>CD</OMSTR> |
| 138 | + </OMA> |
| 139 | + <OMA> |
| 140 | + <OMS cd="ecc" name="Pair"/> |
| 141 | + <OMA> |
| 142 | + <OMS cd="set1" name="set"/> |
| 143 | + <OMSTR>E</OMSTR> |
| 144 | + <OMSTR>I</OMSTR> |
| 145 | + </OMA> |
| 146 | + <OMSTR>CD</OMSTR> |
| 147 | + </OMA> |
| 148 | + <OMA> |
| 149 | + <OMS cd="ecc" name="Pair"/> |
| 150 | + <OMA> |
| 151 | + <OMS cd="set1" name="set"/> |
| 152 | + <OMSTR>I</OMSTR> |
| 153 | + <OMSTR>O</OMSTR> |
| 154 | + </OMA> |
| 155 | + <OMSTR>SC</OMSTR> |
| 156 | + </OMA> |
| 157 | + </OMA> |
| 158 | + <OMA> |
| 159 | + <OMS cd="set1" name="set"/> |
| 160 | + <OMA> |
| 161 | + <OMS cd="ecc" name="Pair"/> |
| 162 | + <OMA> |
| 163 | + <OMS cd="list1" name="list"/> |
| 164 | + <OMSTR>A</OMSTR> |
| 165 | + <OMSTR>I</OMSTR> |
| 166 | + </OMA> |
| 167 | + <OMSTR>SA</OMSTR> |
| 168 | + </OMA> |
| 169 | + <OMA> |
| 170 | + <OMS cd="ecc" name="Pair"/> |
| 171 | + <OMA> |
| 172 | + <OMS cd="list1" name="list"/> |
| 173 | + <OMSTR>E</OMSTR> |
| 174 | + <OMSTR>O</OMSTR> |
| 175 | + </OMA> |
| 176 | + <OMSTR>SA</OMSTR> |
| 177 | + </OMA> |
| 178 | + </OMA> |
| 179 | + </OMA> |
| 180 | + </OMOBJ> |
| 181 | + </Example> |
| 182 | + </CDDefinition> |
| 183 | + |
| 184 | +</CD> |
0 commit comments