(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 172857, 4871] NotebookOptionsPosition[ 160782, 4482] NotebookOutlinePosition[ 161177, 4499] CellTagsIndexPosition[ 161134, 4496] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Coroducts in Categories", "Title", CellChangeTimes->{{3.497179060615942*^9, 3.497179081535542*^9}, { 3.497994348858658*^9, 3.4979943496230574`*^9}}, TextAlignment->Center], Cell["http://cis.k.hosei.ac.jp/~yukita/", "Subtitle", CellChangeTimes->{{3.497179103110342*^9, 3.497179145074342*^9}, { 3.4972136041549997`*^9, 3.4972136085386*^9}}, TextAlignment->Center], Cell[CellGroupData[{ Cell["Preparation", "Section", CellChangeTimes->{{3.4974319729454*^9, 3.4974319751294003`*^9}}], Cell["\<\ We are going to introduce various functions whose names are similar to those \ of the basic library functions. This usually causes a flood of system \ warnings that makes our presentation ugly. The system provides a means to \ avoid such nuisances, which is in general not recommended though.\ \>", "Text", CellChangeTimes->{{3.4974320132558002`*^9, 3.4974320919421997`*^9}, { 3.497432226693*^9, 3.4974322634230003`*^9}, {3.497432752723*^9, 3.4974327827939997`*^9}, {3.497432932936*^9, 3.497433027281*^9}, { 3.4974330701610003`*^9, 3.497433071939*^9}, {3.497433107237*^9, 3.497433128946*^9}, {3.497433327281*^9, 3.497433468446*^9}, { 3.497433504488*^9, 3.497433515682*^9}, 3.4974335469*^9, { 3.4974337663120003`*^9, 3.4974337703570004`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], ";"}]], "Input", CellChangeTimes->{{3.49722169840625*^9, 3.497221710421875*^9}, { 3.497221910546875*^9, 3.497221910671875*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Category Flow", "Section", CellChangeTimes->{{3.4971798232531424`*^9, 3.497179831224742*^9}, { 3.4979944704294577`*^9, 3.4979944718802576`*^9}}], Cell[CellGroupData[{ Cell["Basic Objects", "Subsection", CellChangeTimes->{{3.4972103998048*^9, 3.4972104068716*^9}}], Cell["\<\ R0 = \[EmptySet] R1 = {x| x\[Element]\[DoubleStruckCapitalR]}; R2 = {(x,i)| x\[Element]\[DoubleStruckCapitalR], i={1, 2} } R3 = {(x,i)| x\[Element]\[DoubleStruckCapitalR], i={1, 2, 3} }\ \>", "Text", CellChangeTimes->{{3.4972120821712*^9, 3.497212094698*^9}, {3.49721213752*^9, 3.497212173322*^9}, 3.4980821578856*^9, 3.498082400311*^9, { 3.4980824545652*^9, 3.4980824790727997`*^9}, {3.4980825290708*^9, 3.4980825561212*^9}, {3.4980826068524*^9, 3.4980827153036003`*^9}, { 3.498084287125*^9, 3.498084288451*^9}, {3.4980852380726*^9, 3.4980852475106*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Arrows", "Subsection", CellChangeTimes->{{3.497434412382*^9, 3.497434414567*^9}}], Cell[TextData[{ "In Category Flow, all the objects are sets and all the arrows are piecewise \ continuous mappings between the sets. We adopt ad hoc data structure for the \ arrows. An arrow is represented as a list of real-valued functions, \ especially, ", StyleBox["Mathematica", FontSlant->"Italic"], " library functions such as Sin, Cos, ..., and so on." }], "Text", CellChangeTimes->{{3.497434528495*^9, 3.497434602109*^9}, { 3.4974355613032*^9, 3.4974357230532*^9}, {3.4980843343462*^9, 3.4980843360622*^9}, {3.4980843764662*^9, 3.4980844297402*^9}, { 3.4980849025945997`*^9, 3.4980849561806*^9}, {3.4981029934116*^9, 3.4981030038606*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Interval utilities", "Subsection", CellChangeTimes->{{3.4984222798746867`*^9, 3.4984223033058867`*^9}}], Cell["\<\ Let us first ignore degenerate cases where special care is needed. The \ following is a trial version 1.\ \>", "Text", CellChangeTimes->{{3.4984236466148868`*^9, 3.498423650748887*^9}, { 3.498426399024087*^9, 3.498426431035287*^9}, {3.4995960840277414`*^9, 3.4995961149781413`*^9}, 3.5004344624768*^9, {3.5006702518842*^9, 3.5006702782272*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"subdivideT1", "[", RowBox[{"int1_", ",", "int2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Sort", "[", RowBox[{ RowBox[{"Union", "[", RowBox[{"int1", ",", "int2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"pt1", ",", "pt2"}], "}"}], ",", RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], "\[LessEqual]", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], " ", "]"}]}], " ", "]"}]}]], "Input", CellChangeTimes->{{3.498422503802087*^9, 3.498422538184487*^9}, { 3.498422655487887*^9, 3.498422660105487*^9}, {3.498422702974287*^9, 3.498422713114287*^9}, {3.498422895079687*^9, 3.498422902224487*^9}, { 3.4984229723932867`*^9, 3.498423075961687*^9}, {3.498423129859687*^9, 3.4984231544452868`*^9}, {3.4984235473988867`*^9, 3.4984235772884865`*^9}, 3.4995960575389414`*^9, 3.5004344624768*^9, {3.5006702426502*^9, 3.5006702453952*^9}, {3.5006703279582*^9, 3.5006703367162*^9}}], Cell["tests", "Text", CellChangeTimes->{{3.498423159218887*^9, 3.498423162916087*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"testdata1", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "1"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"testdata2", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "2"}], "}"}]}], "}"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4984231754584866`*^9, 3.4984232878390865`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"subdivideT1", "[", RowBox[{"testdata1", ",", "testdata2"}], "]"}]], "Input", CellChangeTimes->{{3.4984232907562866`*^9, 3.498423301177087*^9}, 3.4995960741529417`*^9, {3.5006702944002*^9, 3.5006702963442*^9}, 3.5006703415732*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"R\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "2"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.498423302643487*^9, 3.498423587865287*^9, {3.4995960683341417`*^9, 3.4995960751513414`*^9}, 3.5000231824094*^9, 3.5001048571397443`*^9, 3.500176697983*^9, 3.5004344752148*^9, 3.500630225889949*^9, { 3.5006702970362*^9, 3.5006703436612*^9}}] }, Open ]], Cell["For degenerate cases", "Text", CellChangeTimes->{{3.499596128175741*^9, 3.499596132902541*^9}, { 3.4995968037025414`*^9, 3.4995968057149415`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"testdata3", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "1"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"testdata4", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "1"}], "}"}]}], "}"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4984231754584866`*^9, 3.4984232878390865`*^9}, { 3.499596160327341*^9, 3.4995961928845415`*^9}}], Cell[TextData[{ "we expect the output for the above data be\n", StyleBox["{{\"R\",-2}, {\"L\",-2},{\"L\",-1},{\"R\",0},{\"L\",1}}.", "Output"] }], "Text", CellChangeTimes->{{3.4995962020885415`*^9, 3.4995962419153414`*^9}, { 3.4995963998341417`*^9, 3.4995964389589415`*^9}, {3.4995965286745415`*^9, 3.4995965334949417`*^9}, {3.4995967157497416`*^9, 3.4995967808797417`*^9}, {3.4995968119393415`*^9, 3.4995968130937414`*^9}, {3.4995970286545415`*^9, 3.4995970331473417`*^9}, {3.4995974960461416`*^9, 3.4995975306313415`*^9}, 3.4995978586681414`*^9}], Cell[BoxData[ RowBox[{ RowBox[{"subdivide", "[", RowBox[{"int1_", ",", "int2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Sort", "[", RowBox[{ RowBox[{"Union", "[", RowBox[{"int1", ",", "int2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"pt1", ",", "pt2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], "<", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}], " ", "||", "\[IndentingNewLine]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}], " ", "&&", "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "\"\\""}], " ", "&&", " ", RowBox[{ RowBox[{"pt2", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "\"\\""}]}], ")"}]}], ")"}]}]}], " ", "]"}]}], " ", "]"}]}]], "Input", CellChangeTimes->{{3.498422503802087*^9, 3.498422538184487*^9}, { 3.498422655487887*^9, 3.498422660105487*^9}, {3.498422702974287*^9, 3.498422713114287*^9}, {3.498422895079687*^9, 3.498422902224487*^9}, { 3.4984229723932867`*^9, 3.498423075961687*^9}, {3.498423129859687*^9, 3.4984231544452868`*^9}, {3.4984235473988867`*^9, 3.4984235772884865`*^9}, 3.4995960575389414`*^9, 3.4995968466649413`*^9, {3.4995969245089417`*^9, 3.499596994100541*^9}, {3.4995971048293414`*^9, 3.499597110523341*^9}, { 3.4995971620813417`*^9, 3.4995971681965413`*^9}, {3.4995971983669415`*^9, 3.4995972267589417`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"subdivide", "[", RowBox[{"testdata3", ",", "testdata4"}], "]"}]], "Input", CellChangeTimes->{{3.499597259674941*^9, 3.4995972776773415`*^9}, 3.4995973536961412`*^9, {3.4995973932889414`*^9, 3.4995974464849415`*^9}, 3.4995978933001413`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"R\"\>", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.4995972790969415`*^9, 3.4995973546945415`*^9, {3.4995973952857413`*^9, 3.499597446968541*^9}, 3.4995978950473413`*^9, 3.5000232213157997`*^9, 3.5001048770687447`*^9, 3.5001767317130003`*^9, 3.5004344935628*^9, 3.500630862755349*^9, 3.5006703609912*^9, 3.5012226276865997`*^9}] }, Open ]], Cell[TextData[{ "According to our interpretation, the resulting intervals are\n", StyleBox["-\[Infinity]{{3.4995982576537414`*^9, 3.4995983237509413`*^9}, { 3.4995983578993416`*^9, 3.4995984971449413`*^9}, {3.4995987101629415`*^9, 3.4995987219877415`*^9}}], Cell["For subdivision of more than three sets of intervals ", "Text", CellChangeTimes->{{3.5007126011454*^9, 3.5007126537642*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"subdivide", "[", RowBox[{"int1_", ",", "int2_", ",", "ints___"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"subdivide", "[", RowBox[{"int1", ",", RowBox[{"subdivide", "[", RowBox[{"int2", ",", "ints"}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.5007125043786*^9, 3.500712612549*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.500712867999*^9, 3.5007128688101997`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"subdivide", "[", RowBox[{"testdata1", ",", "testdata2", ",", "testdata3"}], "]"}]], "Input", CellChangeTimes->{{3.5007127105481997`*^9, 3.500712718473*^9}, { 3.500712782901*^9, 3.5007127874874*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"R\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "2"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.5007127218114*^9, 3.5007127890318003`*^9, 3.5012226363602*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"subdivide", "[", RowBox[{"testdata1", ",", "testdata2", ",", "testdata3", ",", "testdata4"}], "]"}]], "Input", CellChangeTimes->{{3.5007127105481997`*^9, 3.500712718473*^9}, { 3.500712782901*^9, 3.5007127874874*^9}, {3.5007128574846*^9, 3.5007128599026003`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"R\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "2"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.500712860667*^9, 3.5012226559849997`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Examples of Arrows", "Subsection", CellChangeTimes->{{3.4972125396412*^9, 3.4972125427924*^9}, { 3.4972128497536*^9, 3.4972128518128*^9}, {3.497472996597516*^9, 3.497473001745516*^9}, {3.4980850321057997`*^9, 3.4980850403582*^9}}], Cell["a0 : R1\[LongRightArrow]R1", "Text", CellChangeTimes->{{3.4981217195208*^9, 3.4981217377572002`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"a0", "=", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"#", "+", "2"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"-", "#"}], ")"}], "&"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", "#", ")"}], "&"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"2", "-", "#"}], ")"}], "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4981217505804*^9, 3.4981217568672*^9}, { 3.498121805508*^9, 3.4981218117636003`*^9}, {3.4981219158311996`*^9, 3.4981219558608*^9}, 3.4981221774374*^9, {3.4981228540278*^9, 3.4981229228862*^9}, {3.498343764649514*^9, 3.498343794612514*^9}, { 3.498343881171514*^9, 3.498343935638514*^9}, 3.4984188050688868`*^9, { 3.498419071816487*^9, 3.4984190982604866`*^9}, {3.4984709419983125`*^9, 3.4984710049287124`*^9}, {3.498473225978712*^9, 3.4984732705011125`*^9}, { 3.499293127376*^9, 3.4992931316348*^9}, {3.50017679787*^9, 3.500176895149*^9}}], Cell[BoxData[Cell["a1 : R1\[LongRightArrow]R3", "Text", CellChangeTimes->{{3.4981217195208*^9, 3.4981217377572002`*^9}}]], "Text", CellChangeTimes->{{3.4984310744058867`*^9, 3.498431104560687*^9}, { 3.4984311588018866`*^9, 3.498431158911087*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"a1", "=", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"#", "+", "2"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"-", "#"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{ RowBox[{"(", RowBox[{"2", "-", "#"}], ")"}], "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4981217505804*^9, 3.4981217568672*^9}, { 3.498121805508*^9, 3.4981218117636003`*^9}, {3.4981219158311996`*^9, 3.4981219558608*^9}, 3.4981221774374*^9, {3.4981228540278*^9, 3.4981229228862*^9}, {3.498343764649514*^9, 3.498343794612514*^9}, { 3.498343881171514*^9, 3.498343935638514*^9}, 3.4984188050688868`*^9, { 3.498419071816487*^9, 3.4984190982604866`*^9}, {3.4984311453546867`*^9, 3.4984311563214865`*^9}, {3.4984710176583123`*^9, 3.4984710622275124`*^9}, {3.4992432260228*^9, 3.4992432742892*^9}, { 3.4992460797318*^9, 3.4992460803557997`*^9}, {3.4992931402148*^9, 3.4992931430696*^9}, 3.500176867995*^9, {3.5001770683789997`*^9, 3.500177071942*^9}}], Cell[BoxData[Cell["a2 : R2\[LongRightArrow]R2", "Text", CellChangeTimes->{{3.4981217195208*^9, 3.4981217377572002`*^9}}]], "Text", CellChangeTimes->{{3.4984310744058867`*^9, 3.498431104560687*^9}, { 3.4984311588018866`*^9, 3.4984312013586864`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"a2", "=", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"#", "+", "2"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"-", "#"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"(", RowBox[{"2", "-", "#"}], ")"}], "&"}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"#", "+", "2"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "#"}], "+", "1"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"(", RowBox[{"#", "^", "2"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"(", RowBox[{"2", "-", "#"}], ")"}], "&"}]}], "}"}]}], "}"}]}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4981217505804*^9, 3.4981217568672*^9}, { 3.498121805508*^9, 3.4981218117636003`*^9}, {3.4981219158311996`*^9, 3.4981219558608*^9}, 3.4981221774374*^9, {3.4981228540278*^9, 3.4981229228862*^9}, {3.498343764649514*^9, 3.498343794612514*^9}, { 3.498343881171514*^9, 3.498343935638514*^9}, 3.4984188050688868`*^9, { 3.498419071816487*^9, 3.4984190982604866`*^9}, {3.4984311453546867`*^9, 3.4984311563214865`*^9}, {3.498431212091487*^9, 3.498431276269887*^9}, { 3.498471085861512*^9, 3.4984711277787123`*^9}, {3.4992433095296*^9, 3.499243385954*^9}, {3.4992931539428*^9, 3.4992931574528*^9}, { 3.500177087394*^9, 3.500177112691*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Accessors to arrows", "Subsection", CellChangeTimes->{{3.4998504016246*^9, 3.4998504107974*^9}}], Cell["\<\ The getSignature accessor returns the signature of the map represented by the \ arrow. Let {m,n} be the return value. Then, the arrow is \ Rm\[LongRightArrow]Rn.\ \>", "Text", CellChangeTimes->{{3.4998550504653997`*^9, 3.4998550841146*^9}, { 3.5001050030267444`*^9, 3.5001050893567443`*^9}, {3.500105722180744*^9, 3.5001057288207445`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"getSignature", "[", "arrow_", "]"}], ":=", RowBox[{"First", "[", "arrow", "]"}]}]], "Input", CellChangeTimes->{{3.4998505642390003`*^9, 3.4998506119126*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Map", "[", RowBox[{"getSignature", ",", RowBox[{"{", RowBox[{"a0", ",", "a1", ",", "a2"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4998506173726*^9, 3.4998506352346*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.4998506361706*^9, 3.5000233463185997`*^9, 3.5001057433817444`*^9, 3.5004354295682*^9, 3.500630893081749*^9}] }, Open ]], Cell["\<\ The restrictOn accessor returns the map retstricted on the nth component of \ the domain.\ \>", "Text", CellChangeTimes->{{3.4998560709342003`*^9, 3.4998561339894*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"getDomain", "[", "arrow_", "]"}], ":=", RowBox[{"First", "[", RowBox[{"First", "[", "arrow", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"getCodomain", "[", "arrow_", "]"}], ":=", RowBox[{"Part", "[", RowBox[{ RowBox[{"First", "[", "arrow", "]"}], ",", "2"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.500106077154744*^9, 3.5001061387547445`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"getBody", "[", "arrow_", "]"}], ":=", RowBox[{"Rest", "[", "arrow", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.500143932576*^9, 3.500143953868*^9}, {3.500155120009*^9, 3.500155124727*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getBody", "[", "a0", "]"}]], "Input", CellChangeTimes->{{3.500143964583*^9, 3.500143982225*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], "}"}]], "Output", CellChangeTimes->{3.5001439831809998`*^9, 3.500155128258*^9, 3.5001780525179996`*^9, 3.5004356888884*^9, 3.500631028712349*^9, 3.5012319333142*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"restrictOn", "[", RowBox[{"arrow_", ",", "nth_"}], "]"}], ":=", RowBox[{"Part", "[", RowBox[{"arrow", ",", RowBox[{"nth", "+", "1"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4998559582242002`*^9, 3.4998560127774*^9}, { 3.4998560546946*^9, 3.4998560556306*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"restrictOn", "[", RowBox[{"a2", ",", "2"}], "]"}]], "Input", CellChangeTimes->{{3.4998560220126*^9, 3.499856035023*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.4998560356782*^9, 3.4998560611842003`*^9}, 3.500023431245*^9, 3.5001057744457445`*^9, 3.5001780917*^9, 3.5004357971954*^9, 3.5006310532667494`*^9, 3.5012319399286003`*^9}] }, Open ]], Cell["\<\ The getInts accessor returns the set of dividing points for the nth component \ of the domain.\ \>", "Text", CellChangeTimes->{{3.499854884185*^9, 3.499854912811*^9}, { 3.4998549928546*^9, 3.4998550365814*^9}, {3.5001058124687443`*^9, 3.5001058139347444`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"getInts", "[", RowBox[{"arrow_", ",", "nth_"}], "]"}], ":=", RowBox[{"First", "[", RowBox[{"restrictOn", "[", RowBox[{"arrow", ",", "nth"}], "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.4998541299442*^9, 3.4998541950118*^9}, { 3.5000235335186*^9, 3.5000235508970003`*^9}, {3.5004358447874002`*^9, 3.5004358496344*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"getInts", "[", RowBox[{"a2", ",", "2"}], "]"}], " "}]], "Input", CellChangeTimes->{{3.4998541982254*^9, 3.4998542149018*^9}, { 3.4998543355053997`*^9, 3.4998543380638*^9}, {3.500178654316*^9, 3.50017866462*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.499854215635*^9, 3.499854339109*^9, 3.5000235625814*^9, 3.5001058296257443`*^9, 3.500178346777*^9, 3.5001786583199997`*^9, 3.5004358522254*^9, 3.5006310853559494`*^9, 3.5012323984955997`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"getInts", "[", RowBox[{"a2", ",", "#"}], "]"}], "&"}], ",", RowBox[{"Range", "[", RowBox[{"getDomain", "[", "a2", "]"}], "]"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{{3.5001058780587444`*^9, 3.5001059256897445`*^9}, { 3.5001061613087444`*^9, 3.5001061674137444`*^9}, {3.500178613705*^9, 3.500178625354*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"\<\"L\"\>"}, { RowBox[{"-", "1"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"\<\"R\"\>"}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"\<\"L\"\>"}, {"1"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]}, { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"\<\"L\"\>"}, { RowBox[{"-", "3"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"\<\"R\"\>"}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"\<\"L\"\>"}, {"5"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{ 3.5001061695257444`*^9, 3.500178365545*^9, {3.500178604215*^9, 3.5001786266210003`*^9}, 3.5004361541084003`*^9, 3.5006311054487495`*^9}] }, Open ]], Cell["\<\ The getFs fucntion returns the list of functions defined on the intervals.\ \>", "Text", CellChangeTimes->{{3.5000236065578003`*^9, 3.5000237321846*^9}, { 3.5000238829118*^9, 3.5000238832394*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"getFs", "[", RowBox[{"arrow_", ",", "nth_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Rest", "[", RowBox[{"restrictOn", "[", RowBox[{"arrow", ",", "nth"}], "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.5000237473166*^9, 3.5000238780446*^9}, { 3.500178697465*^9, 3.500178700613*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.5006703947022*^9, 3.5006703956352*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getFs", "[", RowBox[{"a2", ",", "2"}], "]"}]], "Input", CellChangeTimes->{{3.500023814381*^9, 3.5000238299653997`*^9}, { 3.5000238928022003`*^9, 3.5000238942686*^9}, {3.5000240082265997`*^9, 3.500024011799*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.5000240124074*^9, 3.5001062810317445`*^9, {3.5001786864230003`*^9, 3.500178703723*^9}, 3.5004365777384*^9, 3.500631125479149*^9, 3.5012324547335997`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"getFs", "[", RowBox[{"a2", ",", "#"}], "]"}], "&"}], ",", RowBox[{"Range", "[", RowBox[{"getDomain", "[", "a2", "]"}], "]"}]}], "]"}], "//", "MatrixForm"}]], "Input", CellChangeTimes->{ 3.5000240349494*^9, {3.5001063004417443`*^9, 3.5001063076927443`*^9}, { 3.50017886702*^9, 3.5001788703450003`*^9}}], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"1"}, { RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"1"}, { RowBox[{ RowBox[{"-", "#1"}], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"2"}, { RowBox[{"#1", "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"2"}, { RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]}, { RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"1"}, { RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"1"}, { RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"2"}, { RowBox[{ SuperscriptBox["#1", "2"], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}], RowBox[{"(", "\[NoBreak]", TagBox[GridBox[{ {"2"}, { RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column], "\[NoBreak]", ")"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.5000240391926003`*^9, 3.500106309791744*^9, 3.500178871104*^9, 3.5004365839014*^9, 3.5006311340591493`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Applying to elements", "Subsection", CellChangeTimes->{{3.4984319698040867`*^9, 3.4984319823776865`*^9}}], Cell[CellGroupData[{ Cell["The findInt function", "Subsubsection", CellChangeTimes->{{3.5006705764662*^9, 3.5006705802402*^9}}], Cell["\<\ The findInt function returns the integer n such that \"val\" belongs to the \ n-th interval.\ \>", "Text", CellChangeTimes->{{3.4984713509367123`*^9, 3.4984713640407124`*^9}, { 3.4992439179608*^9, 3.499244017676*^9}, {3.4995988219993415`*^9, 3.4995988550245414`*^9}, 3.499598885241741*^9}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"findInt", "[", RowBox[{"ints_", ",", "val_"}], "]"}], ":=", RowBox[{"findIntWork", "[", RowBox[{"ints", ",", "val", ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"findIntWork", "[", RowBox[{"ints_", ",", "val_", ",", "n_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"If", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Length", "[", "ints", "]"}], "\[Equal]", "0"}], "\[IndentingNewLine]", "||", " ", RowBox[{"val", " ", "<", " ", RowBox[{"Part", "[", RowBox[{ RowBox[{"First", "[", "ints", "]"}], ",", "2"}], "]"}]}], "\[IndentingNewLine]", "||", " ", RowBox[{"(", RowBox[{ RowBox[{"val", " ", "\[Equal]", " ", RowBox[{"Part", "[", RowBox[{ RowBox[{"First", "[", "ints", "]"}], ",", "2"}], "]"}]}], "\[IndentingNewLine]", "&&", " ", RowBox[{ RowBox[{"Part", "[", RowBox[{ RowBox[{"First", "[", "ints", "]"}], ",", "1"}], "]"}], "\[Equal]", "\"\\""}]}], ")"}]}], ",", "n", ",", "\[IndentingNewLine]", RowBox[{"findIntWork", "[", RowBox[{ RowBox[{"Rest", "[", "ints", "]"}], ",", "val", ",", RowBox[{"n", "+", "1"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4984319973848867`*^9, 3.498432194646887*^9}, { 3.4984323381980867`*^9, 3.498432416868887*^9}, {3.498432486678887*^9, 3.498432492934487*^9}, {3.4984698579073124`*^9, 3.498469878624112*^9}, { 3.4984704565107126`*^9, 3.498470566709112*^9}, {3.4984712656671124`*^9, 3.4984712664003124`*^9}, 3.4984713271467123`*^9, 3.4984714190775127`*^9, { 3.4984714792467127`*^9, 3.4984715462487125`*^9}, {3.4984716425007124`*^9, 3.498471699737112*^9}, {3.499598807522541*^9, 3.4995988176157417`*^9}, { 3.4995988885957413`*^9, 3.4995988937281413`*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.5006704456702003`*^9, 3.5006704465232*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getInts", "[", RowBox[{"a2", ",", "2"}], "]"}]], "Input", CellChangeTimes->{{3.5000242635674*^9, 3.5000242898845997`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.5000242679354*^9, 3.5000242907894*^9}, 3.5001067812437444`*^9, 3.500178910958*^9, 3.5004376104046*^9, 3.500631149783949*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"findInt", "[", RowBox[{ RowBox[{"getInts", "[", RowBox[{"a2", ",", "2"}], "]"}], ",", "#"}], "]"}], "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3.1"}], ",", RowBox[{"-", "3"}], ",", RowBox[{"-", "2.9"}], ",", RowBox[{"-", "1.1"}], ",", "0", ",", "0.1", ",", "1", ",", "6"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4984717478475122`*^9, 3.498471833990712*^9}, { 3.4984720441851125`*^9, 3.4984720526247125`*^9}, {3.4984725280191126`*^9, 3.4984725383775125`*^9}, {3.4993385998766003`*^9, 3.4993386001730003`*^9}, { 3.500024127707*^9, 3.500024145023*^9}, {3.5000243345786*^9, 3.5000243347346*^9}, {3.5000255729533997`*^9, 3.500025626243*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "1", ",", "1", ",", "2", ",", "2", ",", "3", ",", "3", ",", "3", ",", "4"}], "}"}]], "Output", CellChangeTimes->{ 3.4984718367987127`*^9, {3.498472046384712*^9, 3.498472074324312*^9}, 3.4984725435099125`*^9, 3.4992438490712*^9, 3.4992871645816*^9, { 3.4993385397854*^9, 3.499338560315*^9}, 3.4993386013118*^9, 3.499367565115*^9, 3.499565251609375*^9, 3.4995991312849417`*^9, 3.499850363701*^9, {3.5000241586106*^9, 3.5000241721982*^9}, 3.5000243368718*^9, 3.5000256269762*^9, 3.5001067898237443`*^9, 3.500178956465*^9, 3.5004377150182*^9, 3.500631183199149*^9, 3.5012324800212*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getInts", "[", RowBox[{"a0", ",", "1"}], "]"}]], "Input", CellChangeTimes->{{3.500025712745*^9, 3.5000257176902*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.5000257182518*^9, 3.5001068010477448`*^9, 3.5001789620699997`*^9, 3.5004379364538*^9, 3.500631190889949*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Map", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"findInt", "[", RowBox[{ RowBox[{"getInts", "[", RowBox[{"a0", ",", "1"}], "]"}], ",", "#"}], "]"}], "&"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.1"}], ",", "0", ",", "0.1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4995989265817413`*^9, 3.4995991116445417`*^9}, { 3.4995991909393415`*^9, 3.4995992133409414`*^9}, {3.5000257445378*^9, 3.5000257507153997`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "3", ",", "3"}], "}"}]], "Output", CellChangeTimes->{{3.499599113641341*^9, 3.4995991381177416`*^9}, 3.4995992158525414`*^9, 3.500025755957*^9, 3.5001068069757442`*^9, 3.500180062873*^9, 3.5004379389342003`*^9, 3.500631195850749*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"findInt", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "100"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "100"}], "}"}]}], "}"}], ",", "0"}], "]"}]], "Input", CellChangeTimes->{{3.5012324950128*^9, 3.5012326115916*^9}}], Cell[BoxData["3"], "Output", CellChangeTimes->{3.5012325676308002`*^9, 3.5012326132452*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Accessors for elements {component, value}", "Subsubsection", CellChangeTimes->{{3.5000257933970003`*^9, 3.500025939179*^9}, 3.5006705469112*^9}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"getCmp", "[", "element_", "]"}], ":=", RowBox[{"First", "[", "element", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"getVal", "[", "element_", "]"}], ":=", RowBox[{"Part", "[", RowBox[{"element", ",", "2"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.5000259420338*^9, 3.5000260078501997`*^9}, 3.5001069064927444`*^9}], Cell["Tests", "Text", CellChangeTimes->{{3.5006704708152*^9, 3.5006704717402*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getCmp", "[", RowBox[{"{", RowBox[{"1", ",", "Pi"}], "}"}], "]"}]], "Input", CellChangeTimes->{{3.5000260141057997`*^9, 3.500026025915*^9}, 3.5001069256557446`*^9}], Cell[BoxData["1"], "Output", CellChangeTimes->{3.5000260274438*^9, 3.5001069268987446`*^9, 3.5001800829849997`*^9, 3.5004380220614*^9, 3.500631208595949*^9, 3.5012333669435997`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getVal", "[", RowBox[{"{", RowBox[{"1", ",", "Pi"}], "}"}], "]"}]], "Input", CellChangeTimes->{{3.5000260300022*^9, 3.5000260361642*^9}}], Cell[BoxData["\[Pi]"], "Output", CellChangeTimes->{3.5000260370534*^9, 3.5001069296197443`*^9, 3.500180085355*^9, 3.5004380246714*^9, 3.500631211793949*^9, 3.5012333712804003`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["The apply function", "Subsubsection", CellChangeTimes->{{3.5006704983452*^9, 3.5006705045122004`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"apply", "[", RowBox[{"arrow_", ",", "elem_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"m", ",", "v", ",", "ints", ",", "n", ",", "f"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", RowBox[{"getCmp", "[", "elem", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"v", "=", RowBox[{"getVal", "[", "elem", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ints", "=", RowBox[{"getInts", "[", RowBox[{"arrow", ",", "m"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"n", "=", RowBox[{"findInt", "[", RowBox[{"ints", ",", "v"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"f", "=", RowBox[{"Part", "[", RowBox[{ RowBox[{"getFs", "[", RowBox[{"arrow", ",", "m"}], "]"}], ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"First", "[", "f", "]"}], ",", RowBox[{ RowBox[{"Part", "[", RowBox[{"f", ",", "2"}], "]"}], "[", "v", "]"}]}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992461852502003`*^9, 3.499246187637*^9}, 3.4992478252469997`*^9, {3.499248052461*^9, 3.4992480548322*^9}, { 3.4992481187922*^9, 3.4992481897098*^9}, {3.4992482544498*^9, 3.4992483158358*^9}, {3.4992483688445997`*^9, 3.4992483810906*^9}, { 3.4992933602684*^9, 3.499293372764*^9}, {3.5000312327602*^9, 3.5000312658322*^9}, {3.5000314989586*^9, 3.5000315213134003`*^9}, { 3.5000315657265997`*^9, 3.500031592153*^9}, {3.5000316655354*^9, 3.5000316706210003`*^9}, 3.5001071468357444`*^9}], Cell["Tests", "Text", CellChangeTimes->{{3.498091068217*^9, 3.498091069369*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"a2", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"1", "/", "2"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.499246038189*^9, 3.499246055193*^9}, { 3.4992461025546*^9, 3.4992461334582*^9}, 3.4992461764674*^9, { 3.499248206823*^9, 3.4992482069477997`*^9}, {3.499248342153*^9, 3.4992483422622004`*^9}, 3.499248385833*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", FractionBox["1", "2"]}], "}"}]], "Output", CellChangeTimes->{{3.499565270734375*^9, 3.499565278359375*^9}, 3.4996280330078*^9, 3.5000317463122*^9, 3.5001071553117447`*^9, 3.5001806212139997`*^9, 3.5004382667024*^9, 3.5006691796574*^9, 3.5012334088452*^9}] }, Open ]], Cell["a1 : R1\[LongRightArrow]R2", "Text", CellChangeTimes->{{3.4981115109052*^9, 3.4981115461722*^9}, { 3.499249496704*^9, 3.4992495269524*^9}, {3.5001071589207444`*^9, 3.500107160392744*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"a3", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "Sin"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "Cos"}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.497226089328125*^9, 3.49722612303125*^9}, { 3.49722620609375*^9, 3.49722623346875*^9}, {3.4980851101214*^9, 3.4980851455802*^9}, {3.4981039141872*^9, 3.4981039342019997`*^9}, { 3.4992493672708*^9, 3.4992493839316*^9}, {3.4992494391868*^9, 3.4992495031*^9}, {3.499249688584*^9, 3.4992496915636*^9}, { 3.4992500240620003`*^9, 3.4992500711896*^9}, {3.4992501431056004`*^9, 3.4992501582376003`*^9}, {3.4992876123076*^9, 3.499287614554*^9}, { 3.4992933842924*^9, 3.4992933865076*^9}, {3.4994960996935997`*^9, 3.4994961023924*^9}, {3.500180669526*^9, 3.500180672024*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"a3", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "Pi"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4992501088012*^9, 3.4992501300016003`*^9}, { 3.4992501975964003`*^9, 3.499250205646*^9}, {3.4992876243196*^9, 3.49928762446*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]], "Output", CellChangeTimes->{ 3.4992495717244*^9, 3.4992496636552*^9, {3.4992496959628*^9, 3.4992497046052*^9}, 3.4992497797504*^9, {3.4992498574695997`*^9, 3.499249872664*^9}, 3.4992499411792*^9, 3.4992500748868*^9, { 3.499250122888*^9, 3.499250130532*^9}, 3.4992502063792*^9, 3.4992876373456*^9, 3.4992934088*^9, 3.4993388813056*^9, 3.499338958432*^9, 3.4994961208784*^9, 3.499565399046875*^9, 3.4996280449105997`*^9, 3.500031813829*^9, 3.500107166331744*^9, {3.5001806464639997`*^9, 3.5001806752320004`*^9}, 3.5004382786574*^9, 3.5006691891422*^9, 3.501233414898*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"a3", ",", RowBox[{"{", RowBox[{"1", ",", "Pi"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4992502198732*^9, 3.4992502262692003`*^9}, { 3.4992876264723997`*^9, 3.4992876265972*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", RowBox[{"-", "1"}]}], "}"}]], "Output", CellChangeTimes->{3.4992502267684*^9, 3.4992876712288*^9, 3.4993388860480003`*^9, 3.499338969664*^9, 3.4994961239516*^9, 3.499565419125*^9, 3.4996280467981997`*^9, 3.5000318166682*^9, 3.500107168767744*^9, 3.500180679472*^9, 3.5004382808914003`*^9, 3.5006691909362*^9, 3.5012334181428003`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"a3", ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4994961465404*^9, 3.4994961844639997`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]], "Output", CellChangeTimes->{{3.4994961570704*^9, 3.4994961849007998`*^9}, 3.499565422078125*^9, 3.499628048951*^9, 3.5000318201626*^9, 3.5001071712527447`*^9, 3.50018068362*^9, 3.5004382849954*^9, 3.501233420514*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"a4", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "2"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "#"}], "-", "2"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"-", "#"}], ")"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"(", RowBox[{"#", "-", "2"}], ")"}], "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4996281000722*^9, 3.4996282178677998`*^9}, { 3.4996282849634*^9, 3.4996284389042*^9}, {3.4996285704434*^9, 3.4996285733138*^9}, {3.500180695093*^9, 3.5001807016210003`*^9}, 3.5012334371124*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"a4", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "3"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4996285015694*^9, 3.4996285088389997`*^9}, { 3.4996285414898*^9, 3.4996285439077997`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]], "Output", CellChangeTimes->{3.4996285095098*^9, 3.4996285443914003`*^9, 3.499628586293*^9, 3.5000318276194*^9, 3.5001071783877444`*^9, 3.500180710566*^9, 3.5004382923143997`*^9, 3.5006692018562*^9, 3.5012334421668*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"apply", "[", RowBox[{"a4", ",", RowBox[{"{", RowBox[{"1", ",", "#"}], "}"}]}], "]"}], "&"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.1"}], ",", "0", ",", "0.1"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4996287515906*^9, 3.499628816939*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "0.1`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "0.1`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.4996287823226*^9, 3.4996288181246*^9, 3.5000318312542*^9, 3.5001071826387444`*^9, 3.500180974245*^9, 3.5004382968604*^9, 3.5006696781092*^9, 3.5012334454896*^9}] }, Open ]], Cell["\<\ Unfortunately, the Plot library function will not display the discontinuity \ appropriately.\ \>", "Text", CellChangeTimes->{{3.4996286422658*^9, 3.499628726303*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"Part", "[", RowBox[{ RowBox[{"apply", "[", RowBox[{"a4", ",", RowBox[{"{", RowBox[{"1", ",", "x"}], "}"}]}], "]"}], ",", "2"}], "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "3"}], ",", "3"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4996284474062*^9, 3.4996284856886*^9}, { 3.4996285247978*^9, 3.4996285283234*^9}, {3.4996286220794*^9, 3.4996286280698*^9}}], Cell[BoxData[ GraphicsBox[{{}, {}, {Hue[0.67, 0.6, 0.6], LineBox[CompressedData[" 1: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 "]]}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 0}, PlotRange->{{-3, 3}, {-1.9990992220797006`, 0.9999998775510206}}, PlotRangeClipping->True, PlotRangePadding->{ Scaled[0.02], Scaled[0.02]}]], "Output", CellChangeTimes->{3.4996284915074*^9, 3.4996285290098*^9, 3.4996285888514*^9, 3.4996286291306*^9, 3.5000318452318*^9, 3.5001071898117447`*^9, 3.500180980322*^9, 3.5004383269194*^9, 3.5006696843542*^9}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztXHlsncUR/8DPRy5yH5xxiBMSyE2cEENiJ5AEyEG4cgFJHBPjtCWhabgL BCiEUgoPAg3hSCiEQ20lKEhGlahaFaktUlSkqkhVXakCqaJ/FCEV9Q+kSq53 Z3b3+9m/z2/XSRF/NOBnv3m785udnZ2Z3Z3vrWnd27Hj5ta9O9ta61fuab2l Y2fbd+pX7N7TQ6o6KctO6siy7JP6zPzd3fOnvnT3/N+907wYSvj7HfurShvZ T7K3K370iv01NOtsz+Bfe6dp1pm19/zXqV1cm6ZyV6mY41H7q5R1lZtMS8ul XO6qsuTqrNtwae9Uhk1ZuauHTzG3Fvlo2scff/7m3Xf9ou7LL/+TbRKasNJ/ J9vXGiNc1qUszE9XuWzkLym6EUqG1m27GwEterUB3yWMDVDLh3/4u33XDHIY 8uerLjvy+v373su2OzmMnnRIbpgySgLUa5i7hbb/0LMfGL7b3u38s2Lpr5KB /NXuXe+YJne8evRDh+qUZ96dXGl4vVBloKV17//mb2awR/Y//GuDDMDVDti8 M7+tSrZ4pLLahbGR/DTGT/HN0t7M7e92drw14osvvnSSoA5q8qKYZh+2bf9Z /aef/usGtTWRwltntVeRJ2XMYr8l3A1HI4ARxFCoOmrzMpifvNjKiXI3CjaK dnTKvQq4y3RWXfrB7z9599a9oshvEgSlPXHgqd/e8tOf/DHf1yuS27CH0nkx hmUMzL77hnktGSRxLVUbf/neX63F53rEApTCmvJa2EnGorQ5XX/5p9GqXeil AUGZroaFYUWhOoQ24bPP/m3aGUPKqtOgtLnpamzR2kAHgbopiGT6XvDRn/7R 46SSoGoI7aZiKDCGRKhaoZnuho19106glGZYGtb5vrFQdaT5DgKlNKM409ea BetbGQrmYIc38TZiDIPSAAYFFsYYzO/sRjKWNmKfg9OgBhN1tBVDAdtEqCFC 6/j5Wx8d/OFj79t32wnUdtJuSBrUUGK6rQSqNfQ1ftGOfuiAoExXw8LGNAa1 LSxwM1d2ToelQQ0jlrWNQG0lZnFKGpQ2B+e51Zu4xOwq48GNJ8/3iAUYLjQI BFvIWJQG4WR4GtQIYgw3ECilQZAckQY1Umg+uTHvridQSoOIP3JAUPnkhUJd F9r5lGRUGtSoIK2BssZwXTGUUZ5RYr5vLNRoobk80r7bTKCU5lLYfN9YqDHm 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 \ \>"]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Primitives and Structural Operations", "Subsection", CellChangeTimes->{{3.5006706276282*^9, 3.5006706617572002`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"The", " ", SubscriptBox["Test", RowBox[{"x", ">", "0"}]], " ", "primitive"}]], "Subsubsection", CellChangeTimes->{{3.4992908278042*^9, 3.4992908782702*^9}}], Cell["testPos : R1\[LongRightArrow]R2", "Text", CellChangeTimes->{{3.4981115109052*^9, 3.4981115461722*^9}, { 3.499249496704*^9, 3.4992495269524*^9}, {3.4992915031906*^9, 3.4992915236266003`*^9}, {3.4993369273192*^9, 3.4993369297684*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"testPos", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#", "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4992909290950003`*^9, 3.4992910027738*^9}, { 3.4992914235994*^9, 3.4992914740498*^9}, {3.4992934200632*^9, 3.49929342206*^9}, {3.4993369331224003`*^9, 3.4993369353375998`*^9}, { 3.499369963248*^9, 3.4993699653696003`*^9}, {3.500180988425*^9, 3.500180991775*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.4993369442764*^9, 3.49933694905*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"testPos", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "Pi"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993369666468*^9, 3.499336987582*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "\[Pi]"}]}], "}"}]], "Output", CellChangeTimes->{3.4993369906864*^9, 3.4993389919096003`*^9, 3.499565441203125*^9, 3.5001073307967443`*^9, 3.500180997547*^9, 3.5004384105364*^9, 3.5006697532072*^9, 3.5012338575282*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"testPos", ",", RowBox[{"{", RowBox[{"1", ",", "Pi"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993369944927998`*^9, 3.4993370022304*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "\[Pi]"}], "}"}]], "Output", CellChangeTimes->{3.4993370030572*^9, 3.4993389959188004`*^9, 3.499565444140625*^9, 3.5001073356787443`*^9, 3.5001810004230003`*^9, 3.5004384138104*^9, 3.5006697553252*^9, 3.5012338598838*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"testPos", ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993370058964*^9, 3.4993370126823997`*^9}, { 3.499337121976*^9, 3.4993371267496*^9}, 3.4993391407648*^9, 3.4993700197044*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]], "Output", CellChangeTimes->{ 3.4993370133064003`*^9, {3.49933712299*^9, 3.4993371274048*^9}, 3.4993391414667997`*^9, 3.499370020422*^9, 3.49956545015625*^9, 3.500107339588744*^9, 3.500181003045*^9, 3.5004384164384003`*^9, 3.5006700934532003`*^9, 3.5012338637058*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"testPos", ",", RowBox[{"{", RowBox[{"1", ",", "0.01"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993371348772*^9, 3.4993371436756*^9}, 3.4993391345559998`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "0.01`"}], "}"}]], "Output", CellChangeTimes->{3.499337144284*^9, 3.499339135726*^9, 3.4993700280504*^9, 3.499565455296875*^9, 3.5001073424607444`*^9, 3.500181008724*^9, 3.5004384259564*^9, 3.5006700957702*^9, 3.5012338658585997`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["The sum construction", "Subsubsection", CellChangeTimes->{{3.499293434618*^9, 3.4992934431356*^9}}], Cell["\<\ We will take an iterative approach to the design of the sum operation. Trial \ version 1 returns signatures.\ \>", "Text", CellChangeTimes->{{3.500143202568*^9, 3.500143219587*^9}, {3.500143570465*^9, 3.5001435878710003`*^9}, {3.500143631417*^9, 3.5001436761210003`*^9}, { 3.5006707349382*^9, 3.5006707493712*^9}, {3.5006707818842*^9, 3.5006707980982*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sumT1", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, {3.5001074184397445`*^9, 3.500107429246744*^9}, 3.5006707065402*^9}], Cell["Tests", "Text", CellChangeTimes->{{3.5006707133602*^9, 3.5006707142052*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sumT1", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.4992938195324*^9, 3.4992938228708*^9}, 3.5006707276542*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "3", ",", "2", ",", "2"}], "}"}]], "Output", CellChangeTimes->{3.4992938233856*^9, 3.5001074343957443`*^9, 3.500181312427*^9, 3.500181364613*^9, 3.5006707291612*^9}] }, Open ]], Cell["\<\ Trial version 2 returns the body of arrow2, dropping its signature.\ \>", "Text", CellChangeTimes->{{3.5006708129592*^9, 3.5006708680652*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sumT2", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2", ",", "f2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"f2", "=", RowBox[{"getBody", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", "f2"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, 3.4992938950832*^9, { 3.4992963046254*^9, 3.4992963048504*^9}, {3.4992964479294*^9, 3.4992964531703997`*^9}, {3.4992965428534*^9, 3.4992965599484*^9}, { 3.4992966574594*^9, 3.4992966586024*^9}, {3.4992966986963997`*^9, 3.4992966992754*^9}, {3.4992967606633997`*^9, 3.4992967994203997`*^9}, { 3.5001074506787443`*^9, 3.500107459333744*^9}, {3.500181356264*^9, 3.5001813599110003`*^9}, 3.5006708042702*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sumT2", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.4992938195324*^9, 3.4992938228708*^9}, { 3.4992969208143997`*^9, 3.4992969209274*^9}, 3.5006708440352*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.4992969097544003`*^9, 3.4992969221324*^9}, 3.500107522857744*^9, 3.500181383493*^9, 3.5006708460032*^9}] }, Open ]], Cell["Trial version 3 returns the list of function parts.", "Text", CellChangeTimes->{{3.5006710165601997`*^9, 3.5006710406122*^9}, { 3.5006710995341997`*^9, 3.5006711250902*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sumT3", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2", ",", "f2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"f2", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Rest", "[", "#", "]"}], "&"}], ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", "f2"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, 3.4992938950832*^9, { 3.4992963046254*^9, 3.4992963048504*^9}, {3.4992964479294*^9, 3.4992964531703997`*^9}, {3.4992965428534*^9, 3.4992965599484*^9}, { 3.4992966574594*^9, 3.4992966586024*^9}, {3.4992966986963997`*^9, 3.4992966992754*^9}, {3.4992967606633997`*^9, 3.4992967994203997`*^9}, { 3.4992971385584*^9, 3.4992971386703997`*^9}, {3.499297803797*^9, 3.499297828085*^9}, {3.499297908225*^9, 3.499297933848*^9}, { 3.5001075315897446`*^9, 3.5001075429347444`*^9}, {3.500154290712*^9, 3.500154302851*^9}, {3.500181474151*^9, 3.500181476344*^9}, { 3.5001815200439997`*^9, 3.500181523031*^9}, 3.5006708869091997`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sumT3", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.50018150812*^9, 3.500181512033*^9}, 3.5006711405271997`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.500181514038*^9, 3.50018152571*^9}, 3.5006711420632*^9}] }, Open ]], Cell["Trial version 4 gives adequate displacement to arrow2.", "Text", CellChangeTimes->{{3.5006714367412*^9, 3.5006714943431997`*^9}, { 3.5006715573392*^9, 3.5006715584002*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sumT4", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2", ",", "f2", ",", "wf"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"f2", "=", RowBox[{"Map", "[", RowBox[{"Rest", ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"wf", "[", "p_", "]"}], " ", ":=", " ", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Part", "[", RowBox[{"#", ",", "1"}], "]"}], "+", "c1"}], ",", RowBox[{"Part", "[", RowBox[{"#", ",", "2"}], "]"}]}], "}"}], "&"}], ",", "p"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Map", "[", RowBox[{"wf", ",", "f2"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, 3.4992938950832*^9, { 3.4992963046254*^9, 3.4992963048504*^9}, {3.4992964479294*^9, 3.4992964531703997`*^9}, {3.4992965428534*^9, 3.4992965599484*^9}, { 3.4992966574594*^9, 3.4992966586024*^9}, {3.4992966986963997`*^9, 3.4992966992754*^9}, {3.4992967606633997`*^9, 3.4992967994203997`*^9}, { 3.4992971385584*^9, 3.4992971386703997`*^9}, {3.499297803797*^9, 3.499297828085*^9}, {3.499297908225*^9, 3.499297933848*^9}, { 3.4993115941280003`*^9, 3.499311594198*^9}, {3.499311909672*^9, 3.499311910699*^9}, {3.4993127979284*^9, 3.4993128750704*^9}, { 3.4993129165976*^9, 3.4993130044256*^9}, {3.4993135551303997`*^9, 3.4993135602204*^9}, {3.4993141341924*^9, 3.4993141564514*^9}, { 3.5001077038557444`*^9, 3.5001077128557444`*^9}, {3.50018322096*^9, 3.500183223183*^9}, {3.5001869324230003`*^9, 3.500186943708*^9}, { 3.500187052051*^9, 3.500187080109*^9}, {3.500187160226*^9, 3.500187185041*^9}, {3.500187449809*^9, 3.500187468472*^9}, 3.5006711718012*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sumT4", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.500186916903*^9, 3.500186920152*^9}, 3.5006715698442*^9} ], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.500186952974*^9, 3.5001872529519997`*^9, {3.500187462101*^9, 3.5001874711070004`*^9}, 3.5006715709172*^9}] }, Open ]], Cell["The first complete version", "Text", CellChangeTimes->{{3.5006715815341997`*^9, 3.5006715895861998`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sum", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2", ",", "a3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"a3", "=", "\[IndentingNewLine]", RowBox[{"Map", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Function", "[", RowBox[{"y", ",", "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"First", "[", "y", "]"}], "}"}], ",", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "+", "c1"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], ",", RowBox[{"Rest", "[", "y", "]"}]}], "]"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"d1", "+", "d2"}], ",", RowBox[{"c1", "+", "c2"}]}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"getBody", "[", "arrow1", "]"}], ",", "\[IndentingNewLine]", "a3"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, 3.4992938950832*^9, { 3.4992963046254*^9, 3.4992963048504*^9}, {3.4992964479294*^9, 3.4992964531703997`*^9}, {3.4992965428534*^9, 3.4992965599484*^9}, { 3.4992966574594*^9, 3.4992966586024*^9}, {3.4992966986963997`*^9, 3.4992966992754*^9}, {3.4992967606633997`*^9, 3.4992967994203997`*^9}, { 3.4992971385584*^9, 3.4992971386703997`*^9}, {3.499297803797*^9, 3.499297828085*^9}, {3.499297908225*^9, 3.499297933848*^9}, { 3.4993115941280003`*^9, 3.499311594198*^9}, {3.499311909672*^9, 3.499311910699*^9}, {3.4993127979284*^9, 3.4993128750704*^9}, { 3.4993129165976*^9, 3.4993130044256*^9}, {3.4993135551303997`*^9, 3.4993135602204*^9}, {3.4993141341924*^9, 3.4993141564514*^9}, 3.499315438615*^9, 3.4993154841982*^9, {3.4993155805126*^9, 3.4993156803993998`*^9}, {3.4993157181202*^9, 3.499315783999*^9}, { 3.4993158473038*^9, 3.4993158630754004`*^9}, {3.4993158978946*^9, 3.499315905835*^9}, {3.4993174161298*^9, 3.4993174873718*^9}, { 3.499320423388*^9, 3.499320434554*^9}, {3.4993303481598*^9, 3.499330352559*^9}, {3.4993304496534*^9, 3.4993305589625998`*^9}, { 3.4993305937818003`*^9, 3.499330594125*^9}, {3.4993306942302*^9, 3.499330736709*^9}, {3.4993315282530003`*^9, 3.4993315744602003`*^9}, { 3.4993316786844*^9, 3.49933170405*^9}, {3.4993318135776*^9, 3.499331911296*^9}, {3.4993320677952003`*^9, 3.4993320716015997`*^9}, { 3.499332130476*^9, 3.499332204186*^9}, 3.4993322675688*^9, 3.499332431322*^9, 3.4993324763904*^9, 3.4993337723908*^9, { 3.4993339094368*^9, 3.4993339280008*^9}, {3.4993339620868*^9, 3.4993339699491997`*^9}, {3.499334049712*^9, 3.4993340995852003`*^9}, 3.4993342033564*^9, {3.4993342649608*^9, 3.49933428223*^9}, { 3.4993343204812*^9, 3.4993343265964003`*^9}, 3.499334362258*^9, { 3.499334568178*^9, 3.4993345702528*^9}, {3.4993346435104*^9, 3.499334649532*^9}, 3.4993347090615997`*^9, {3.4993347718828*^9, 3.4993347729592*^9}, {3.4993348578543997`*^9, 3.4993349448244*^9}, { 3.4993349778964*^9, 3.4993350018268003`*^9}, {3.4993350799203997`*^9, 3.4993351038508*^9}, {3.4993389038476*^9, 3.49933890469*^9}, { 3.499565743875*^9, 3.49956578209375*^9}, {3.500149036021*^9, 3.500149056751*^9}, {3.5001532657799997`*^9, 3.5001532817679996`*^9}, { 3.500188897166*^9, 3.5001888979440002`*^9}, {3.500189058391*^9, 3.500189059091*^9}, {3.500189438585*^9, 3.500189443174*^9}, { 3.50018987108*^9, 3.500189896125*^9}, {3.5004394342152*^9, 3.5004394377720003`*^9}, {3.5004563384382*^9, 3.500456338875*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.5006716592902*^9, 3.5006716605962*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Map", "[", RowBox[{"Rest", ",", RowBox[{"getBody", "[", "a2", "]"}]}], "]"}]], "Input", CellChangeTimes->{ 3.500154165224*^9, {3.5001889843929996`*^9, 3.500188985141*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.5001541686949997`*^9, 3.500160591665*^9, 3.500188986223*^9, 3.5004394481303997`*^9, 3.5006716918872004`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getBody", "[", "a1", "]"}]], "Input", CellChangeTimes->{{3.500153669262*^9, 3.500153674525*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], "}"}]], "Output", CellChangeTimes->{3.5001536749630003`*^9, 3.5001606261289997`*^9, 3.500188990592*^9, 3.5006716984992*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sum", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.500189074074*^9, 3.500189076703*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.500189083017*^9, 3.500189452848*^9, 3.500189938441*^9, 3.5004394536528*^9, 3.500456350965*^9, 3.5006717015522003`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{ RowBox[{"sum", "[", RowBox[{"a1", ",", "a2"}], "]"}], ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993362642256002`*^9, 3.499336284178*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"3", ",", "0"}], "}"}]], "Output", CellChangeTimes->{3.4993362848332*^9, 3.499565813125*^9, 3.500160681777*^9, 3.500189969151*^9, 3.5006717172511997`*^9}] }, Open ]], Cell["\<\ Alternative definition of the sum operation. Let us redefine as follows.\ \>", "Text", CellChangeTimes->{{3.5004403531788*^9, 3.5004403757988*^9}, { 3.5006717261962*^9, 3.5006717418812*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sum", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2", ",", "a3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"a3", "=", "\[IndentingNewLine]", RowBox[{"Map", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"First", "[", "#", "]"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"ReplacePart", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Rest", "[", "#", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"x_", ",", "1"}], "}"}], ":>", RowBox[{ RowBox[{"Part", "[", RowBox[{ RowBox[{"Rest", "[", "#", "]"}], ",", "x", ",", "1"}], "]"}], "+", "c1"}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "&"}], ",", "\[IndentingNewLine]", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"d1", "+", "d2"}], ",", RowBox[{"c1", "+", "c2"}]}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"getBody", "[", "arrow1", "]"}], ",", "\[IndentingNewLine]", "a3"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, 3.4992938950832*^9, { 3.4992963046254*^9, 3.4992963048504*^9}, {3.4992964479294*^9, 3.4992964531703997`*^9}, {3.4992965428534*^9, 3.4992965599484*^9}, { 3.4992966574594*^9, 3.4992966586024*^9}, {3.4992966986963997`*^9, 3.4992966992754*^9}, {3.4992967606633997`*^9, 3.4992967994203997`*^9}, { 3.4992971385584*^9, 3.4992971386703997`*^9}, {3.499297803797*^9, 3.499297828085*^9}, {3.499297908225*^9, 3.499297933848*^9}, { 3.4993115941280003`*^9, 3.499311594198*^9}, {3.499311909672*^9, 3.499311910699*^9}, {3.4993127979284*^9, 3.4993128750704*^9}, { 3.4993129165976*^9, 3.4993130044256*^9}, {3.4993135551303997`*^9, 3.4993135602204*^9}, {3.4993141341924*^9, 3.4993141564514*^9}, 3.499315438615*^9, 3.4993154841982*^9, {3.4993155805126*^9, 3.4993156803993998`*^9}, {3.4993157181202*^9, 3.499315783999*^9}, { 3.4993158473038*^9, 3.4993158630754004`*^9}, {3.4993158978946*^9, 3.499315905835*^9}, {3.4993174161298*^9, 3.4993174873718*^9}, { 3.499320423388*^9, 3.499320434554*^9}, {3.4993303481598*^9, 3.499330352559*^9}, {3.4993304496534*^9, 3.4993305589625998`*^9}, { 3.4993305937818003`*^9, 3.499330594125*^9}, {3.4993306942302*^9, 3.499330736709*^9}, {3.4993315282530003`*^9, 3.4993315744602003`*^9}, { 3.4993316786844*^9, 3.49933170405*^9}, {3.4993318135776*^9, 3.499331911296*^9}, {3.4993320677952003`*^9, 3.4993320716015997`*^9}, { 3.499332130476*^9, 3.499332204186*^9}, 3.4993322675688*^9, 3.499332431322*^9, 3.4993324763904*^9, 3.4993337723908*^9, { 3.4993339094368*^9, 3.4993339280008*^9}, {3.4993339620868*^9, 3.4993339699491997`*^9}, {3.499334049712*^9, 3.4993340995852003`*^9}, 3.4993342033564*^9, {3.4993342649608*^9, 3.49933428223*^9}, { 3.4993343204812*^9, 3.4993343265964003`*^9}, 3.499334362258*^9, { 3.499334568178*^9, 3.4993345702528*^9}, {3.4993346435104*^9, 3.499334649532*^9}, 3.4993347090615997`*^9, {3.4993347718828*^9, 3.4993347729592*^9}, {3.4993348578543997`*^9, 3.4993349448244*^9}, { 3.4993349778964*^9, 3.4993350018268003`*^9}, {3.4993350799203997`*^9, 3.4993351038508*^9}, {3.4993389038476*^9, 3.49933890469*^9}, { 3.499565743875*^9, 3.49956578209375*^9}, {3.500149036021*^9, 3.500149056751*^9}, {3.5001532657799997`*^9, 3.5001532817679996`*^9}, { 3.500188897166*^9, 3.5001888979440002`*^9}, {3.500189058391*^9, 3.500189059091*^9}, {3.500189438585*^9, 3.500189443174*^9}, { 3.50018987108*^9, 3.500189896125*^9}, {3.5004394342152*^9, 3.5004394377720003`*^9}, 3.5004404276398*^9, {3.5004419835344*^9, 3.5004420043194*^9}, {3.5004420670524*^9, 3.5004420962293997`*^9}, { 3.5004421288624*^9, 3.5004421436004*^9}, {3.5004426810744*^9, 3.5004426899344*^9}, {3.5004428806024*^9, 3.5004428818834*^9}, { 3.5004431623254004`*^9, 3.5004431931042*^9}, {3.5004432321977997`*^9, 3.5004433662798*^9}, {3.500443411749*^9, 3.5004434271618*^9}, 3.5004438577716*^9, 3.5004439123646*^9, {3.500451885442*^9, 3.5004519101540003`*^9}, {3.5004522846591997`*^9, 3.5004522865792*^9}, { 3.5004562917785997`*^9, 3.500456292777*^9}, 3.5006717450242*^9}], Cell["\<\ :> is the \"rule delayed\" operator. The RHS stays unevaluated until this \ rule is applied. We will get the same results as the ones the first version \ returns.\ \>", "Text", CellChangeTimes->{{3.5004528746982*^9, 3.5004529740422*^9}, { 3.5004530076071997`*^9, 3.5004530182782*^9}, {3.5006717609542*^9, 3.5006717958222*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sum", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.5004436673456*^9, 3.5004436774695997`*^9}, 3.5004437627066*^9, 3.5006717543462*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.5004436785156*^9, 3.5004437639386*^9, 3.5004438651816*^9, 3.5004439165836*^9, 3.5004518918691998`*^9, 3.5004522926661997`*^9, 3.5006717550352*^9, 3.5006718002862*^9}] }, Open ]], Cell["The second alternative definition. Let us redefine further.", "Text", CellChangeTimes->{{3.5004530600861998`*^9, 3.5004530683042*^9}, { 3.5006718116312*^9, 3.5006718289491997`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"sum", "[", RowBox[{"arrow1_", ",", "arrow2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1", ",", "d2", ",", "c2", ",", "a3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"a3", "=", "\[IndentingNewLine]", RowBox[{"ReplacePart", "[", RowBox[{ RowBox[{"getBody", "[", "arrow2", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"x_", ",", RowBox[{"Except", "[", RowBox[{"1", ",", "y_"}], "]"}], ",", "1"}], "}"}], ":>", RowBox[{ RowBox[{"Part", "[", RowBox[{ RowBox[{"getBody", "[", "arrow2", "]"}], ",", "x", ",", "y", ",", "1"}], "]"}], "+", "c1"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"d1", "+", "d2"}], ",", RowBox[{"c1", "+", "c2"}]}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"getBody", "[", "arrow1", "]"}], ",", "\[IndentingNewLine]", "a3"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4992923477504*^9, 3.4992923547548*^9}, { 3.4992936823616*^9, 3.4992937901888*^9}, 3.4992938950832*^9, { 3.4992963046254*^9, 3.4992963048504*^9}, {3.4992964479294*^9, 3.4992964531703997`*^9}, {3.4992965428534*^9, 3.4992965599484*^9}, { 3.4992966574594*^9, 3.4992966586024*^9}, {3.4992966986963997`*^9, 3.4992966992754*^9}, {3.4992967606633997`*^9, 3.4992967994203997`*^9}, { 3.4992971385584*^9, 3.4992971386703997`*^9}, {3.499297803797*^9, 3.499297828085*^9}, {3.499297908225*^9, 3.499297933848*^9}, { 3.4993115941280003`*^9, 3.499311594198*^9}, {3.499311909672*^9, 3.499311910699*^9}, {3.4993127979284*^9, 3.4993128750704*^9}, { 3.4993129165976*^9, 3.4993130044256*^9}, {3.4993135551303997`*^9, 3.4993135602204*^9}, {3.4993141341924*^9, 3.4993141564514*^9}, 3.499315438615*^9, 3.4993154841982*^9, {3.4993155805126*^9, 3.4993156803993998`*^9}, {3.4993157181202*^9, 3.499315783999*^9}, { 3.4993158473038*^9, 3.4993158630754004`*^9}, {3.4993158978946*^9, 3.499315905835*^9}, {3.4993174161298*^9, 3.4993174873718*^9}, { 3.499320423388*^9, 3.499320434554*^9}, {3.4993303481598*^9, 3.499330352559*^9}, {3.4993304496534*^9, 3.4993305589625998`*^9}, { 3.4993305937818003`*^9, 3.499330594125*^9}, {3.4993306942302*^9, 3.499330736709*^9}, {3.4993315282530003`*^9, 3.4993315744602003`*^9}, { 3.4993316786844*^9, 3.49933170405*^9}, {3.4993318135776*^9, 3.499331911296*^9}, {3.4993320677952003`*^9, 3.4993320716015997`*^9}, { 3.499332130476*^9, 3.499332204186*^9}, 3.4993322675688*^9, 3.499332431322*^9, 3.4993324763904*^9, 3.4993337723908*^9, { 3.4993339094368*^9, 3.4993339280008*^9}, {3.4993339620868*^9, 3.4993339699491997`*^9}, {3.499334049712*^9, 3.4993340995852003`*^9}, 3.4993342033564*^9, {3.4993342649608*^9, 3.49933428223*^9}, { 3.4993343204812*^9, 3.4993343265964003`*^9}, 3.499334362258*^9, { 3.499334568178*^9, 3.4993345702528*^9}, {3.4993346435104*^9, 3.499334649532*^9}, 3.4993347090615997`*^9, {3.4993347718828*^9, 3.4993347729592*^9}, {3.4993348578543997`*^9, 3.4993349448244*^9}, { 3.4993349778964*^9, 3.4993350018268003`*^9}, {3.4993350799203997`*^9, 3.4993351038508*^9}, {3.4993389038476*^9, 3.49933890469*^9}, { 3.499565743875*^9, 3.49956578209375*^9}, {3.500149036021*^9, 3.500149056751*^9}, {3.5001532657799997`*^9, 3.5001532817679996`*^9}, { 3.500188897166*^9, 3.5001888979440002`*^9}, {3.500189058391*^9, 3.500189059091*^9}, {3.500189438585*^9, 3.500189443174*^9}, { 3.50018987108*^9, 3.500189896125*^9}, {3.5004394342152*^9, 3.5004394377720003`*^9}, 3.5004404276398*^9, {3.5004419835344*^9, 3.5004420043194*^9}, {3.5004420670524*^9, 3.5004420962293997`*^9}, { 3.5004421288624*^9, 3.5004421436004*^9}, {3.5004426810744*^9, 3.5004426899344*^9}, {3.5004428806024*^9, 3.5004428818834*^9}, { 3.5004431623254004`*^9, 3.5004431931042*^9}, {3.5004432321977997`*^9, 3.5004433662798*^9}, {3.500443411749*^9, 3.5004434271618*^9}, 3.5004438577716*^9, 3.5004439123646*^9, {3.500451885442*^9, 3.5004519101540003`*^9}, {3.5004522846591997`*^9, 3.5004522865792*^9}, 3.5004537965226*^9, {3.5004547237595997`*^9, 3.5004547966272*^9}, { 3.5004548334588003`*^9, 3.5004548347692003`*^9}, {3.5004548879807997`*^9, 3.5004548982924*^9}, {3.5004558302460003`*^9, 3.500455880517*^9}, { 3.5004559126029997`*^9, 3.500455913341*^9}, {3.5006718326492*^9, 3.5006718328542*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sum", "[", RowBox[{"a1", ",", "a2"}], "]"}]], "Input", CellChangeTimes->{{3.5004558890950003`*^9, 3.500455893859*^9}, { 3.5006718409042*^9, 3.5006718411182003`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"-", "#1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{"#1", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{"#1", "+", "2"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", RowBox[{ RowBox[{ RowBox[{"-", "#1"}], "+", "1"}], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ SuperscriptBox["#1", "2"], "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", RowBox[{ RowBox[{"2", "-", "#1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.50045589454*^9, 3.50045591784*^9}, 3.5006718416242*^9, 3.5012339681478*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["The identity and codiagonal arrows", "Subsection", CellChangeTimes->{{3.4993363595884*^9, 3.499336395016*^9}, { 3.4993365751024*^9, 3.4993365801099997`*^9}}], Cell["id : R1\[LongRightArrow]R1", "Text", CellChangeTimes->{{3.4993366155064*^9, 3.4993366419016*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"id", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4993365837916*^9, 3.4993366025116*^9}, { 3.4993366550836*^9, 3.4993366836004*^9}, {3.4993368197104*^9, 3.499336821988*^9}, {3.500189999045*^9, 3.500190002072*^9}}], Cell["codiag : R2\[LongRightArrow]R1", "Text", CellChangeTimes->{{3.4993366916656*^9, 3.4993367308216*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"codiag", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4993367238952*^9, 3.4993367809288*^9}, { 3.4993368257788*^9, 3.4993368289300003`*^9}, {3.500190016748*^9, 3.500190025058*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"id", ",", RowBox[{"{", RowBox[{"1", ",", "Pi"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993367866228*^9, 3.4993368046252003`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "\[Pi]"}], "}"}]], "Output", CellChangeTimes->{{3.4993368065128*^9, 3.4993368354664*^9}, 3.49956583496875*^9, 3.500162690441*^9, 3.500190032019*^9, 3.500460715335*^9, 3.5006719717592*^9, 3.5012339915945997`*^9, 3.5013164647561674`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"codiag", ",", RowBox[{"{", RowBox[{"1", ",", "Pi"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993368394756002`*^9, 3.4993368538431997`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "\[Pi]"}], "}"}]], "Output", CellChangeTimes->{3.4993368545608*^9, 3.499565841015625*^9, 3.5001626926549997`*^9, 3.5001900345439997`*^9, 3.5004607179402*^9, 3.5006719739582*^9, 3.5012339936382*^9, 3.5013164683129673`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{"codiag", ",", RowBox[{"{", RowBox[{"2", ",", "Pi"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4993368574624*^9, 3.4993368650752*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "\[Pi]"}], "}"}]], "Output", CellChangeTimes->{3.4993368657460003`*^9, 3.499565843890625*^9, 3.500162696576*^9, 3.500190038462*^9, 3.5004607210290003`*^9, 3.5006719766222*^9, 3.5012339957754*^9, 3.501316472072567*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Tamed-General Compose - constructor ", "Subsection", CellChangeTimes->{{3.4972130590744*^9, 3.4972130601664*^9}, { 3.497474239332116*^9, 3.4974742445425158`*^9}, {3.4995067805467997`*^9, 3.4995068015968*^9}, {3.5004607612925997`*^9, 3.5004607631802*^9}}], Cell["\<\ Def. A tamed arrow is an arrow with domain intervals (-\[Infinity], \ \[Infinity]) with continuous functions on the whole real lines.\ \>", "Text", CellChangeTimes->{{3.4995003520502*^9, 3.4995004370692*^9}, 3.500162725453*^9, {3.500194167914*^9, 3.5001941759560003`*^9}, { 3.500194217052*^9, 3.500194243791*^9}, {3.500194690164*^9, 3.500194799807*^9}, {3.500194860416*^9, 3.5001948815810003`*^9}, { 3.500195487175*^9, 3.500195488968*^9}, {3.5004607848798*^9, 3.5004607863306*^9}}], Cell[TextData[{ "The tgCompose constructor composes two or more arrows ", Cell[BoxData[ FormBox[ SubscriptBox["f", "n"], TraditionalForm]]], ", \[Ellipsis] ,", Cell[BoxData[ FormBox[ SubscriptBox["f", "1"], TraditionalForm]]], ",\nwhere ", Cell[BoxData[ FormBox[ SubscriptBox["f", "n"], TraditionalForm]]], ", \[Ellipsis] ,", Cell[BoxData[ FormBox[ SubscriptBox["f", "2"], TraditionalForm]]], " are all tamed." }], "Text", CellChangeTimes->{{3.4995002075912*^9, 3.4995002521632*^9}, { 3.4995005183101997`*^9, 3.4995005567462*^9}, {3.4995006187441998`*^9, 3.4995006476232*^9}, {3.4995006843802*^9, 3.4995007321001997`*^9}, { 3.4995008552122*^9, 3.4995008723462*^9}, {3.4995068858978*^9, 3.4995068862508*^9}, {3.500194810498*^9, 3.5001948114379997`*^9}, { 3.5001954984440002`*^9, 3.5001954987790003`*^9}}], Cell["\<\ tgCompose: ((B\[RightArrow]C:tamed)\[Cross](A\[RightArrow]B:general))\ \[RightArrow](A\[RightArrow]C)\ \>", "Text", CellChangeTimes->{{3.4975032646730003`*^9, 3.497503298837*^9}, { 3.4975033320806*^9, 3.497503406087*^9}, {3.4994930523308*^9, 3.4994930657868*^9}, {3.4994933274438*^9, 3.4994933304648*^9}, { 3.4995008610762*^9, 3.4995008776782*^9}, {3.4995035607636003`*^9, 3.4995035611068*^9}, {3.4995035944908*^9, 3.4995036083904*^9}, { 3.500194907146*^9, 3.5001949133719997`*^9}}], Cell["\<\ Trial version 1 returns the information about which component is transfered \ to which component via arrow2.\ \>", "Text", CellChangeTimes->{{3.5006721013501997`*^9, 3.5006721051322002`*^9}, { 3.5006721878862*^9, 3.5006721904262*^9}, {3.5006722255442*^9, 3.5006722741362*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"tgComposeT1", "[", RowBox[{"arrow2_", ",", "arrow1_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "d1", ",", "c1", ",", "d2", ",", "c2", ",", "d3", ",", "c3", ",", "cs"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"c1", "\[NotEqual]", "d2"}], ",", RowBox[{"Return", "[", "False", "]"}], ","}], RowBox[{"(*", " ", "continue", " ", "*)"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"d3", "=", "d1"}], ";", "\[IndentingNewLine]", RowBox[{"c3", "=", "c2"}], ";", "\[IndentingNewLine]", RowBox[{"cs", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Part", "[", RowBox[{"#", ",", "2", ",", "1"}], "]"}], "&"}], ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4972128708915997`*^9, 3.4972128978640003`*^9}, { 3.497221961296875*^9, 3.4972220216875*^9}, {3.497222096046875*^9, 3.497222101890625*^9}, {3.497222232359375*^9, 3.4972222594375*^9}, { 3.4994933350797997`*^9, 3.4994933356598*^9}, {3.4995011564802*^9, 3.4995011661962*^9}, 3.499502307598*^9, {3.4995023382363997`*^9, 3.4995024633328*^9}, {3.499503567222*^9, 3.49950356769*^9}, { 3.4995039244152*^9, 3.4995039612156*^9}, 3.4995043129175997`*^9, { 3.4995046587995996`*^9, 3.4995046592676*^9}, {3.499565955015625*^9, 3.499565958046875*^9}, {3.5001627519849997`*^9, 3.50016277787*^9}, { 3.5001660366029997`*^9, 3.500166044182*^9}, {3.5001949194040003`*^9, 3.5001949195369997`*^9}, 3.5006722925352*^9}], Cell["Test", "Text", CellChangeTimes->{{3.4975044917377996`*^9, 3.497504492627*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a11", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "a11f1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "a11f3"}], "}"}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a10", " ", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "Sin"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"0", "&"}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"1", "&"}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4995039866436*^9, 3.4995042478344*^9}, 3.4995043265208*^9, {3.500163790252*^9, 3.500163812942*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"tgComposeT1", "[", RowBox[{"a11", ",", "a10"}], "]"}]], "Input", CellChangeTimes->{{3.497222045546875*^9, 3.497222062046875*^9}, { 3.499503975006*^9, 3.4995039782508*^9}, {3.4995042550416*^9, 3.4995042610632*^9}, 3.499504293792*^9, {3.500194939534*^9, 3.500194939698*^9}, 3.5006723036921997`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}]], "Output", CellChangeTimes->{{3.4995043172544003`*^9, 3.4995043298592*^9}, 3.499565977109375*^9, 3.500162971333*^9, 3.500163998179*^9, 3.5001659451689997`*^9, 3.500166049099*^9, 3.50019068006*^9, 3.500194940863*^9, 3.5004612646428003`*^9, 3.5006723048782*^9}] }, Open ]], Cell["\<\ Trial version 2 is for getting a rough idea for dealing with components.\ \>", "Text", CellChangeTimes->{{3.5006723965442*^9, 3.5006724364472*^9}, { 3.5006736068332*^9, 3.5006736083241997`*^9}, {3.5006736544142*^9, 3.5006736625252*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"tgComposeT2", "[", RowBox[{"arrow2_", ",", "arrow1_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "d1", ",", "c1", ",", "d2", ",", "c2", ",", "d3", ",", "c3", ",", "cs", ",", "wf"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"c1", "\[NotEqual]", "d2"}], ",", RowBox[{"Return", "[", "False", "]"}], ","}], RowBox[{"(*", " ", "continue", " ", "*)"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"d3", "=", "d1"}], ";", "\[IndentingNewLine]", RowBox[{"c3", "=", "c2"}], ";", "\[IndentingNewLine]", RowBox[{"cs", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Part", "[", RowBox[{"#", ",", "2", ",", "1"}], "]"}], "&"}], ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"wf", "[", "a_", "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"First", "[", "a", "]"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Part", "[", RowBox[{"cs", ",", RowBox[{"First", "[", "#", "]"}]}], "]"}], ",", RowBox[{"Part", "[", RowBox[{"#", ",", "2"}], "]"}]}], "}"}], "&"}], ",", "\[IndentingNewLine]", RowBox[{"Rest", "[", "a", "]"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"d3", ",", "c3"}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Map", "[", RowBox[{"wf", ",", RowBox[{"getBody", "[", "arrow1", "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4972128708915997`*^9, 3.4972128978640003`*^9}, { 3.497221961296875*^9, 3.4972220216875*^9}, {3.497222096046875*^9, 3.497222101890625*^9}, {3.497222232359375*^9, 3.4972222594375*^9}, { 3.4994933350797997`*^9, 3.4994933356598*^9}, {3.4995011564802*^9, 3.4995011661962*^9}, 3.499502307598*^9, {3.4995023382363997`*^9, 3.4995024633328*^9}, {3.499503567222*^9, 3.49950356769*^9}, { 3.4995039244152*^9, 3.4995039612156*^9}, 3.4995043129175997`*^9, { 3.4995046587995996`*^9, 3.4995046974466*^9}, {3.4995048563546*^9, 3.4995048576256*^9}, {3.4995049285906*^9, 3.4995049296716003`*^9}, { 3.4995049795176*^9, 3.4995049992186003`*^9}, {3.4995050410856*^9, 3.4995050483486*^9}, {3.4995051102796*^9, 3.4995052027125998`*^9}, { 3.4995052469946003`*^9, 3.4995053209746*^9}, {3.4995055533775997`*^9, 3.4995056048346*^9}, {3.4995058778402*^9, 3.4995059181661997`*^9}, { 3.4995060834568*^9, 3.4995060842524*^9}, {3.4995061366864*^9, 3.4995062135476*^9}, 3.4995063422008*^9, 3.49956604803125*^9, { 3.500163087785*^9, 3.5001631292939997`*^9}, {3.500166057457*^9, 3.500166067553*^9}, 3.500167338492*^9, {3.500167725263*^9, 3.5001677303050003`*^9}, {3.500167922334*^9, 3.500167932325*^9}, { 3.500167968777*^9, 3.500167972414*^9}, 3.500168115493*^9, { 3.500168254325*^9, 3.500168265494*^9}, {3.50016856152*^9, 3.500168583458*^9}, {3.500168665953*^9, 3.500168670427*^9}, 3.500168700889*^9, {3.500168814657*^9, 3.500168873775*^9}, { 3.500191355554*^9, 3.5001913582609997`*^9}, 3.500191425565*^9, { 3.500191482383*^9, 3.500191485777*^9}, {3.500194944811*^9, 3.500194944955*^9}, 3.5006723165172*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"tgComposeT2", "[", RowBox[{"a11", ",", "a10"}], "]"}]], "Input", CellChangeTimes->{{3.5001912707320004`*^9, 3.5001912778570004`*^9}, { 3.500194950986*^9, 3.500194951192*^9}, 3.5006734859342003`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "Sin"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"0", "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"1", "&"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.500191278749*^9, 3.5001914963970003`*^9, 3.500194952742*^9, 3.5004985150506*^9, 3.5006734924572*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{ RowBox[{"tgComposeT2", "[", RowBox[{"a11", ",", "a10"}], "]"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"-", "Pi"}], "/", "2"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.500163384311*^9, 3.500163420301*^9}, { 3.5001635676359997`*^9, 3.5001635677799997`*^9}, {3.500163599367*^9, 3.500163599531*^9}, 3.5001915409449997`*^9, {3.500194956392*^9, 3.500194956547*^9}, 3.5006734985972*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"3", ",", "1"}], "}"}]], "Output", CellChangeTimes->{3.500163423882*^9, 3.500163569461*^9, 3.5001636006029997`*^9, 3.5001915427869997`*^9, 3.500194957494*^9, 3.5004998014175997`*^9, 3.5006735005732*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{ RowBox[{"tgComposeT2", "[", RowBox[{"a11", ",", "a10"}], "]"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "Pi"}], "/", "3"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5001916185629997`*^9, 3.500191648855*^9}, { 3.5001949670950003`*^9, 3.500194967262*^9}, 3.5006735076642*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", FractionBox[ SqrtBox["3"], "2"]}]}], "}"}]], "Output", CellChangeTimes->{3.5001916500690002`*^9, 3.500194969883*^9, 3.5004998066816*^9, 3.5006735101742*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{ RowBox[{"tgComposeT2", "[", RowBox[{"a11", ",", "a10"}], "]"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Pi", "/", "3"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5001916185629997`*^9, 3.5001916691730003`*^9}, { 3.5001949739370003`*^9, 3.500194974071*^9}, 3.5006735133522*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"3", ",", "0"}], "}"}]], "Output", CellChangeTimes->{3.500191669984*^9, 3.500194975568*^9, 3.5005000808576*^9, 3.5006735145671997`*^9}] }, Open ]], Cell["Here is the complete version.", "Text", CellChangeTimes->{{3.5006736718501997`*^9, 3.5006736903202*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"tgCompose", "[", RowBox[{"arrow2_", ",", "arrow1_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "d1", ",", "c1", ",", "d2", ",", "c2", ",", "d3", ",", "c3", ",", "cs", ",", "cf", ",", "wf"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"c1", "\[NotEqual]", "d2"}], ",", RowBox[{"Return", "[", "False", "]"}], ","}], RowBox[{"(*", " ", "continue", " ", "*)"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"d3", "=", "d1"}], ";", "\[IndentingNewLine]", RowBox[{"c3", "=", "c2"}], ";", "\[IndentingNewLine]", RowBox[{"cs", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Part", "[", RowBox[{"#", ",", "2", ",", "1"}], "]"}], "&"}], ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"cf", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"Part", "[", RowBox[{"#", ",", "2", ",", "2"}], "]"}], "&"}], ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"wf", "[", "a_", "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"First", "[", "a", "]"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Map", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Part", "[", RowBox[{"cs", ",", RowBox[{"First", "[", "#", "]"}]}], "]"}], ",", RowBox[{"Composition", "[", RowBox[{ RowBox[{"Part", "[", RowBox[{"cf", ",", RowBox[{"First", "[", "#", "]"}]}], "]"}], ",", RowBox[{"Part", "[", RowBox[{"#", ",", "2"}], "]"}]}], "]"}]}], "}"}], "&"}], ",", "\[IndentingNewLine]", RowBox[{"Rest", "[", "a", "]"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"d3", ",", "c3"}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"Map", "[", RowBox[{"wf", ",", RowBox[{"getBody", "[", "arrow1", "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4972128708915997`*^9, 3.4972128978640003`*^9}, { 3.497221961296875*^9, 3.4972220216875*^9}, {3.497222096046875*^9, 3.497222101890625*^9}, {3.497222232359375*^9, 3.4972222594375*^9}, { 3.4994933350797997`*^9, 3.4994933356598*^9}, {3.4995011564802*^9, 3.4995011661962*^9}, 3.499502307598*^9, {3.4995023382363997`*^9, 3.4995024633328*^9}, {3.499503567222*^9, 3.49950356769*^9}, { 3.4995039244152*^9, 3.4995039612156*^9}, 3.4995043129175997`*^9, { 3.4995046587995996`*^9, 3.4995046974466*^9}, {3.4995048563546*^9, 3.4995048576256*^9}, {3.4995049285906*^9, 3.4995049296716003`*^9}, { 3.4995049795176*^9, 3.4995049992186003`*^9}, {3.4995050410856*^9, 3.4995050483486*^9}, {3.4995051102796*^9, 3.4995052027125998`*^9}, { 3.4995052469946003`*^9, 3.4995053209746*^9}, {3.4995055533775997`*^9, 3.4995056048346*^9}, {3.4995058778402*^9, 3.4995059181661997`*^9}, { 3.4995060834568*^9, 3.4995060842524*^9}, {3.4995061366864*^9, 3.4995062135476*^9}, 3.4995063422008*^9, 3.49956604803125*^9, { 3.500163087785*^9, 3.5001631292939997`*^9}, {3.500166057457*^9, 3.500166067553*^9}, 3.500167338492*^9, {3.500167725263*^9, 3.5001677303050003`*^9}, {3.500167922334*^9, 3.500167932325*^9}, { 3.500167968777*^9, 3.500167972414*^9}, 3.500168115493*^9, { 3.500168254325*^9, 3.500168265494*^9}, {3.50016856152*^9, 3.500168583458*^9}, {3.500168665953*^9, 3.500168670427*^9}, 3.500168700889*^9, {3.500168814657*^9, 3.500168873775*^9}, { 3.500191355554*^9, 3.5001913582609997`*^9}, 3.500191425565*^9, { 3.500191482383*^9, 3.500191485777*^9}, 3.500191786425*^9, { 3.5001922523789997`*^9, 3.500192283591*^9}, {3.500192389082*^9, 3.5001924635959997`*^9}, {3.500192571197*^9, 3.5001925948389997`*^9}, { 3.500194998986*^9, 3.500194999191*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.5006737079372*^9, 3.5006737086122*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"tgCompose", "[", RowBox[{"a11", ",", "a10"}], "]"}]], "Input", CellChangeTimes->{{3.5001912707320004`*^9, 3.5001912778570004`*^9}, 3.500192759665*^9, {3.500195004883*^9, 3.5001950054110003`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Composition", "[", RowBox[{"a11f1", ",", "Sin"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"Composition", "[", RowBox[{"a11f3", ",", RowBox[{"0", "&"}]}], "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"Composition", "[", RowBox[{"a11f3", ",", RowBox[{"1", "&"}]}], "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Composition", "[", RowBox[{"a11f1", ",", RowBox[{ RowBox[{"-", "1"}], "&"}]}], "]"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.50019276034*^9, 3.5001950089440002`*^9, 3.5005002819796*^9, 3.5006737195162*^9, {3.5012345888886003`*^9, 3.5012346116334*^9}, 3.5013165026725674`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"a12", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "ArcSin"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "Cos"}], "}"}]}], "}"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.4995039866436*^9, 3.4995042478344*^9}, 3.4995043265208*^9, {3.500163790252*^9, 3.500163812942*^9}, { 3.500193528104*^9, 3.500193551934*^9}, {3.5001935834630003`*^9, 3.500193585333*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"tgCompose", "[", RowBox[{"a12", ",", "a10"}], "]"}]], "Input", CellChangeTimes->{{3.5001935930360003`*^9, 3.500193598508*^9}, { 3.500195025699*^9, 3.500195025863*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Composition", "[", RowBox[{"ArcSin", ",", "Sin"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"Composition", "[", RowBox[{"Cos", ",", RowBox[{"0", "&"}]}], "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"Composition", "[", RowBox[{"Cos", ",", RowBox[{"1", "&"}]}], "]"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Composition", "[", RowBox[{"ArcSin", ",", RowBox[{ RowBox[{"-", "1"}], "&"}]}], "]"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.500193598998*^9, 3.500195026877*^9, 3.5005002982816*^9, 3.5006737275942*^9, 3.5012346197298*^9, 3.501318371207367*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{ RowBox[{"tgCompose", "[", RowBox[{"a12", ",", "a10"}], "]"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5001935930360003`*^9, 3.500193598508*^9}, { 3.500193764168*^9, 3.500193788868*^9}, {3.500195030973*^9, 3.500195031137*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]], "Output", CellChangeTimes->{3.500193789449*^9, 3.500195032079*^9, 3.5005003026935997`*^9, 3.5006737311512003`*^9, 3.5012346256734*^9, 3.501318375138567*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"apply", "[", RowBox[{ RowBox[{"tgCompose", "[", RowBox[{"a12", ",", "a10"}], "]"}], ",", RowBox[{"{", RowBox[{"2", ",", "0"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.5001935930360003`*^9, 3.500193598508*^9}, { 3.500193764168*^9, 3.500193788868*^9}, {3.500193896491*^9, 3.500193896658*^9}, {3.500195035526*^9, 3.500195035719*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"3", ",", RowBox[{"Cos", "[", "1", "]"}]}], "}"}]], "Output", CellChangeTimes->{3.500193898413*^9, 3.5001950367130003`*^9, 3.5005003051636*^9, 3.5006737342382*^9, 3.5012346281382*^9, 3.5013183779621673`*^9}] }, Open ]], Cell["A recursive definition for arguments of more than three.", "Text", CellChangeTimes->{{3.5006737446062*^9, 3.5006737856962*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"tgCompose", "[", RowBox[{"arrow2_", ",", "arrow1_", ",", "arrows___"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"tgCompose", "[", RowBox[{"arrow2", ",", RowBox[{"tgCompose", "[", RowBox[{"arrow1", ",", "arrows"}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4995064113712*^9, 3.4995064314952*^9}, { 3.4995065264818*^9, 3.4995065695548*^9}, {3.500195041474*^9, 3.5001950515179996`*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Under construction", "Section", CellChangeTimes->{{3.500201602416*^9, 3.5002016095950003`*^9}}], Cell[CellGroupData[{ Cell["General - Simple Compose -- Constructor", "Subsection", CellChangeTimes->{{3.4995068306528*^9, 3.4995068531678*^9}}], Cell["\<\ Def. A simple arrow is an arrow with the partially identity functions on \ intervals. Example: a99 is a simple arrow. a100 = {{3,2}, {{{\"L\",-10},{\"R\",0},{\"L\",10}},{1,f1},{2,f2},{1,f3},{2,f4}}, {{{\"L\",-10},{\"R\",3}},{1,g1},{2,g2},{1,g3}}, {{{\"L\",5}},{1,h1},{2,h2}}}; a99 = {{2,3}, {{{\"L\",-100},{\"L\",100}},{1,#&},{2,#&},{3,#&}}, {{{\"R\",20}},{2,#&},{1,#&}}}; gsCompose[a100,a99] must return the following value. {{2,2}, {{{L,-100},{L,-10},{R,0},{L,10}},\ \>", "Text", CellChangeTimes->{{3.500195560916*^9, 3.5001956127860003`*^9}, { 3.5001959765690002`*^9, 3.500195980939*^9}, {3.5006782069874*^9, 3.5006784550586*^9}, {3.5006883053185997`*^9, 3.5006883887682*^9}, { 3.5006884516906*^9, 3.5006884909576*^9}, {3.5006885314336*^9, 3.5006885733066*^9}, {3.5006899995202*^9, 3.5006901694572*^9}, { 3.5006905346772003`*^9, 3.5006905779132*^9}, {3.5006908746552*^9, 3.5006908901661997`*^9}, {3.5006987882302*^9, 3.500698835311*^9}, { 3.5008868597990694`*^9, 3.5008868682520695`*^9}}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.5006901104782*^9, 3.5006901182762003`*^9}}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.5006783016794*^9, 3.500678303177*^9}}], Cell["The leftQ function ", "Text", CellChangeTimes->{{3.5005261862952003`*^9, 3.5005262083442*^9}, { 3.5005423387752*^9, 3.5005423399922*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"leftQ", "[", RowBox[{"pt1_", ",", "pt2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], "<", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}], " ", "||", "\[IndentingNewLine]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}], " ", "&&", "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "\"\\""}], " ", "&&", " ", RowBox[{ RowBox[{"pt2", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "\"\\""}]}], ")"}]}], ")"}]}]}]], "Input", CellChangeTimes->{{3.5005259863642*^9, 3.5005260181492*^9}, { 3.5005260580462*^9, 3.5005260987642*^9}, 3.5005261312302*^9, { 3.5005261633412*^9, 3.5005261823472*^9}, {3.5005269953038*^9, 3.500526998065*^9}, 3.5005413875052*^9}], Cell[BoxData[ RowBox[{ RowBox[{"rightQ", "[", RowBox[{"pt1_", ",", "pt2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], ">", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}], " ", "||", "\[IndentingNewLine]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "2", "]"}], "]"}], "\[Equal]", RowBox[{"pt2", "[", RowBox[{"[", "2", "]"}], "]"}]}], " ", "&&", "\[IndentingNewLine]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"pt1", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "\"\\""}], " ", "&&", " ", RowBox[{ RowBox[{"pt2", "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "\"\\""}]}], ")"}]}], ")"}]}]}]], "Input", CellChangeTimes->{{3.5012407463970003`*^9, 3.5012408029002*^9}}], Cell[TextData[{ "The gsCompose constructor composes two or more arrows ", Cell[BoxData[ FormBox[ SubscriptBox["f", "n"], TraditionalForm]]], ", \[Ellipsis] ,", Cell[BoxData[ FormBox[ SubscriptBox["f", "1"], TraditionalForm]]], ",\nwhere ", Cell[BoxData[ FormBox[ SubscriptBox["f", RowBox[{"n", "-", "1"}]], TraditionalForm]]], ", \[Ellipsis] ,", Cell[BoxData[ FormBox[ SubscriptBox["f", "1"], TraditionalForm]]], " are all simple." }], "Text", CellChangeTimes->{{3.4995002075912*^9, 3.4995002521632*^9}, { 3.4995005183101997`*^9, 3.4995005567462*^9}, {3.4995006187441998`*^9, 3.4995006476232*^9}, {3.4995006843802*^9, 3.4995007321001997`*^9}, { 3.4995008552122*^9, 3.4995008723462*^9}, {3.4995068858978*^9, 3.4995068862508*^9}, {3.4995102550355997`*^9, 3.4995102556966*^9}, { 3.4995103046686*^9, 3.4995103119876003`*^9}}], Cell["\<\ gsCompose: ((B\[RightArrow]C:general)\[Cross](A\[RightArrow]B:simple))\ \[RightArrow](A\[RightArrow]C)\ \>", "Text", CellChangeTimes->{{3.4975032646730003`*^9, 3.497503298837*^9}, { 3.4975033320806*^9, 3.497503406087*^9}, {3.4994930523308*^9, 3.4994930657868*^9}, {3.4994933274438*^9, 3.4994933304648*^9}, { 3.4995008610762*^9, 3.4995008776782*^9}, {3.4995035607636003`*^9, 3.4995035611068*^9}, {3.4995035944908*^9, 3.4995036083904*^9}, { 3.4995069722918*^9, 3.4995069831338*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"getDivsT1", "[", RowBox[{"arrow2_", ",", "fRestricted_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"targetList", "=", RowBox[{"Map", "[", RowBox[{"First", ",", RowBox[{"Rest", "[", "fRestricted", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"divList1", "=", RowBox[{"First", "[", "fRestricted", "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"targetList", ",", "divList1"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.5012385974924*^9, 3.5012386563356*^9}, { 3.5012387213564*^9, 3.5012388042236*^9}, {3.5012389176356*^9, 3.5012391262388*^9}, {3.5012397279978*^9, 3.5012397332862*^9}, { 3.5013208841475673`*^9, 3.501320907999967*^9}}], Cell["Tests", "Text", CellChangeTimes->{{3.5007164115006*^9, 3.5007164155254*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a100", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "2"}], "}"}], ",", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "10"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "10"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "f1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "f2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "f3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "f4"}], "}"}]}], "}"}], ",", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "10"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "3"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "g1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "g2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "g3"}], "}"}]}], "}"}], ",", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\"\\"", ",", "5"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "h1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "h2"}], "}"}]}], "}"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"a99", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"-", "100"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "100"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"#", "&"}]}], "}"}]}], "}"}], ",", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\"\\"", ",", "20"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"#", "&"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"#", "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getDivsT1", "[", RowBox[{"a100", ",", RowBox[{"restrictOn", "[", RowBox[{"a99", ",", "1"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.5007163619862003`*^9, 3.5007163659642*^9}, { 3.5007164479578*^9, 3.5007164513898*^9}, {3.5007168503129997`*^9, 3.5007168635573997`*^9}, {3.5007169104042*^9, 3.5007169136022*^9}, { 3.5012391665648003`*^9, 3.5012391669704*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "100"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "100"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.5007164520762*^9, 3.5007165710886*^9, 3.5007166633626003`*^9, 3.5007168649302*^9, 3.5007169143198*^9, {3.5012391432272*^9, 3.5012391690608*^9}, 3.5013207141387672`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"getDivsT2", "[", RowBox[{"arrow2_", ",", "fRestricted_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"targetList", "=", RowBox[{"Map", "[", RowBox[{"First", ",", RowBox[{"Rest", "[", "fRestricted", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"divLists2", "=", RowBox[{"Map", "[", RowBox[{"First", ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"divList1", "=", RowBox[{"First", "[", "fRestricted", "]"}]}], ","}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", "divLists2"}], "]"}]}]], "Input", CellChangeTimes->{{3.5012385974924*^9, 3.5012386563356*^9}, { 3.5012387213564*^9, 3.5012388042236*^9}, {3.5012389176356*^9, 3.5012391262388*^9}, {3.5012392393543997`*^9, 3.5012392508204*^9}, { 3.5012393522516003`*^9, 3.501239374388*^9}, {3.5012395101126003`*^9, 3.5012395239653997`*^9}, {3.5012395646345997`*^9, 3.5012397122262*^9}, { 3.5012397475758*^9, 3.5012397582306004`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getDivsT2", "[", RowBox[{"a100", ",", RowBox[{"restrictOn", "[", RowBox[{"a99", ",", "1"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.5007168106734*^9, 3.500716818567*^9}, { 3.5007169272054*^9, 3.5007169378445997`*^9}, {3.5007169984974003`*^9, 3.5007170048466*^9}, {3.5007170775425997`*^9, 3.500717078229*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "10"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "10"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "10"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "3"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"{", RowBox[{"\<\"L\"\>", ",", "5"}], "}"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.5007168193002*^9, 3.5007169386246*^9, 3.5007170788998003`*^9, 3.5012397821142*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"getDivsT3", "[", RowBox[{"arrow2_", ",", "fRestricted_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"targetList", "=", RowBox[{"Map", "[", RowBox[{"First", ",", RowBox[{"Rest", "[", "fRestricted", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"divLists2", "=", RowBox[{"Map", "[", RowBox[{"First", ",", RowBox[{"getBody", "[", "arrow2", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"divList1", "=", RowBox[{"First", "[", "fRestricted", "]"}]}], ","}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Map", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Function", "[", RowBox[{"y", ",", "\[IndentingNewLine]", RowBox[{"Select", "[", RowBox[{ RowBox[{"Part", "[", RowBox[{"divLists2", ",", RowBox[{"Part", "[", RowBox[{"targetList", ",", "y"}], "]"}]}], "]"}], ",", RowBox[{"Function", "[", RowBox[{"x", ",", RowBox[{"leftQ", "[", RowBox[{"x", ",", RowBox[{"Part", "[", RowBox[{"divList1", ",", "y"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Range", "[", RowBox[{"Length", "[", "divList1", "]"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.5012385974924*^9, 3.5012386563356*^9}, { 3.5012387213564*^9, 3.5012388042236*^9}, {3.5012389176356*^9, 3.5012391262388*^9}, {3.5012392393543997`*^9, 3.5012392508204*^9}, { 3.5012393522516003`*^9, 3.501239374388*^9}, {3.5012395101126003`*^9, 3.5012395239653997`*^9}, {3.5012395646345997`*^9, 3.5012397122262*^9}, { 3.5012397475758*^9, 3.5012397582306004`*^9}, {3.5012398039854*^9, 3.5012398537494*^9}, {3.5012398863066*^9, 3.5012400735690002`*^9}, { 3.5012401046286*^9, 3.5012402174477997`*^9}, {3.5012403602658*^9, 3.5012403975810003`*^9}, {3.5012404300758*^9, 3.5012404523993998`*^9}, { 3.5012405125842*^9, 3.5012405307114*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"getDivsT3", "[", RowBox[{"a100", ",", RowBox[{"restrictOn", "[", RowBox[{"a99", ",", "1"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.5007168106734*^9, 3.500716818567*^9}, { 3.5007169272054*^9, 3.5007169378445997`*^9}, {3.5007169984974003`*^9, 3.5007170048466*^9}, {3.5007170775425997`*^9, 3.500717078229*^9}, { 3.5012402330945997`*^9, 3.5012402332349997`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\<\"L\"\>", ",", RowBox[{"-", "10"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\<\"R\"\>", ",", "3"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.5012402380242*^9, 3.5012404768602*^9, 3.501240536421*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"gsRestricted", "[", RowBox[{"arrow2_", ",", "fRestricted_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"gsWork", "[", RowBox[{"arrow2", ",", "fRestricted", ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"gsRWork", "[", RowBox[{"arrow2_", ",", "fRestricted_", ",", "divs_", ",", "fs_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"First", "[", "fRestricted", "]"}], ","}]}]}]}], "Input", CellChangeTimes->{{3.50088812301787*^9, 3.5008882137318697`*^9}, { 3.5008882503606696`*^9, 3.5008882589718695`*^9}, {3.5008883018250694`*^9, 3.50088851176987*^9}, {3.5008885519710693`*^9, 3.5008885688814697`*^9}, { 3.5008886116410694`*^9, 3.5008886333406696`*^9}, {3.5008890621550694`*^9, 3.5008890644014697`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"gsCompose", "[", RowBox[{"arrow2_", ",", "arrow1_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "d1", ",", "c1", ",", "d2", ",", "c2", ",", "d3", ",", "c3", ",", "f1", ",", "wf", ",", "f3", ",", "a3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"d1", ",", "c1"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"d2", ",", "c2"}], "}"}], "=", RowBox[{"getSignature", "[", "arrow2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"c1", "\[NotEqual]", "d2"}], ",", RowBox[{"Return", "[", "False", "]"}], ","}], RowBox[{"(*", " ", "continue", " ", "*)"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"d3", "=", "d1"}], ";", "\[IndentingNewLine]", RowBox[{"c3", "=", "c2"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"f1", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"subdivideW", "[", RowBox[{"arrow2", ",", "#"}], "]"}], "&"}], ",", RowBox[{"getBody", "[", "arrow1", "]"}]}], "]"}]}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.4972128708915997`*^9, 3.4972128978640003`*^9}, { 3.497221961296875*^9, 3.4972220216875*^9}, {3.497222096046875*^9, 3.497222101890625*^9}, {3.497222232359375*^9, 3.4972222594375*^9}, { 3.4994933350797997`*^9, 3.4994933356598*^9}, {3.4995011564802*^9, 3.4995011661962*^9}, 3.499502307598*^9, {3.4995023382363997`*^9, 3.4995024633328*^9}, {3.499503567222*^9, 3.49950356769*^9}, { 3.4995039244152*^9, 3.4995039612156*^9}, 3.4995043129175997`*^9, { 3.4995046587995996`*^9, 3.4995046592676*^9}, {3.4995076727757998`*^9, 3.4995076729958*^9}, {3.4995104818336*^9, 3.4995104924186*^9}, { 3.500193972882*^9, 3.500193985551*^9}, {3.5001940293929996`*^9, 3.500194031016*^9}, 3.500699476111*^9, 3.5007003949364*^9, { 3.5007107480369997`*^9, 3.500710780251*^9}}], Cell["Test", "Text", CellChangeTimes->{{3.4975044917377996`*^9, 3.497504492627*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a11", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "a11f1"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "a11f3"}], "}"}]}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a10", " ", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"\"\\"", ",", "0"}], "}"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "Sin"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"0", "&"}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"1", "&"}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{ RowBox[{"-", "1"}], "&"}]}], "}"}]}], "}"}]}], "}"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4995039866436*^9, 3.4995042478344*^9}, 3.4995043265208*^9, {3.500163790252*^9, 3.500163812942*^9}}] }, Open ]] }, Open ]] }, Open ]] }, ScreenStyleEnvironment->"Presentation", WindowSize->{838, 650}, WindowMargins->{{29, Automatic}, {11, Automatic}}, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (2009\:5e744\:670823\ \:65e5)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 181, 3, 246, "Title"], Cell[751, 27, 192, 3, 88, "Subtitle"], Cell[CellGroupData[{ Cell[968, 34, 96, 1, 119, "Section"], Cell[1067, 37, 773, 12, 143, "Text"], Cell[1843, 51, 224, 5, 50, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[2104, 61, 153, 2, 119, "Section"], Cell[CellGroupData[{ Cell[2282, 67, 97, 1, 63, "Subsection"], Cell[2382, 70, 584, 11, 143, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3003, 86, 88, 1, 63, "Subsection"], Cell[3094, 89, 662, 13, 143, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3793, 107, 110, 1, 63, "Subsection"], Cell[3906, 110, 366, 7, 79, "Text"], Cell[4275, 119, 1092, 24, 119, "Input"], Cell[5370, 145, 87, 1, 47, "Text"], Cell[5460, 148, 799, 25, 85, "Input"], Cell[CellGroupData[{ Cell[6284, 177, 265, 5, 50, "Input"], Cell[6552, 184, 794, 22, 50, "Output"] }, Open ]], Cell[7361, 209, 155, 2, 47, "Text"], Cell[7519, 213, 850, 26, 85, "Input"], Cell[8372, 241, 574, 10, 74, "Text"], Cell[8949, 253, 1898, 44, 221, "Input"], Cell[CellGroupData[{ Cell[10872, 301, 275, 5, 50, "Input"], Cell[11150, 308, 764, 20, 50, "Output"] }, Open ]], Cell[11929, 331, 395, 7, 74, "Text"], Cell[12327, 340, 131, 1, 47, "Text"], Cell[12461, 343, 354, 9, 85, "Input"], Cell[12818, 354, 86, 1, 47, "Text"], Cell[CellGroupData[{ Cell[12929, 359, 228, 4, 50, "Input"], Cell[13160, 365, 605, 19, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13802, 389, 298, 6, 85, "Input"], Cell[14103, 397, 669, 21, 85, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[14821, 424, 242, 3, 63, "Subsection"], Cell[15066, 429, 108, 1, 47, "Text"], Cell[15177, 432, 1789, 47, 221, "Input"], Cell[16969, 481, 251, 3, 47, "Text"], Cell[17223, 486, 1828, 47, 153, "Input"], Cell[19054, 535, 253, 3, 47, "Text"], Cell[19310, 540, 2853, 79, 255, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[22200, 624, 103, 1, 63, "Subsection"], Cell[22306, 627, 356, 7, 79, "Text"], Cell[22665, 636, 196, 4, 50, "Input"], Cell[CellGroupData[{ Cell[22886, 644, 214, 5, 50, "Input"], Cell[23103, 651, 363, 10, 50, "Output"] }, Open ]], Cell[23481, 664, 179, 4, 79, "Text"], Cell[23663, 670, 466, 14, 85, "Input"], Cell[24132, 686, 247, 6, 50, "Input"], Cell[CellGroupData[{ Cell[24404, 696, 121, 2, 50, "Input"], Cell[24528, 700, 931, 30, 85, "Output"] }, Open ]], Cell[25474, 733, 316, 8, 50, "Input"], Cell[CellGroupData[{ Cell[25815, 745, 148, 3, 50, "Input"], Cell[25966, 750, 986, 31, 93, "Output"] }, Open ]], Cell[26967, 784, 276, 6, 79, "Text"], Cell[27246, 792, 377, 9, 85, "Input"], Cell[CellGroupData[{ Cell[27648, 805, 256, 6, 50, "Input"], Cell[27907, 813, 494, 12, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[28438, 830, 441, 12, 85, "Input"], Cell[28882, 844, 4466, 118, 137, "Output"] }, Open ]], Cell[33363, 965, 209, 4, 47, "Text"], Cell[33575, 971, 342, 8, 85, "Input"], Cell[33920, 981, 83, 1, 47, "Text"], Cell[CellGroupData[{ Cell[34028, 986, 244, 5, 50, "Input"], Cell[34275, 993, 695, 23, 55, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[35007, 1021, 414, 12, 85, "Input"], Cell[35424, 1035, 6025, 163, 141, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[41498, 1204, 112, 1, 63, "Subsection"], Cell[CellGroupData[{ Cell[41635, 1209, 107, 1, 44, "Subsubsection"], Cell[41745, 1212, 307, 6, 79, "Text"], Cell[42055, 1220, 2017, 49, 323, "Input"], Cell[44075, 1271, 87, 1, 47, "Text"], Cell[CellGroupData[{ Cell[44187, 1276, 150, 3, 50, "Input"], Cell[44340, 1281, 430, 12, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[44807, 1298, 790, 19, 85, "Input"], Cell[45600, 1319, 656, 13, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[46293, 1337, 145, 3, 50, "Input"], Cell[46441, 1342, 408, 11, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[46886, 1358, 533, 14, 119, "Input"], Cell[47422, 1374, 291, 5, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[47750, 1384, 488, 15, 85, "Input"], Cell[48241, 1401, 92, 1, 50, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[48382, 1408, 155, 2, 44, "Subsubsection"], Cell[48540, 1412, 417, 11, 85, "Input"], Cell[48960, 1425, 83, 1, 47, "Text"], Cell[CellGroupData[{ Cell[49068, 1430, 200, 5, 50, "Input"], Cell[49271, 1437, 188, 3, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[49496, 1445, 169, 4, 50, "Input"], Cell[49668, 1451, 187, 3, 50, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[49904, 1460, 109, 1, 44, "Subsubsection"], Cell[50016, 1463, 1729, 40, 323, "Input"], Cell[51748, 1505, 81, 1, 47, "Text"], Cell[CellGroupData[{ Cell[51854, 1510, 400, 9, 50, "Input"], Cell[52257, 1521, 321, 7, 72, "Output"] }, Open ]], Cell[52593, 1531, 199, 3, 47, "Text"], Cell[52795, 1536, 1054, 24, 50, "Input"], Cell[CellGroupData[{ Cell[53874, 1564, 310, 8, 50, "Input"], Cell[54187, 1574, 667, 12, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[54891, 1591, 247, 6, 50, "Input"], Cell[55141, 1599, 399, 8, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[55577, 1612, 197, 5, 50, "Input"], Cell[55777, 1619, 293, 6, 50, "Output"] }, Open ]], Cell[56085, 1628, 1549, 47, 153, "Input"], Cell[CellGroupData[{ Cell[57659, 1679, 267, 7, 50, "Input"], Cell[57929, 1688, 292, 6, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[58258, 1699, 359, 11, 50, "Input"], Cell[58620, 1712, 467, 13, 50, "Output"] }, Open ]], Cell[59102, 1728, 177, 4, 79, "Text"], Cell[CellGroupData[{ Cell[59304, 1736, 489, 14, 50, "Input"], Cell[59796, 1752, 9173, 158, 249, 3598, 65, "CachedBoxData", "BoxData", \ "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[69030, 1917, 124, 1, 63, "Subsection"], Cell[CellGroupData[{ Cell[69179, 1922, 188, 4, 46, "Subsubsection"], Cell[69370, 1928, 244, 3, 47, "Text"], Cell[69617, 1933, 802, 22, 50, "Input"], Cell[70422, 1957, 81, 1, 47, "Text"], Cell[CellGroupData[{ Cell[70528, 1962, 219, 6, 50, "Input"], Cell[70750, 1970, 291, 6, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[71078, 1981, 203, 5, 50, "Input"], Cell[71284, 1988, 277, 5, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[71598, 1998, 291, 7, 50, "Input"], Cell[71892, 2007, 345, 7, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[72274, 2019, 229, 6, 50, "Input"], Cell[72506, 2027, 290, 5, 50, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[72845, 2038, 106, 1, 44, "Subsubsection"], Cell[72954, 2041, 375, 7, 79, "Text"], Cell[73332, 2050, 940, 25, 221, "Input"], Cell[74275, 2077, 83, 1, 47, "Text"], Cell[CellGroupData[{ Cell[74383, 2082, 169, 4, 50, "Input"], Cell[74555, 2088, 218, 4, 50, "Output"] }, Open ]], Cell[74788, 2095, 153, 3, 47, "Text"], Cell[74944, 2100, 1333, 30, 255, "Input"], Cell[CellGroupData[{ Cell[76302, 2134, 215, 4, 50, "Input"], Cell[76520, 2140, 1768, 58, 166, "Output"] }, Open ]], Cell[78303, 2201, 182, 2, 47, "Text"], Cell[78488, 2205, 1683, 37, 255, "Input"], Cell[CellGroupData[{ Cell[80196, 2246, 170, 4, 50, "Input"], Cell[80369, 2252, 1130, 39, 131, "Output"] }, Open ]], Cell[81514, 2294, 181, 2, 47, "Text"], Cell[81698, 2298, 2497, 57, 323, "Input"], Cell[CellGroupData[{ Cell[84220, 2359, 166, 4, 50, "Input"], Cell[84389, 2365, 1186, 41, 131, "Output"] }, Open ]], Cell[85590, 2409, 112, 1, 47, "Text"], Cell[85705, 2412, 4621, 91, 527, "Input"], Cell[90329, 2505, 83, 1, 47, "Text"], Cell[CellGroupData[{ Cell[90437, 2510, 205, 5, 50, "Input"], Cell[90645, 2517, 1184, 40, 131, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[91866, 2562, 121, 2, 50, "Input"], Cell[91990, 2566, 886, 29, 85, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[92913, 2600, 141, 3, 50, "Input"], Cell[93057, 2605, 2601, 86, 234, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[95695, 2696, 253, 7, 50, "Input"], Cell[95951, 2705, 197, 4, 50, "Output"] }, Open ]], Cell[96163, 2712, 203, 4, 47, "Text"], Cell[96369, 2718, 5221, 99, 629, "Input"], Cell[101593, 2819, 343, 7, 111, "Text"], Cell[CellGroupData[{ Cell[101961, 2830, 191, 4, 50, "Input"], Cell[102155, 2836, 2652, 87, 234, "Output"] }, Open ]], Cell[104822, 2926, 190, 2, 47, "Text"], Cell[105015, 2930, 5092, 95, 459, "Input"], Cell[CellGroupData[{ Cell[110132, 3029, 195, 4, 50, "Input"], Cell[110330, 3035, 2560, 86, 234, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[112951, 3128, 166, 2, 63, "Subsection"], Cell[113120, 3132, 104, 1, 47, "Text"], Cell[113227, 3135, 519, 15, 50, "Input"], Cell[113749, 3152, 108, 1, 47, "Text"], Cell[113860, 3155, 654, 21, 50, "Input"], Cell[CellGroupData[{ Cell[114539, 3180, 198, 5, 50, "Input"], Cell[114740, 3187, 297, 6, 73, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[115074, 3198, 206, 5, 50, "Input"], Cell[115283, 3205, 277, 5, 73, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[115597, 3215, 198, 5, 50, "Input"], Cell[115798, 3222, 273, 5, 73, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[116120, 3233, 266, 3, 63, "Subsection"], Cell[116389, 3238, 511, 9, 79, "Text"], Cell[116903, 3249, 846, 24, 79, "Text"], Cell[117752, 3275, 505, 9, 47, "Text"], Cell[118260, 3286, 292, 6, 79, "Text"], Cell[118555, 3294, 2077, 47, 323, "Input"], Cell[120635, 3343, 85, 1, 47, "Text"], Cell[120723, 3346, 1506, 49, 187, "Input"], Cell[CellGroupData[{ Cell[122254, 3399, 335, 6, 50, "Input"], Cell[122592, 3407, 335, 6, 50, "Output"] }, Open ]], Cell[122942, 3416, 252, 5, 47, "Text"], Cell[123197, 3423, 4068, 89, 561, "Input"], Cell[CellGroupData[{ Cell[127290, 3516, 229, 4, 50, "Input"], Cell[127522, 3522, 862, 29, 85, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[128421, 3556, 493, 12, 50, "Input"], Cell[128917, 3570, 248, 5, 50, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[129202, 3580, 381, 10, 50, "Input"], Cell[129586, 3592, 236, 7, 78, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[129859, 3604, 364, 9, 50, "Input"], Cell[130226, 3615, 178, 4, 50, "Output"] }, Open ]], Cell[130419, 3622, 111, 1, 47, "Text"], Cell[130533, 3625, 4735, 104, 697, "Input"], Cell[135271, 3731, 83, 1, 47, "Text"], Cell[CellGroupData[{ Cell[135379, 3736, 227, 4, 50, "Input"], Cell[135609, 3742, 1235, 40, 176, "Output"] }, Open ]], Cell[136859, 3785, 683, 20, 50, "Input"], Cell[CellGroupData[{ Cell[137567, 3809, 197, 4, 50, "Input"], Cell[137767, 3815, 1193, 38, 176, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[138997, 3858, 347, 9, 50, "Input"], Cell[139347, 3869, 227, 5, 73, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[139611, 3879, 387, 9, 50, "Input"], Cell[140001, 3890, 257, 6, 73, "Output"] }, Open ]], Cell[140273, 3899, 134, 1, 47, "Text"], Cell[140410, 3902, 460, 11, 85, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[140919, 3919, 102, 1, 119, "Section"], Cell[CellGroupData[{ Cell[141046, 3924, 123, 1, 63, "Subsection"], Cell[141172, 3927, 1091, 22, 431, "Text"], Cell[142266, 3951, 92, 1, 50, "Input"], Cell[142361, 3954, 87, 1, 50, "Input"], Cell[142451, 3957, 146, 2, 47, "Text"], Cell[142600, 3961, 1107, 31, 153, "Input"], Cell[143710, 3994, 935, 28, 153, "Input"], Cell[144648, 4024, 869, 25, 79, "Text"], Cell[145520, 4051, 503, 9, 47, "Text"], Cell[146026, 4062, 864, 22, 187, "Input"], Cell[146893, 4086, 83, 1, 47, "Text"], Cell[146979, 4089, 2725, 84, 357, "Input"], Cell[CellGroupData[{ Cell[149729, 4177, 408, 8, 50, "Input"], Cell[150140, 4187, 531, 15, 73, "Output"] }, Open ]], Cell[150686, 4205, 1176, 28, 255, "Input"], Cell[CellGroupData[{ Cell[151887, 4237, 357, 7, 50, "Input"], Cell[152247, 4246, 735, 23, 85, "Output"] }, Open ]], Cell[152997, 4272, 2225, 51, 425, "Input"], Cell[CellGroupData[{ Cell[155247, 4327, 410, 8, 50, "Input"], Cell[155660, 4337, 366, 11, 50, "Output"] }, Open ]], Cell[156041, 4351, 906, 21, 153, "Input"], Cell[156950, 4374, 2195, 49, 357, "Input"], Cell[159148, 4425, 85, 1, 47, "Text"], Cell[159236, 4428, 1506, 49, 187, "Input"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)