From b1ce45bf1bf1f6d4546abe501b750a44a4c64aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Philippe=20Labb=C3=A9?= Date: Wed, 28 Feb 2018 18:03:02 +0100 Subject: [PATCH] Several other corrections --- .../thematic_tutorials/geometry/lectures.rst | 68 ++++++++++--------- .../geometry/polytutorial.rst | 6 +- .../en/thematic_tutorials/geometry/tips.rst | 2 +- 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/doc/en/thematic_tutorials/geometry/lectures.rst b/src/doc/en/thematic_tutorials/geometry/lectures.rst index 10f56577b27..faee1b12fa7 100644 --- a/src/doc/en/thematic_tutorials/geometry/lectures.rst +++ b/src/doc/en/thematic_tutorials/geometry/lectures.rst @@ -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 @@ -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 @@ -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 @@ -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. :: @@ -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. :: @@ -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: :: @@ -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]`. :: @@ -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. :: @@ -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. :: @@ -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. :: @@ -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`: :: diff --git a/src/doc/en/thematic_tutorials/geometry/polytutorial.rst b/src/doc/en/thematic_tutorials/geometry/polytutorial.rst index 6f410d90f8a..f5aa9d6d758 100644 --- a/src/doc/en/thematic_tutorials/geometry/polytutorial.rst +++ b/src/doc/en/thematic_tutorials/geometry/polytutorial.rst @@ -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)`: :: @@ -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). :: diff --git a/src/doc/en/thematic_tutorials/geometry/tips.rst b/src/doc/en/thematic_tutorials/geometry/tips.rst index a9bf351c7ff..f0f45bcfe16 100644 --- a/src/doc/en/thematic_tutorials/geometry/tips.rst +++ b/src/doc/en/thematic_tutorials/geometry/tips.rst @@ -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! ::