(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 330018, 6718] NotebookOptionsPosition[ 325808, 6572] NotebookOutlinePosition[ 326278, 6590] CellTagsIndexPosition[ 326235, 6587] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["\<\ GREATER2\ \>", "Title", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.497027653136301*^9, 3.497027654529505*^9}, { 3.5499690275205584`*^9, 3.549969050165976*^9}}], Cell["", "Text", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{ 3.549016120805242*^9, {3.549970033337064*^9, 3.5499700912233963`*^9}, { 3.549970155547716*^9, 3.5499702086777067`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"BeginPackage", "[", "\"\\"", "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Written", " ", "by", " ", "Tom", " ", RowBox[{"Hartman", ".", " ", "Uses"}], " ", "code", " ", "from", " ", RowBox[{"GREAT", ".", "m"}], " ", "by", " ", "Tristan", " ", "Hubsch"}], ",", " ", RowBox[{ RowBox[{"EinsteinTensor", ".", "m"}], " ", "by", " ", "Pekka", " ", "Janhunen"}], ",", " ", RowBox[{"and", " ", RowBox[{"diffgeo", ".", "m"}], " ", "by", " ", "Matt", " ", RowBox[{ "Headrick", ".", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", "Last"}], " ", "updated", " ", "June", " ", "2012."}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]"}]], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.549969017847439*^9}, { 3.549970210106041*^9, 3.5499702159775047`*^9}, {3.54997514266726*^9, 3.549975169995693*^9}}], Cell[BoxData["\n"], "Input", InitializationGroup->True, CellChangeTimes->{3.5771768459053707`*^9}], Cell[CellGroupData[{ Cell["Random Useful Things", "Section", CellChangeTimes->{{3.5757120858285227`*^9, 3.575712093161072*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"S", " ", "=", " ", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"#", ",", RowBox[{"TimeConstraint", "\[Rule]", "1"}]}], "]"}], "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SMF", " ", "=", " ", RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"MatrixForm", "[", "#", "]"}], ",", " ", RowBox[{"TimeConstraint", "\[Rule]", "1"}]}], "]"}], "&"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MF", " ", "=", " ", "MatrixForm"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"GSimplify", " ", "=", " ", RowBox[{"(", RowBox[{"#1", "&"}], ")"}]}], ";"}]}], "Input", CellChangeTimes->{3.577176849989174*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"datapoints", " ", "=", " ", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Sto", "[", "datapoint_", "]"}], ":=", " ", RowBox[{"datapoints", "=", RowBox[{"Join", "[", RowBox[{"datapoints", ",", " ", RowBox[{"{", "datapoint", "}"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.577176852187975*^9, 3.577176872505436*^9}, { 3.5771769124333067`*^9, 3.577176935576952*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Schwarzian", "[", RowBox[{"w_", ",", " ", "z_"}], "]"}], ":=", " ", RowBox[{ FractionBox[ RowBox[{"D", "[", RowBox[{"w", ",", RowBox[{"{", RowBox[{"z", ",", "3"}], "}"}]}], "]"}], RowBox[{"D", "[", RowBox[{"w", ",", "z"}], "]"}]], "-", RowBox[{ FractionBox["3", "2"], RowBox[{ RowBox[{"(", FractionBox[ RowBox[{"D", "[", RowBox[{"w", ",", RowBox[{"{", RowBox[{"z", ",", "2"}], "}"}]}], "]"}], RowBox[{"D", "[", RowBox[{"w", ",", "z"}], "]"}]], ")"}], "^", "2"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"3", "-", RowBox[{"pt", " ", "function", " ", "in", " ", "2", "d", " ", "cft"}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cft3", "[", RowBox[{"h_", ",", " ", "z_"}], "]"}], ":=", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"z", "[", RowBox[{"[", "1", "]"}], "]"}], "-", RowBox[{"z", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], RowBox[{ RowBox[{"-", RowBox[{"h", "[", RowBox[{"[", "1", "]"}], "]"}]}], "-", RowBox[{"h", "[", RowBox[{"[", "2", "]"}], "]"}], "+", RowBox[{"h", "[", RowBox[{"[", "3", "]"}], "]"}]}]], SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"z", "[", RowBox[{"[", "2", "]"}], "]"}], "-", RowBox[{"z", "[", RowBox[{"[", "3", "]"}], "]"}]}], ")"}], RowBox[{ RowBox[{"-", RowBox[{"h", "[", RowBox[{"[", "2", "]"}], "]"}]}], "-", RowBox[{"h", "[", RowBox[{"[", "3", "]"}], "]"}], "+", RowBox[{"h", "[", RowBox[{"[", "1", "]"}], "]"}]}]], SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"z", "[", RowBox[{"[", "3", "]"}], "]"}], "-", RowBox[{"z", "[", RowBox[{"[", "1", "]"}], "]"}]}], ")"}], RowBox[{ RowBox[{"-", RowBox[{"h", "[", RowBox[{"[", "3", "]"}], "]"}]}], "-", RowBox[{"h", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"h", "[", RowBox[{"[", "2", "]"}], "]"}]}]]}]}]}], "Input", CellChangeTimes->{{3.575712114335544*^9, 3.57571215629959*^9}, { 3.575715151432994*^9, 3.5757153333576527`*^9}, {3.575716661450522*^9, 3.575716671810339*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["The GREAT package", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.54996902598566*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"IMetric", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"Christoffel", "::", "usage"}], " ", "=", " ", "\"\\""}], " ", "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"Riemann", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"Ricci", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SCurvature", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"EinsteinTensor", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SqRicci", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SqRiemann", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"helpGREAT", "::", "usage"}], " ", "=", " ", "\"\\""}], "\n", "\n"}], "\n", RowBox[{ RowBox[{"Simplif1", " ", "=", " ", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"#1", ",", " ", RowBox[{"TimeConstraint", "->", "1"}]}], "]"}], " ", "&"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"IMetric", "[", "metric_", "]"}], " ", ":=", " ", RowBox[{"Simplif1", "[", RowBox[{"Inverse", "[", "metric", "]"}], "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"Christoffel", "[", RowBox[{"metric_", ",", "x_"}], "]"}], ":=", " ", RowBox[{ RowBox[{"Christoffel", "[", RowBox[{"metric", ",", "x"}], "]"}], " ", "=", " ", "\n", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "Dim", ",", " ", "iMet", ",", " ", "PreChristoffel", ",", " ", "Christoffel", ",", " ", "i", ",", " ", "j", ",", " ", "k"}], "}"}], ",", "\n", " ", RowBox[{ RowBox[{"Dim", " ", "=", " ", RowBox[{"Length", "[", "x", "]"}]}], ";", "\n", " ", RowBox[{"iMet", " ", "=", " ", RowBox[{"IMetric", "[", "metric", "]"}]}], ";", "\n", " ", RowBox[{"(*", " ", RowBox[{"Metric", " ", "with", " ", "upper", " ", "indices"}], " ", "*)"}], "\n", " ", RowBox[{"PreChristoffel", " ", "=", "\n", " ", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"metric", "[", RowBox[{"[", RowBox[{"k", ",", "i"}], "]"}], "]"}], ",", RowBox[{"x", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "\n", " ", "+", " ", RowBox[{"D", "[", RowBox[{ RowBox[{"metric", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], ",", RowBox[{"x", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "\n", " ", "-", " ", RowBox[{"D", "[", RowBox[{ RowBox[{"metric", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}]}], ",", "\n", " \t ", RowBox[{"{", RowBox[{"k", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", "Dim"}], "}"}]}], " ", "]"}]}], ";", "\n", " \t ", RowBox[{"(*", " ", RowBox[{ RowBox[{"The", " ", "\\", RowBox[{"{", RowBox[{"k", ",", RowBox[{"ij", "\\"}]}], "}"}]}], " ", "Christoffel", " ", "symbols"}], " ", "*)"}], "\n", " ", RowBox[{"PreChristoffel", " ", "=", " ", RowBox[{"Simplif1", "[", "PreChristoffel", "]"}]}], ";", "\n", " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"The", " ", "\\", RowBox[{"Gamma", "^", "k_"}]}], RowBox[{"{", "ij", "}"}], " ", "Christoffel", " ", "symbols"}], " ", "*)"}], "\n", " ", RowBox[{"Christoffel", " ", "=", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], " ", RowBox[{"iMet", " ", ".", " ", "PreChristoffel"}]}]}], ";", "\n", " ", RowBox[{"(*", " ", RowBox[{"Return", " ", "the", " ", "Christoffel", " ", RowBox[{"symbol", ":"}]}], " ", "*)"}], "\n", " ", RowBox[{"Simplif1", "[", "Christoffel", "]"}]}]}], " ", "]"}]}]}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"Riemann", "[", RowBox[{"metric_", ",", "x_"}], "]"}], ":=", "\n", " ", RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ "Dim", ",", " ", "iMet", ",", " ", "ChrisSymbol", ",", " ", "Riemann", ",", " ", "PreRiemann", ",", "\n", " ", "a", ",", " ", "b", ",", " ", "c", ",", " ", "i", ",", " ", "j", ",", " ", "k"}], "}"}], ",", "\n", " ", RowBox[{ RowBox[{"Dim", " ", "=", " ", RowBox[{"Length", "[", "x", "]"}]}], ";", "\n", " ", RowBox[{"iMet", " ", "=", " ", RowBox[{"IMetric", "[", "metric", "]"}]}], ";", "\n", " ", RowBox[{"ChrisSymbol", " ", "=", " ", RowBox[{"Christoffel", "[", RowBox[{"metric", ",", "x"}], "]"}]}], ";", "\n", " ", RowBox[{"PreRiemann", " ", "=", " ", "\n", " ", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"ChrisSymbol", "[", RowBox[{"[", RowBox[{"a", ",", "i", ",", "c"}], "]"}], "]"}], ",", RowBox[{"x", "[", RowBox[{"[", "b", "]"}], "]"}]}], "]"}], "\n", " ", "+", " ", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"ChrisSymbol", "[", RowBox[{"[", RowBox[{"k", ",", "i", ",", "c"}], "]"}], "]"}], "\n", " ", "*", " ", RowBox[{"ChrisSymbol", "[", RowBox[{"[", RowBox[{"a", ",", "k", ",", "b"}], "]"}], "]"}]}], ",", "\n", " ", RowBox[{"{", RowBox[{"k", ",", "Dim"}], "}"}]}], " ", "]"}]}], ",", "\n", " ", RowBox[{"{", RowBox[{"a", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"b", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"c", ",", "Dim"}], "}"}]}], " ", "]"}]}], ";", "\n", " \t", RowBox[{"(*", " ", RowBox[{"Riemann", " ", "tensor", " ", RowBox[{"(", RowBox[{ RowBox[{"1", "st", " ", "upper"}], ",", " ", RowBox[{"three", " ", "lower", " ", "indices"}]}], ")"}], "\n", " \t ", "is", " ", "antisymmetrized", " ", RowBox[{"PreRiemann", ":"}]}], " ", "*)"}], "\n", " ", RowBox[{"Riemann", " ", "=", " ", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"PreRiemann", "[", RowBox[{"[", RowBox[{"a", ",", "i", ",", "b", ",", "c"}], "]"}], "]"}], "\n", " ", "-", " ", RowBox[{"PreRiemann", "[", RowBox[{"[", RowBox[{"a", ",", "i", ",", "c", ",", "b"}], "]"}], "]"}]}], ",", "\n", " ", RowBox[{"{", RowBox[{"a", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"b", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"c", ",", "Dim"}], "}"}]}], " ", "]"}]}], ";", "\n", " ", RowBox[{"(*", " ", RowBox[{"Return", " ", "the", " ", "Riemann", " ", RowBox[{"tensor", ":"}]}], " ", "*)"}], "\n", " ", RowBox[{"Simplif1", "[", "Riemann", "]"}]}]}], " ", "]"}]}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"Ricci", "[", RowBox[{"metric_", ",", "x_"}], "]"}], ":=", "\n", " ", RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ "Dim", ",", " ", "Riem", ",", " ", "Ricci", ",", " ", "a", ",", " ", "i", ",", " ", "j"}], "}"}], ",", "\n", " ", RowBox[{ RowBox[{"Dim", " ", "=", " ", RowBox[{"Length", "[", "x", "]"}]}], ";", "\n", " ", RowBox[{"Riem", " ", "=", " ", RowBox[{"Riemann", "[", RowBox[{"metric", ",", "x"}], "]"}]}], ";", "\n", " ", RowBox[{"Ricci", " ", "=", " ", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"Riem", "[", RowBox[{"[", RowBox[{"a", ",", "i", ",", "a", ",", "j"}], "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"a", ",", "Dim"}], "}"}]}], "]"}], ",", "\n", " ", RowBox[{"{", RowBox[{"i", ",", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", "Dim"}], "}"}]}], " ", "]"}]}], ";", "\n", " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"Return", " ", "the", " ", "Ricci", " ", "tensor", " ", RowBox[{"(", RowBox[{"two", " ", "lower", " ", "indices"}], ")"}]}], ":"}], " ", "*)"}], "\n", " ", RowBox[{"Simplif1", "[", "Ricci", "]"}]}]}], " ", "]"}]}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SCurvature", "[", RowBox[{"metric_", ",", "x_"}], "]"}], ":=", "\n", " ", RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ "Dim", ",", "iMet", ",", "CurvatureScalar", ",", "i", ",", "j"}], "}"}], ",", "\n", " ", RowBox[{ RowBox[{"Dim", "=", RowBox[{"Length", "[", "x", "]"}]}], ";", "\n", " ", RowBox[{"iMet", "=", RowBox[{"IMetric", "[", "metric", "]"}]}], ";", "\n", " ", RowBox[{"CurvatureScalar", "=", RowBox[{"Tr", "[", RowBox[{"iMet", ".", RowBox[{"Ricci", "[", RowBox[{"metric", ",", "x"}], "]"}]}], "]"}]}], ";", "\n", " ", RowBox[{"(*", RowBox[{"Return", " ", "Scalar", " ", RowBox[{"Curvature", ":"}]}], "*)"}], RowBox[{"Simplif1", "[", "CurvatureScalar", "]"}]}]}], "]"}]}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"EinsteinTensor", "[", RowBox[{"metric_", ",", "x_"}], "]"}], ":=", "\n", " ", RowBox[{"Simplif1", "[", RowBox[{ RowBox[{"Ricci", "[", RowBox[{"metric", ",", "x"}], "]"}], " ", "-", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], " ", RowBox[{"SCurvature", "[", RowBox[{"metric", ",", "x"}], "]"}], " ", "metric"}]}], "]"}]}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SqRicci", "[", RowBox[{"metric_", ",", "x_"}], "]"}], ":=", "\n", " ", RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ "Dim", ",", " ", "iMet", ",", " ", "Ric", ",", " ", "RRicci", ",", " ", "i", ",", " ", "j", ",", " ", "k", ",", " ", "l"}], "}"}], ",", "\n", " ", RowBox[{ RowBox[{"Dim", " ", "=", " ", RowBox[{"Length", "[", "x", "]"}]}], ";", "\n", " ", RowBox[{"iMet", " ", "=", " ", RowBox[{"IMetric", "[", "metric", "]"}]}], ";", "\n", " ", RowBox[{"Ric", " ", "=", " ", RowBox[{"iMet", ".", RowBox[{"Ricci", "[", RowBox[{"metric", ",", " ", "x"}], "]"}]}]}], ";", "\n", " ", RowBox[{"RRicci", " ", "=", " ", RowBox[{"Tr", "[", RowBox[{"Ric", ".", "Ric"}], "]"}]}], ";", "\n", " ", RowBox[{"(*", RowBox[{ RowBox[{"Return", " ", "norm"}], " ", "-", " ", RowBox[{"square", " ", "of", " ", "Ricci", " ", RowBox[{"tensor", " ", ":"}]}]}], "*)"}], RowBox[{"Simplif1", "[", "RRicci", "]"}]}]}], "]"}]}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"SqRiemann", "[", RowBox[{"metric_", ",", " ", "x_"}], "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "Dim", ",", " ", "iMet", ",", " ", "Riem", ",", "\n", " ", "RRiem", ",", " ", "i", ",", " ", "j", ",", " ", "k", ",", " ", "l", ",", " ", "m", ",", " ", "n", ",", " ", "p", ",", " ", "q"}], "}"}], ",", " ", RowBox[{ RowBox[{"Dim", " ", "=", " ", RowBox[{"Length", "[", "x", "]"}]}], ";", "\n", " ", RowBox[{"iMet", " ", "=", " ", RowBox[{"IMetric", "[", "metric", "]"}]}], ";", "\n", " ", RowBox[{"Riem", " ", "=", " ", RowBox[{ RowBox[{"Riemann", "[", RowBox[{"metric", ",", " ", "x"}], "]"}], ".", "iMet"}]}], ";", "\n", " ", RowBox[{"RRiem", " ", "=", " ", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Riem", "[", RowBox[{"[", RowBox[{"i", ",", " ", "j", ",", " ", "l", ",", " ", "k"}], "]"}], "]"}], "*", "\n", " ", RowBox[{"Riem", "[", RowBox[{"[", RowBox[{"l", ",", " ", "k", ",", " ", "i", ",", " ", "j"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", " ", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"k", ",", " ", "Dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"l", ",", " ", "Dim"}], "}"}]}], "]"}]}], ";", "\n", " ", RowBox[{"(*", RowBox[{ RowBox[{"Return", " ", "norm"}], " ", "-", " ", RowBox[{"square", " ", "of", " ", "Riemann", " ", RowBox[{"tensor", " ", ":"}]}]}], "*)"}], RowBox[{"Simplif1", "[", "RRiem", "]"}]}]}], "]"}]}], "\n"}], "\n", RowBox[{"helpGREAT", ":=", " ", RowBox[{ "Print", "[", "\"\\"", "]"}]}], "\[IndentingNewLine]"}], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.5499690860197277`*^9}}], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{{3.549970301574566*^9, 3.5499703573903303`*^9}, { 3.5499704089855213`*^9, 3.5499704323335648`*^9}, {3.5499704772688017`*^9, 3.549970504266005*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Metric\ \>", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969251087439*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"ds2met", "::", "usage"}], " ", "=", " ", "\"\\""}], "\ \[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ds2met", "[", RowBox[{"ds2_", ",", "dx_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "dim", ",", "ds2metdouble", ",", "icounter", ",", "jcounter", ",", " ", "xds2", ",", " ", "res"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dim", " ", "=", " ", RowBox[{"Length", "[", "dx", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"xds2", " ", "=", " ", RowBox[{"Expand", "[", "ds2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Coefficient", "[", RowBox[{"xds2", ",", RowBox[{ RowBox[{"dx", "[", RowBox[{"[", "icounter", "]"}], "]"}], " ", RowBox[{"dx", "[", RowBox[{"[", "jcounter", "]"}], "]"}]}]}], "]"}], "/", RowBox[{"(", RowBox[{"2", "-", RowBox[{"KroneckerDelta", "[", RowBox[{"icounter", ",", "jcounter"}], "]"}]}], ")"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"icounter", ",", "dim"}], "}"}], ",", RowBox[{"{", RowBox[{"jcounter", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"S", "[", "res", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Metric", "::", "usage"}], " ", "=", " ", RowBox[{"ToString", "[", "\[IndentingNewLine]", RowBox[{"\"\\"Italic\"]\), {\!\(\*SubscriptBox[ StyleBox[\"x\", FontSlant->\"Italic\"], \"1\"]\), \!\(\*SubscriptBox[ StyleBox[\"x\", FontSlant->\"Italic\"], \"2\"]\), ...}] returns the metric tensor specified \ by the line element \!\(\* StyleBox[\"ds2\", FontSlant->\"Italic\"]\) with coordinates \!\(\*SubscriptBox[ StyleBox[\"x\", FontSlant->\"Italic\"], \"i\"]\). (Just like ds2met but does not require you \ to define differentials.)\>\"", ",", " ", "StandardForm"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Metric", "[", RowBox[{"ds2_", ",", " ", "X_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "dX", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dX", " ", "=", " ", RowBox[{"Differential", "[", "X", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ds2met", "[", RowBox[{"ds2", ",", "dX"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Differential", "[", "X_List", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\n", "\t", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"MatchQ", "[", RowBox[{ RowBox[{"Union", "[", RowBox[{"Head", "/@", "X"}], "]"}], ",", " ", RowBox[{"{", "Symbol", "}"}]}], "]"}]}], ",", " ", RowBox[{"Message", "[", RowBox[{ RowBox[{"GREATER", "::", "invalidCoordinate"}], ",", "X"}], "]"}]}], "]"}], ";", "\n", "\t", RowBox[{ RowBox[{ RowBox[{"Symbol", "[", RowBox[{"\"\\"", "<>", RowBox[{"SymbolName", "[", "#", "]"}]}], "]"}], "&"}], "/@", "X"}]}]}], "\n", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"Forms", " ", "to", " ", "tensors"}], ";", " ", RowBox[{ RowBox[{"use", " ", "\[Vee]"}], " ", "=", " ", RowBox[{ "Vee", " ", "as", " ", "a", " ", "abstract", " ", "wedge", " ", "product"}]}]}], ",", " ", RowBox[{ RowBox[{"Wedge", " ", "as", " ", "a", " ", "component"}], "-", RowBox[{"wise", " ", "wedge", " ", "product"}]}]}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TFormQ", "[", RowBox[{"f_", ",", " ", "dX_"}], "]"}], ":=", RowBox[{"Not", "[", RowBox[{"NotTFormQ", "[", RowBox[{"f", ",", "dX"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"NotTFormQ", "[", RowBox[{"f_", ",", " ", "dX_"}], "]"}], ":=", RowBox[{"And", "@@", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"FreeQ", "[", RowBox[{"f", ",", " ", "#"}], "]"}], "&"}], "/@", "dX"}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TFormExRules", "[", "dX_", "]"}], " ", ":=", " ", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"Vee", "[", RowBox[{"a_", ",", RowBox[{"b_", "+", "c_"}]}], "]"}], "]"}], "\[RuleDelayed]", " ", RowBox[{ RowBox[{"Vee", "[", RowBox[{"a", ",", "b"}], "]"}], " ", "+", " ", RowBox[{"Vee", "[", RowBox[{"a", ",", "c"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"Vee", "[", RowBox[{ RowBox[{"a_", "+", "b_"}], ",", "c_"}], "]"}], "]"}], "\[RuleDelayed]", " ", RowBox[{ RowBox[{"Vee", "[", RowBox[{"a", ",", "c"}], "]"}], " ", "+", " ", RowBox[{"Vee", "[", RowBox[{"b", ",", "c"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"Vee", "[", RowBox[{ RowBox[{ RowBox[{"n_", "?", RowBox[{"(", RowBox[{ RowBox[{"NotTFormQ", "[", RowBox[{"#", ",", "dX"}], "]"}], "&"}], ")"}]}], " ", "*", " ", "b_"}], ",", " ", "c_"}], "]"}], "]"}], "\[RuleDelayed]", " ", RowBox[{"n", " ", RowBox[{"Vee", "[", RowBox[{"b", ",", "c"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"Vee", "[", RowBox[{"c_", ",", " ", RowBox[{ RowBox[{"n_", "?", RowBox[{"(", RowBox[{ RowBox[{"NotTFormQ", "[", RowBox[{"#", ",", "dX"}], "]"}], "&"}], ")"}]}], " ", "*", " ", "b_"}]}], "]"}], "]"}], "\[RuleDelayed]", " ", RowBox[{"n", " ", RowBox[{"Vee", "[", RowBox[{"c", ",", "b"}], "]"}]}]}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"formToTensor", "[", RowBox[{"form_", ",", " ", "dX_", ",", " ", "n_"}], "]"}], ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dim", ",", "xform", ",", " ", "res"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dim", " ", "=", " ", RowBox[{"Length", "[", "dX", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"xform", " ", "=", " ", RowBox[{ RowBox[{"Expand", "[", "form", "]"}], "//.", RowBox[{"TFormExRules", "[", "dX", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Coefficient", "[", RowBox[{"xform", ",", " ", RowBox[{"Vee", "[", RowBox[{ RowBox[{"dX", "[", RowBox[{"[", "ia", "]"}], "]"}], ",", RowBox[{"dX", "[", RowBox[{"[", "ib", "]"}], "]"}]}], "]"}]}], "]"}], " ", "-", " ", RowBox[{"Coefficient", "[", RowBox[{"xform", ",", " ", RowBox[{"Vee", "[", RowBox[{ RowBox[{"dX", "[", RowBox[{"[", "ib", "]"}], "]"}], ",", RowBox[{"dX", "[", RowBox[{"[", "ia", "]"}], "]"}]}], "]"}]}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "dim"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "res"}]}], "\[IndentingNewLine]", "]"}], "/;", RowBox[{"n", " ", "\[Equal]", " ", "2"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Unprotect", "[", "TensorProduct", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TensorProductT", "[", "a__", "]"}], ":=", " ", RowBox[{"Outer", "[", RowBox[{"Times", ",", " ", "a"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Protect", "[", "TensorProduct", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.549969312261738*^9}, {3.549969744012075*^9, 3.549969782879828*^9}, { 3.5929171817035646`*^9, 3.592917193358202*^9}, 3.592925357334132*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Tensor Utilities", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499693176348047`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"antisymmetrize", "[", "X_", "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "perms", ",", " ", "n", ",", " ", "numperm", ",", " ", "res", ",", "ia"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", " ", "=", " ", RowBox[{"ArrayDepth", "[", "X", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"perms", " ", "=", " ", RowBox[{"Permutations", "[", RowBox[{"Range", "[", "n", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"numperm", " ", "=", " ", RowBox[{"Length", "[", "perms", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"Sum", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Transpose", "[", RowBox[{"X", ",", RowBox[{"perms", "[", RowBox[{"[", "ia", "]"}], "]"}]}], "]"}], RowBox[{"Signature", "[", RowBox[{"perms", "[", RowBox[{"[", "ia", "]"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"ia", ",", "numperm"}], "}"}]}], "\[IndentingNewLine]", "]"}], "/", "numperm"}]}], ";", "\[IndentingNewLine]", "res"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"symmetrize", "[", "X_", "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "perms", ",", " ", "n", ",", " ", "numperm", ",", " ", "res", ",", "ia"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", " ", "=", " ", RowBox[{"ArrayDepth", "[", "X", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"perms", " ", "=", " ", RowBox[{"Permutations", "[", RowBox[{"Range", "[", "n", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"numperm", " ", "=", " ", RowBox[{"Length", "[", "perms", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"Sum", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"X", ",", RowBox[{"perms", "[", RowBox[{"[", "ia", "]"}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"ia", ",", "numperm"}], "}"}]}], "\[IndentingNewLine]", "]"}], "/", "numperm"}]}], ";", "\[IndentingNewLine]", "res"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"IndexAtStart", "[", RowBox[{"T_", ",", " ", "ind_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Transpose", "[", RowBox[{"T", ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", "ind", "}"}], ",", RowBox[{"Range", "[", RowBox[{"1", ",", " ", RowBox[{"ind", "-", "1"}]}], "]"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"ind", "+", "1"}], ",", " ", RowBox[{"ArrayDepth", "[", "T", "]"}]}], "]"}]}], "]"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"2", ",", " ", "ind"}], "]"}], ",", RowBox[{"{", "1", "}"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"ind", "+", "1"}], ",", " ", RowBox[{"ArrayDepth", "[", "T", "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Contract", "[", RowBox[{"T1_", ",", " ", "T2_", ",", " ", "ind1_", ",", " ", "ind2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Inner", "[", RowBox[{"Times", ",", " ", "T1", ",", " ", RowBox[{"IndexAtStart", "[", RowBox[{"T2", ",", " ", "ind2"}], "]"}], ",", " ", "Plus", ",", " ", "ind1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"SelfContract", "[", RowBox[{"T1_", ",", " ", "ind1_", ",", " ", "ind2_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tr", "[", RowBox[{ RowBox[{"IndexAtStart", "[", RowBox[{ RowBox[{"IndexAtStart", "[", RowBox[{"T1", ",", "ind1"}], "]"}], ",", "ind2"}], "]"}], ",", " ", "Plus", ",", " ", "2"}], "]"}], "/;", RowBox[{"ind1", "<", "ind2"}]}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Raise", "[", RowBox[{"T_", ",", " ", "i_", ",", " ", "Guu_"}], "]"}], ":=", RowBox[{"IndexMove", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{"T", ",", " ", "Guu", ",", " ", "i", ",", " ", "1"}], "]"}], ",", RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "T", "]"}], "]"}], ",", " ", "i"}], "]"}]}], " ", ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"CircleTimes", ",", "HoldAll"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CircleTimes", "[", RowBox[{ RowBox[{"Part", "[", RowBox[{"T1_", ",", " ", "ind1__"}], "]"}], ",", " ", RowBox[{"Part", "[", RowBox[{"T2_", ",", " ", "ind2__"}], "]"}]}], "]"}], ":=", "\[IndentingNewLine]", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "sumind", ",", " ", "res", ",", " ", "ii", ",", " ", "ilist1", ",", " ", "ilist2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ilist1", " ", "=", " ", RowBox[{"List", "[", "ind1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ilist2", " ", "=", " ", RowBox[{"List", "[", "ind2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sumind", " ", "=", " ", RowBox[{"Intersection", "[", RowBox[{"ilist1", ",", "ilist2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", "=", " ", RowBox[{"Outer", "[", RowBox[{"Times", ",", " ", "T1", ",", " ", "T2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"res", " ", "=", " ", RowBox[{"SelfContract", "[", RowBox[{"res", ",", RowBox[{ RowBox[{"Position", "[", RowBox[{"ilist1", ",", " ", "ii"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", " ", RowBox[{ RowBox[{"Length", "[", "ilist1", "]"}], " ", "+", " ", RowBox[{ RowBox[{"Position", "[", RowBox[{"ilist2", ",", "ii"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"ii", ",", " ", "sumind"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", "res"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"EpsilonTensor", "[", "4", "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Signature", "[", RowBox[{"{", RowBox[{"ia", ",", "ib", ",", "ic", ",", "id"}], "}"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"id", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"EpsilonTensor", "[", "5", "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Signature", "[", RowBox[{"{", RowBox[{"ia", ",", "ib", ",", "ic", ",", "id", ",", "ie"}], "}"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "5"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "5"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", "5"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"id", ",", "5"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ie", ",", "5"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Epsilon", "[", "args_", "]"}], ":=", " ", RowBox[{"Signature", "[", "args", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"TraceFirst", "[", "T1_", "]"}], ":=", " ", RowBox[{"SelfContract", "[", RowBox[{"T1", ",", " ", "1", ",", " ", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"IndexShift", "[", RowBox[{"T_", ",", " ", "istart_", ",", " ", "ishift_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Transpose", "[", RowBox[{"T", ",", "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", " ", RowBox[{"istart", "-", "1"}]}], "]"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"istart", "+", "1"}], ",", " ", RowBox[{"istart", "+", "ishift"}]}], "]"}], ",", " ", RowBox[{"{", "istart", "}"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"istart", "+", "ishift", "+", "1"}], ",", " ", RowBox[{"ArrayDepth", "[", "T", "]"}]}], "]"}]}], "]"}]}], "]"}]}], ";"}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"IndexShift", "[", RowBox[{"T_", ",", " ", "istart_", ",", " ", "ishift_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Transpose", "[", RowBox[{"T", ",", "\[IndentingNewLine]", RowBox[{"Join", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", " ", RowBox[{"istart", "-", "1"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"istart", "+", "ishift"}], "}"}], ",", " ", RowBox[{"Range", "[", RowBox[{"istart", ",", " ", RowBox[{"istart", "+", "ishift", "-", "1"}]}], "]"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"istart", "+", "ishift", "+", "1"}], ",", " ", RowBox[{"ArrayDepth", "[", "T", "]"}]}], "]"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"IndexMove", "[", RowBox[{"components_List", ",", " ", "from_", ",", " ", "to_"}], "]"}], ":=", " ", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"components", ",", " ", RowBox[{"Join", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"from", "-", "1"}]}], "]"}], ",", " ", RowBox[{"{", "to", "}"}], ",", " ", RowBox[{"Range", "[", RowBox[{"from", ",", " ", RowBox[{"to", "-", "1"}]}], "]"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"to", "+", "1"}], ",", RowBox[{"ArrayDepth", "[", "components", "]"}]}], "]"}]}], "]"}]}], "]"}], "/;", RowBox[{"to", ">", "from"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"IndexMove", "[", RowBox[{"components_List", ",", " ", "from_", ",", " ", "to_"}], "]"}], ":=", " ", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"components", ",", " ", RowBox[{"Join", "[", RowBox[{ RowBox[{"Range", "[", RowBox[{"1", ",", RowBox[{"to", "-", "1"}]}], "]"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"to", "+", "1"}], ",", "from"}], "]"}], ",", " ", RowBox[{"{", "to", "}"}], ",", " ", RowBox[{"Range", "[", RowBox[{ RowBox[{"from", "+", "1"}], ",", " ", RowBox[{"ArrayDepth", "[", "components", "]"}]}], "]"}]}], "]"}]}], "]"}], "/;", RowBox[{"to", "<", "from"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"IndexMove", "[", RowBox[{"components_List", ",", " ", "from_", ",", " ", "to_"}], "]"}], ":=", " ", RowBox[{"components", "/;", RowBox[{"to", "\[Equal]", "from"}]}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ShowComponents", "[", RowBox[{"T_", ",", " ", "X_", ",", " ", "ind_", ",", " ", RowBox[{"name_:", "\"\\""}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"Tflat", ",", " ", "irep", ",", " ", "istr"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Tflat", " ", "=", " ", RowBox[{"Flatten", "[", "T", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"ii", " ", "=", " ", "1"}], ",", " ", RowBox[{"ii", "\[LessEqual]", " ", RowBox[{"Length", "[", "Tflat", "]"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"UnsameQ", " ", "[", RowBox[{ RowBox[{"Tflat", "[", RowBox[{"[", "ii", "]"}], "]"}], ",", " ", "0"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"irep", " ", "=", " ", RowBox[{"IntegerDigits", "[", RowBox[{ RowBox[{"ii", "-", "1"}], ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"irep", " ", "=", " ", RowBox[{ RowBox[{"PadLeft", "[", RowBox[{"irep", ",", " ", RowBox[{"Length", "[", "ind", "]"}]}], "]"}], "+", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{"irep", " ", "=", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Part", "[", RowBox[{"X", ",", " ", "#1"}], "]"}], "&"}], ")"}], "/@", " ", "irep"}]}], ";", "\[IndentingNewLine]", RowBox[{"istr", " ", "=", " ", "name"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"ij", " ", "=", " ", "1"}], ",", " ", RowBox[{"ij", " ", "\[LessEqual]", " ", RowBox[{"Length", "[", "ind", "]"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"whichscript", " ", "=", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"ind", "[", RowBox[{"[", "ij", "]"}], "]"}], "\[Equal]", RowBox[{"-", "1"}]}], ",", " ", "Subscript", ",", " ", "Superscript"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"istr", " ", "=", " ", RowBox[{"whichscript", "[", RowBox[{"istr", ",", " ", RowBox[{"irep", "[", RowBox[{"[", "ij", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ij", " ", "=", " ", RowBox[{"ij", " ", "+", " ", "1"}]}]}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"istr", " ", "=", " ", RowBox[{"istr", "/.", RowBox[{"{", RowBox[{ RowBox[{"Subscript", "[", RowBox[{ RowBox[{"Subscript", "[", RowBox[{"a1_", ",", "b1_"}], "]"}], ",", "c1_"}], "]"}], "\[RuleDelayed]", " ", RowBox[{"Subscript", "[", RowBox[{"a1", ",", RowBox[{ RowBox[{"ToString", "[", "b1", "]"}], "<>", RowBox[{"ToString", "[", "c1", "]"}]}]}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"istr", " ", "=", " ", RowBox[{"istr", "/.", RowBox[{"{", RowBox[{ RowBox[{"Superscript", "[", RowBox[{ RowBox[{"Superscript", "[", RowBox[{"a1_", ",", "b1_"}], "]"}], ",", "c1_"}], "]"}], "\[RuleDelayed]", " ", RowBox[{"Superscript", "[", RowBox[{"a1", ",", RowBox[{ RowBox[{"ToString", "[", "b1", "]"}], "<>", RowBox[{"ToString", "[", "c1", "]"}]}]}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"istr", " ", ",", " ", "\"\<=\>\"", ",", " ", RowBox[{"Tflat", "[", RowBox[{"[", "ii", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"ii", " ", "=", " ", RowBox[{"ii", " ", "+", " ", "1"}]}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Converts", ",", " ", "say", ",", " ", RowBox[{"dt", " ", "+", " ", RowBox[{ "r", " ", "dr", " ", "to", " ", "a", " ", "component", " ", "p"}], "-", RowBox[{"form", " ", RowBox[{"{", RowBox[{"1", ",", " ", "r"}], "}"}]}]}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"pForm", "[", RowBox[{"f_", ",", " ", "dX_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "ia", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"Coefficient", "[", RowBox[{"f", ",", " ", RowBox[{"dX", "[", RowBox[{"[", "ia", "]"}], "]"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"Length", "[", "dX", "]"}]}], "}"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"HodgeStar", "[", RowBox[{"wdd_", ",", " ", "Gdd_", ",", " ", "Guu_"}], "]"}], ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"n", ",", " ", "detg", ",", " ", "dims", ",", " ", "wuu"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", " ", "=", " ", RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "w", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"detg", " ", "=", " ", SqrtBox[ RowBox[{"-", RowBox[{"Det", "[", "Gdd", "]"}]}]]}], ";", "\[IndentingNewLine]", RowBox[{"dims", " ", "=", " ", RowBox[{"Length", "[", "Gdd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"wuu", " ", "=", " ", RowBox[{ RowBox[{"Guu", ".", "wdd", ".", "Guu"}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ FractionBox["1", RowBox[{"Factorial", "[", "n", "]"}]], "detg", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Signature", "[", RowBox[{"{", RowBox[{"ia", ",", "ib", ",", "ic", ",", "id", ",", "ie"}], "}"}], "]"}], RowBox[{"wuu", "[", RowBox[{"[", RowBox[{"id", ",", "ie"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"id", ",", "dims"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ie", ",", "dims"}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "dims"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "dims"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", "dims"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", "res"}]}], "]"}], "/;", RowBox[{ RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "wdd", "]"}], "]"}], "\[Equal]", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"HodgeStar", "::", "usage"}], " ", "=", " ", "\"\\""}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"HodgeStar", "[", RowBox[{"wUPPER_", ",", " ", "Gdd_", ",", " ", "Guu_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"n", ",", " ", "detg", ",", " ", "dims", ",", " ", "ep"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", " ", "=", " ", RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "wUPPER", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"detg", " ", "=", " ", SqrtBox[ RowBox[{"-", RowBox[{"Det", "[", "Gdd", "]"}]}]]}], ";", "\[IndentingNewLine]", RowBox[{"dims", " ", "=", " ", RowBox[{"Length", "[", "Gdd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ep", " ", "=", " ", RowBox[{"EpsilonTensor", "[", "dims", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", RowBox[{ FractionBox["1", RowBox[{"Factorial", "[", "n", "]"}]], "detg", " ", RowBox[{"Contract", "[", RowBox[{"ep", ",", " ", "wUPPER", ",", " ", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{ RowBox[{ RowBox[{"wUPPER", " ", "\[IndentingNewLine]", "res"}], " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Signature", "[", RowBox[{"{", RowBox[{ "ia", ",", "ib", ",", "ic", ",", "id", ",", "ie"}], "}"}], "]"}], RowBox[{"wuu", "[", RowBox[{"[", RowBox[{"id", ",", "ie"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"id", ",", "dims"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ie", ",", "dims"}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "dims"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "dims"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", "dims"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "res"}], "]"}], "/;", RowBox[{ RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "wUPPER", "]"}], "]"}], "\[Equal]", "2"}]}], ";"}]}], "\[IndentingNewLine]"}]}]}]}]}]}]}]}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Make", " ", "epsilon"}], ",", " ", RowBox[{"without", " ", "any", " ", SqrtBox["g"]}]}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"MakeEpsilon", "[", "n_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "ilist", ",", " ", "tableIters", ",", " ", "ii", ",", " ", "compoTilde"}], "}"}], ",", "\n", "\t", RowBox[{ RowBox[{"ilist", " ", "=", " ", RowBox[{"Array", "[", RowBox[{"ii", ",", " ", RowBox[{"{", "n", "}"}]}], "]"}]}], ";", "\n", "\t", RowBox[{"tableIters", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"jj", ",", " ", "n"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"jj", ",", "ilist"}], "}"}]}], "]"}]}], ";", "\n", "\t", RowBox[{"compoTilde", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Signature", "[", "ilist", "]"}], ",", " ", "##"}], "]"}], "&"}], "@@", "tableIters"}]}], ";", "\[IndentingNewLine]", "compoTilde"}]}], "\n", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.549969338347444*^9}, {3.549969405679839*^9, 3.549969406601528*^9}, { 3.549969454795738*^9, 3.549969455116714*^9}, {3.549969538655301*^9, 3.54996953896883*^9}, {3.549969638167672*^9, 3.549969638481707*^9}, { 3.5533591552099533`*^9, 3.553359225754713*^9}, {3.555413824884235*^9, 3.5554138507167187`*^9}, {3.555414215007444*^9, 3.5554142178886003`*^9}, { 3.555414250544238*^9, 3.555414250794327*^9}, {3.555414295496408*^9, 3.555414299875723*^9}, 3.555414404989056*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Derivatives", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499693461961193`*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"SimpleDeriv", "[", RowBox[{"v_", ",", " ", "x_"}], "]"}], " ", ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "i", "}"}], ",", "\[IndentingNewLine]", RowBox[{"GSimplify", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"D", "[", RowBox[{"v", ",", " ", RowBox[{"x", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{"Length", "[", "x", "]"}]}], "}"}]}], "]"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SimpleDerivt", "[", RowBox[{"v_", ",", " ", "x_"}], "]"}], " ", ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "i", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Dt", "[", RowBox[{"v", ",", " ", RowBox[{"x", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{"Length", "[", "x", "]"}]}], "}"}]}], "]"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"PD", "[", RowBox[{"v_", ",", "x_"}], "]"}], ":=", RowBox[{"SimpleDeriv", "[", RowBox[{"v", ",", "x"}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"LieD", "[", RowBox[{"v_", ",", " ", "T_", ",", " ", "x_", ",", " ", "ind_"}], "]"}], " ", ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "dv", " ", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dv", " ", "=", " ", RowBox[{"SimpleDeriv", "[", RowBox[{"v", ",", "x"}], "]"}]}], ";", "\[IndentingNewLine]", " ", RowBox[{"GSimplify", "[", RowBox[{ RowBox[{"v", ".", RowBox[{"SimpleDeriv", "[", RowBox[{"T", ",", " ", "x"}], "]"}]}], "\[IndentingNewLine]", "+", " ", "\[IndentingNewLine]", " ", RowBox[{"Sum", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"ind", "[", RowBox[{"[", "iind", "]"}], "]"}], "\[Equal]", " ", "1"}], ",", "\[IndentingNewLine]", RowBox[{"-", RowBox[{"IndexShift", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ "dv", ",", " ", "T", ",", " ", "1", ",", " ", "iind"}], "]"}], ",", " ", "1", ",", " ", RowBox[{"iind", "-", "1"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"IndexShift", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ "dv", ",", " ", "T", ",", " ", "2", ",", " ", "iind"}], "]"}], ",", " ", "1", ",", " ", RowBox[{"iind", "-", "1"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"iind", ",", " ", "1", ",", " ", RowBox[{"Length", "[", "ind", "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"LieCom", "[", RowBox[{"V1_", ",", " ", "V2_", ",", " ", "X_"}], "]"}], ":=", " ", RowBox[{"LieD", "[", RowBox[{"V1", ",", " ", "V2", ",", " ", "X", ",", " ", RowBox[{"{", "1", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CoD", "[", RowBox[{ "T_", ",", " ", "met_", ",", " ", "x_", ",", " ", "ind_", ",", " ", RowBox[{"\[Omega]dab_:", "ERROR"}]}], "]"}], " ", ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"\[CapitalGamma]", " ", ",", " ", "p1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[CapitalGamma]", " ", "=", " ", RowBox[{"Christoffel", "[", RowBox[{"met", ",", " ", "x"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"p1", " ", "=", " ", RowBox[{"SimpleDeriv", "[", RowBox[{"T", ",", " ", "x"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"GSimplify", "[", RowBox[{"p1", "+", "\[IndentingNewLine]", RowBox[{"Sum", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Switch", "[", RowBox[{ RowBox[{"ind", "[", RowBox[{"[", "iind", "]"}], "]"}], ",", "\[IndentingNewLine]", "1", ",", " ", RowBox[{"IndexShift", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ "\[CapitalGamma]", ",", " ", "T", ",", " ", "3", ",", " ", "iind"}], "]"}], ",", " ", "1", ",", " ", "iind"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"-", "1"}], ",", " ", RowBox[{"-", RowBox[{"IndexShift", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ "\[CapitalGamma]", ",", " ", "T", ",", " ", "1", ",", " ", "iind"}], "]"}], ",", " ", "2", ",", " ", RowBox[{"iind", "-", "1"}]}], "]"}]}], ",", "\[IndentingNewLine]", "2", ",", " ", RowBox[{"IndexShift", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ "\[Omega]dab", ",", " ", "T", ",", " ", "3", ",", " ", "iind"}], "]"}], ",", " ", "2", ",", " ", RowBox[{"iind", "-", "1"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"-", "2"}], ",", " ", RowBox[{"-", RowBox[{"IndexShift", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ "\[Omega]dab", ",", " ", "T", ",", " ", "2", ",", " ", "iind"}], "]"}], ",", " ", "2", ",", " ", RowBox[{"iind", "-", "1"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"iind", ",", " ", "1", ",", " ", RowBox[{"Length", "[", "ind", "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SpinorCoD", "[", RowBox[{ "\[Psi]_", ",", " ", "Gdd_", ",", " ", "X_", ",", " ", "\[Omega]dbb_", ",", " ", "\[Gamma]a_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "\[Gamma]aa", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Gamma]aa", " ", "=", " ", RowBox[{ FractionBox["1", "2"], RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ia", "]"}], "]"}], ".", RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ib", "]"}], "]"}]}], " ", "-", " ", RowBox[{ RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ib", "]"}], "]"}], ".", " ", RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ia", "]"}], "]"}]}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"SimpleDeriv", "[", RowBox[{"\[Psi]", ",", " ", "X"}], "]"}], " ", "+", RowBox[{"spinsign", FractionBox["1", "4"], RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", " ", RowBox[{ RowBox[{ RowBox[{"\[Omega]dbb", "[", RowBox[{"[", RowBox[{"iu", ",", "ia", ",", "ib"}], "]"}], "]"}], "*", RowBox[{"\[Gamma]aa", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iu", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], ".", "\[Psi]"}]}]}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SpinorCoDBar", "[", RowBox[{ "\[Psi]_", ",", " ", "Gdd_", ",", " ", "X_", ",", " ", "\[Omega]dbb_", ",", " ", "\[Gamma]a_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "\[Gamma]aa", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Gamma]aa", " ", "=", " ", RowBox[{ FractionBox["1", "2"], RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ia", "]"}], "]"}], ".", RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ib", "]"}], "]"}]}], " ", "-", " ", RowBox[{ RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ib", "]"}], "]"}], ".", " ", RowBox[{"\[Gamma]a", "[", RowBox[{"[", "ia", "]"}], "]"}]}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"SimpleDeriv", "[", RowBox[{"\[Psi]", ",", " ", "X"}], "]"}], " ", "-", RowBox[{ FractionBox["1", "4"], RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", " ", RowBox[{ RowBox[{ RowBox[{"\[Omega]dbb", "[", RowBox[{"[", RowBox[{"iu", ",", "ia", ",", "ib"}], "]"}], "]"}], "*", RowBox[{"(", RowBox[{"\[Psi]", ".", RowBox[{"\[Gamma]aa", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}]}], ")"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iu", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}]}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"KillingEquations", "[", RowBox[{"k_", ",", "met_", ",", "x_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "delk", "}"}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"delk", " ", "=", " ", RowBox[{"CoD", "[", RowBox[{"k", ",", "met", ",", "x", ",", " ", RowBox[{"{", RowBox[{"-", "1"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"delk", " ", "+", " ", RowBox[{"Transpose", "[", "delk", "]"}]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}]}]], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499693605220013`*^9}, {3.549969787348105*^9, 3.549969796622787*^9}, { 3.549974390920972*^9, 3.549974409044238*^9}, {3.568462717745167*^9, 3.568462754708879*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Tensor Parsing", "Section", CellChangeTimes->{{3.553341260157123*^9, 3.5533412666631002`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"BasisFormToTensor", "[", RowBox[{"dx_List", ",", " ", "dX_"}], "]"}], ":=", RowBox[{ RowBox[{"Length", "[", "dx", "]"}], "*", RowBox[{"antisymmetrize", "[", RowBox[{ RowBox[{ RowBox[{"Outer", "[", RowBox[{"Times", ",", " ", "##"}], "]"}], "&"}], "@@", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"OneFormToBasisVector", "[", RowBox[{"#", ",", " ", "dX"}], "]"}], "&"}], "/@", " ", "dx"}], ")"}]}], "]"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"OneFormToBasisVector", "[", RowBox[{"dx_", ",", " ", "dX_"}], "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"i", "==", RowBox[{ RowBox[{"Position", "[", RowBox[{"dX", ",", " ", "dx"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ",", "1", ",", "0"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{"Length", "[", "dX", "]"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Form", "[", RowBox[{"expr_", ",", " ", "X_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "rank", ",", " ", "p", ",", " ", "dX", ",", " ", "compo", ",", " ", "sig"}], "}"}], ",", "\n", "\t", RowBox[{ RowBox[{"dX", " ", "=", " ", RowBox[{"Differential", "[", "X", "]"}]}], ";", "\n", "\t", RowBox[{"p", " ", "=", " ", RowBox[{"Expand", "[", "expr", "]"}]}], ";", "\n", "\t", RowBox[{"If", "[", RowBox[{ RowBox[{"FreeQ", "[", RowBox[{"expr", ",", "Wedge"}], "]"}], ",", " ", RowBox[{"p", "=", RowBox[{"Wedge", "[", "p", "]"}]}]}], "]"}], ";", "\n", "\t", RowBox[{"rank", " ", "=", " ", RowBox[{"Union", "[", RowBox[{"Length", "/@", RowBox[{"Cases", "[", RowBox[{ RowBox[{"{", "p", "}"}], ",", " ", RowBox[{"Wedge", "[", "___", "]"}], ",", " ", "Infinity", ",", "Infinity", ",", " ", RowBox[{"Heads", "\[Rule]", "True"}]}], "]"}]}], "]"}]}], ";", "\n", "\n", "\t", RowBox[{"compo", " ", "=", " ", RowBox[{ RowBox[{"p", "//.", RowBox[{"{", "\n", "\t\t", RowBox[{ RowBox[{ RowBox[{"Wedge", "[", RowBox[{"d___", ",", " ", RowBox[{"c_", "+", "a_"}], ",", " ", "b___"}], "]"}], "\[RuleDelayed]", " ", RowBox[{ RowBox[{"Wedge", "[", RowBox[{"d", ",", "c", ",", "b"}], "]"}], " ", "+", " ", RowBox[{"Wedge", "[", RowBox[{"d", ",", "a", ",", "b"}], "]"}]}]}], ",", "\n", "\t\t", RowBox[{ RowBox[{"Wedge", "[", RowBox[{"d___", ",", " ", RowBox[{"c_", " ", "*", " ", "a_"}], ",", " ", "b___"}], "]"}], " ", "\[RuleDelayed]", " ", RowBox[{ RowBox[{"c", " ", RowBox[{"Wedge", "[", RowBox[{"d", ",", "a", ",", "b"}], "]"}]}], "/;", RowBox[{"And", "@@", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"FreeQ", "[", RowBox[{"c", ",", "#"}], "]"}], "&"}], "/@", "dX"}], ")"}]}]}]}], ",", "\n", "\t\t", RowBox[{ RowBox[{"Wedge", "[", RowBox[{"d___", ",", " ", "c_", " ", ",", " ", "b___"}], "]"}], " ", "\[RuleDelayed]", " ", RowBox[{ RowBox[{"c", " ", RowBox[{"Wedge", "[", RowBox[{"d", ",", "b"}], "]"}]}], "/;", RowBox[{"And", "@@", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"FreeQ", "[", RowBox[{"c", ",", "#"}], "]"}], "&"}], "/@", "dX"}], ")"}]}]}]}]}], "\n", "\t\t", "\n", "\t", "}"}]}], "/.", RowBox[{"{", RowBox[{ RowBox[{"Wedge", "[", RowBox[{"f__", "?", RowBox[{"(", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"dX", ",", "#"}], "]"}], "&"}], ")"}]}], "]"}], " ", "\[RuleDelayed]", " ", RowBox[{"BasisFormToTensor", "[", RowBox[{ RowBox[{"List", "[", "f", "]"}], ",", " ", "dX"}], "]"}]}], "}"}]}]}], ";", "\n", "\t", RowBox[{"sig", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"-", "1"}], ",", " ", RowBox[{"{", RowBox[{"ArrayDepth", "[", "compo", "]"}], "}"}]}], "]"}]}], ";", "\n", "\t", "compo"}]}], "\n", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.5533412845497103`*^9, 3.55334128484426*^9}, { 3.553341620946789*^9, 3.553341621053495*^9}, {3.5533418737264013`*^9, 3.5533418766805964`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Coordinate Changes", "Section", InitializationGroup->True, CellChangeTimes->{{3.54996937988428*^9, 3.549969387392282*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Options", "[", "ChangeCoords", "]"}], " ", "=", " ", RowBox[{"{", RowBox[{"Inverse", "\[Rule]", "False"}], "}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChangeCoords", "[", RowBox[{ "V_", ",", " ", "X1_", ",", " ", "X2_", ",", "trans_", ",", " ", "ind_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "jac", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"jac", " ", "=", " ", RowBox[{"TJacobian", "[", RowBox[{"X2", ",", " ", "X1", ",", " ", "trans"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{"jac", ".", "V"}], ")"}], "/.", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", "X2", ",", "trans"}], "]"}]}], "]"}]}]}], "]"}], "/;", RowBox[{"ind", "\[Equal]", RowBox[{"{", "1", "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChangeCoords", "[", RowBox[{ "V_", ",", " ", "X1_", ",", " ", "X2_", ",", "trans_", ",", " ", "ind_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "jac", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"jac", " ", "=", " ", RowBox[{"TJacobian", "[", RowBox[{"X1", ",", " ", "X2", ",", " ", "trans"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{"V", ".", "jac"}], ")"}], "/.", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", "X2", ",", "trans"}], "]"}]}], "]"}]}]}], "]"}], "/;", RowBox[{"ind", "\[Equal]", RowBox[{"{", RowBox[{"-", "1"}], "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChangeCoords", "[", RowBox[{ "g_", ",", " ", "X1_", ",", " ", "X2_", ",", " ", "trans_", ",", " ", "ind_", ",", RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], " ", ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "jac", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"jac", " ", "=", " ", RowBox[{"TJacobian", "[", RowBox[{"X1", ",", " ", "X2", ",", " ", "trans"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"S", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Transpose", "[", "jac", "]"}], ".", "g", ".", "jac"}], ")"}], "/.", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", "X2", ",", "trans"}], "]"}]}], "]"}]}]}], "]"}], "/;", RowBox[{"ind", "\[Equal]", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChangeCoords", "[", RowBox[{ "g_", ",", " ", "X1_", ",", " ", "X2_", ",", " ", "trans_", ",", " ", "ind_"}], "]"}], " ", ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "jac", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"jac", " ", "=", " ", RowBox[{ RowBox[{"TJacobian", "[", RowBox[{"X1", ",", " ", "X2", ",", " ", "trans"}], "]"}], "TESTING"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Contract", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Transpose", "[", "jac", "]"}], ".", "g", ".", "jac"}], ")"}], ",", " ", "jac", ",", " ", "2", ",", " ", "1"}], "]"}], "/.", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", "X2", ",", "trans"}], "]"}]}], "]"}]}]}], "]"}], "/;", RowBox[{"ind", "\[Equal]", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}], ",", " ", RowBox[{"-", "1"}]}], "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChangeCoords", "[", RowBox[{ "g_", ",", " ", "X1_", ",", " ", "X2_", ",", " ", "trans_", ",", " ", "ind_"}], "]"}], " ", ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "jac", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"jac", " ", "=", " ", RowBox[{"TJacobian", "[", RowBox[{"X2", ",", " ", "X1", ",", " ", "trans"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{"jac", ".", "g", ".", RowBox[{"Transpose", "[", "jac", "]"}]}], ")"}], "/.", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", "X2", ",", "trans"}], "]"}]}], "]"}]}]}], "]"}], "/;", RowBox[{"ind", "\[Equal]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChangeCoords", "[", RowBox[{ "g_", ",", " ", "X1_", ",", " ", "X2_", ",", " ", "trans_", ",", " ", "ind_"}], "]"}], " ", ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "jac", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"jac", " ", "=", " ", RowBox[{"TJacobian", "[", RowBox[{"X1", ",", " ", "X2", ",", " ", "trans"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Transpose", "[", "jac", "]"}], ".", "g", ".", RowBox[{"Inverse", "[", "jac", "]"}]}], ")"}], "/.", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", "X2", ",", "trans"}], "]"}]}], "]"}]}]}], "]"}], "/;", RowBox[{"ind", "\[Equal]", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TJacobian", "[", RowBox[{"X1_", ",", " ", "X2_", ",", " ", "trans_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"ru", ",", " ", "X1new", ",", "res"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ru", " ", "=", " ", RowBox[{"Trans2rules", "[", RowBox[{"X1", ",", " ", "X2", ",", " ", "trans"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"X1new", " ", "=", " ", RowBox[{"X1", "/.", "ru"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"SimpleDeriv", "[", " ", RowBox[{ RowBox[{"X1new", "[", RowBox[{"[", "ia", "]"}], "]"}], ",", " ", "X2"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"Length", "[", "X1", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", "res", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Trans2rules", "[", RowBox[{"X1_", ",", "X2_", ",", "trans_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"Solve", "[", RowBox[{"trans", ",", " ", "X1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Pullback", "[", RowBox[{"\[Omega]_", ",", " ", "X_", RowBox[{"(*", RowBox[{"big", " ", "space"}], "*)"}], ",", " ", "Y_", RowBox[{"(*", "hypersurface", "*)"}], ",", " ", "surf_", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "J", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"J", " ", "=", " ", RowBox[{"TJacobian", "[", RowBox[{"X", ",", " ", "Y", ",", " ", "surf"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"\[Omega]", "[", RowBox[{"[", RowBox[{"ia", ",", "ib", ",", "ic"}], "]"}], "]"}], RowBox[{"J", "[", RowBox[{"[", RowBox[{"ia", ",", "iap"}], "]"}], "]"}], RowBox[{"J", "[", RowBox[{"[", RowBox[{"ib", ",", "ibp"}], "]"}], "]"}], RowBox[{"J", "[", RowBox[{"[", RowBox[{"ic", ",", "icp"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iap", ",", " ", RowBox[{"Length", "[", "Y", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ibp", ",", " ", RowBox[{"Length", "[", "Y", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"icp", ",", " ", RowBox[{"Length", "[", "Y", "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", InitializationGroup->True, CellChangeTimes->{{3.560100613053314*^9, 3.560100654787607*^9}, { 3.560100694855609*^9, 3.56010072033937*^9}, {3.5601007577759733`*^9, 3.560100836197706*^9}, {3.5959458160105257`*^9, 3.595945816503553*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Physics Tensors", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.549969366101493*^9}, {3.549969612820792*^9, 3.549969613379129*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"3", "d", " ", "chern"}], "-", "simons"}], ",", " ", RowBox[{"1", "-", "form", "-", "valued"}], ",", " ", RowBox[{"d", "=", "3"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ChernSimons", "[", RowBox[{"w_", ",", " ", "X_"}], "]"}], ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "res", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"w", " ", "\[Wedge]", RowBox[{"exterior", "[", RowBox[{"w", ",", "X"}], "]"}]}], " ", "+", " ", RowBox[{ RowBox[{"2", "/", "3"}], " ", RowBox[{"w", "\[Wedge]", "w", "\[Wedge]", "w"}]}]}]}], " ", ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", "res", "]"}]}]}], "\[IndentingNewLine]", "]"}], "/;", RowBox[{ RowBox[{ RowBox[{"Length", "[", "X", "]"}], "\[Equal]", " ", "3"}], "&&", " ", RowBox[{ RowBox[{"Dimensions", "[", "w", "]"}], "\[Equal]", " ", RowBox[{"{", "3", "}"}]}]}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"3", "d", " ", "chern"}], "-", "simons"}], ",", " ", RowBox[{ RowBox[{"matrix", "-", "1", "-", "form", "-", RowBox[{"valued", ".", " ", "d"}]}], "=", "3"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ChernSimons", "[", RowBox[{"w_", ",", " ", "X_"}], "]"}], ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "res", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", " ", "=", " ", RowBox[{"TraceFirst", "[", RowBox[{ RowBox[{"w", " ", "\[Diamond]", RowBox[{"MatrixExterior", "[", RowBox[{"w", ",", "X"}], "]"}]}], " ", "+", " ", RowBox[{ RowBox[{"2", "/", "3"}], " ", RowBox[{"w", "\[Diamond]", "w", "\[Diamond]", "w"}]}]}], " ", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", "res", "]"}]}]}], "\[IndentingNewLine]", "]"}], "/;", RowBox[{ RowBox[{ RowBox[{"Length", "[", "X", "]"}], "\[Equal]", " ", "3"}], "&&", RowBox[{ RowBox[{"Dimensions", "[", "w", "]"}], " ", "\[NotEqual]", " ", RowBox[{"{", "3", "}"}]}]}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FieldStrength", "[", RowBox[{"A_", ",", " ", "X_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"SimpleDeriv", "[", RowBox[{"A", ",", "X"}], "]"}], "-", RowBox[{"Transpose", "[", RowBox[{"SimpleDeriv", "[", RowBox[{"A", ",", "X"}], "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"4", "d"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"MaxwellStressTensor", "[", RowBox[{"Fdd_", ",", " ", "Gdd_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "Guu", ",", " ", "res", ",", " ", "Fdu", ",", " ", "Fuu", ",", " ", "ND"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ND", " ", "=", " ", RowBox[{"Length", "[", "Gdd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Guu", " ", "=", " ", RowBox[{"IMetric", "[", "Gdd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Fdu", " ", "=", " ", RowBox[{ RowBox[{"Fdd", ".", "Guu"}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{"Fuu", " ", "=", " ", RowBox[{ RowBox[{"Guu", ".", "Fdu"}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{ FractionBox[ RowBox[{"-", "1"}], "4"], "Gdd", " ", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Fuu", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}], RowBox[{"Fdd", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "ND"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", " ", "ND"}], "}"}]}], "]"}]}], " ", "+", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Fdu", "[", RowBox[{"[", RowBox[{"iu", ",", "ig"}], "]"}], "]"}], " ", RowBox[{"Fdd", "[", RowBox[{"[", RowBox[{"iv", ",", "ig"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ig", ",", "ND"}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iu", ",", "ND"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"iv", ",", "ND"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", "res"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"3", "d"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CottonTensor", "[", RowBox[{"gdd_", ",", " ", "X_", ",", " ", RowBox[{"sig_:", "-", "1"}]}], "]"}], ":=", " ", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"assumes", " ", "epsilon_uv"}], " ", "=", " ", RowBox[{ RowBox[{"+", " ", "sqrt"}], RowBox[{"(", "g", ")"}]}]}], ";", " ", RowBox[{"3", "d"}]}], "*)"}], RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "Rdd", ",", " ", "Rcurve", ",", " ", "DdRdd", ",", " ", "DdRgdd", ",", " ", "paren", ",", " ", "res", ",", " ", "eddd", ",", " ", "guu"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"guu", " ", "=", " ", RowBox[{"IMetric", "[", "gdd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Rdd", " ", "=", " ", RowBox[{"Ricci", "[", RowBox[{"gdd", ",", "X"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Rcurve", " ", "=", " ", RowBox[{"SCurvature", "[", RowBox[{"gdd", ",", "X"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"DdRdd", " ", "=", " ", RowBox[{"CoD", "[", RowBox[{"Rdd", ",", " ", "gdd", ",", " ", "X", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"DdRgdd", " ", "=", " ", RowBox[{"CoD", "[", RowBox[{ RowBox[{"Rcurve", "*", "gdd"}], ",", " ", "gdd", ",", " ", "X", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"paren", " ", "=", " ", RowBox[{"DdRdd", " ", "-", " ", RowBox[{ FractionBox["1", "4"], "DdRgdd"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"eddd", " ", "=", " ", RowBox[{ SqrtBox[ RowBox[{"sig", "*", RowBox[{"Det", "[", "gdd", "]"}]}]], RowBox[{"Table", "[", RowBox[{ RowBox[{"Signature", "[", RowBox[{"{", RowBox[{"ia", ",", "ib", ",", "ic"}], "}"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", "3"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"eddd", "[", RowBox[{"[", RowBox[{"iu", ",", " ", "ibprime", ",", " ", "iaprime"}], "]"}], "]"}], RowBox[{"guu", "[", RowBox[{"[", RowBox[{"ia", ",", "iaprime"}], "]"}], "]"}], RowBox[{"guu", "[", RowBox[{"[", RowBox[{"ib", ",", "ibprime"}], "]"}], "]"}], RowBox[{"paren", "[", RowBox[{"[", RowBox[{"ia", ",", "iv", ",", "ib"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"iaprime", ",", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ibprime", ",", "3"}], "}"}]}], "]"}], ",", " ", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"iu", ",", " ", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"iv", ",", " ", "3"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"res", ",", RowBox[{"TimeConstraint", "\[Rule]", "1"}]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Disp", "[", "str_", "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"str", ",", " ", "\"\< = \>\"", ",", " ", RowBox[{"ToExpression", "[", "str", "]"}]}], "]"}]}], "]"}]}], ";"}]}]}]], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.549969466228401*^9}, 3.549969620745689*^9, {3.5499743739131308`*^9, 3.549974376450148*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Geometry extras", "Section", InitializationGroup->True, CellChangeTimes->{{3.549969552648477*^9, 3.549969562306404*^9}, { 3.549969752666059*^9, 3.549969753384502*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"GeodesicEquation", "[", RowBox[{"\[CapitalGamma]_", ",", " ", "X_", ",", " ", "\[Lambda]_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"res", ",", "v", ",", "x", ",", " ", "\[CapitalGamma]fix"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"X", "[", RowBox[{"[", "ia", "]"}], "]"}], "[", "\[Lambda]", "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"v", " ", "=", " ", RowBox[{"D", "[", RowBox[{"x", ",", "\[Lambda]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"\[CapitalGamma]fix", " ", "=", " ", RowBox[{"\[CapitalGamma]", "/.", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"X", "[", RowBox[{"[", "ia", "]"}], "]"}], "\[Rule]", RowBox[{ RowBox[{"X", "[", RowBox[{"[", "ia", "]"}], "]"}], "[", "\[Lambda]", "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "ia", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"\[Lambda]", ",", "2"}], "}"}]}], "]"}], " ", "+", " ", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"\[CapitalGamma]fix", "[", RowBox[{"[", RowBox[{"ia", ",", "ib", ",", "ic"}], "]"}], "]"}], RowBox[{"v", "[", RowBox[{"[", "ib", "]"}], "]"}], RowBox[{"v", "[", RowBox[{"[", "ic", "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], "//", "GSimplify"}]}], ";", "\[IndentingNewLine]", "res"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"InducedMetric", "[", RowBox[{"Gdd_", ",", " ", "coord_", ",", " ", "csign_", ",", " ", "X_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"nd", ",", "\[Gamma]dd"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"nd", " ", "=", " ", RowBox[{"UnitNormal", "[", RowBox[{"Gdd", ",", " ", "coord", ",", " ", "csign"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"\[Gamma]dd", " ", "=", RowBox[{"Gdd", " ", "-", " ", RowBox[{"Outer", "[", RowBox[{"Times", ",", " ", "nd", ",", "nd"}], "]"}]}]}], ";", "\[IndentingNewLine]", "\[Gamma]dd"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ExtrinsicCurvature", "[", RowBox[{ "Gdd_", ",", " ", "coord_", ",", " ", "csign_", ",", " ", "X_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "nd", ",", " ", "\[Gamma]dd", ",", " ", "delN", ",", " ", "delSym", ",", " ", "Kdd", ",", " ", "\[Gamma]ud"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"nd", " ", "=", " ", RowBox[{"UnitNormal", "[", RowBox[{"Gdd", ",", " ", "coord", ",", " ", "csign"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"\[Gamma]dd", " ", "=", RowBox[{"Gdd", " ", "-", " ", RowBox[{"Outer", "[", RowBox[{"Times", ",", " ", "nd", ",", "nd"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"\[Gamma]ud", " ", "=", " ", RowBox[{ RowBox[{"IMetric", "[", "Gdd", "]"}], ".", "\[Gamma]dd"}]}], ";", "\[IndentingNewLine]", RowBox[{"delN", " ", "=", " ", RowBox[{"CoD", "[", RowBox[{"nd", ",", " ", "Gdd", ",", " ", "X", ",", " ", RowBox[{"{", RowBox[{"-", "1"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"delN", " ", "=", " ", RowBox[{"Simplify", "[", RowBox[{"delN", ",", " ", RowBox[{"TimeConstraint", "\[Rule]", ".1"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"delSym", " ", "=", " ", RowBox[{ RowBox[{"1", "/", "2"}], RowBox[{"(", RowBox[{"delN", " ", "+", " ", RowBox[{"Transpose", "[", "delN", "]"}]}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Kdd", " ", "=", " ", RowBox[{"-", RowBox[{ RowBox[{"Transpose", "[", "\[Gamma]ud", "]"}], ".", "delSym", ".", "\[Gamma]ud"}]}]}], ";", "\[IndentingNewLine]", "Kdd"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"sgn", " ", "should", " ", "be"}], " ", "+", RowBox[{"1", " ", "for", " ", "spacelike", " ", "normal"}]}], ",", " ", RowBox[{ RowBox[{"-", "1"}], " ", "for", " ", "timelike", " ", RowBox[{"normal", ".", " ", "This"}], " ", "takes", " ", "surfaces", " ", "of", " ", "constant", " ", RowBox[{"X", "[", RowBox[{"[", "coord", "]"}], "]"}]}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"UnitNormal", "[", RowBox[{"met_", ",", " ", "coord_", ",", " ", "sgn_"}], "]"}], " ", ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"greatertemp", ",", " ", "greaterres"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"greatertemp", " ", "=", RowBox[{"sgn", "/", SqrtBox[ RowBox[{ RowBox[{ RowBox[{"IMetric", "[", "met", "]"}], "[", RowBox[{"[", RowBox[{"coord", ",", "coord"}], "]"}], "]"}], "*", "sgn"}]]}]}], ";", "\[IndentingNewLine]", RowBox[{"greaterres", " ", "=", " ", RowBox[{"Table", "[", RowBox[{"0", ",", " ", RowBox[{"{", RowBox[{"Length", "[", "met", "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"greaterres", "[", RowBox[{"[", "coord", "]"}], "]"}], " ", "=", " ", "greatertemp"}], ";", "\[IndentingNewLine]", RowBox[{"GSimplify", "[", "greaterres", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", InitializationGroup->True, CellChangeTimes->{{3.5499697486311703`*^9, 3.549969748975245*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Wedges", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.549969473805503*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Unprotect", "[", "NonCommutativeMultiply", "]"}], ";"}], "\n", RowBox[{ RowBox[{"NonCommutativeMultiply", "[", "tensors__", "]"}], ":=", RowBox[{ RowBox[{"Outer", "[", RowBox[{"Times", ",", "tensors"}], "]"}], "//", "Simplify"}]}], "\n", RowBox[{ RowBox[{ RowBox[{"Protect", "[", "NonCommutativeMultiply", "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"wedge", "[", "forms__", "]"}], ":=", RowBox[{ RowBox[{"Apply", "[", RowBox[{"Multinomial", ",", RowBox[{"Map", "[", RowBox[{"ArrayDepth", ",", RowBox[{"List", "[", "forms", "]"}]}], "]"}]}], "]"}], "*", RowBox[{"antisymmetrize", "[", RowBox[{"NonCommutativeMultiply", "[", "forms", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"exterior", "[", RowBox[{"form_", ",", " ", "X_"}], "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"ArrayDepth", "[", "form", "]"}], "+", "1"}], ")"}], " ", RowBox[{"antisymmetrize", "[", RowBox[{"SimpleDeriv", "[", RowBox[{"form", ",", "X"}], "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"exteriort", "[", RowBox[{"form_", ",", " ", "X_"}], "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"ArrayDepth", "[", "form", "]"}], "+", "1"}], ")"}], " ", RowBox[{"antisymmetrize", "[", RowBox[{"SimpleDerivt", "[", RowBox[{"form", ",", "X"}], "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Assumes", " ", "first", " ", "two", " ", "indices", " ", "are", " ", "rectangular", " ", "matrix"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"MatrixExterior", "[", RowBox[{"m_", ",", "X_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"res", ",", " ", "d"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"d", " ", "=", " ", RowBox[{"Dimensions", "[", "m", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"exterior", "[", RowBox[{ RowBox[{"m", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}], ",", "X"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"d", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", " ", RowBox[{"d", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", "res", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"MatrixExteriort", "[", RowBox[{"m_", ",", "X_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"res", ",", " ", "d"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"d", " ", "=", " ", RowBox[{"Dimensions", "[", "m", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"exteriort", "[", RowBox[{ RowBox[{"m", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}], ",", "X"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"d", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", " ", RowBox[{"d", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", "res", "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"MatrixWedge", "[", RowBox[{"w1_", ",", " ", "w2_"}], "]"}], " ", ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"res", ",", "d1", ",", " ", "d2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"d1", " ", "=", " ", RowBox[{"Dimensions", "[", "w1", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"d2", " ", "=", " ", RowBox[{"Dimensions", "[", "w2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Sum", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"w1", "[", RowBox[{"[", RowBox[{"ia", ",", "ib"}], "]"}], "]"}], "\[Wedge]", RowBox[{"w2", "[", RowBox[{"[", RowBox[{"ib", ",", " ", "ic"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"ib", ",", " ", RowBox[{"d1", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"d1", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", RowBox[{"d2", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", "res"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"MatrixWedge", "[", RowBox[{"a_", ",", "b_", ",", " ", "c__"}], "]"}], " ", ":=", " ", RowBox[{"MatrixWedge", "[", RowBox[{"a", ",", " ", RowBox[{"MatrixWedge", "[", RowBox[{"b", ",", "c"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"Wedge", "[", "forms__", "]"}], ":=", " ", RowBox[{"wedge", "[", "forms", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"Diamond", "[", "forms__", "]"}], ":=", " ", RowBox[{"MatrixWedge", "[", "forms", "]"}]}], ";"}], "*)"}]}]}], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.5499695488755693`*^9}, { 3.5499698181201057`*^9, 3.549969820354308*^9}, {3.5533414809852133`*^9, 3.5533414835268507`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Spinors", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.549969522755578*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"DiracGamma", "[", RowBox[{"rep_", ",", " ", RowBox[{"signtt_:", "-", "1"}]}], "]"}], ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"res", ",", " ", "ia"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", "}"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", "4"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}], " ", "=", " ", RowBox[{"DiagonalMatrix", "[", RowBox[{"{", RowBox[{"1", ",", "1", ",", RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "2", "]"}], "]"}], " ", "=", " ", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "1"}, {"0", "0", "1", "0"}, {"0", RowBox[{"-", "1"}], "0", "0"}, { RowBox[{"-", "1"}], "0", "0", "0"} }], "\[NoBreak]", ")"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "3", "]"}], "]"}], " ", "=", " ", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", RowBox[{"-", "I"}]}, {"0", "0", "I", "0"}, {"0", "I", "0", "0"}, { RowBox[{"-", "I"}], "0", "0", "0"} }], "\[NoBreak]", ")"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "4", "]"}], "]"}], " ", "=", " ", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "1", "0"}, {"0", "0", "0", RowBox[{"-", "1"}]}, { RowBox[{"-", "1"}], "0", "0", "0"}, {"0", "1", "0", "0"} }], "\[NoBreak]", ")"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"signtt", "\[Equal]", RowBox[{"-", "1"}]}], ",", " ", RowBox[{"res", " ", "=", " ", RowBox[{"I", " ", "res"}]}], ",", " ", RowBox[{"res", " ", "=", " ", "res"}]}], "]"}], ";", "\[IndentingNewLine]", "res"}]}], "\[IndentingNewLine]", "]"}], "/;", RowBox[{"rep", "\[Equal]", " ", "\"\\""}]}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"DiracGamma", "[", RowBox[{"rep_", ",", " ", RowBox[{"signtt_:", "-", "1"}]}], "]"}], ":=", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"res", ",", " ", "ia"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", " ", "=", " ", RowBox[{"DiracGamma", "[", RowBox[{"\"\\"", ",", "signtt"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}], " ", "=", " ", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "1", "0"}, {"0", "0", "0", "1"}, {"1", "0", "0", "0"}, {"0", "1", "0", "0"} }], "\[NoBreak]", ")"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"signtt", "\[Equal]", RowBox[{"-", "1"}]}], ",", " ", RowBox[{ RowBox[{"res", " ", "[", RowBox[{"[", "1", "]"}], "]"}], " ", "=", " ", RowBox[{"I", " ", RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], ",", " ", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}], "=", RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", "res"}]}], "\[IndentingNewLine]", "]"}], "/;", RowBox[{"rep", "\[Equal]", " ", "\"\\""}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"DiracGamma5", "[", RowBox[{"rep_", ",", " ", RowBox[{"signtt_:", "-", "1"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"gam", ",", " ", "res5"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"gam", " ", "=", " ", RowBox[{"DiracGamma", "[", RowBox[{"rep", ",", "signtt"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"res5", " ", "=", " ", RowBox[{"I", " ", "*", RowBox[{ RowBox[{"gam", "[", RowBox[{"[", "1", "]"}], "]"}], ".", RowBox[{"gam", "[", RowBox[{"[", "2", "]"}], "]"}], ".", RowBox[{"gam", "[", RowBox[{"[", "3", "]"}], "]"}], ".", RowBox[{"gam", "[", RowBox[{"[", "4", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", "res5"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"**", "**"}], "*", " ", "4", "d", " ", RowBox[{"SPINORS", "--"}], "this", " ", "looks", " ", "general", " ", "why", " ", "did", " ", "I", " ", "claim", " ", "4", "d", " ", RowBox[{"only", "?"}]}], " ", "**********)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SpinConnection", "::", "usage"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"SpinConnection", "[", RowBox[{"Gdd_", ",", "\[Eta]bb_", ",", " ", "Ebu_", ",", " ", "X_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "Guu", ",", " ", "\[Eta]aa", ",", " ", "Eau", ",", " ", "Eua", ",", " ", "Ead", ",", "DdEad", ",", " ", "Ebd", ",", " ", "Edb", ",", "DdEdb", ",", "term1", ",", " ", "term2", ",", " ", "term3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Guu", " ", "=", " ", RowBox[{"IMetric", "[", "Gdd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"\[Eta]aa", " ", "=", " ", RowBox[{"IMetric", "[", "\[Eta]bb", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Eau", " ", "=", " ", RowBox[{"\[Eta]aa", ".", "Ebu"}]}], ";", "\[IndentingNewLine]", RowBox[{"Eua", "=", " ", RowBox[{"Transpose", "[", "Eau", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Ead", " ", "=", " ", RowBox[{"\[Eta]aa", ".", "Ebu", ".", "Gdd"}]}], ";", "\[IndentingNewLine]", RowBox[{"DdEad", " ", "=", " ", RowBox[{"SimpleDeriv", "[", RowBox[{"Ead", ",", " ", "X"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Ebd", " ", "=", " ", RowBox[{"Ebu", ".", "Gdd"}]}], ";", "\[IndentingNewLine]", RowBox[{"Edb", " ", "=", " ", RowBox[{"Transpose", "[", "Ebd", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"DdEdb", " ", "=", " ", RowBox[{"SimpleDeriv", "[", RowBox[{"Edb", ",", "X"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"term1", " ", "=", " ", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", " ", RowBox[{ RowBox[{ RowBox[{"Eua", "[", RowBox[{"[", RowBox[{"iv", ",", " ", "ia"}], "]"}], "]"}], RowBox[{"(", RowBox[{ RowBox[{"DdEad", "[", RowBox[{"[", RowBox[{"iu", ",", "ib", ",", "iv"}], "]"}], "]"}], " ", "-", " ", RowBox[{"DdEad", "[", RowBox[{"[", RowBox[{"iv", ",", "ib", ",", "iu"}], "]"}], "]"}]}], ")"}]}], ",", " ", RowBox[{"{", RowBox[{"iv", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iu", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{"term2", " ", "=", " ", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"term1", "[", RowBox[{"[", RowBox[{"iu", ",", " ", "ib", ",", "ia"}], "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iu", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{"term3", " ", "=", " ", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", " ", RowBox[{ RowBox[{ RowBox[{"Eua", "[", RowBox[{"[", RowBox[{"ip", ",", "ia"}], "]"}], "]"}], RowBox[{"Eua", "[", RowBox[{"[", RowBox[{"is", ",", "ib"}], "]"}], "]"}], RowBox[{"(", RowBox[{ RowBox[{"DdEdb", "[", RowBox[{"[", RowBox[{"ip", ",", "is", ",", "ic"}], "]"}], "]"}], " ", "-", " ", RowBox[{"DdEdb", "[", RowBox[{"[", RowBox[{"is", ",", "ip", ",", "ic"}], "]"}], "]"}]}], ")"}], RowBox[{"Ead", "[", RowBox[{"[", RowBox[{"ic", ",", "iu"}], "]"}], "]"}]}], ",", " ", RowBox[{"{", RowBox[{"ip", ",", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"is", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ic", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"iu", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ib", ",", " ", RowBox[{"Length", "[", "X", "]"}]}], "}"}]}], "]"}]}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{"S", "[", RowBox[{"term1", " ", "-", " ", "term2", " ", "-", " ", "term3"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{"**", "**", " ", "END"}], " ", "4", "d", " ", "SPINORS"}], " ", "******)"}]}]}], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.5499695146508827`*^9}, { 3.549969580585025*^9, 3.549969585711115*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Wave equations", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.5499695146508827`*^9}, { 3.549969580585025*^9, 3.549969591315383*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"DAlembertian", "[", RowBox[{"f_", ",", " ", "met_", ",", " ", "X_", ",", " ", RowBox[{"sig_:", "-", "1"}]}], "]"}], ":=", " ", RowBox[{ RowBox[{"1", "/", SqrtBox[ RowBox[{"sig", " ", RowBox[{"Det", "[", "met", "]"}]}]]}], "*", " ", RowBox[{"Tr", "[", RowBox[{"SimpleDeriv", "[", RowBox[{ RowBox[{ SqrtBox[ RowBox[{"sig", " ", RowBox[{"Det", "[", "met", "]"}]}]], RowBox[{ RowBox[{"IMetric", "[", "met", "]"}], ".", RowBox[{"SimpleDeriv", "[", RowBox[{"f", ",", " ", "X"}], "]"}]}]}], ",", "X"}], "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"dCollect", "[", RowBox[{"expr_", ",", " ", "f_", ",", " ", "proc___"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tf", ",", "newf"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "f", "]"}], "==", "0"}], ",", " ", RowBox[{"tf", "=", RowBox[{"{", "f", "}"}]}], ",", " ", RowBox[{"tf", "=", " ", "f"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"newf", " ", "=", RowBox[{"Flatten", "[", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"tf", "[", RowBox[{"[", "ia", "]"}], "]"}], ",", " ", RowBox[{ RowBox[{"tf", "[", RowBox[{"[", "ia", "]"}], "]"}], "[", "__", "]"}], ",", " ", RowBox[{ RowBox[{ RowBox[{"Derivative", "[", "__", "]"}], "[", RowBox[{"tf", "[", RowBox[{"[", "ia", "]"}], "]"}], "]"}], "[", "__", "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"ia", ",", RowBox[{"Length", "[", "tf", "]"}]}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Collect", "[", RowBox[{"expr", ",", "newf", ",", "proc"}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ChangeDVar", "[", RowBox[{ "expr_", ",", " ", "r1_", ",", " ", "r2_", ",", " ", "trans12_"}], "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "dr2dr1", ",", " ", "rule12", ",", " ", "rule21", ",", "res", ",", " ", "opD"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rule21", " ", "=", " ", RowBox[{"Trans2rules", "[", RowBox[{"r2", ",", " ", "r1", ",", " ", "trans12"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rule12", " ", "=", " ", RowBox[{"Trans2rules", "[", RowBox[{"r1", ",", " ", "r2", ",", " ", "trans12"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dr2dr1", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"r2", "/.", "rule21"}], ",", " ", "r1"}], "]"}], "/.", "rule12"}], "//", "S"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"opD", "[", "f_", "]"}], ":=", RowBox[{"dr2dr1", "*", " ", RowBox[{"D", "[", RowBox[{"f", ",", "r2"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"expr", "/.", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Derivative", "[", "n_", "]"}], "[", "f_", "]"}], "[", "r1", "]"}], "\[RuleDelayed]", " ", RowBox[{"Nest", "[", RowBox[{"D2", ",", " ", RowBox[{"f", "[", "r2", "]"}], ",", " ", "n"}], "]"}]}]}], "/.", RowBox[{ RowBox[{"f_", "[", "r1", "]"}], "\[RuleDelayed]", " ", RowBox[{"f", "[", "r2", "]"}]}]}], "/.", "rule12"}], "/.", RowBox[{"D2", "\[Rule]", "opD"}]}], "//", "S"}]}], ";", "\[IndentingNewLine]", "res"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Op", "[", RowBox[{"\[Zeta]u_", ",", " ", "X_"}], "]"}], ":=", " ", RowBox[{"Function", "[", RowBox[{"\[Zeta]u", ".", RowBox[{"SimpleDeriv", "[", RowBox[{"#", ",", "X"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.5499695146508827`*^9}, { 3.549969580585025*^9, 3.549969631697516*^9}, {3.5559412239996967`*^9, 3.555941234709898*^9}, 3.5559412704544497`*^9}] }, Open ]], Cell[CellGroupData[{ Cell["TensorMath", "Section", CellChangeTimes->{{3.549971765474272*^9, 3.5499717724561462`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"TensorMath", "::", "invalidIndex"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TensorMath", "::", "invalidTensor"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TensorMath", "::", "indexMismatch"}], " ", "=", " ", "\"\\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"TensorMath", "::", "componentOrdering"}], " ", "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"TensorMath", "::", "generalError"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Get", " ", "info", " ", "on", " ", "upper", " ", "and", " ", "lower", " ", "indices", " ", "in", " ", "an", " ", "expression"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"IndexStructure", "[", "T__ComponentTensor", "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"alli", ",", " ", "upper", ",", " ", "lower"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"alli", " ", "=", " ", RowBox[{"Flatten", "[", RowBox[{"Cases", "[", RowBox[{ RowBox[{"List", "[", "T", "]"}], ",", " ", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"n_", ",", " ", "I_"}], "]"}], "\[RuleDelayed]", "I"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"upper", " ", "=", " ", RowBox[{"Cases", "[", RowBox[{"alli", ",", " ", "_Symbol"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"lower", " ", "=", " ", RowBox[{"-", RowBox[{"Cases", "[", RowBox[{"alli", ",", " ", RowBox[{"-", "_Symbol"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"upper", ",", " ", "lower", ",", " ", RowBox[{"alli", "/.", RowBox[{"{", RowBox[{ RowBox[{"-", "s_Symbol"}], "\[Rule]", "s"}], "}"}]}]}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "ComponentTensor", " ", "is", " ", "used", " ", "internally", " ", "to", " ", "add", " ", "together", " ", "tensor", " ", "expressions", " ", "with", " ", "labelled", " ", "indices"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"Format", "[", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"components_", ",", " ", "I_"}], "]"}], ",", " ", "StandardForm"}], "]"}], ":=", " ", RowBox[{"\"\<\"", " ", "<>", " ", RowBox[{"ToString", "[", "I", "]"}], " ", "<>", " ", "\"\<>\>\""}]}], ";"}], "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ComponentTensor", "/:", " ", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"C1_", ",", " ", "I1_"}], "]"}], "+", " ", RowBox[{"ComponentTensor", "[", RowBox[{"C2_", ",", " ", "I2_"}], "]"}]}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"MatchQ", "[", RowBox[{"I1", ",", " ", "I2"}], "]"}]}], ",", RowBox[{"Message", "[", RowBox[{ RowBox[{"TensorMath", "::", "componentOrdering"}], ",", " ", "I1", ",", " ", "I2"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"ComponentTensor", "[", " ", RowBox[{ RowBox[{"C1", "+", " ", "C2"}], ",", " ", "I1"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ComponentTensor", "/:", " ", RowBox[{"c_", "*", RowBox[{"ComponentTensor", "[", RowBox[{"C_", ",", " ", "I_"}], "]"}]}], ":=", RowBox[{"ComponentTensor", "[", RowBox[{ RowBox[{"c", "*", "C"}], ",", "I"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Attributes", "[", "TensorMath", "]"}], " ", "=", " ", RowBox[{"{", "HoldFirst", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TensorMath", "[", RowBox[{"expr_", ",", " ", RowBox[{"ifree_:", "Null"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "res", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"Hold", "[", "expr", "]"}], "/.", RowBox[{"Times", "\[Rule]", "TTimes"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"res", "/.", RowBox[{"{", RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"Part", "[", RowBox[{"a_", ",", "b__"}], "]"}], "]"}], "\[RuleDelayed]", RowBox[{"ComponentTensor", "[", RowBox[{ RowBox[{"Hold", "[", "a", "]"}], ",", " ", RowBox[{ RowBox[{"List", "[", "b", "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"TTimes", "[", RowBox[{ RowBox[{"-", "1"}], ",", "s_Symbol"}], "]"}], "\[Rule]", RowBox[{"-", "s"}]}], "}"}]}]}], "]"}]}], "}"}]}], "//", "ReleaseHold"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "res"}], "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Expand", " ", "and", " ", "factor", " ", "out", " ", "non"}], "-", "tensors"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{ RowBox[{"res", "//.", RowBox[{"t_TTimes", "\[RuleDelayed]", RowBox[{"Distribute", "[", "t", "]"}]}]}], "//.", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"TTimes", "[", RowBox[{"a___", ",", "b_", ",", " ", "c___"}], "]"}], "\[RuleDelayed]", " ", RowBox[{ RowBox[{"b", "*", RowBox[{"TTimes", "[", RowBox[{"a", ",", "c"}], "]"}]}], "/;", RowBox[{"FreeQ", "[", RowBox[{"b", ",", "ComponentTensor"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"TTimes", "[", "a_", "]"}], "\[RuleDelayed]", RowBox[{"a", "/;", RowBox[{"FreeQ", "[", RowBox[{"a", ",", "ComponentTensor"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"TTimes", "[", RowBox[{"a___", ",", RowBox[{"b_", "*", "c_"}], ",", "d___"}], "]"}], "\[RuleDelayed]", RowBox[{ RowBox[{"c", " ", RowBox[{"TTimes", "[", RowBox[{"a", ",", "b", ",", "d"}], "]"}]}], "/;", RowBox[{"FreeQ", "[", RowBox[{"c", ",", "ComponentTensor"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"TTimes", "[", "]"}], "\[RuleDelayed]", "1"}]}], "\[IndentingNewLine]", "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "res"}], "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"res", " ", "=", RowBox[{ RowBox[{ RowBox[{"res", "/.", RowBox[{"{", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"a_", ",", "b_"}], "]"}], "\[RuleDelayed]", RowBox[{"TTimes", "[", RowBox[{"ComponentTensor", "[", RowBox[{"a", ",", "b"}], "]"}], "]"}]}], "}"}]}], "//.", RowBox[{"{", RowBox[{ RowBox[{"TTimes", "[", RowBox[{"a___", ",", " ", RowBox[{"TTimes", "[", "y___", "]"}], ",", " ", "b___"}], "]"}], "\[RuleDelayed]", RowBox[{"TTimes", "[", RowBox[{"a", ",", "y", ",", "b"}], "]"}]}], "}"}]}], "//", "ReleaseHold"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "res"}], "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"res", "/.", RowBox[{"{", RowBox[{ RowBox[{"TTimes", "[", "T__", "]"}], "\[RuleDelayed]", RowBox[{"ComponentTensorMultiply", "[", RowBox[{ RowBox[{"{", "T", "}"}], ",", " ", "ifree"}], "]"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "res"}], "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"MatchQ", "[", RowBox[{ RowBox[{"Head", "[", "res", "]"}], ",", "ComponentTensor"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"Message", "[", RowBox[{ RowBox[{"TensorMath", "::", "generalError"}], ",", "res"}], "]"}], ";", RowBox[{"Return", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ComponentTensorMultiply", "[", RowBox[{ RowBox[{"{", "T__ComponentTensor", "}"}], ",", " ", "ifreeOrdered_"}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "tensors", ",", " ", "istruct", ",", " ", "idummy", ",", " ", "ifree", ",", " ", "i", ",", " ", "ilen", ",", " ", "badIndices", ",", " ", "res", ",", " ", "sumIters", ",", " ", "tableIters", ",", " ", "componentExpression", ",", " ", "indices", ",", " ", "masks", ",", " ", "it", ",", " ", "components", ",", " ", "matrixIndices", ",", " ", "ifreePositioned", ",", " ", "tempind"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"istruct", " ", "=", " ", RowBox[{"IndexStructure", "[", "T", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"idummy", " ", "=", " ", RowBox[{"Intersection", "[", RowBox[{ RowBox[{"istruct", "[", RowBox[{"[", "1", "]"}], "]"}], ",", " ", RowBox[{"istruct", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ifree", " ", "=", " ", RowBox[{"Select", "[", RowBox[{ RowBox[{"istruct", "[", RowBox[{"[", "3", "]"}], "]"}], ",", " ", RowBox[{ RowBox[{"!", RowBox[{"MemberQ", "[", RowBox[{"idummy", ",", " ", "#"}], "]"}]}], "&"}]}], "]"}]}], ";", " ", RowBox[{"(*", RowBox[{ "done", " ", "this", " ", "way", " ", "to", " ", "maintain", " ", "ordering"}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"if", " ", "explicit", " ", "ordering", " ", "specified"}], ",", " ", RowBox[{"use", " ", "it"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{ RowBox[{"Head", "[", "ifreeOrdered", "]"}], ",", "List"}], "]"}], ",", RowBox[{"ifree", " ", "=", " ", RowBox[{"Select", "[", RowBox[{ RowBox[{"ifreeOrdered", "/.", RowBox[{"{", RowBox[{ RowBox[{"-", "s_Symbol"}], "\[Rule]", "s"}], "}"}]}], ",", " ", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"ifree", ",", " ", "#"}], "]"}], "&"}]}], "]"}]}]}], "]"}], ";", " ", "\[IndentingNewLine]", RowBox[{"ifreePositioned", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"istruct", "[", RowBox[{"[", "1", "]"}], "]"}], ",", " ", "#"}], "]"}], ",", " ", "#", ",", " ", RowBox[{"-", "#"}]}], "]"}], "&"}], "/@", "ifree"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Make", " ", "sure", " ", "componentTensors", " ", "are", " ", "valid"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"badTensors", " ", "=", " ", RowBox[{"Cases", "[", RowBox[{ RowBox[{"{", "T", "}"}], ",", " ", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{ RowBox[{"t_", "?", RowBox[{"(", RowBox[{ RowBox[{"!", RowBox[{"MatchQ", "[", RowBox[{ RowBox[{"Head", "[", "#", "]"}], ",", "List"}], "]"}]}], "&"}], ")"}]}], ",", " ", "_"}], "]"}], "\[RuleDelayed]", "t"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "badTensors", "]"}], ">", "0"}], ",", " ", RowBox[{ RowBox[{"Message", "[", RowBox[{ RowBox[{"TensorMath", "::", "invalidTensor"}], ",", " ", RowBox[{"badTensors", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";", " ", RowBox[{"Return", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"badIndex", " ", "=", " ", RowBox[{"Cases", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{"ifree", ",", "idummy"}], "]"}], ",", " ", RowBox[{"Except", "[", "_Symbol", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "badIndex", "]"}], ">", "0"}], ",", " ", RowBox[{ RowBox[{"Message", "[", RowBox[{ RowBox[{"TensorMath", "::", "invalidIndex"}], ",", " ", RowBox[{"badIndex", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";", " ", RowBox[{"Return", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Dimensions", " ", "associated", " ", "to", " ", "each", " ", "index"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"ilen", " ", "=", " ", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{"Union", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "[", RowBox[{"[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}], "]"}], "&"}], "/@", "\[IndentingNewLine]", RowBox[{"Cases", "[", RowBox[{ RowBox[{"List", "[", "T", "]"}], ",", " ", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"c_", ",", " ", RowBox[{"iall", ":", RowBox[{"{", RowBox[{"ipre___", ",", " ", RowBox[{"i", "|", RowBox[{"-", "i"}]}], ",", " ", "ipost___"}], "}"}]}]}], "]"}], "\[RuleDelayed]", " ", RowBox[{"{", RowBox[{"c", ",", " ", RowBox[{ RowBox[{"Length", "[", RowBox[{"List", "[", "ipre", "]"}], "]"}], "+", "1"}]}], "}"}]}]}], "]"}]}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{"Join", "[", RowBox[{"idummy", ",", "ifree"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"badIndices", " ", "=", " ", RowBox[{"Cases", "[", RowBox[{"ilen", ",", " ", RowBox[{"{", RowBox[{"i_", ",", " ", RowBox[{"{", RowBox[{"len1_", ",", " ", "len2__"}], "}"}]}], "}"}], ",", " ", "Infinity", ",", " ", "1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "badIndices", "]"}], ">", "0"}], ",", RowBox[{ RowBox[{"Message", "[", RowBox[{ RowBox[{"TensorMath", "::", "indexMismatch"}], ",", " ", RowBox[{"badIndices", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ";", " ", RowBox[{"Return", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"re", "-", RowBox[{"format", " ", "ilen", " ", "to", " ", "simplify"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"ilen", " ", "=", " ", RowBox[{"ilen", "/.", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"i_", ",", " ", RowBox[{"{", "len_", "}"}]}], "}"}], "\[RuleDelayed]", " ", RowBox[{"{", RowBox[{"i", ",", "len"}], "}"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Wrapping", " ", RowBox[{"table", "/", "sum"}], " ", "indexes", " ", "in", " ", "tempind", " ", "prevents", " ", "accidents", " ", "if", " ", "the", " ", "components", " ", "depend", " ", "on", " ", "a", " ", "variable", " ", "of", " ", "the", " ", "same", " ", "name"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"sumIters", " ", "=", " ", RowBox[{ RowBox[{"Select", "[", RowBox[{"ilen", ",", " ", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"idummy", ",", " ", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "&"}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"{", RowBox[{"ii_Symbol", ",", " ", "ilen_"}], "}"}], "]"}], "\[RuleDelayed]", " ", RowBox[{"{", RowBox[{ RowBox[{"tempind", "[", "ii", "]"}], ",", " ", "ilen"}], "}"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"tableIters", " ", "=", " ", RowBox[{ RowBox[{"Select", "[", RowBox[{"ilen", ",", " ", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"ifree", ",", " ", RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "&"}]}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"HoldPattern", "[", RowBox[{"{", RowBox[{"ii_Symbol", ",", " ", "ilen_"}], "}"}], "]"}], "\[RuleDelayed]", " ", RowBox[{"{", RowBox[{ RowBox[{"tempind", "[", "ii", "]"}], ",", " ", "ilen"}], "}"}]}], "}"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"components", ",", " ", "matrixIndices"}], "}"}], " ", "=", " ", RowBox[{"Transpose", "[", RowBox[{"Cases", "[", RowBox[{ RowBox[{"List", "[", "T", "]"}], ",", " ", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"c_", ",", " ", "i_"}], "]"}], "\[RuleDelayed]", RowBox[{"{", RowBox[{"c", ",", RowBox[{"tempind", "/@", RowBox[{"(", RowBox[{"i", "/.", RowBox[{"{", RowBox[{ RowBox[{"-", "s_Symbol"}], "\[Rule]", "s"}], "}"}]}], ")"}]}]}], "}"}]}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"The", " ", "actual", " ", "component", " ", "computation"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"res", " ", "=", " ", RowBox[{"Timing", "[", RowBox[{"Switch", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Length", "[", "idummy", "]"}], ">", "0"}], ",", RowBox[{ RowBox[{"Length", "[", "ifree", "]"}], ">", "0"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"True", ",", " ", "True"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"Product", "[", RowBox[{ RowBox[{ RowBox[{"components", "[", RowBox[{"[", "it", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"Sequence", "@@", RowBox[{"matrixIndices", "[", RowBox[{"[", "it", "]"}], "]"}]}], "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"it", ",", RowBox[{"Length", "[", "components", "]"}]}], "}"}]}], "]"}], ",", " ", "##"}], "]"}], "&"}], "@@", "sumIters"}], ",", " ", "##"}], "]"}], "&"}], "@@", "tableIters"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"True", ",", " ", "False"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"Product", "[", RowBox[{ RowBox[{ RowBox[{"components", "[", RowBox[{"[", "it", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"Sequence", "@@", RowBox[{"matrixIndices", "[", RowBox[{"[", "it", "]"}], "]"}]}], "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"it", ",", RowBox[{"Length", "[", "components", "]"}]}], "}"}]}], "]"}], ",", " ", "##"}], "]"}], "&"}], "@@", "sumIters"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"False", ",", " ", "True"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Product", "[", RowBox[{ RowBox[{ RowBox[{"components", "[", RowBox[{"[", "it", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"Sequence", "@@", RowBox[{"matrixIndices", "[", RowBox[{"[", "it", "]"}], "]"}]}], "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"it", ",", RowBox[{"Length", "[", "components", "]"}]}], "}"}]}], "]"}], ",", " ", "##"}], "]"}], "&"}], "@@", "tableIters"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"False", ",", "False"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ "Print", "[", "\"\\"", "]"}]}], "\[IndentingNewLine]", "]"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "idummy"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "ifree"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "ifreePositioned"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "ilen"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", " ", ",", " ", "sumIters"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", " ", ",", " ", "tableIters"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "matrixIndices"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "components"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"Length", "[", "components", "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\< RES = \>\"", ",", " ", "res"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"res", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"List", "[", "T", "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"Cases", "[", RowBox[{ RowBox[{"List", "[", "T", "]"}], ",", " ", RowBox[{ RowBox[{"ComponentTensor", "[", RowBox[{"c_", ",", " ", RowBox[{"iall", ":", RowBox[{"{", RowBox[{"ipre___", ",", " ", RowBox[{"a", "|", RowBox[{"-", "a"}]}], ",", " ", "ipost___"}], "}"}]}]}], "]"}], "\[RuleDelayed]", " ", RowBox[{"{", RowBox[{"c", ",", " ", RowBox[{ RowBox[{"Length", "[", RowBox[{"List", "[", "ipre", "]"}], "]"}], "+", "1"}]}], "}"}]}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"Product", "[", RowBox[{ RowBox[{ RowBox[{"components", "[", RowBox[{"[", "it", "]"}], "]"}], "[", RowBox[{"[", RowBox[{"Sequence", "@@", RowBox[{"matrixIndices", "[", RowBox[{"[", "it", "]"}], "]"}]}], "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"it", ",", RowBox[{"Length", "[", "components", "]"}]}], "}"}]}], "]"}]}], "]"}], ";"}], " ", "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{"ComponentTensor", "[", RowBox[{ RowBox[{"res", "[", RowBox[{"[", "2", "]"}], "]"}], ",", " ", "ifreePositioned"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.549972379808721*^9, 3.549972497850471*^9}, { 3.549972534903081*^9, 3.5499729333812923`*^9}, {3.5499729741856956`*^9, 3.54997311769804*^9}, {3.549973149486033*^9, 3.5499732664491568`*^9}, { 3.549973318160234*^9, 3.5499735080407257`*^9}, {3.54997361518369*^9, 3.549973633694174*^9}, {3.5499736914581842`*^9, 3.5499736930391083`*^9}, { 3.549973737566648*^9, 3.5499738751787777`*^9}, {3.549974088755474*^9, 3.549974089221921*^9}, {3.5533423406599197`*^9, 3.553342385854581*^9}, { 3.553342425738635*^9, 3.553342487002399*^9}, {3.553342525285603*^9, 3.553342557923971*^9}, {3.5533427098582582`*^9, 3.553342712871974*^9}, { 3.553342818162218*^9, 3.553342848064391*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Cleanup", "Section", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.5499695146508827`*^9}, { 3.549969580585025*^9, 3.549969602957489*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"EndPackage", "[", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ "Print", "[", "\"\\"", "]"}], ";"}]}]}]], "Input", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974750066875*^9, 3.397475086171875*^9}, { 3.397475117765625*^9, 3.397475152203125*^9}, {3.397475778609375*^9, 3.39747578184375*^9}, {3.39747594065625*^9, 3.397475945328125*^9}, { 3.3974788134375*^9, 3.39747881678125*^9}, {3.397479535734375*^9, 3.397479559625*^9}, {3.397479643375*^9, 3.397479747390625*^9}, { 3.397480363265625*^9, 3.397480415078125*^9}, {3.39748218740625*^9, 3.397482193578125*^9}, {3.397482274953125*^9, 3.3974822806875*^9}, { 3.3974826929375*^9, 3.39748273353125*^9}, {3.397487671984375*^9, 3.39748768228125*^9}, 3.3974877419375*^9, {3.397487863703125*^9, 3.39748786475*^9}, {3.397487900609375*^9, 3.397487909109375*^9}, { 3.397487945953125*^9, 3.3974879474375*^9}, 3.397487994265625*^9, { 3.39748805334375*^9, 3.397488054453125*^9}, {3.397559344578125*^9, 3.397559391859375*^9}, {3.397559432140625*^9, 3.397559517921875*^9}, { 3.39755966828125*^9, 3.39755967003125*^9}, {3.39755973215625*^9, 3.397559759859375*^9}, {3.3975597913125*^9, 3.39755984146875*^9}, { 3.39755994578125*^9, 3.397560003765625*^9}, {3.397560127453125*^9, 3.397560150109375*^9}, {3.397560213015625*^9, 3.397560223765625*^9}, { 3.397560385875*^9, 3.397560553921875*^9}, {3.397560616765625*^9, 3.397560628171875*^9}, {3.397560994921875*^9, 3.397561018515625*^9}, { 3.397561054*^9, 3.397561061328125*^9}, {3.397561656453125*^9, 3.397561702484375*^9}, {3.39756174890625*^9, 3.39756185459375*^9}, { 3.397561888703125*^9, 3.3975619228125*^9}, {3.397562743*^9, 3.3975627465625*^9}, {3.397571558546875*^9, 3.397571558953125*^9}, { 3.397571667703125*^9, 3.3975717684375*^9}, {3.397571846921875*^9, 3.39757193653125*^9}, {3.39757203365625*^9, 3.397572068484375*^9}, 3.397572121296875*^9, {3.39757245303125*^9, 3.397572468515625*^9}, { 3.399397127625*^9, 3.3993971628125*^9}, {3.399397449109375*^9, 3.399397489796875*^9}, {3.399402383828125*^9, 3.3994023998125*^9}, { 3.40458356153125*^9, 3.40458357728125*^9}, {3.4045844266875*^9, 3.404584446765625*^9}, {3.404592498515625*^9, 3.40459250025*^9}, { 3.4111460085625*^9, 3.4111461045625*^9}, {3.414338278984375*^9, 3.414338346578125*^9}, {3.414338640828125*^9, 3.414338653890625*^9}, { 3.414339744515625*^9, 3.41433986859375*^9}, {3.41433996359375*^9, 3.41433998559375*^9}, {3.414340820265625*^9, 3.41434083028125*^9}, { 3.414340952859375*^9, 3.414340961671875*^9}, {3.41434123203125*^9, 3.41434124840625*^9}, {3.41434131775*^9, 3.4143413435*^9}, { 3.414342041296875*^9, 3.414342041421875*^9}, {3.414342225296875*^9, 3.414342369234375*^9}, {3.4143424056875*^9, 3.41434244721875*^9}, { 3.414342530125*^9, 3.4143425346875*^9}, {3.414342622546875*^9, 3.414342622890625*^9}, {3.41434500309375*^9, 3.41434500371875*^9}, { 3.414345218125*^9, 3.41434537221875*^9}, {3.41434803946875*^9, 3.414348043875*^9}, {3.414348123*^9, 3.414348132921875*^9}, { 3.414513255703125*^9, 3.4145132825625*^9}, {3.414513378578125*^9, 3.414513383171875*^9}, 3.41555056315625*^9, {3.415550598765625*^9, 3.4155506431875*^9}, {3.41555113909375*^9, 3.415551157328125*^9}, { 3.415551445671875*^9, 3.41555144840625*^9}, {3.4155520286875*^9, 3.415552070078125*^9}, {3.41753886528125*^9, 3.41753892896875*^9}, { 3.417772863984375*^9, 3.4177728674375*^9}, {3.419349866140625*^9, 3.4193498719375*^9}, {3.4193500955625*^9, 3.41935010125*^9}, { 3.419350267234375*^9, 3.41935026940625*^9}, {3.421162646828125*^9, 3.421162647140625*^9}, {3.4216916222528267`*^9, 3.4216916229872017`*^9}, { 3.4216917129090767`*^9, 3.4216917919403267`*^9}, {3.42176698994*^9, 3.42176700128375*^9}, 3.421772217768125*^9, {3.421779544424375*^9, 3.421779547486875*^9}, {3.422033749421875*^9, 3.4220337565625*^9}, 3.422033809984375*^9, {3.422114842171875*^9, 3.422114845953125*^9}, { 3.422194260171875*^9, 3.422194267546875*^9}, {3.4228920174514685`*^9, 3.4228920302170935`*^9}, {3.425815538609375*^9, 3.425815561734375*^9}, { 3.425815679*^9, 3.425815689625*^9}, {3.425815771203125*^9, 3.4258157755625*^9}, {3.42581601871875*^9, 3.42581605290625*^9}, 3.425816512140625*^9, {3.42814472884375*^9, 3.428144789015625*^9}, { 3.4281450834375*^9, 3.4281450929375*^9}, {3.42814517734375*^9, 3.428145219671875*^9}, {3.428145835234375*^9, 3.42814587396875*^9}, { 3.428145921625*^9, 3.428145925015625*^9}, {3.428147212484375*^9, 3.428147240171875*^9}, {3.42815982525*^9, 3.428159829609375*^9}, { 3.42816000946875*^9, 3.428160009578125*^9}, 3.428161503*^9, { 3.43050076126975*^9, 3.43050077833225*^9}, {3.430500840972875*^9, 3.4305008467385*^9}, {3.43185654953125*^9, 3.4318565505625*^9}, { 3.433153897015625*^9, 3.433153912953125*^9}, {3.43523370396875*^9, 3.4352337618125*^9}, {3.435402380859375*^9, 3.435402387828125*^9}, { 3.435402454953125*^9, 3.435402466109375*^9}, {3.435407648578125*^9, 3.435407731953125*^9}, {3.435407778640625*^9, 3.435407846078125*^9}, { 3.4354095803125*^9, 3.435409585671875*^9}, 3.435519725125*^9, { 3.441116393546875*^9, 3.441116414046875*^9}, {3.441908874625*^9, 3.441909052859375*^9}, {3.441909104015625*^9, 3.441909152109375*^9}, { 3.44190988921875*^9, 3.44190995003125*^9}, {3.441910010921875*^9, 3.441910012609375*^9}, {3.44518616461975*^9, 3.4451862249635*^9}, { 3.445186257760375*^9, 3.445186462291625*^9}, {3.44518650924475*^9, 3.44518651243225*^9}, {3.445193429604125*^9, 3.44519346286975*^9}, { 3.445963596046875*^9, 3.44596361921875*^9}, {3.447525574171875*^9, 3.44752559215625*^9}, {3.449236971359375*^9, 3.449236977984375*^9}, { 3.44983659878125*^9, 3.449836647015625*^9}, {3.449836869859375*^9, 3.449836874609375*^9}, {3.45061604125*^9, 3.450616050015625*^9}, { 3.451650826625*^9, 3.451650857828125*^9}, {3.45865612990625*^9, 3.458656293859375*^9}, {3.458656324484375*^9, 3.458656386640625*^9}, { 3.45865643215625*^9, 3.4586565325625*^9}, {3.458656564125*^9, 3.45865661109375*^9}, {3.458656648375*^9, 3.45865702684375*^9}, { 3.458657266828125*^9, 3.458657274625*^9}, {3.458657372890625*^9, 3.458657425765625*^9}, {3.458659342625*^9, 3.45865936334375*^9}, { 3.45865951428125*^9, 3.458659526125*^9}, {3.45865958103125*^9, 3.458659586921875*^9}, {3.45865966765625*^9, 3.458659683734375*^9}, { 3.458659968078125*^9, 3.458660041703125*^9}, {3.458660137078125*^9, 3.458660153890625*^9}, {3.4586604710625*^9, 3.458660474640625*^9}, { 3.45866083375*^9, 3.45866083846875*^9}, {3.45866119434375*^9, 3.458661227484375*^9}, {3.45866125753125*^9, 3.45866126746875*^9}, { 3.45892283371875*^9, 3.45892283403125*^9}, {3.46143150353125*^9, 3.46143150928125*^9}, {3.461433489671875*^9, 3.46143348978125*^9}, { 3.46564921246875*^9, 3.4656492239375*^9}, {3.465649265484375*^9, 3.4656492696875*^9}, {3.465653652296875*^9, 3.4656536598125*^9}, { 3.4662462966875*^9, 3.466246390484375*^9}, {3.46624654490625*^9, 3.466246712546875*^9}, {3.4662468295*^9, 3.46624683396875*^9}, { 3.466246873484375*^9, 3.46624689021875*^9}, {3.466246929453125*^9, 3.46624696590625*^9}, {3.46624703134375*^9, 3.466247124875*^9}, 3.47343170402859*^9, 3.4734317544944763`*^9, {3.47344094179196*^9, 3.473440943039031*^9}, {3.4754971874883585`*^9, 3.475497192964672*^9}, { 3.47904902641434*^9, 3.4790490281344385`*^9}, {3.4791231481812997`*^9, 3.4791231486313066`*^9}, {3.4798105125021925`*^9, 3.4798105133032384`*^9}, {3.4888061479259996`*^9, 3.488806152744275*^9}, { 3.488806216616929*^9, 3.4888062317837963`*^9}, {3.488806274367232*^9, 3.4888064409397593`*^9}, {3.4888065903993077`*^9, 3.4888065905073137`*^9}, {3.4888066742751055`*^9, 3.4888068144331217`*^9}, {3.4888068476820235`*^9, 3.4888069312178016`*^9}, {3.488887859753643*^9, 3.4888878940436044`*^9}, { 3.4888901134075446`*^9, 3.4888901211179857`*^9}, {3.4897534910838213`*^9, 3.489753491217829*^9}, {3.4897546879582787`*^9, 3.4897546893183565`*^9}, { 3.497027660107499*^9, 3.497027660516945*^9}, 3.498325871722569*^9, { 3.5490155672937307`*^9, 3.549015571139689*^9}, 3.549015671985948*^9, { 3.549016123310104*^9, 3.5490161264537687`*^9}, {3.5499059111410427`*^9, 3.549905928819941*^9}, 3.5499062937734957`*^9, 3.54990761076158*^9, 3.549907675497808*^9, {3.549907743752928*^9, 3.549907751955635*^9}, { 3.5499078239937983`*^9, 3.549907824579949*^9}, 3.549907868045867*^9, { 3.54996876868449*^9, 3.54996880252323*^9}, {3.549968938507649*^9, 3.549968973195475*^9}, {3.549969009892331*^9, 3.5499690161287613`*^9}, { 3.5499690688922377`*^9, 3.549969239439465*^9}, {3.549969307000939*^9, 3.5499694674989433`*^9}, {3.549969505740037*^9, 3.5499695146508827`*^9}, { 3.549969580585025*^9, 3.549969597525885*^9}, {3.5499742974198236`*^9, 3.54997429859764*^9}}], Cell[BoxData["\<\"GREATER`\"\>"], "Output", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974751575*^9, 3.39747515809375*^9}, { 3.41434262928125*^9, 3.414342629390625*^9}, {3.4143453748125*^9, 3.4143453749375*^9}, {3.414348142234375*^9, 3.41434814234375*^9}, { 3.414513285890625*^9, 3.414513286*^9}, 3.41451338615625*^9, 3.4155520550625*^9, {3.4175389325625*^9, 3.417538932859375*^9}, { 3.425816516375*^9, 3.425816516578125*^9}}], Cell[CellGroupData[{ Cell[BoxData["\<\"GREAT functions are: IMetric, Christoffel,\\n Riemann, \ Ricci, SCurvature, EinsteinTensor, SqRicci, SqRiemann.\"\>"], "Print", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.397475158*^9, 3.397475158125*^9}, {3.414342629296875*^9, 3.414342629390625*^9}, {3.414345374828125*^9, 3.414345374953125*^9}, { 3.41434814225*^9, 3.41434814234375*^9}, {3.41451328590625*^9, 3.414513286015625*^9}, 3.414513386171875*^9, 3.41555205509375*^9, { 3.417538932671875*^9, 3.417538932890625*^9}, {3.42581651640625*^9, 3.425816516609375*^9}}], Cell[BoxData["\<\"Enter 'helpGREAT' for this list of functions\"\>"], "Print", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.397475158*^9, 3.397475158125*^9}, {3.414342629296875*^9, 3.414342629390625*^9}, {3.414345374828125*^9, 3.414345374953125*^9}, { 3.41434814225*^9, 3.41434814234375*^9}, {3.41451328590625*^9, 3.414513286015625*^9}, 3.414513386171875*^9, 3.41555205509375*^9, { 3.417538932671875*^9, 3.417538932890625*^9}, {3.42581651640625*^9, 3.425816516640625*^9}}] }, Open ]], Cell[BoxData["\<\"ds2met[ds2,dx] convert \\!\\(\\*SuperscriptBox[\\(ds\\), \ \\(2\\)]\\) expression to \\!\\(\\*SubscriptBox[\\(g\\), \\(\[Mu]\[Nu]\\)]\\) \ matrix.\"\>"], "Output", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.3974751575*^9, 3.39747515809375*^9}, { 3.41434262928125*^9, 3.414342629390625*^9}, {3.4143453748125*^9, 3.4143453749375*^9}, {3.414348142234375*^9, 3.41434814234375*^9}, { 3.414513285890625*^9, 3.414513286*^9}, 3.41451338615625*^9, 3.4155520550625*^9, {3.4175389325625*^9, 3.417538932859375*^9}, { 3.425816516375*^9, 3.42581651665625*^9}}], Cell[BoxData["\<\"GREATER has been loaded. Functions = antisymmetrize, CoD, \ Contract, ds2met, Epsilon, KillingEquations, SimpleDeriv, LieD, ChangeCoords, \ DAlembertian , FieldStrength, IndexShift, symmetrize, TJacobian, Trans2rules, \ SelfContract\"\>"], "Print", InitializationCell->True, InitializationGroup->True, CellChangeTimes->{{3.397475158*^9, 3.397475158125*^9}, {3.414342629296875*^9, 3.414342629390625*^9}, {3.414345374828125*^9, 3.414345374953125*^9}, { 3.41434814225*^9, 3.41434814234375*^9}, {3.41451328590625*^9, 3.414513286015625*^9}, 3.414513386171875*^9, 3.41555205509375*^9, { 3.417538932671875*^9, 3.417538932890625*^9}, {3.42581651640625*^9, 3.425816516671875*^9}}] }, Open ]] }, Open ]] }, Open ]] }, AutoGeneratedPackage->Automatic, WindowSize->{1127, 1282}, WindowMargins->{{Automatic, 411}, {Automatic, 43}}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, FrontEndVersion->"9.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (January 25, \ 2013)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 206, 7, 148, "Title", InitializationCell->True, InitializationGroup->True], Cell[776, 31, 216, 5, 30, "Text", InitializationCell->True, InitializationGroup->True], Cell[995, 38, 9614, 145, 199, "Input", InitializationCell->True, InitializationGroup->True], Cell[10612, 185, 100, 2, 46, "Input", InitializationGroup->True], Cell[CellGroupData[{ Cell[10737, 191, 107, 1, 80, "Section"], Cell[10847, 194, 728, 22, 80, "Input"], Cell[11578, 218, 505, 13, 63, "Input"], Cell[12086, 233, 2464, 81, 89, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[14587, 319, 8659, 124, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[23249, 445, 24566, 522, 1865, "Input", InitializationCell->True, InitializationGroup->True], Cell[47818, 969, 217, 3, 46, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[48072, 977, 8712, 128, 115, "Section", InitializationCell->True, InitializationGroup->True], Cell[56787, 1107, 18121, 377, 851, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[74945, 1489, 8765, 126, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[83713, 1617, 34349, 773, 2101, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[118099, 2395, 8760, 126, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[126862, 2523, 21769, 447, 1109, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[148668, 2975, 101, 1, 80, "Section"], Cell[148772, 2978, 5076, 135, 301, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[153885, 3118, 130, 2, 80, "Section", InitializationGroup->True], Cell[154018, 3122, 9933, 278, 573, "Input", InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[163988, 3405, 8808, 126, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[172799, 3533, 18954, 389, 841, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[191790, 3927, 177, 3, 80, "Section", InitializationGroup->True], Cell[191970, 3932, 7245, 189, 561, "Input", InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[199252, 4126, 8753, 126, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[208008, 4254, 15276, 305, 556, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[223321, 4564, 8802, 126, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[232126, 4692, 20497, 423, 1104, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[252660, 5120, 8861, 127, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[261524, 5249, 13699, 257, 371, "Input", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[CellGroupData[{ Cell[275260, 5511, 97, 1, 80, "Section"], Cell[275360, 5514, 29042, 718, 1952, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[304439, 6237, 8854, 127, 80, "Section", InitializationCell->True, InitializationGroup->True], Cell[CellGroupData[{ Cell[313318, 6368, 9486, 140, 131, "Input", InitializationCell->True, InitializationGroup->True], Cell[322807, 6510, 478, 8, 28, "Output", InitializationCell->True, InitializationGroup->True], Cell[CellGroupData[{ Cell[323310, 6522, 590, 9, 38, "Print", InitializationCell->True, InitializationGroup->True], Cell[323903, 6533, 522, 8, 22, "Print", InitializationCell->True, InitializationGroup->True] }, Open ]], Cell[324440, 6544, 615, 10, 34, "Output", InitializationCell->True, InitializationGroup->True], Cell[325058, 6556, 710, 11, 38, "Print", InitializationCell->True, InitializationGroup->True] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)