This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The copyright holder grants you permission to redistribute this document freely as a verbatim copy. Furthermore, the copyright holder permits you to develop any derived work from this document provided that the following conditions are met. a) The derived work acknowledges the fact that it is derived from this document, and maintains a prominent reference in the work to the original source. b) The fact that the derived work is not the original OpenMath document is stated prominently in the derived work. Moreover if both this document and the derived work are Content Dictionaries then the derived work must include a different CDName element, chosen so that it cannot be confused with any works adopted by the OpenMath Society. In particular, if there is a Content Dictionary Group whose name is, for example, `math' containing Content Dictionaries named `math1', `math2' etc., then you should not name a derived Content Dictionary `mathN' where N is an integer. However you are free to name it `private_mathN' or some such. This is because the names `mathN' may be used by the OpenMath Society for future extensions. c) The derived work is distributed under terms that allow the compilation of derived works, but keep paragraphs a) and b) intact. The simplest way to do this is to distribute the derived work under the OpenMath license, but this is not a requirement. If you have questions about this license please contact the OpenMath society at http://www.openmath.org.
Author: OpenMath Consortium SourceURL: https://github.com/OpenMath/CDs
This CD defines the set functions and constructors for basic multiset theory. It is intended to be `compatible' with the corresponding elements in MathML i.e. set operations acting on sets of type=multiset.
Based on set1.ocdsize
This symbol is used to denote the number of elements in a multiset. It is either a non-negative integer, or an infinite cardinal number. The symbol infinity may be used for an unspecified infinite cardinal.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="relation1" name="eq"/> <OMA> <OMS cd="multiset1" name="size"/> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 3 </OMI> <OMI> 3 </OMI> <OMI> 9 </OMI> </OMA> </OMA> <OMI> 3 </OMI> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="relation1">eq</csymbol> <apply><csymbol cd="multiset1">size</csymbol> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">3</cn> <cn type="integer">3</cn> <cn type="integer">9</cn> </apply> </apply> <cn type="integer">3</cn> </apply> </math>
multiset1.size(multiset1.multiset(3, 3, 9)) = 3
size ( multiset ( 3 , 3 , 9 ) ) = 3
This symbol represents an n-ary construction function for constructing the Cartesian product of multisets. It takes n multiset arguments in order to construct their Cartesian product.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="cartesian_product"/> <OMV name="A"/> <OMV name="B"/> <OMV name="C"/> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">cartesian_product</csymbol><ci>A</ci><ci>B</ci><ci>C</ci></apply> </math>
multiset1.cartesian_product($A, $B, $C)
This symbol is used to represent the empty multiset, that is the multiset which contains no members. It takes no parameters.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="relation1" name="eq"/> <OMA> <OMS cd="multiset1" name="intersect"/> <OMV name="A"/> <OMS cd="multiset1" name="emptyset"/> </OMA> <OMS cd="multiset1" name="emptyset"/> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="relation1">eq</csymbol> <apply><csymbol cd="multiset1">intersect</csymbol><ci>A</ci><csymbol cd="multiset1">emptyset</csymbol></apply> <csymbol cd="multiset1">emptyset</csymbol> </apply> </math>
multiset1.intersect($A, multiset1.emptyset) = multiset1.emptyset
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="relation1" name="eq"/> <OMA> <OMS cd="multiset1" name="union"/> <OMV name="A"/> <OMS cd="multiset1" name="emptyset"/> </OMA> <OMV name="A"/> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="relation1">eq</csymbol> <apply><csymbol cd="multiset1">union</csymbol><ci>A</ci><csymbol cd="multiset1">emptyset</csymbol></apply> <ci>A</ci> </apply> </math>
multiset1.union($A, multiset1.emptyset) = $A
This symbol represents the multiset construct. It is either an n-ary function, in which case the multiset entries are given explicitly, or it works on an elements construct. There is no implied ordering to the elements of a multiset.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 4 </OMI> <OMI> 1 </OMI> <OMI> 0 </OMI> <OMI> 1 </OMI> <OMI> 4 </OMI> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">4</cn> <cn type="integer">1</cn> <cn type="integer">0</cn> <cn type="integer">1</cn> <cn type="integer">4</cn> </apply> </math>
multiset1.multiset(4, 1, 0, 1, 4)
multiset ( 4 , 1 , 0 , 1 , 4 )
This symbol is used to denote the n-ary intersection of multisets. It takes multisets as arguments, and denotes the multiset that contains all the elements that occur in all of them, with multiplicity the minimum of their multiplicities in all multisets.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="logic1" name="and"/> <OMA> <OMS cd="multiset1" name="subset"/> <OMA> <OMS cd="multiset1" name="intersect"/> <OMV name="A"/> <OMV name="B"/> </OMA> <OMV name="A"/> </OMA> <OMA> <OMS cd="multiset1" name="subset"/> <OMA> <OMS cd="multiset1" name="intersect"/> <OMV name="A"/> <OMV name="B"/> </OMA> <OMV name="B"/> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="logic1">and</csymbol> <apply><csymbol cd="multiset1">subset</csymbol> <apply><csymbol cd="multiset1">intersect</csymbol><ci>A</ci><ci>B</ci></apply> <ci>A</ci> </apply> <apply><csymbol cd="multiset1">subset</csymbol> <apply><csymbol cd="multiset1">intersect</csymbol><ci>A</ci><ci>B</ci></apply> <ci>B</ci> </apply> </apply> </math>
multiset1.subset(multiset1.intersect($A, $B), $A) and multiset1.subset(multiset1.intersect($A, $B), $B)
This symbol is used to denote the n-ary union of multisets. It takes multisets as arguments, and denotes the multiset that contains all the elements that occur in any of them, with multiplicity the sum of all the multiplicities in the multiset arguments.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="logic1" name="and"/> <OMA> <OMS cd="multiset1" name="subset"/> <OMV name="A"/> <OMA> <OMS cd="multiset1" name="union"/> <OMV name="A"/> <OMV name="B"/> </OMA> </OMA> <OMA> <OMS cd="multiset1" name="subset"/> <OMV name="B"/> <OMA> <OMS cd="multiset1" name="union"/> <OMV name="A"/> <OMV name="B"/> </OMA> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="logic1">and</csymbol> <apply><csymbol cd="multiset1">subset</csymbol> <ci>A</ci> <apply><csymbol cd="multiset1">union</csymbol><ci>A</ci><ci>B</ci></apply> </apply> <apply><csymbol cd="multiset1">subset</csymbol> <ci>B</ci> <apply><csymbol cd="multiset1">union</csymbol><ci>A</ci><ci>B</ci></apply> </apply> </apply> </math>
multiset1.subset($A, multiset1.union($A, $B)) and multiset1.subset($B, multiset1.union($A, $B))
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMBIND> <OMS cd="quant1" name="forall"/> <OMBVAR> <OMV name="A"/> <OMV name="B"/> <OMV name="C"/> </OMBVAR> <OMA> <OMS cd="relation1" name="eq"/> <OMA> <OMS cd="multiset1" name="union"/> <OMV name="A"/> <OMA> <OMS cd="multiset1" name="intersect"/> <OMV name="B"/> <OMV name="C"/> </OMA> </OMA> <OMA> <OMS cd="multiset1" name="intersect"/> <OMA> <OMS cd="multiset1" name="union"/> <OMV name="A"/> <OMV name="B"/> </OMA> <OMA> <OMS cd="multiset1" name="union"/> <OMV name="A"/> <OMV name="C"/> </OMA> </OMA> </OMA> </OMBIND> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <bind><csymbol cd="quant1">forall</csymbol> <bvar><ci>A</ci></bvar> <bvar><ci>B</ci></bvar> <bvar><ci>C</ci></bvar> <apply><csymbol cd="relation1">eq</csymbol> <apply><csymbol cd="multiset1">union</csymbol> <ci>A</ci> <apply><csymbol cd="multiset1">intersect</csymbol><ci>B</ci><ci>C</ci></apply> </apply> <apply><csymbol cd="multiset1">intersect</csymbol> <apply><csymbol cd="multiset1">union</csymbol><ci>A</ci><ci>B</ci></apply> <apply><csymbol cd="multiset1">union</csymbol><ci>A</ci><ci>C</ci></apply> </apply> </apply> </bind> </math>
quant1.forall[$A, $B, $C -> multiset1.union($A, multiset1.intersect($B, $C)) = multiset1.intersect(multiset1.union($A, $B), multiset1.union($A, $C))]
∀ A , B , C . A ∪ B ∩ C = A ∪ B ∩ A ∪ C
This symbol is used to denote the multiset difference of two multisets. It takes two multisets as arguments, and denotes the multiset that contains all the elements that occur in the first multiset with strictly greater multiplicity than in the second. The multiplicity in the result is the difference of the two.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="subset"/> <OMA> <OMS cd="multiset1" name="setdiff"/> <OMV name="A"/> <OMV name="B"/> </OMA> <OMV name="A"/> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">subset</csymbol> <apply><csymbol cd="multiset1">setdiff</csymbol><ci>A</ci><ci>B</ci></apply> <ci>A</ci> </apply> </math>
multiset1.subset(multiset1.setdiff($A, $B), $A)
This symbol has two (multiset) arguments. It is used to denote that the first set is a subset of the second, i.e. every element of the first occurs with multiplicity at least as much in the second.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="logic1" name="implies"/> <OMA> <OMS cd="logic1" name="and"/> <OMA> <OMS cd="multiset1" name="subset"/> <OMV name="B"/> <OMV name="A"/> </OMA> <OMA> <OMS cd="multiset1" name="subset"/> <OMV name="C"/> <OMV name="B"/> </OMA> </OMA> <OMA> <OMS cd="multiset1" name="subset"/> <OMV name="C"/> <OMV name="A"/> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="logic1">implies</csymbol> <apply><csymbol cd="logic1">and</csymbol> <apply><csymbol cd="multiset1">subset</csymbol><ci>B</ci><ci>A</ci></apply> <apply><csymbol cd="multiset1">subset</csymbol><ci>C</ci><ci>B</ci></apply> </apply> <apply><csymbol cd="multiset1">subset</csymbol><ci>C</ci><ci>A</ci></apply> </apply> </math>
multiset1.subset($B, $A) and multiset1.subset($C, $B) ==> multiset1.subset($C, $A)
This symbol has two arguments, an element and a multiset. It is used to denote that the element is in the given multiset.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="logic1" name="implies"/> <OMA> <OMS cd="logic1" name="and"/> <OMA> <OMS cd="multiset1" name="in"/> <OMV name="a"/> <OMV name="A"/> </OMA> <OMA> <OMS cd="multiset1" name="in"/> <OMV name="a"/> <OMV name="B"/> </OMA> </OMA> <OMA> <OMS cd="multiset1" name="in"/> <OMV name="a"/> <OMA> <OMS cd="multiset1" name="intersect"/> <OMV name="A"/> <OMV name="B"/> </OMA> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="logic1">implies</csymbol> <apply><csymbol cd="logic1">and</csymbol> <apply><csymbol cd="multiset1">in</csymbol><ci>a</ci><ci>A</ci></apply> <apply><csymbol cd="multiset1">in</csymbol><ci>a</ci><ci>B</ci></apply> </apply> <apply><csymbol cd="multiset1">in</csymbol> <ci>a</ci> <apply><csymbol cd="multiset1">intersect</csymbol><ci>A</ci><ci>B</ci></apply> </apply> </apply> </math>
multiset1.in($a, $A) and multiset1.in($a, $B) ==> multiset1.in($a, multiset1.intersect($A, $B))
a ∈ A ∧ a ∈ B ⇒ a ∈ A ∩ B
This symbol has two arguments, an element and a multiset. It is used to denote that the element is not in the given multiset.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="notin"/> <OMI> 4 </OMI> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 1 </OMI> <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 3 </OMI> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">notin</csymbol> <cn type="integer">4</cn> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">1</cn> <cn type="integer">1</cn> <cn type="integer">2</cn> <cn type="integer">3</cn> </apply> </apply> </math>
multiset1.notin(4, multiset1.multiset(1, 1, 2, 3))
4 ∉ multiset ( 1 , 1 , 2 , 3 )
This symbol has two (multiset) arguments. It is used to denote that the first multiset is a proper subset of the second, that is a subset of the second multiset but not actually equal to it.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="prsubset"/> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 2 </OMI> <OMI> 3 </OMI> </OMA> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 2 </OMI> <OMI> 2 </OMI> <OMI> 3 </OMI> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">prsubset</csymbol> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">2</cn> <cn type="integer">3</cn> </apply> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">2</cn> <cn type="integer">2</cn> <cn type="integer">3</cn> </apply> </apply> </math>
multiset1.prsubset(multiset1.multiset(2, 3), multiset1.multiset(2, 2, 3))
multiset ( 2 , 3 ) ⊂ multiset ( 2 , 2 , 3 )
This symbol has two (multiset) arguments. It is used to denote that the first multiset is not a subset of the second.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="notsubset"/> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 2 </OMI> <OMI> 3 </OMI> <OMI> 3 </OMI> </OMA> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 3 </OMI> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">notsubset</csymbol> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">2</cn> <cn type="integer">3</cn> <cn type="integer">3</cn> </apply> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">1</cn> <cn type="integer">2</cn> <cn type="integer">3</cn> </apply> </apply> </math>
multiset1.notsubset(multiset1.multiset(2, 3, 3), multiset1.multiset(1, 2, 3))
multiset ( 2 , 3 , 3 ) ⊄ multiset ( 1 , 2 , 3 )
This symbol has two (multiset) arguments. It is used to denote that the first multiset is not a proper subset of the second. A proper subset of a multiset is a subset of the multiset but not actually equal to it.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd"> <OMA> <OMS cd="multiset1" name="notprsubset"/> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 1 </OMI> </OMA> <OMA> <OMS cd="multiset1" name="multiset"/> <OMI> 1 </OMI> <OMI> 2 </OMI> <OMI> 1 </OMI> </OMA> </OMA> </OMOBJ>
<math xmlns="http://www.w3.org/1998/Math/MathML"> <apply><csymbol cd="multiset1">notprsubset</csymbol> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">1</cn> <cn type="integer">2</cn> <cn type="integer">1</cn> </apply> <apply><csymbol cd="multiset1">multiset</csymbol> <cn type="integer">1</cn> <cn type="integer">2</cn> <cn type="integer">1</cn> </apply> </apply> </math>
multiset1.notprsubset(multiset1.multiset(1, 2, 1), multiset1.multiset(1, 2, 1))
multiset ( 1 , 2 , 1 ) ⊄ multiset ( 1 , 2 , 1 )
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5