Definitions

Extensive M

RsOverM[f_,α_,V0_][m_]:=((-(1-(m^2)))/(2(((f[1]-(1-(m^2))f'[1]))^2)))(α (V0^2)f'[1]+(2-α)f[1](((f[1])/(1-(m^2)))-f'[1])-α √(((4(V0^2))/α)f[1]f'[1](((f[1])/(1-(m^2)))-f'[1])+((((((f[1])^2)/(1-(m^2)))-((V0^2)+f[1])f'[1]))^2)))
𝒮χ[f_,α_,V0_][m_]:=-(α/2)(Log[1-((f[1])/(f'[1]))((1+1/RsOverM[f,α,V0][m])/(1-(m^2)))]+((V0^2)/(f[1]))(((1-((f'[1])/(f[1]))((1-(m^2))/(1+1/RsOverM[f,α,V0][m]))))^(-1)))+(1/2)Log[((-1)/(RsOverM[f,α,V0][m]))]

𝒮χ2m0[f_,α_,V0_]:=Re[𝒮χ[f,α,V0][0]]

Plot[{𝒮χ2m0[fp[2],1/4,V0],Re[𝒮χ[fp[2],1/4,V0][0]],𝒮𝒩[fp[2],1/4,V0][0]},{V0,1.86,1.87}]

𝒮𝒩s[f_,α_,V0_][m_]:=(1/2)(1-α)Log[((f''[1](1-(m^2)))/(f'[1](1-α)))]-(1/2)α Log[((α f'[1](V0^2))/((1-(m^2))(f''[1]f[1]+((f'[1])^2))-f[1]f'[1]))]-(1/2)α(1+(((V0^2)(f''[1](1-(m^2))-f'[1]))/((1-(m^2))(f''[1]f[1]+((f'[1])^2))-f[1]f'[1])))

mc[f_,α_,V0_]:=√(1-((2(1-α)f[1]f'[1])/((2-α)f[1]f''[1]+2(1-α)((f'[1])^2)-(Sqrt[α f''[1]])(Sqrt[4(V0^2)(1-α)((f'[1])^2)+α ((f[1])^2)f''[1]]))))
𝒮𝒩[f_,α_,V0_][m_]:=Piecewise[{{𝒮χ[f,α,V0][m],(m^2)>=((mc[f,α,V0])^2)},{𝒮𝒩s[f,α,V0][m],(m^2)<((mc[f,α,V0])^2)}}]

Von1[f_,α_]:=(Sqrt[(1/α)((1-α)(((f'[1])^2)/(f''[1]))-α f[1])])

Von[f_,α_]:=(Sqrt[(1/α)(1-α+(Sqrt[1-α]))f[1]])
Vsh[f_,α_]:=(Sqrt[(1/α)(((1+(Sqrt[1-α])))^2)f[1](1-((f[1])/(f'[1])))])

Vth[f_,α_]:=(Sqrt[(1/α)((f[1] (f''[1]-f'[1])+((f'[1])^2))/(((f'[1])^2) f''[1]))(f[1]f''[1]+(1-α)f'[1](f'[1]-f[1]))])

ClearAll[VSAT]

VSATs[f_,α_]:=(Sqrt[((f'[1])/α)-f[1]])
VSAT[f_][α_?NumericQ]:=Block[{V0,αα=Rationalize[α,(10^(-30))]},V0/.FindRoot[Re@𝒮χ[f,αα,V0][0],{V0,2VSATs[f,αα]},WorkingPrecision->20]]

Vtriv[f_][α_?NumericQ]:=Block[{V0,a=Derivative[1][f][0],b=(1/2)Derivative[2][f][0],αα=Rationalize[α,(10^(-30))]},
Abs[V0] /.FindRoot[𝒮χ2m0[f,αα,V0],{V0,(Sqrt[a (E^((-αα+Log[(b/(a+b))])/(αα)))+b (E^((-αα+Log[(b/(a+b))])/(αα)))])},WorkingPrecision->20]]

ms[f_,α_,V0_]:=((Sqrt[-(V0^2) α-α f[1]+f'[1]])/(Sqrt[f'[1]]))

mMin[f_,α_,V0_]:=(Sqrt[1-(((f[1])^2)/(f'[1]))(((V0^2)(((1+(Sqrt[1-α])))^2)-α f[1])/(2(V0^2)f[1](2-α)-α((V0^4)+((f[1])^2))))])

mMax[f_,α_?NumericQ,V0_?NumericQ]:=m/.FindRoot[𝒮χ[f,α,V0][m],{m,ms[f,α,V0]}]

M = 1 (Spherical spin glasses)

RsOverM[f_,E_][m_]:=((-(1-(m^2)))/(2(((f[1]-(1-(m^2))f'[1]))^2)))((E^2)f'[1]+2f[1](((f[1])/(1-(m^2)))-f'[1])-(Sqrt[4 (E^2) f[1] (((f[1])/(1-(m^2)))-f'[1]) f'[1]+(E^4) ((f'[1])^2)]))
𝒮χ[f_,E_][m_]:=-(1/2)((E^2)/(f[1]))(((1-((f'[1])/(f[1]))((1-(m^2))/(1+1/RsOverM[f,E][m]))))^(-1))+(1/2)Log[((-1)/(RsOverM[f,E][m]))]

𝒮𝒩s[f_,E_][m_]:=(1/2)Log[((f''[1](1-(m^2)))/(f'[1]))]-(1/2)(((E^2)(f''[1](1-(m^2))-f'[1]))/((1-(m^2))(f''[1]f[1]+((f'[1])^2))-f[1]f'[1]))

mc[f_,E_]:=(Sqrt[1-((f[1]f'[1])/(f[1]f''[1]+((f'[1])^2)-(Sqrt[f''[1]])(Sqrt[(E^2)((f'[1])^2)])))])
𝒮𝒩[f_,E_][m_]:=Piecewise[{{𝒮χ[f,E][m],(m^2)>=((mc[f,E])^2)},{𝒮𝒩s[f,E][m],(m^2)<((mc[f,E])^2)}}]

μm[f_]:=(Sqrt[4f''[1]])

Eon1[f_]:=(Sqrt[(((f'[1])^2)/(f''[1]))])
Eon[f_,α_]:=(Sqrt[2f[1]])

Eth[f_]:=((f[1] (f''[1]-f'[1])+((f'[1])^2))/(f'[1] (Sqrt[f''[1]])))

Esh[f_]:=(Sqrt[4f[1](1-((f[1])/(f'[1])))])

ESATs[f_]:=(Sqrt[f'[1]])

ESAT[f_]:=Block[{e},e/.FindRoot[𝒮𝒩[f,e][0],{e,ESATs[f]},WorkingPrecision->20]]

mMin[f_,E_]:=(Sqrt[1-(((f[1])^2)/(f'[1]))(4/(4f[1]-(E^2)))])

ms[f_,E_]:=(Sqrt[1-((E^2)/(f'[1]))])

General

f3=Function[q,(1/2)(q^3)];

f34=Function[q,(1/2)((q^3)+(q^4))];

fp[p_]:=Function[q,(1/2)(q^p)]

Plots

Action examples

actionPlot1=Plot[Evaluate[Function[V0,𝒮χ[Function[q,q],1/2,V0][m]]/@Range[0,4/3,1/3]],{m,-1,1},Frame->True,FrameStyle->Black,FrameLabel->{m,(Subscript[𝒮, χ])[m]},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},Epilog->{Inset[LineLegend[ColorData[97]/@Range[5],NumberForm[#,{∞,3}]&/@N[Range[0,4/3,1/3]],LegendLayout->{"Column",1},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},LegendFunction->Panel,LegendLabel->(Subscript[V, 0])],Scaled[{0.045,0.0125}],ImageScaled[{0,0}]],Text[Style["f(q) = q",FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Scaled[{0.95,0.91}],ImageScaled[{1,0.5}]]},ImageSize->590/2+22,AspectRatio->9/10,PlotRange->{{-0.025,1.025},{-0.249,0.049}},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}]}]

es={0,(2/3)Von[fp[3],1/2],Von[fp[3],1/2],1.25,1.325,1.375,Vsh[fp[3],1/2],1.42,VSAT[fp[3],1/2],1.46};
actionPlot3=Plot[Evaluate[Join[Function[V0,𝒮χ[fp[3],1/2,V0][m]]/@es,Function[V0,Re[𝒮χ[fp[3],1/2,V0][m]]]/@es]],{m,-0.2,1},Frame->True,FrameStyle->Black,PlotStyle->Join[ColorData[97]/@Range[Length[es]],{Dashed,ColorData[97][#]}&/@Range[Length[es]]],FrameLabel->{m,Style[(Subscript[𝒮, χ])[m],FontOpacity->0]},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}]},PlotRange->{{-0.025,1.025},{-0.249,0.149}},Epilog->{Inset[LineLegend[ColorData[97]/@Range[10],NumberForm[#,{∞,3}]&/@N[es],LegendLabel->(Subscript[V, 0]),LegendLayout->{"Column",2},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},LegendFunction->Panel],Scaled[{0.045,0.0125}],ImageScaled[{0,0}]],Text[Style["f(q) = (1/2)(q^3)",FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Scaled[{0.95,0.91}],ImageScaled[{1,0.5}]]},ImageSize->590/2+22,AspectRatio->9/10,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}}]

SetDirectory[NotebookDirectory[]];
Export["figs/action_1.pdf",actionPlot1];
Export["figs/action_3.pdf",actionPlot3];

Action in different regimes

es=0.5;
regimePlot1=Plot[𝒮χ[f3,es,1/2][m],{m,-0.2,1},Frame->True,FrameStyle->Black,FrameLabel->{m,(Subscript[𝒮, χ])[m]},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}],{Dashed,Line[{{mMin[f3,1/2,es],-0.175},{mMin[f3,1/2,es],𝒮χ[f3,1/2,es][mMin[f3,1/2,es]]}}]},{Dashed,Line[{{ms[f3,1/2,es],-0.135},{ms[f3,1/2,es],0}}]},Text[Style[(Subscript[m, min]),FontFamily->"BitstreamCharter",FontSize->12,Black],{0.025+mMin[f3,1/2,es],-0.185}],Text[Style[(SuperStar[m]),FontFamily->"BitstreamCharter",FontSize->12,Black],{0.015+ms[f3,1/2,es],-0.145}]},PlotRange->{{-0.05,1.05},{-0.249,0.049}},Epilog->{Text[Style[(Subscript[V, 0])==0.5,FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Scaled[{0.92,0.97}],ImageScaled[{1,1}]],Text[Style["Connected",FontFamily->"BitstreamCharter",FontSize->12,Black,Bold],Scaled[{0.07,0.02}],ImageScaled[{0,0}]]},ImageSize->590/4+30,AspectRatio->12/10]

es=1.37;
regimePlot2=Plot[𝒮χ[f3,1/2,es][m],{m,-0.2,1},Frame->True,FrameStyle->Black,FrameLabel->{m,Style[(Subscript[𝒮, χ])[m],FontOpacity->0]},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}],{Dashed,Line[{{mMin[f3,1/2,es],-0.175},{mMin[f3,1/2,es],𝒮χ[f3,1/2,es][mMin[f3,1/2,es]]}}]},{Dashed,Line[{{mMax[f3,1/2,es],-0.135},{mMax[f3,1/2,es],0}}]},Text[Style[(Subscript[m, min]),FontFamily->"BitstreamCharter",FontSize->12,Black],{0.07+mMin[f3,1/2,es],-0.185}],Text[Style[(Subscript[m, max]),FontFamily->"BitstreamCharter",FontSize->12,Black],{0.07+mMax[f3,1/2,es],-0.145}]},PlotRange->{{-0.05,1.05},{-0.249,0.049}},Epilog->{Text[Style[(Subscript[V, 0])==1.37,FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Scaled[{0.92,0.97}],ImageScaled[{1,1}]],Text[Style["Onset",FontFamily->"BitstreamCharter",FontSize->12,Black,Bold],Scaled[{0.07,0.02}],ImageScaled[{0,0}]]},ImageSize->590/4+30,AspectRatio->12/10,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}}]

es=1.4;
regimePlot3=Plot[𝒮χ[f3,1/2,es][m],{m,-0.2,1},Frame->True,FrameStyle->Black,FrameLabel->{m,Style[(Subscript[𝒮, χ])[m],FontOpacity->0]},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}],{Dashed,Line[{{mMax[f3,1/2,es],-0.135},{mMax[f3,1/2,es],0}}]},Text[Style[(Subscript[m, max]),FontFamily->"BitstreamCharter",FontSize->12,Black],{0.07+mMax[f3,1/2,es],-0.145}]},PlotRange->{{-0.05,1.05},{-0.249,0.049}},Epilog->{Text[Style[(Subscript[V, 0])==1.4,FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Scaled[{0.92,0.97}],ImageScaled[{1,1}]],Text[Style["Shattered",FontFamily->"BitstreamCharter",FontSize->12,Black,Bold],Scaled[{0.07,0.02}],ImageScaled[{0,0}]]},ImageSize->590/4+30,AspectRatio->12/10,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}}]

es=1.47;
regimePlot4=Plot[𝒮χ[f3,1/2,es][m],{m,-0.2,1},Frame->True,FrameStyle->Black,FrameLabel->{m,Style[(Subscript[𝒮, χ])[m],FontOpacity->0]},LabelStyle->{FontFamily->"BitstreamCharter",FontSize->12,Black},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}]},PlotRange->{{-0.05,1.05},{-0.249,0.049}},Epilog->{Text[Style[(Subscript[V, 0])==es,FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Scaled[{0.92,0.97}],ImageScaled[{1,1}]],Text[Style["UNSAT",FontFamily->"BitstreamCharter",FontSize->12,Black,Bold],Scaled[{0.07,0.02}],ImageScaled[{0,0}]]},ImageSize->590/4+30,AspectRatio->12/10,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}}]

SetDirectory[NotebookDirectory[]];
Export["figs/regime_1.pdf",regimePlot1];
Export["figs/regime_2.pdf",regimePlot2];
Export["figs/regime_3.pdf",regimePlot3];
Export["figs/regime_4.pdf",regimePlot4];

Phase diagrams

phasesPlot1=Plot[Evaluate[Reverse@{VSATs[f,α],-VSATs[f,α]}/(α^(-1/2))/.f->Function[q,((q^1))]],{α,0,1},Frame->True,FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Inset[SwatchLegend[{ColorData[97][1],{ColorData[97][2],Opacity[0.6]},ColorData[97][2],ColorData[97][3],White},{"I","IIa","IIb",III,IV},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},LegendLayout->{"Row",2},LegendLabel->"Regime"],Scaled[{0.925,1}],ImageScaled[{1,1}]],Text[Style["f(q) = q",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.15}],ImageScaled[{0,0.5}]]},FrameLabel->{α,"(Subscript[V, 0]) (α^(1/2))"},Filling->{1->{{2},Directive[ColorData[97][1]]}},PlotStyle->Directive[Black,Thickness[0.005]],LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/3+25,AspectRatio->1,PlotStyle->{ColorData[97][1],ColorData[97][3]}]

phasesPlot2=Plot[Evaluate[{-Vsh[f,α],Vsh[f,α],VSAT[f][α],-Von[f,α],Von[f,α]}/(α^(-1/2))/.f->Function[q,(1/2)((q^2))]],{α,0,1},Frame->True,PlotStyle->{Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],{Dashed,Directive[Black,Thickness[0.005]]}},FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Text[Style["f(q) = (1/2)(q^2)",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.15}],ImageScaled[{0,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{5->{{4},Directive[ColorData[97][2],Opacity[0.6]]},2->{{5},Directive[ColorData[97][2]]},3->{{2},Directive[ColorData[97][3]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/3+25,AspectRatio->1,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}}]

phasesPlot3=Plot[Evaluate[{-Vsh[f,α],Vsh[f,α],VSAT[f][α],-Von[f,α],Von[f,α]}/(α^(-1/2))/.f->Function[q,(1/2)((q^3))]],{α,0,1},Frame->True,PlotStyle->{Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],{Dashed,Directive[Black,Thickness[0.005]]}},FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Line[{{0.35+0.025,1.1716747792652888`},{-0.0,1.1716747792652888`}}],Line[{{0.5,(Sqrt[4/3])-0.06},{0.35,(Sqrt[4/3])-0.06},{0.35,(Sqrt[4/3])},{-0.0,(Sqrt[4/3])}}],,Text[Style["(Subscript[E, gs])",{FontFamily->"Bitstream Charter",FontSize->12,Black}],{0.35+0.025,(Sqrt[4/3])},ImageScaled[{-0.2,0.45}]],Text[Style["(Subscript[E, th])",{FontFamily->"Bitstream Charter",FontSize->12,Black}],{0.5,(Sqrt[4/3])-0.06},ImageScaled[{-0.2,0.5}]],Text[Style["f(q) = (1/2)(q^3)",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.15}],ImageScaled[{0,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{5->{{4},Directive[ColorData[97][2],Opacity[0.6]]},2->{{5},Directive[ColorData[97][2]]},3->{{2},Directive[ColorData[97][3]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/3+25,AspectRatio->1,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}}]

SetDirectory[NotebookDirectory[]];
Export["figs/phases_1.pdf",phasesPlot1];
Export["figs/phases_2.pdf",phasesPlot2];
Export["figs/phases_3.pdf",phasesPlot3];

phasesPlot121=Plot[Evaluate[{-Vtriv[f][α],-Vsh[f,α],Vtriv[f][α],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},VSAT[f][α]],VSAT[f][α],Piecewise[{{Von[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]]}/(α^(-1/2))/.f->Function[q,((1-λ)q+λ(1/2)((q^2)))]/.λ->1/8],{α,0.001,0.999},Frame->True,PlotStyle->Directive[Black,Thickness[0.005]],FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Text[Style["λ = (1/8)",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.875}],ImageScaled[{0,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))"]},Filling->{6->{{1},Directive[ColorData[97][2],Opacity[0.6]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][3]]},7->{{6},Directive[ColorData[97][2]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->4/3,Exclusions->None]

phasesPlot122=Plot[Evaluate[{-Vtriv[f][α],-Vsh[f,α],Vtriv[f][α],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},VSAT[f][α]],VSAT[f][α],Piecewise[{{Von[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]]}/(α^(-1/2))/.f->Function[q,((1-λ)q+λ(1/2)((q^2)))]/.λ->3/8],{α,0.001,0.999},Frame->True,PlotStyle->{Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],{Dashed,Directive[Black,Thickness[0.005]]},Directive[Black,Thickness[0.005]]},FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Text[Style["λ = (3/8)",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.875}],ImageScaled[{0,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{6->{{1},Directive[ColorData[97][2],Opacity[0.6]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][3]]},7->{{6},Directive[ColorData[97][2]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->4/3,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

phasesPlot123=Plot[Evaluate[{-Vtriv[f][α],-Vsh[f,α],Vtriv[f][α],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},VSAT[f][α]],VSAT[f][α],Piecewise[{{Von[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]]}/(α^(-1/2))/.f->Function[q,((1-λ)q+λ(1/2)((q^2)))]/.λ->5/8],{α,0.001,0.999},Frame->True,PlotStyle->{Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],{Dashed,Directive[Black,Thickness[0.005]]},Directive[Black,Thickness[0.005]]},FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Text[Style["λ = (5/8)",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.875}],ImageScaled[{0,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{6->{{1},Directive[ColorData[97][2],Opacity[0.6]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][3]]},7->{{6},Directive[ColorData[97][2]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->4/3,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

phasesPlot124=Plot[Evaluate[{-Vtriv[f][α],-Vsh[f,α],Vtriv[f][α],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},VSAT[f][α]],VSAT[f][α],Piecewise[{{Von[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]],Piecewise[{{Vsh[f,α],Re[𝒮χ[f,α,Vsh[f,α]][0]]>0}},Vtriv[f][α]]}/(α^(-1/2))/.f->Function[q,((1-λ)q+λ(1/2)((q^2)))]/.λ->7/8],{α,0.001,0.999},Frame->True,PlotStyle->{Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],Directive[Black,Thickness[0.005]],{Dashed,Directive[Black,Thickness[0.005]]},Directive[Black,Thickness[0.005]]},FrameStyle->Black,Prolog->{},PlotRange->{{-0.06,1+0.06},{-0.075,1.275}},Epilog->{Line[{{0,-1},{0,2}}],Line[{{1,-1},{1,2}}],Line[{{-1,0},{2,0}}],Text[Style["λ = (7/8)",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.125,0.875}],ImageScaled[{0,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{6->{{1},Directive[ColorData[97][2],Opacity[0.6]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][3]]},7->{{6},Directive[ColorData[97][2]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->4/3,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

SetDirectory[NotebookDirectory[]];
Export["figs/phases_12_1.pdf",phasesPlot121];
Export["figs/phases_12_2.pdf",phasesPlot122];
Export["figs/phases_12_3.pdf",phasesPlot123];
Export["figs/phases_12_4.pdf",phasesPlot124];

Complexity solutions

𝒮SSG=𝒮𝒩[f,α,e/(α^(1/2)),0][m,(OverHat[m]),Ap,Am,D,R]/.α->0;

eqsSSG=D[𝒮SSG,{{m,Ap,Am,R,D,(OverHat[m])}}]/.{(OverHat[m])->0,α->0};

solD=Solve[0==Last[eqsSSG],D]

eqsSSG2=FullSimplify[Most[Drop[eqsSSG,2]]/.D f'[1]-(1/2) (((Am^2)/2)+(((-(Ap/2)+R))^2)) f''[1]->(y- (R^2)((f'[1])^2))/f[1]/.solD[[1]]]

sCompSSG=Solve[0==Append[eqsSSG2,D f'[1]-(1/2) (((Am^2)/2)+(((-(Ap/2)+R))^2)) f''[1]-(y- (R^2)((f'[1])^2))/f[1]/.solD[[1]]]/.f->Function[q,(1/2)(q^3)],{Ap,Am,R,y}];

Chop[Rest[eqsSSG]/.solD[[1]]/.sCompSSG/.{m->0.5,f->Function[q,(1/2)(q^3)],e->1}]

mMax1=ms[Function[q,(1/2)(q^3)],α,1/(α^(1/2))]/.α->0

mMax2=m/.FindMaximum[𝒮SSG/.solD[[1]]/.{(OverHat[m])->0,ϵ->0}/.sCompSSG[[1]]/.{f->Function[q,(1/2)(q^3)],e->1},{m,0.54,0.58}][[2]]

mMax3=m/.FindMaximum[𝒮SSG/.solD[[1]]/.{(OverHat[m])->0,ϵ->0}/.sCompSSG[[3]]/.{f->Function[q,(1/2)(q^3)],e->1},{m,0.55,0.58}][[2]]

insetRange={{0.544,0.584},{-0.0006,0.00145}};
pCompSSGz=Plot[Evaluate[𝒮SSG/.solD[[1]]/.{(OverHat[m])->0}/.sCompSSG[[{1,3,11}]]/.{f->Function[q,(1/2)(q^3)],e->1}],{m,0.505,0.595},PlotRange->insetRange,Frame->True,FrameStyle->Black,LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/5,FrameTicksStyle->Directive[FontOpacity->0,FontSize->0],Prolog->{Line[{{mMax2,-0.002},{mMax2,0.002}}],{Dashed,Line[{{mMax3,-0.002},{mMax3,0.002}}]},Line[{{mMax1,0},{mMax1,0.0007}}],Text[Style[(SuperStar[m]),FontFamily->"Bitstream Charter",FontSize->12,Black],{mMax1+0.001,0.0009}]}]

pCompSSG=Plot[Evaluate[𝒮SSG/.solD[[1]]/.{(OverHat[m])->0}/.sCompSSG[[{1,3,11}]]/.{f->Function[q,(1/2)(q^3)],e->1}],{m,0.505,0.7},PlotRange->{{0.505,0.6195},{-0.0175,0.0025}},Frame->True,FrameStyle->Black,LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/2-10,FrameLabel->{m,(Subscript[𝒮, 𝒩])[m]},Prolog->{FaceForm[None],EdgeForm[Black],Rectangle@@Transpose[insetRange]},Epilog->Inset[pCompSSGz,Scaled[{0.6,0.3}]]]

testdat=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_16.dat"],"-nan"];
testdat2=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_32.dat"],"-nan"];
testdat3=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_64.dat"],"-nan"];
testdat4=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_128.dat"],"-nan"];
testdat5=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_256.dat"],"-nan"];
testdat6=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_512.dat"],"-nan"];
testdat7=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_1024.dat"],"-nan"];
testdat8=DeleteCases[Flatten@Import["~/doc/research/least_squares/code/test_1.0_2048.dat"],"-nan"];
Histogram[{(*Abs@testdat,Abs@testdat2,Abs@testdat3,*)Abs@testdat4,Abs@testdat5,Abs@testdat6,Abs@testdat7,Abs@testdat8},35,{"Log","Probability"},Prolog->{Line[{{mMax1,-10},{mMax1,10}}],Line[{{mMax2,-10},{mMax2,10}}],Line[{{mMax3,-10},{mMax3,10}}]}]

Histogram[{Abs@testdat8[[;;20]],Abs@testdat8[[21;;]]},Automatic,"Probability",Prolog->{Line[{{mMax1,-10},{mMax1,10}}],Line[{{mMax2,-10},{mMax2,10}}],Line[{{mMax3,-10},{mMax3,10}}]}]

Histogram[{Abs@testdat7,Abs@testdat8},35,"Probability",Prolog->{Line[{{mMax1,-10},{mMax1,10}}],Line[{{mMax2,-10},{mMax2,10}}],Line[{{mMax3,-10},{mMax3,10}}]}]

Length/@{testdat2,testdat3,testdat4,testdat5,testdat6,testdat7,testdat8}

fittest1=LinearModelFit[Log@Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@((mMax3)-Abs@{testdat4,testdat5,testdat6}),x,x]

Show[ListLogLogPlot[Thread[{2^Range[4,11],Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@((mMax3)-Abs@{testdat,testdat2,testdat3,testdat4,testdat5,testdat6,testdat7,testdat8})}]],LogLogPlot[Exp[fittest1[Log2[x]-6]],{x,0,3000}]]

fittest=LinearModelFit[Log@Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@(mMax1-Abs@{testdat5,testdat6,testdat7,testdat8}),x,x]

Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@(mMax1-Abs@{testdat2,testdat3,testdat4,testdat5,testdat6,testdat7,testdat8})

convergence=Show[
LogLogPlot[Exp[fittest[Log2[x]-7]],{x,12,2500},PlotStyle->Black,Epilog->{Line[{{0,Log[mMax1-(mMax2)]},{100,Log[(mMax1)-(mMax2)]}}],{Dashed,Line[{{0,Log[(mMax1)-(mMax3)]},{100,Log[(mMax1)-(mMax3)]}}]}},Frame->True,FrameStyle->Black,LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/2-15,FrameLabel->{N,m-(SuperStar[m])}],ListLogLogPlot[Thread[{2^Range[4,11],Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@((mMax1)-Abs@{testdat,testdat2,testdat3,testdat4,testdat5,testdat6,testdat7,testdat8})}]]]

SetDirectory[NotebookDirectory[]];
Export["figs/alt_sols_1.pdf",pCompSSG];
Export["figs/alt_sols_2.pdf",convergence];

(Exp@fittest[6-3]-Mean[#])/(StandardDeviation[#]/(Sqrt[Length[#]]))&@(mMax1-Abs[testdat7])
(Exp@fittest[7-3]-Mean[#])/(StandardDeviation[#]/(Sqrt[Length[#]]))&@(mMax1-Abs[testdat8])

nfit=NonlinearModelFit[Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@(Abs@{testdat5,testdat6,testdat7,testdat8}),m0-Exp[b-1/2 x],{{m0,0.5773502735179695`},b},x]

nfit2=NonlinearModelFit[Around[Mean[#],StandardDeviation[#]/(Sqrt[Length[#]])]&/@(Abs@{testdat4,testdat5,testdat6,testdat7,testdat8}),m0-Exp[b-c x],{{m0,0.5773502735179695`},b,c},x]

ListPlot[{(Around@@nfit["ParameterTableEntries"][[1,;;2]])-mMax1,(Around@@nfit2["ParameterTableEntries"][[1,;;2]])-mMax1,(Around@@nfit["ParameterTableEntries"][[1,;;2]])-mMax2,(Around@@nfit2["ParameterTableEntries"][[1,;;2]])-mMax2,(Around@@nfit["ParameterTableEntries"][[1,;;2]])-mMax3,(Around@@nfit2["ParameterTableEntries"][[1,;;2]])-mMax3}]

Spheres

randf2[n_]:=(1/(4n))Sum[RandomVariate[NormalDistribution[]]Cos[kx θ]Cos[ ky ϕ]+RandomVariate[NormalDistribution[]]Cos[kx θ]Sin[ky ϕ]+RandomVariate[NormalDistribution[]]Sin[kx θ]Cos[ky ϕ]+RandomVariate[NormalDistribution[]]Sin[kx θ]Sin[ky ϕ],{kx,1,n},{ky,1,n}]

testf=randf2[5];

conF=0+0.3testf+((Cos[2θ])^3)+((Cos[θ])^4);

conF=0+0.3testf+0((Cos[2θ])^3)+6((Cos[θ])^4)+Sin[ϕ+π 7/8];

cPlot2=Show[ContourPlot[0==conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},ContourStyle->{Black,Thickness[0.007]}],AspectRatio->2,Background->White,PlotPoints->100]

dϕC=Evaluate@D[conF,ϕ];

cPointsSpotsC=Select[DeleteDuplicates@Table[untilSuccess@FindRoot[{dϕC,conF},{{θ,RandomReal[{0,π}]},{ϕ,RandomReal[{0,2π}]}}],{20}],0<=θ<=π&&0<=ϕ<=2π/.#&];

cPlot2=Show[ContourPlot[0==conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},ContourStyle->{Black,Thickness[0.007]},PlotPoints->50],ListPlot[{θ,ϕ}/.cPointsSpotsC,PlotMarkers->{Automatic,PointSize[0.02]},PlotStyle->Red],AspectRatio->2,Background->ColorData[97][1]]

cplot3=Image[Show[cPlot2,Frame->False,ImagePadding->0,PlotRangePadding->0,ImageSize->3000]];

sphereSpots1=SphericalPlot3D[1,{θ,0,π},{ϕ,0,2π},Mesh->False,PlotStyle->Directive[Texture[cplot3]],Lighting->"Neutral",PlotPoints->40]

vp={-2.6236811602783363`,2.134048495909731`,0};
vv={1/2/(Sqrt[2]),1/(Sqrt[2]),1/(Sqrt[2])};

connectedManifold=Show[Graphics3D[{Thick,Arrow[{{0,0,-1.3},{0,0,1.3}}]}],sphereSpots1,Boxed->False,ViewPoint->Dynamic[vp],ViewVertical->Dynamic[vv],ImageSize->165,Axes->False]

testf=randf2[15];

conF=0+testf+((Cos[2θ])^3)+((Cos[θ])^4)/.θ->2(θ-π/2)+π/2;

conF=-0.5+(0.5testf+0.3((Cos[2θ])^3)+6((Cos[θ])^2)+((Sin[16ϕ+π 7/8])^1))+0.3(testf/.θ->0);

cPlot2=Show[ContourPlot[0==conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},ContourStyle->{Black,Thickness[0.007]}],AspectRatio->2,Background->White,PlotPoints->150]

dϕC=Evaluate@D[conF,ϕ];

cPointsSpotsC=Select[DeleteDuplicates@Table[untilSuccess@FindRoot[{dϕC,conF},{{θ,RandomReal[{π/4,3π/4}]},{ϕ,RandomReal[{0,2π}]}}],{100}],π/4<=θ<=3π/4&&0<=ϕ<=2π/.#&];

cPlot2=Show[ContourPlot[0==conF,{θ,π/4,3π/4},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},ContourStyle->{Black,Thickness[0.007]},PlotPoints->50],ListPlot[{θ,ϕ}/.cPointsSpotsC,PlotMarkers->{Automatic,PointSize[0.02]},PlotStyle->Red],AspectRatio->2,Background->ColorData[97][2]]

cplot3=Image[Show[cPlot2,Frame->False,ImagePadding->0,PlotRangePadding->0,ImageSize->3000]];

sphereSpots1=SphericalPlot3D[1,{θ,0,π},{ϕ,0,2π},Mesh->False,PlotStyle->Directive[Texture[cplot3]],Lighting->"Neutral",PlotPoints->40]

vp={-2.6236811602783363`,2.134048495909731`,0};
vv={1/2/(Sqrt[2]),1/(Sqrt[2]),1/(Sqrt[2])};

coextManifold=Show[Graphics3D[{Thick,Arrow[{{0,0,-1.3},{0,0,1.3}}]}],sphereSpots1,Boxed->False,ViewPoint->Dynamic[vp],ViewVertical->Dynamic[vv],ImageSize->165,Axes->False]

fSpots=randf2[35];
fConst=fSpots-2(((Cos[θ]^2))^2)-0.15/.θ->5/2(θ-π/2)+π/2;

fConst=fSpots-0.3((Cos[2θ])^3)+6((Cos[θ])^2)-0.2;

rPlot=ContourPlot[0==fConst,{θ,0,π},{ϕ,0,2π},ContourStyle->{Black,Thickness[0.007]},PlotPoints->100,PlotRange->{{0,π},{0,2π}}]

dϕ=Evaluate@D[fConst,ϕ];

cPointsSpots=Select[DeleteDuplicates@Table[untilSuccess@FindRoot[{dϕ,fConst},{{θ,RandomReal[{0,π}]},{ϕ,RandomReal[{0,2π}]}}],{1000}],π/4<=θ<=3π/4&&0<=ϕ<=2π/.#&];

rPlot2=Show[rPlot,ListPlot[{θ,ϕ}/.cPointsSpots,PlotMarkers->{Automatic,PointSize[0.02]},PlotStyle->Red],AspectRatio->2,Background->ColorData[97][3]]

rplot3=Image[Show[rPlot2,Frame->False,ImagePadding->0,PlotRangePadding->0,ImageSize->3000]];

sphereSpots2=SphericalPlot3D[1,{θ,0,π},{ϕ,0,2π},Mesh->False,PlotStyle->Directive[Texture[rplot3]],Lighting->"Neutral",PlotPoints->50]

shatteredManifold=Show[Graphics3D[{Thick,Black,Arrow[{{0,0,-1.3},{0,0,1.3}}]}],sphereSpots2,Axes->False,Boxed->False,ViewPoint->vp,ViewVertical->vv,ImageSize->165]

noManifold=Show[Graphics3D[{Thick,Black,Arrow[{{0,0,-1.3},{0,0,1.3}}]}],Graphics3D[Sphere[]],Axes->False,Boxed->False,ViewPoint->vp,ViewVertical->vv,ImageSize->165]

sphereBar=Graphics[{Arrow[{{0,0},{4,0}}],Line[{{0,-1/16},{0,1/16}}],Line[{{1,-1/32},{1,1/32}}],Line[{{2,-1/32},{2,1/32}}],Line[{{3,-1/32},{3,1/32}}],Text[Style[(Subscript[V, on]),Black,FontFamily->"Bitstream Charter",FontSize->12],{1,-0.11}],
Text[Style[(Subscript[V, sh]),Black,FontFamily->"Bitstream Charter",FontSize->12],{2,-0.11}],
Text[Style[(Subscript[V, Style[sat,FontVariations->{"CapsType"->"SmallCaps"}]]),Black,FontFamily->"Bitstream Charter",FontSize->12],{3,-0.1}],Text[Style[(Subscript[V, 0]),Black,FontFamily->"Bitstream Charter",FontSize->12],{4,-0.1}]},ImageSize->590]

SetDirectory[NotebookDirectory[]];
Export["figs/connected.pdf",connectedManifold];
Export["figs/shattered.pdf",shatteredManifold];
Export["figs/coexist.pdf",coextManifold];
Export["figs/gone.pdf",noManifold];
Export["figs/bar.pdf",sphereBar];