Function Repository Resource:

CurvedSpacetimeSprinkling

Source Notebook

Produce random causal graphs by sprinkling points into a spacetime with a specified algebraic curvature function

Contributed by: Jonathan Gorard

ResourceFunction["CurvedSpacetimeSprinkling"][func,{x,xmin,xmax},n]

produces a random sprinkling of n points into a one-dimensional spacetime with algebraic curvature given by func as a function of x.

ResourceFunction["CurvedSpacetimeSprinkling"][func,{x,},{y,},]

produces a random sprinkling of n points into a higher-dimensional spacetime with multivariable algebraic curvature function func (in variables x,y,, etc.).

ResourceFunction["CurvedSpacetimeSprinkling"][func,{x,},,n,"prop"]

gives the property "prop" for the spacetime sprinkling with the specified algebraic curvature function.

Details and Options

ResourceFunction["CurvedSpacetimeSprinkling"][func,{x,},,n] returns a SpacetimeSprinkling object by default.
Unlike the resource function FlatSpacetimeSprinkling, sprinklings can only be performed in 0+1-, 1+1- and 2+1-dimensional spacetimes using ResourceFunction["CurvedSpacetimeSprinkling"].
Note that, in the multivariable case, only algebraic curvature functions are supported.
Sprinklings are performed using a Poisson point process, with the expected number of sprinkled points being proportional to the spacetime region volume so as to guarantee Lorentz invariance.
Causal edges are added in accordance with the standard causal partial order relation on spacetime (as determined using the usual form of the spacetime line element) and are transitively reduced by default.
CurvedSpacetimeSprinking[func,{x1,},,{xm,},] treats the last variable, xm, as being the time coordinate with the other xi being the spatial coordinates.
ResourceFunction["CurvedSpacetimeSprinkling"] uses a similar argument specification to ProbabilityDistribution.
In ResourceFunction["CurvedSpacetimeSprinkling"][func,{x,},,n,"prop"], the following properties can be requested:
"CausalGraphFull"full causal partial order graph (before transitive reduction)
"CausalGraph"transitively reduced causal partial order graph
"Points"plot of the sprinkled points only (without causal edges)
"PointsList"list of the spacetime coordinates of all sprinkled points
"Dimensions"number of dimensions in the continuum spacetime approximation
"TotalEdgeCount"total number of causal edges (before transitive reduction)
"ReducedEdgeCount"number of transitively reduced causal edges
"PureCausalGraphFull"full causal partial order graph (before transitive reduction) with vertex coordinate information removed
"PureCausalGraph"transitively reduced causal partial order graph with vertex coordinate information removed
"Properties"list of properties
The sprinkling of elements of a discrete causal partial order into a continuous Lorentzian manifold via a Poisson point process was first described in the context of causal set theory by Sorkin, Bombelli and Henson.

Examples

Basic Examples (3) 

A two-variable algebraic curvature function:

In[1]:=
Plot3D[func = x^4 + y^4, {x, -1, 1}, {y, -1, 1}]
Out[1]=

Produce a random sprinkling of 100 points into a 1+1-dimensional spacetime with the specified curvature function:

In[2]:=
sprinkling = ResourceFunction["CurvedSpacetimeSprinkling"][
  func, {x, -1, 1}, {y, -1, 1}, 100]
Out[2]=

Show the causal graph:

In[3]:=
sprinkling["CausalGraph"]
Out[3]=

Show the full causal graph (without transitive reduction):

In[4]:=
sprinkling["CausalGraphFull"]
Out[4]=

A slightly more complicated two-variable algebraic curvature function:

In[5]:=
Plot3D[func = x^2 + 2 y^2 + 3 x^3 + 4 y^4 + 5 x^5 + 6 y^6, {x, -1, 1}, {y, -1, 1}]
Out[5]=

Produce a random sprinkling of 200 points into a 1+1-dimensional spacetime with the specified curvature function:

In[6]:=
sprinkling = ResourceFunction["CurvedSpacetimeSprinkling"][
  func, {x, -1, 1}, {y, -1, 1}, 200]
Out[6]=

Show the causal graph:

In[7]:=
sprinkling["CausalGraph"]
Out[7]=

Show the pure causal graph (with vertex coordinate information removed):

In[8]:=
sprinkling["PureCausalGraph"]
Out[8]=

Show the pure causal graph with a layered graph embedding:

In[9]:=
LayeredGraphPlot[sprinkling["PureCausalGraph"], AspectRatio -> 1/2]
Out[9]=

A three-variable algebraic curvature function:

In[10]:=
func = x^3 + y^2 - z;
ContourPlot3D[func, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]
Out[11]=

Produce a random sprinkling of 200 points into a 2+1-dimensional spacetime with the specified curvature function:

In[12]:=
sprinkling = ResourceFunction["CurvedSpacetimeSprinkling"][
  func, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 200]
Out[12]=

Plot the positions of the sprinkled points only (without causal edges):

In[13]:=
sprinkling["Points"]
Out[14]=

Show the causal graph:

In[15]:=
sprinkling["CausalGraph"]
Out[15]=

Scope (5) 

Sprinklings can be produced in 0+1-dimensional spacetimes:

In[16]:=
sprinkling = ResourceFunction["CurvedSpacetimeSprinkling"][x^2, {x, -1, 1}, 100]
Out[16]=

Show the pure causal graph:

In[17]:=
sprinkling["PureCausalGraph"]
Out[17]=

A sprinkling in 1+1-dimensional spacetime:

In[18]:=
sprinkling2 = ResourceFunction["CurvedSpacetimeSprinkling"][
  x^4 + y^4, {x, -1, 1}, {y, -1, 1}, 100]
Out[18]=

Show the causal graph:

In[19]:=
sprinkling2["CausalGraph"]
Out[19]=

A sprinkling in 2+1-dimensional spacetime:

In[20]:=
sprinkling3 = ResourceFunction["CurvedSpacetimeSprinkling"][
  x^3 + y^2 - z, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 100]
Out[20]=

Show the causal graph. Note that, unlike FlatSpacetimeSprinkling, CurvedSpacetimeSprinkling does not support higher-dimensional sprinklings:

In[21]:=
sprinkling3["CausalGraph"]
Out[21]=

Properties can be requested directly from CurvedSpacetimeSprinkling:

In[22]:=
ResourceFunction["CurvedSpacetimeSprinkling"][
 x^4 + y^4, {x, -1, 1}, {y, -1, 1}, 100, "PureCausalGraph"]
Out[22]=

Produce a random sprinkling of 100 points into a 1+1-dimensional spacetime with a complicated algebraic curvature function:

In[23]:=
sprinkling = ResourceFunction["CurvedSpacetimeSprinkling"][
  x^2 + 2 y^2 + 3 x^3 + 4 y^4 + 5 x^5 + 6 y^6, {x, -1, 1}, {y, -1, 1},
   100]
Out[23]=

Show the complete list of properties:

In[24]:=
sprinkling["Properties"]
Out[24]=

Show the full causal graph:

In[25]:=
sprinkling["CausalGraphFull"]
Out[25]=

Show the transitively reduced causal graph:

In[26]:=
sprinkling["CausalGraph"]
Out[26]=

Plot the positions of the sprinkled points only (without causal edges):

In[27]:=
sprinkling["Points"]
Out[27]=

Show the complete list of spacetime coordinates for the sprinkled points:

In[28]:=
sprinkling["PointsList"]
Out[28]=

Show the number of sprinkled points:

In[29]:=
sprinkling["PointsCount"]
Out[29]=

Show the number of dimensions in the background spacetime:

In[30]:=
sprinkling["Dimensions"]
Out[30]=

Show the total number of causal edges:

In[31]:=
sprinkling["TotalEdgeCount"]
Out[31]=

Show the number of causal edges after transitive reduction:

In[32]:=
sprinkling["ReducedEdgeCount"]
Out[32]=

Show the pure full causal graph (with vertex coordinate information removed):

In[33]:=
sprinkling["PureCausalGraphFull"]
Out[33]=

Show the pure transitively reduced causal graph (with vertex coordinate information removed):

In[34]:=
sprinkling["PureCausalGraph"]
Out[34]=

Publisher

Jonathan Gorard

Version History

  • 1.0.0 – 17 November 2020

Source Metadata

Related Resources

License Information