Definitions

SetAttributes[untilSuccess,HoldAll];
untilSuccess[e_]:=Quiet[Check[e,untilSuccess[e]]]

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]}]

rsbInstab[f_,α_,V0_]:=With[{R11=RsOverM[f,α,V0][0]},(((1+R11))^3) ((f[1])^3)-3 R11 (((1+R11))^2) ((f[1])^2) f'[1]+R11 α ((f'[0])^2) f'[1]-(R11^3) ((f'[1])^3)+(V0^2) α (2 (1+R11) ((f'[0])^2)+R11 f'[1] f''[0])-(1+R11) f[1] (-3 (R11^2) ((f'[1])^2)+α (((f'[0])^2)+(V0^2) f''[0]))]

rsbInstab2[f_,α_,V0_]:=With[{R11=RsOverM[f,α,V0][0]},-((((1+R11) f[1]-R11 f'[1]))^3) (-α ((f'[0])^2)+((f'[1])^2)) (-α ((f'[0])^2)+f'[1] (f[1]+R11 f[1]-R11 f'[1]))+(R11^2) (V0^4) (α^2) ((f'[1])^2) f''[0] ((1+R11) ((f'[0])^2)+R11 f'[1] f''[0])+(V0^2) α ((1+R11) f[1]-R11 f'[1]) ((1+R11) ((f'[0])^2) ((1+R11) f[1]-R11 f'[1]) (α ((f'[0])^2)-((f'[1])^2))+R11 f'[1] (α ((f'[0])^2) (f[1]+R11 f[1]-2 R11 f'[1])+(-1+R11) ((f'[1])^2) (f[1]+R11 f[1]-R11 f'[1])) f''[0])]

Solve[0==rsbInstab[fp[2],α,V0],V0]

RegionPlot[Evaluate[{0>rsbInstab[Function[q,((1-λ)q+λ(1/2)((q^2)))],α,e (α^(-1/2))],0<rsbInstab2[Function[q,((1-λ)q+λ(1/2)((q^2)))],α,e (α^(-1/2))]}/.λ->1/64],{α,0,1},{e,0,0.5},PlotPoints->70]

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->(Framed[#,Background->White,FrameStyle->Thin]&),LegendLabel->(Subscript[V, 0])],Scaled[{0.075,0.025}],ImageScaled[{0,0}]],Inset[Framed[Style["f(q) = q",FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Background->White,FrameStyle->Thin],Scaled[{0.95,0.975}],ImageScaled[{1,1}]]},ImageSize->590/2+22,AspectRatio->9/10,PlotRange->{{-0.025,1.025},{-0.249,0.099}},Prolog->{Line[{{-1,0},{2,0}}],Line[{{0,-4},{0,1}}],Line[{{1,-4},{1,1}}]}]

es={(10^(-5)),(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.099}},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->(Framed[#,Background->White,FrameStyle->Thin]&)],Scaled[{0.075,0.025}],ImageScaled[{0,0}]],Inset[Framed[Style["f(q) = (1/2)(q^3)",FontFamily->"BitstreamCharter",FontSize->12,Black,ScriptLevel->1],Background->White,FrameStyle->Thin],Scaled[{0.95,0.975}],ImageScaled[{1,1}]]},ImageSize->590/2+22,AspectRatio->9/10,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

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

lineThickness=Thickness[0.004];

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[Append[ColorData[97]/@Range[4],White],{"I","II","III",IV,"V"},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},LegendLayout->{"Column",2},LegendFunction->(Framed[#,Background->White,FrameStyle->Thin]&),LegendLabel->Style["Regime",Bold]],Scaled[{0.085,0.07}],ImageScaled[{0,0}]],Text[Style["f(q) = q",{FontFamily->"Bitstream Charter",FontSize->12,Black,ScriptLevel->2}],Scaled[{0.9,0.925}],ImageScaled[{1,1}]]},FrameLabel->{α,"(Subscript[V, 0]) (α^(1/2))"},Filling->{1->{{2},Directive[ColorData[97][1]]}},PlotStyle->Directive[Black,lineThickness],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) (Sqrt[-1+(2/α)-((2 (Sqrt[1-α]))/α)]),-(1/2) (Sqrt[-1+(2/α)-((2 (Sqrt[1-α]))/α)])}/(α^(-1/2))/.f->Function[q,(1/2)((q^2))]],{α,0,1},Frame->True,PlotStyle->Join[ConstantArray[Directive[Black,lineThickness],5],{None,None}],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.9,0.925}],ImageScaled[{1,1}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{5->{{4},Directive[ColorData[97][2]]},2->{{5},Directive[ColorData[97][3]]},3->{{2},Directive[ColorData[97][4]]},7->{{6},Directive[Black,Opacity[0.25]]}},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,lineThickness],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.305,1.1716747792652888`},{-0.0,1.1716747792652888`}}],Line[{{0.425,(Sqrt[4/3])-0.06},{0.3,(Sqrt[4/3])-0.06},{0.3,(Sqrt[4/3])},{-0.0,(Sqrt[4/3])}}],,Text[Style["(Subscript[E, gs])",{FontFamily->"Bitstream Charter",FontSize->12,Black}],{0.305,(Sqrt[4/3])},ImageScaled[{-0.2,0.45}]],Text[Style["(Subscript[E, th])",{FontFamily->"Bitstream Charter",FontSize->12,Black}],{0.425,(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.9,0.925}],ImageScaled[{1,1}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{5->{{4},Directive[ColorData[97][2]]},2->{{5},Directive[ColorData[97][3]]},3->{{2},Directive[ColorData[97][4]]}},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,lineThickness],FrameStyle->Black,Prolog->{},PlotRange->{{-0.05,1+0.05},{-0.05,1.05}},Epilog->{Inset[SwatchLegend[Append[ColorData[97]/@Range[4],White],{"I","II","III",IV,"V"},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},LegendFunction->(Framed[#,Background->White,FrameStyle->Thin]&),LegendLayout->{"Column",1}],Scaled[{0.085,0.065}],ImageScaled[{0,0}]],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.875,0.875}],ImageScaled[{1,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))"]},Filling->{6->{{1},Directive[ColorData[97][2]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][4]]},7->{{6},Directive[ColorData[97][3]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->5/4,Exclusions->None]

rp18=RegionPlot[Evaluate[0>rsbInstab[Function[q,((1-λ)q+λ(1/2)((q^2)))],α,e (α^(-1/2))]||0<rsbInstab2[Function[q,(1-λ)q+(1/2)λ (q^2)],α,e (α^(-1/2))]/.λ->1/8],{α,0,1},{e,-0.3,0.3},BoundaryStyle->None,PlotStyle->{Black,Opacity[0.25]},PlotPoints->100]

phasesPlot121b=Show[phasesPlot121,rp18]

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,lineThickness],FrameStyle->Black,Prolog->{},PlotRange->{{-0.05,1+0.05},{-0.05,1.05}},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.875,0.875}],ImageScaled[{1,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{6->{{1},Directive[ColorData[97][2]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][4]]},7->{{6},Directive[ColorData[97][3]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->5/4,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

rp38=RegionPlot[Evaluate[0>rsbInstab[Function[q,((1-λ)q+λ(1/2)((q^2)))],α,e (α^(-1/2))]||0<rsbInstab2[Function[q,(1-λ)q+(1/2)λ (q^2)],α,e (α^(-1/2))]/.λ->3/8],{α,0,1},{e,-0.34,0.34},BoundaryStyle->None,PlotStyle->{Black,Opacity[0.25]},PlotPoints->100]

phasesPlot122b=Show[phasesPlot122,rp38]

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,lineThickness],FrameStyle->Black,Prolog->{},PlotRange->{{-0.05,1+0.05},{-0.05,1.05}},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.875,0.875}],ImageScaled[{1,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{6->{{1},Directive[ColorData[97][2]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][4]]},7->{{6},Directive[ColorData[97][3]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->5/4,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

rp58=RegionPlot[Evaluate[0>rsbInstab[Function[q,((1-λ)q+λ(1/2)((q^2)))],α,e (α^(-1/2))]||0<rsbInstab2[Function[q,(1-λ)q+(1/2)λ (q^2)],α,e (α^(-1/2))]/.λ->5/8],{α,0,1},{e,-0.4,0.4},BoundaryStyle->None,PlotStyle->{Black,Opacity[0.25]},PlotPoints->100]

phasesPlot123b=Show[phasesPlot123,rp58]

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,lineThickness],FrameStyle->Black,Prolog->{},PlotRange->{{-0.05,1+0.05},{-0.05,1.05}},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.875,0.875}],ImageScaled[{1,0.5}]]},FrameLabel->{α,Style["(Subscript[V, 0]) (α^(1/2))",FontOpacity->0]},Filling->{6->{{1},Directive[ColorData[97][2]]},4->{{3},Directive[ColorData[97][1]]},2->{{1},Directive[ColorData[97][1]]},5->{{4},Directive[ColorData[97][4]]},7->{{6},Directive[ColorData[97][3]]}},LabelStyle->{FontFamily->"Bitstream Charter",FontSize->12,Black},ImageSize->590/4+25,AspectRatio->5/4,FrameTicksStyle->{{FontOpacity->0,Automatic},{Automatic,Automatic}},Exclusions->None]

rp78=RegionPlot[Evaluate[0>rsbInstab[Function[q,((1-λ)q+λ(1/2)((q^2)))],α,e (α^(-1/2))]||0<rsbInstab2[Function[q,(1-λ)q+(1/2)λ (q^2)],α,e (α^(-1/2))]/.λ->7/8],{α,0,1},{e,-0.5,0.5},BoundaryStyle->None,PlotStyle->{Black,Opacity[0.25]},PlotPoints->100]

phasesPlot124b=Show[phasesPlot124,rp78]

SetDirectory[NotebookDirectory[]];
Export["figs/phases_12_1.pdf",phasesPlot121b];
Export["figs/phases_12_2.pdf",phasesPlot122b];
Export["figs/phases_12_3.pdf",phasesPlot123b];
Export["figs/phases_12_4.pdf",phasesPlot124b];

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[7];

conF=0+0.07testf+(((Cos[θ])^2))-0.3;

cPlot2=Show[RegionPlot[0>conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->Black,PlotStyle->{Black,Opacity[0.4]}],AspectRatio->2,Background->White]

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

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

cPlot2=Show[RegionPlot[0>conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->{Black,Thickness[0.007]},PlotStyle->{Black,Opacity[0.4]}],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[35];

conF=0+0.15testf(((1-((Cos[θ])^2)))^4)+(3((Cos[θ])^2)+((Cos[2θ])^2))-1+0 0.05Sin[17ϕ](((1-((Cos[θ])^2)))^4);

cPlot2=Show[RegionPlot[0>conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->Black,PlotStyle->{Black,Opacity[0.4]}],AspectRatio->2,Background->White]

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[RegionPlot[0>conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->{Black,Thickness[0.007]},PlotStyle->{Black,Opacity[0.4]},PlotPoints->100](*,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])};

middleManifold=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[30];

conF=0+1.25testf+(7((Cos[θ])^4))-0.15;

cPlot2=Show[RegionPlot[0>conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->Black,PlotStyle->{Black,Opacity[0.4]}],AspectRatio->2,Background->White]

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[RegionPlot[0>conF,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->{Black,Thickness[0.007]},PlotStyle->{Black,Opacity[0.4]},PlotPoints->100](*,ListPlot[{θ,ϕ}/.cPointsSpotsC,PlotMarkers->{Automatic,PointSize[0.02]},PlotStyle->Red]*),AspectRatio->2,Background->ColorData[97][3]]

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])};

complexManifold=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[40];

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

rPlot=RegionPlot[0>fConst,{θ,0,π},{ϕ,0,2π},PlotRange->{{0,π},{0,2π}},BoundaryStyle->{Black,Thickness[0.007]},PlotStyle->{Black,Opacity[0.4]},PlotPoints->150,AspectRatio->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][4]]

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];