This worksheet demonstrates a few capabilities of SageManifolds (version 1.0, as included in SageMath 7.5) in computations regarding the real projective plane.

Click here to download the worksheet file (ipynb format). To run it, you must start SageMath with the Jupyter notebook, via the command `sage -n jupyter`

*NB:* a version of SageMath at least equal to 7.5 is required to run this worksheet:

In [1]:

```
version()
```

Out[1]:

First we set up the notebook to display mathematical objects using LaTeX rendering:

In [2]:

```
%display latex
```

We also define a viewer for 3D plots (use `'threejs'`

or `'jmol'`

for interactive 3D graphics):

In [3]:

```
viewer3D = 'threejs' # must be 'threejs', 'jmol', 'tachyon' or None (default)
```

We start by declaring the real projective plane as a 2-dimensional differentiable manifold:

In [4]:

```
RP2 = Manifold(2, 'RP^2', r'\mathbb{RP}^2') ; RP2
```

Out[4]:

In [5]:

```
U1 = RP2.open_subset('U_1') ; U1
```

Out[5]:

In [6]:

```
X1.<x1,y1> = U1.chart() ; X1
```

Out[6]:

Note that since we have not specified any coordinate range in the arguments of chart(), the range of $(x_1,y_1)$ is $\mathbb{R}^2$.

Similarly, let $U_2$ be the set of lines through the origin of $\mathbb{R}^3$ that are not contained in the plane $x=0$. Any line in $U_2$ is uniquely determined by its intersection $(1,y,z)$ with the plane $x=1$, leading to coordinates $(x_2,y_2)=(y,z)$ on $U_2$:

In [7]:

```
U2 = RP2.open_subset('U_2')
X2.<x2,y2> = U2.chart() ; X2
```

Out[7]:

In [8]:

```
U3 = RP2.open_subset('U_3')
X3.<x3,y3> = U3.chart() ; X3
```

Out[8]:

In [9]:

```
RP2.declare_union(U1.union(U2), U3)
U1.union(U2).union(U3)
```

Out[9]:

At this stage, three open covers of $\mathbb{RP}^2$ have been constructed:

In [10]:

```
RP2.open_covers()
```

Out[10]:

In [11]:

```
X1_to_X2 = X1.transition_map(X2, (y1/x1, 1/x1), intersection_name='U_{12}',
restrictions1= x1!=0, restrictions2= y2!=0)
X1_to_X2.display()
```

Out[11]:

The inverse of this transition map is easily computed by Sage:

In [12]:

```
X2_to_X1 = X1_to_X2.inverse()
X2_to_X1.display()
```

Out[12]:

In [13]:

```
X1_to_X3 = X1.transition_map(X3, (1/y1, x1/y1), intersection_name='U_{13}',
restrictions1= y1!=0, restrictions2= x3!=0)
X1_to_X3.display()
```

Out[13]:

In [14]:

```
X3_to_X1 = X1_to_X3.inverse()
X3_to_X1.display()
```

Out[14]:

In [15]:

```
X2_to_X3 = X2.transition_map(X3, (y2/x2, 1/x2), intersection_name='U_{23}',
restrictions1= x2!=0, restrictions2= y3!=0)
X2_to_X3.display()
```

Out[15]:

In [16]:

```
X3_to_X2 = X2_to_X3.inverse()
X3_to_X2.display()
```

Out[16]:

In [17]:

```
RP2.atlas()
```

Out[17]:

In [18]:

```
U12 = U1.intersection(U2)
U13 = U1.intersection(U3)
U23 = U2.intersection(U3)
X1.restrict(U12)
```

Out[18]:

In [19]:

```
X1.restrict(U12) is RP2.atlas()[3]
```

Out[19]:

It is well known that $\mathbb{RP}^2$ is not an orientable manifold. To illustrate this, let us make an attempt to construct a global non-vanishing 2-form $\epsilon$ on $\mathbb{RP}^2$. If we succeed, this would provide a volume form and $\mathbb{RP}^2$ would be orientable. We start by declaring $\epsilon$ as a 2-form on $\mathbb{RP}^2$:

In [20]:

```
eps = RP2.diff_form(2, name='eps', latex_name=r'\epsilon')
print(eps)
```

In [21]:

```
e1 = X1.frame() ; e1
```

Out[21]:

In [22]:

```
eps[e1,0,1] = 1
eps.display(e1)
```

Out[22]:

In [23]:

```
eps.display(X2.frame().restrict(U12), chart=X2.restrict(U12))
```

Out[23]:

Now, the complement of $U_{12}$ in $U_2$ is defined by $y_2=0$. The above expression shows that it is not possible to extend smoothly $\epsilon$ to the whole domain $U_2$. We conclude that starting from $\mathrm{d}x_1\wedge\mathrm{d}y_1$ on $U_1$, it is not possible to get a regular non-vanishing 2-form on $\mathbb{RP}^2$. This of course follows from the fact that $\mathbb{RP}^2$ is not orientable.

Let us first define $\mathbb{R}^3$ as a 3-dimensional manifold, with a single-chart atlas (Cartesian coordinates Y):

In [24]:

```
R3 = Manifold(3, 'R^3', r'\mathbb{R}^3')
Y.<x,y,z> = R3.chart()
```

The Steiner map is a map $\mathbb{RP}^2 \rightarrow \mathbb{R}^3$ defined as follows:

In [25]:

```
Phi = RP2.diff_map(R3, {(X1,Y): [y1/(1+x1^2+y1^2), x1/(1+x1^2+y1^2), x1*y1/(1+x1^2+y1^2)],
(X2,Y): [x2*y2/(1+x2^2+y2^2), y2/(1+x2^2+y2^2), x2/(1+x2^2+y2^2)],
(X3,Y): [x3/(1+x3^2+y3^2), x3*y3/(1+x3^2+y3^2), y3/(1+x3^2+y3^2)]},
name='Phi', latex_name=r'\Phi')
Phi.display()
```

Out[25]:

**Roman surface**:

In [26]:

```
g1 = parametric_plot3d(Phi.expr(X1,Y), (x1,-10,10), (y1,-10,10), plot_points=[100,100])
g2 = parametric_plot3d(Phi.expr(X2,Y), (x2,-10,10), (y2,-10,10), plot_points=[100,100])
g3 = parametric_plot3d(Phi.expr(X3,Y), (x3,-10,10), (y3,-10,10), plot_points=[100,100])
show(g1+g2+g3, viewer=viewer3D)
```