(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 13.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 41252, 1120] NotebookOptionsPosition[ 37245, 1017] NotebookOutlinePosition[ 39002, 1069] CellTagsIndexPosition[ 38959, 1066] WindowTitle->MultisetSum | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->285421464], Cell["Give a sorted list of elements from all the lists:", "Text", TaggingRules->{}, CellChangeTimes->{{3.7574383894685583`*^9, 3.757438394680949*^9}}, CellID->221583938], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/MultisetSum"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "MultisetSum"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["MultisetSum"], BoxID -> "MultisetSum", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "b", ",", "a", ",", "c"}], "}"}], ",", RowBox[{"{", RowBox[{"d", ",", "a", ",", "e", ",", "b"}], "}"}], ",", RowBox[{"{", RowBox[{"c", ",", "d", ",", "a", ",", "d"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7574384056122293`*^9, 3.757438409770308*^9}, { 3.7574443035343857`*^9, 3.757444308763623*^9}, 3.757448783780587*^9, 3.757671202918787*^9}, CellLabel->"In[61]:=", CellID->7099978], Cell[BoxData[ RowBox[{"{", RowBox[{ "a", ",", "a", ",", "a", ",", "a", ",", "b", ",", "b", ",", "c", ",", "c", ",", "d", ",", "d", ",", "d", ",", "e"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.757438410901744*^9, 3.757438481183166*^9, 3.7574385169991283`*^9, { 3.757439222585512*^9, 3.757439237120307*^9}, 3.7574443096406317`*^9, 3.757448784885881*^9, 3.7574488637809668`*^9, 3.757671307136606*^9, 3.757676583705371*^9, 3.757684270562289*^9, 3.757759467416851*^9, 3.7586605686443367`*^9, 3.75960310965172*^9}, CellLabel->"Out[61]=", CellID->1531727520] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->1374780090], Cell[TextData[{ "Multisets as an ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Association", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Association", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro", FontSize->0.9428571428571428 Inherited], " of counts:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.758728673474133*^9, 3.7587286952990103`*^9}, 3.75960311271738*^9, {3.7699887772174797`*^9, 3.7699887775132923`*^9}, 3.853872669210943*^9}, CellID->1725912843], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/MultisetSum"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "MultisetSum"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["MultisetSum"], BoxID -> "MultisetSum", Selectable->False], "[", RowBox[{ RowBox[{"<|", RowBox[{ RowBox[{"\"\\"", "\[Rule]", "3"}], ",", RowBox[{"\"\\"", "\[Rule]", "1"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}], ",", RowBox[{"\"\\"", "\[Rule]", "1"}]}], "|>"}], ",", "\[IndentingNewLine]", RowBox[{"<|", RowBox[{ RowBox[{"\"\\"", "\[Rule]", "2"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}], ",", RowBox[{"\"\\"", "\[Rule]", "1"}]}], "|>"}], ",", "\[IndentingNewLine]", RowBox[{"<|", RowBox[{ RowBox[{"\"\\"", "\[Rule]", "1"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}]}], "|>"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.758729781515945*^9, 3.7587298005109053`*^9}}, CellLabel->"In[5]:=", CellID->1911028995], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"\<\"a\"\>", "\[Rule]", "6"}], ",", RowBox[{"\<\"b\"\>", "\[Rule]", "5"}], ",", RowBox[{"\<\"c\"\>", "\[Rule]", "6"}], ",", RowBox[{"\<\"d\"\>", "\[Rule]", "1"}], ",", RowBox[{"\<\"e\"\>", "\[Rule]", "3"}]}], "\[RightAssociation]"}]], "Output",\ TaggingRules->{}, CellChangeTimes->{3.758729801604809*^9}, CellLabel->"Out[5]=", CellID->418111591] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Scope", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->267254639], Cell[TextData[{ Cell[BoxData[ StyleBox["MultisetSum", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " works with any head, not just ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["List", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/List", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro", FontSize->0.9428571428571428 Inherited], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.757438611064035*^9, 3.7574386404699183`*^9}, 3.757448808947042*^9, 3.757671203623019*^9, {3.7596031194251337`*^9, 3.7596031222082453`*^9}, 3.853872675896674*^9}, CellID->276556488], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/MultisetSum"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "MultisetSum"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["MultisetSum"], BoxID -> "MultisetSum", Selectable->False], "[", RowBox[{ RowBox[{"f", "[", RowBox[{"a", ",", "b"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"c", ",", "a"}], "]"}], ",", RowBox[{"f", "[", RowBox[{"b", ",", "b", ",", "a"}], "]"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.757438656218522*^9, 3.757438657873952*^9}, 3.757448810692274*^9, 3.757671204292535*^9}, CellLabel->"In[6]:=", CellID->1803407847], Cell[BoxData[ RowBox[{"f", "[", RowBox[{"a", ",", "a", ",", "a", ",", "b", ",", "b", ",", "b", ",", "c"}], "]"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.757438659483479*^9, {3.757438893017931*^9, 3.75743892227676*^9}, 3.7574392689496603`*^9, 3.757448811514254*^9, 3.757448867756833*^9, 3.757671310639653*^9, 3.757676583731998*^9, 3.757684274310083*^9, 3.757759470988813*^9, 3.7586605724142847`*^9}, CellLabel->"Out[6]=", CellID->1101344127] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Properties and Relations", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->461307998], Cell[TextData[{ "Compare to ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Union", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Union", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro", FontSize->0.9428571428571428 Inherited], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.757448897463325*^9, 3.757448900821784*^9}, { 3.757448931117136*^9, 3.757448936268607*^9}, 3.757684285509705*^9, 3.7596032028267193`*^9, {3.7699887841841607`*^9, 3.769988784433997*^9}}, CellID->305765260], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["MultisetSum", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/MultisetSum"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "MultisetSum"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["MultisetSum"], BoxID -> "MultisetSum", Selectable->False], "[", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "b", ",", "a", ",", "c"}], "}"}], ",", RowBox[{"{", RowBox[{"d", ",", "a", ",", "e", ",", "b"}], "}"}], ",", RowBox[{"{", RowBox[{"c", ",", "d", ",", "a", ",", "d"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7574489479662943`*^9, 3.757448948525012*^9}, 3.757671204921249*^9}, CellLabel->"In[62]:=", CellID->1387759205], Cell[BoxData[ RowBox[{"{", RowBox[{ "a", ",", "a", ",", "a", ",", "a", ",", "b", ",", "b", ",", "c", ",", "c", ",", "d", ",", "d", ",", "d", ",", "e"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.757444322541905*^9, 3.7574485479190207`*^9, 3.7574489494423323`*^9, 3.757671314233042*^9, 3.75767658374302*^9, 3.7576842899141273`*^9, 3.757759474599636*^9, 3.7586605785215197`*^9, 3.759603130919957*^9}, CellLabel->"Out[62]=", CellID->2068155801] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Union", "[", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "b", ",", "a", ",", "c"}], "}"}], ",", RowBox[{"{", RowBox[{"d", ",", "a", ",", "e", ",", "b"}], "}"}], ",", RowBox[{"{", RowBox[{"c", ",", "d", ",", "a", ",", "d"}], "}"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{3.757444327763886*^9}, CellLabel->"In[63]:=", CellID->969011416], Cell[BoxData[ RowBox[{"{", RowBox[{"a", ",", "b", ",", "c", ",", "d", ",", "e"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.7574443285358677`*^9, 3.757448549362811*^9, 3.75744895228843*^9, 3.757671334104905*^9, 3.757676583770033*^9, 3.7576842924283743`*^9, 3.7577594760850477`*^9, 3.758660578618958*^9, 3.759603133102457*^9}, CellLabel->"Out[63]=", CellID->169594564] }, Open ]] }, Closed]] }, ClosingSaveDialog->False, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"MultisetSum | Example Notebook", Visible->False, FrontEndVersion->"13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions->Notebook[{ Cell[ StyleData[ StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb", CharacterEncoding -> "UTF-8"]]], Cell[ StyleData[All, "Working"], Editable -> True, DockedCells -> {}], Cell[ StyleData["Notebook"], Editable -> True, DockedCells -> {}, ScrollingOptions -> {"VerticalScrollRange" -> Automatic}], Cell[ StyleData[ "Section", StyleDefinitions -> StyleData["PrimaryExamplesSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Subsection", StyleDefinitions -> StyleData["ExampleSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsection", StyleDefinitions -> StyleData["ExampleSubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsubsection", StyleDefinitions -> StyleData["ExampleSubsubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Text", StyleDefinitions -> StyleData["ExampleText"]], Editable -> True]}, Visible -> False, FrontEndVersion -> "13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions -> "PrivateStylesheetFormatting.nb"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[624, 23, 168, 7, 70, "Subsection",ExpressionUUID->"b985e6d6-2774-42eb-b465-68e58feffa18", CellID->285421464], Cell[795, 32, 173, 3, 70, "Text",ExpressionUUID->"19269ac9-ffa6-4295-a26d-a421d266795f", CellID->221583938], Cell[CellGroupData[{ Cell[993, 39, 7462, 188, 70, "Input",ExpressionUUID->"389dd8c2-ce7f-425b-883e-ca90c07dc341", CellID->7099978], Cell[8458, 229, 600, 13, 70, "Output",ExpressionUUID->"3e02b2ef-1288-464a-9de2-e1dc76202b25", CellID->1531727520] }, Open ]], Cell[CellGroupData[{ Cell[9095, 247, 145, 4, 70, "ExampleDelimiter",ExpressionUUID->"9c2b9bb7-4ca2-4ff2-b432-187d09d6807a", CellID->1374780090], Cell[9243, 253, 796, 24, 70, "Text",ExpressionUUID->"84c9b09e-fdd4-424b-a951-bbacaa1e2778", CellID->1725912843], Cell[CellGroupData[{ Cell[10064, 281, 7904, 200, 70, "Input",ExpressionUUID->"37821817-2ba0-415b-84f9-d2da6f25dce3", CellID->1911028995], Cell[17971, 483, 434, 12, 70, "Output",ExpressionUUID->"a3074fcd-f50d-44db-af24-22b8cbc17dea", CellID->418111591] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[18466, 502, 159, 7, 70, "Subsection",ExpressionUUID->"31e3857b-7561-4eb5-b750-ede6cc1c824c", CellID->267254639], Cell[18628, 511, 929, 27, 70, "Text",ExpressionUUID->"c1e1875f-eb2b-4222-8aa8-bf1200f69072", CellID->276556488], Cell[CellGroupData[{ Cell[19582, 542, 7375, 187, 70, "Input",ExpressionUUID->"b51d4e58-fcab-4942-921a-60336fb8d4be", CellID->1803407847], Cell[26960, 731, 476, 11, 70, "Output",ExpressionUUID->"2067781a-4401-4f11-8096-9c9c53f100ef", CellID->1101344127] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[27485, 748, 178, 7, 70, "Subsection",ExpressionUUID->"5e6ad628-39a6-4e08-8aca-7eccbad38d35", CellID->461307998], Cell[27666, 757, 813, 24, 70, "Text",ExpressionUUID->"cbc91757-8219-4647-b5c3-54efe42c6d3d", CellID->305765260], Cell[CellGroupData[{ Cell[28504, 785, 7391, 187, 70, "Input",ExpressionUUID->"27fe3a9f-4931-4c49-9589-9cdd61d3600a", CellID->1387759205], Cell[35898, 974, 478, 11, 70, "Output",ExpressionUUID->"ffc2ef9c-1f44-4f27-b994-7028b736b285", CellID->2068155801] }, Open ]], Cell[CellGroupData[{ Cell[36413, 990, 403, 12, 70, "Input",ExpressionUUID->"9cc1d51f-2146-4715-9f66-d1cc4c012888", CellID->969011416], Cell[36819, 1004, 398, 9, 70, "Output",ExpressionUUID->"52fbc3bd-3335-481a-b718-48e00faef74a", CellID->169594564] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)