Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Several other corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jplab committed Feb 28, 2018
1 parent bd6c356 commit b1ce45b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
68 changes: 35 additions & 33 deletions src/doc/en/thematic_tutorials/geometry/lectures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,46 +32,48 @@ during the SageDays 84 in Olot (Spain).
Lecture 0: Basic definitions and constructions
==============================================

A real :math:`(k\times d)`-matrix :math:`A` and a real vector :math:`b`
in :math:`\mathbb{R}^d` define a (convex) **polyhedron** :math:`P` as the set of solutions
A real `(k\times d)`-matrix `A` and a real vector `b`
in `\mathbb{R}^d` define a (convex) **polyhedron** `P` as the set of solutions
of the system of linear inequalities:

.. MATH::
A\cdot x + b \geq 0.
Each row of :math:`A` defines a closed half-space of :math:`\mathbb{R}^d`.
Each row of `A` defines a closed half-space of `\mathbb{R}^d`.
Hence a polyhedron is the intersection of finitely many closed half-spaces in
:math:`\mathbb{R}^d`. The matrix :math:`A` may contain equal rows, which may lead to a
`\mathbb{R}^d`. The matrix `A` may contain equal rows, which may lead to a
set of *equalities* satisfied by the polyhedron. If there are no redundant rows
in the above definition, this definition is referred to as the
:math:`\mathbf{H}` **-representation** of a polyhedron.
`\mathbf{H}` **-representation** of a polyhedron.

The maximal affine subspace :math:`L` contained in a polyhedron is the
**lineality** space. Fixing a point :math:`o` of the lineality space to act
as the *origin*, one can write every point :math:`p` inside a polyhedron as a combination
A maximal affine subspace `L` contained in a polyhedron is a **lineality** space of
`P`. Fixing a point `o` of the lineality space `L` to act
as the *origin*, one can write every point `p` inside a polyhedron as a combination

.. MATH::
p = \ell +\sum_{i=1}^{n}\lambda_iv_i+\sum_{i=1}^{m}\mu_ir_i,
where :math:`\ell\in L` (using :math:`o` as the origin), :math:`\sum_{i=1}^n\lambda_i=1`,
:math:`\mu_i\geq0`, and :math:`r_i\neq0` for all :math:`0\leq i\leq m` and the
set of :math:`r_i` 's are positively independent (the origin is not in their positive span).
There are many equivalent ways to write the above, so one asks :math:`n` and :math:`m`
to be minimal with that property.
where `\ell\in L` (using `o` as the origin), `\sum_{i=1}^n\lambda_i=1`,
`\lambda_i\geq0`, `\mu_i\geq0`, and `r_i\neq0` for all `0\leq i\leq m` and the
set of `r_i` 's are positively independent (the origin is not in their positive span).
For a given point `p` there may be many equivalent ways to write the above using
different sets `\{v_i\}_{i=1}^{n}` and `\{r_i\}_{i=1}^{m}`. Hence we require the sets
to be inclusion minimal sets such that we can get the above property equality
for any point `p\in P`.

The points :math:`v_i` are called the *vertices* of :math:`P` and the points
:math:`r_i` are called the *rays* of :math:`P`.
The vectors `v_i` are called the *vertices* of `P` and the vectors
`r_i` are called the *rays* of `P`.
This way to represent a polyhedron is referred to as the
:math:`\mathbf{V}` **-representation** of a polyhedron. The second sum represents the *convex
hull* of the vertices :math:`v_i` 's and the second sum represents a *pointed
`\mathbf{V}` **-representation** of a polyhedron. The first sum represents the *convex
hull* of the vertices `v_i` 's and the second sum represents a *pointed
polyhedral cone* generated by finitely many rays.

When the lineality space and the rays are reduced to a point (i.e. no rays and
no lines) the object is often referred to as a **polytope**.

.. note :: As mentioned in the documentation of the constructor when typing :code:`Polyhedron?`,
.. note :: As mentioned in the documentation of the constructor when typing :code:`Polyhedron?`:
*You may either define it with vertex/ray/line or
inequalities/equations data, but not both. Redundant data will
Expand All @@ -80,7 +82,7 @@ no lines) the object is often referred to as a **polytope**.
Here is the documentation for the constructor function of :ref:`sage.geometry.polyhedron.constructor`.
:math:`V`-representation
`V`-representation
------------------------

First, let's define a polyhedron object as the convex hull of a set of points
Expand All @@ -98,7 +100,7 @@ The string representation already gives a lot of information:

- the dimension of the polyhedron (the smallest affine space containing it)
- the dimension of the space in which it is defined
- the base ring (:math:`\mathbb{Z}^2`) over which the polyhedron lives (this specifies the parent class, see :ref:`sage.geometry.polyhedron.parent`)
- the base ring (`\mathbb{Z}^2`) over which the polyhedron lives (this specifies the parent class, see :ref:`sage.geometry.polyhedron.parent`)
- the number of vertices
- the number of rays

Expand All @@ -125,7 +127,7 @@ We can also add a lineality space.

.. end of output
Notice that the base ring changes because of the value :math:`\frac{1}{2}`.
Notice that the base ring changes because of the value `\frac{1}{2}`.
Indeed, Sage finds an appropriate ring to define the object.

::
Expand Down Expand Up @@ -281,8 +283,8 @@ without having specified the base ring :code:`RDF` by the user.
`H`-representation
------------------

If a polyhedron object was constructed via a :math:`V`-representation, Sage can provide
the :math:`H`-representation of the object.
If a polyhedron object was constructed via a `V`-representation, Sage can provide
the `H`-representation of the object.

::

Expand All @@ -294,9 +296,9 @@ the :math:`H`-representation of the object.

.. end of output
Each line gives a row of the matrix :math:`A` and an entry of the vector :math:`b`.
The variable :math:`x` is a vector in the ambient space where :code:`P1` is
defined. The :math:`H`-representation may contain equations:
Each line gives a row of the matrix `A` and an entry of the vector `b`.
The variable `x` is a vector in the ambient space where :code:`P1` is
defined. The `H`-representation may contain equations:

::

Expand All @@ -307,8 +309,8 @@ defined. The :math:`H`-representation may contain equations:

.. end of output
The construction of a polyhedron object via its :math:`H`-representation,
requires a precise format. Each inequality :math:`(a_{i1}, \dots, a_{id})\cdot
The construction of a polyhedron object via its `H`-representation,
requires a precise format. Each inequality `(a_{i1}, \dots, a_{id})\cdot
x + b_i \geq 0` must be written as :code:`[b_i,a_i1, ..., a_id]`.

::
Expand Down Expand Up @@ -360,13 +362,13 @@ the data before defining the polyhedron if possible.
Lecture 1: Representation objects
===================================

Many objects are related to the :math:`H`- and :math:`V`-representations. Sage
Many objects are related to the `H`- and `V`-representations. Sage
has classes implemented for them.

`H`-representation
------------------

You can store the :math:`H`-representation in a variable and use the
You can store the `H`-representation in a variable and use the
inequalities and equalities as objects.

::
Expand Down Expand Up @@ -395,7 +397,7 @@ inequalities and equalities as objects.

.. end of output
It is possible to obtain the different objects of the :math:`H`-representation
It is possible to obtain the different objects of the `H`-representation
as follows.

::
Expand Down Expand Up @@ -444,7 +446,7 @@ Similarly, you can access to vertices, rays and lines of the polyhedron.

.. end of output
It is possible to obtain the different objects of the :math:`V`-representation
It is possible to obtain the different objects of the `V`-representation
as follows.

::
Expand Down Expand Up @@ -572,7 +574,7 @@ but not algebraic or symbolic values:
.. end of output
It is possible to get the :code:`cdd` format of any polyhedron object defined
over :math:`\mathbb{Z}`, :math:`\mathbb{Q}`, or :code:`RDF`:
over `\mathbb{Z}`, `\mathbb{Q}`, or :code:`RDF`:

::

Expand Down
6 changes: 3 additions & 3 deletions src/doc/en/thematic_tutorials/geometry/polytutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Basics
""""""

First, let's define a polytope as the convex hull of a set of points,
i.e. given :math:`S` we compute :math:`P={\rm conv}(S)`:
i.e. given `S` we compute `P={\rm conv}(S)`:


::
Expand Down Expand Up @@ -60,11 +60,11 @@ That notation is not immediately parseable, because seriously,
those do not look like equations of lines (or of halfspaces, which is
really what they are).

``(-4, 1) x + 12 >= 0`` really means :math:`(-4, 1)\cdot\vec{x} + 12 \geq 0`.
``(-4, 1) x + 12 >= 0`` really means `(-4, 1)\cdot\vec{x} + 12 \geq 0`.

So... if you want to define a polytope via inequalities, you have to
translate each inequality into a vector. For example,
:math:`(-4, 1)\cdot\vec{x} + 12 \geq 0` becomes (12, \-4, 1).
`(-4, 1)\cdot\vec{x} + 12 \geq 0` becomes (12, \-4, 1).


::
Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/thematic_tutorials/geometry/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object, you can!
:code:`repr_pretty_Hrepresentation`
==============================================================

If you would like to visualize the :math:`H`-representation nicely and even get
If you would like to visualize the `H`-representation nicely and even get
the latex presentation, there is a method for that!

::
Expand Down

0 comments on commit b1ce45b

Please sign in to comment.