Skip to content

Use LaTeX commands instead of Unicode characters #40589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/es/tutorial/tour_help.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ El indexado de una lista comienza en el cero, como en muchos lenguajes de progra

La función ``len(v)`` devuelve la longitud de ``v``. Utiliza ``v.append(obj)`` para
añadir un nuevo objeto al final de ``v``, y utiliza ``del v[i]`` para borrar
el :math:`i-ésimo` elemento de ``v``:
el :math:`i`-ésimo elemento de ``v``:

.. link

Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/matrices/dancing_links.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ cdef class dancing_linksWrapper:
Return the SAT solver solving an equivalent problem.

Note that row index `i` in the dancing links solver corresponds to
the boolean variable index `ì+1` for the SAT solver to avoid
the boolean variable index `i+1` for the SAT solver to avoid
the variable index `0`.

See also :mod:`sage.sat.solvers.satsolver`.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/graphs/matching_covered_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ def is_brace(self, coNP_certificate=False):

For a brace `G[A, B]` of order six or more, `|N(X)| \geq |X| + 2`, for
all `X \subset A` such that `0 < |X| <|A| - 1`, where
`N(S) := \{b | (a, b) \in E \^ a \in S\}` is called the neighboring set
`N(S) := \{b | (a, b) \in E \wedge a \in S\}` is called the neighboring set
of `S`::

sage: H = graphs.MoebiusLadderGraph(15)
Expand Down
32 changes: 16 additions & 16 deletions src/sage/stats/distributions/discrete_gaussian_integer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ r"""
Discrete Gaussian Samplers over the Integers

This class realizes oracles which returns integers proportionally to
`\exp(-(x-c)^2/(^2))`. All oracles are implemented using rejection sampling.
`\exp(-(x-c)^2/(2\sigma^2))`. All oracles are implemented using rejection sampling.
See :func:`DiscreteGaussianDistributionIntegerSampler.__init__` for which algorithms are
available.

Expand All @@ -18,7 +18,7 @@ AUTHORS:

EXAMPLES:

We construct a sampler for the distribution `D_{3,c}` with width `σ=3` and center `c=0`::
We construct a sampler for the distribution `D_{3,c}` with width `\sigma=3` and center `c=0`::

sage: from sage.stats.distributions.discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler
sage: sigma = 3.0
Expand Down Expand Up @@ -169,19 +169,19 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):
INPUT:

- ``sigma`` -- samples `x` are accepted with probability proportional to
`\exp(-(x-c)²/(2σ²))`
`\exp(-(x-c)^2/(2\sigma^2))`

- ``c`` -- the mean of the distribution. The value of ``c`` does not have
to be an integer. However, some algorithms only support integer-valued
``c`` (default: ``0``)

- ``tau`` -- samples outside the range `(⌊c⌉-⌈στ⌉,...,⌊c⌉+⌈στ⌉)` are
- ``tau`` -- samples outside the range `(⌊c⌉-⌈\sigma\tau⌉,...,⌊c⌉+⌈\sigma\tau⌉)` are
considered to have probability zero. This bound applies to algorithms which
sample from the uniform distribution (default: ``6``)

- ``algorithm`` -- see list below (default: ``'uniform+table'`` for
`σt` bounded by ``DiscreteGaussianDistributionIntegerSampler.table_cutoff`` and
``'uniform+online'`` for bigger `στ`)
`\sigma\tau` bounded by ``DiscreteGaussianDistributionIntegerSampler.table_cutoff`` and
``'uniform+online'`` for bigger `\sigma\tau`)

- ``precision`` -- either ``'mp'`` for multi-precision where the actual
precision used is taken from sigma or ``'dp'`` for double precision. In
Expand All @@ -191,27 +191,27 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):

- ``'uniform+table'`` -- classical rejection sampling, sampling from the
uniform distribution and accepted with probability proportional to
`\exp(-(x-c)²/(2σ²))` where `\exp(-(x-c)²/(2σ²))` is precomputed and
`\exp(-(x-c)^2/(2\sigma^2))` where `\exp(-(x-c)^2/(2\sigma^2))` is precomputed and
stored in a table. Any real-valued `c` is supported.

- ``'uniform+logtable'`` -- samples are drawn from a uniform distribution and
accepted with probability proportional to `\exp(-(x-c)²/(2σ²))` where
`\exp(-(x-c)²/(2σ²))` is computed using logarithmically many calls to
accepted with probability proportional to `\exp(-(x-c)^2/(2\sigma^2))` where
`\exp(-(x-c)^2/(2\sigma^2))` is computed using logarithmically many calls to
Bernoulli distributions. See [DDLL2013]_ for details. Only
integer-valued `c` are supported.

- ``'uniform+online'`` -- samples are drawn from a uniform distribution and
accepted with probability proportional to `\exp(-(x-c)²/(2σ²))` where
`\exp(-(x-c)²/(2σ²))` is computed in each invocation. Typically this
accepted with probability proportional to `\exp(-(x-c)^2/(2\sigma^2))` where
`\exp(-(x-c)^2/(2\sigma^2))` is computed in each invocation. Typically this
is very slow. See [DDLL2013]_ for details. Any real-valued `c` is
accepted.

- ``'sigma2+logtable'`` -- samples are drawn from an easily samplable
distribution with `σ = k·σ_2` with `σ_2 = \sqrt{1/(2\log 2)}` and accepted
with probability proportional to `\exp(-(x-c)²/(2σ²))` where
`\exp(-(x-c)²/(2σ²))` is computed using logarithmically many calls to Bernoulli
distribution with `\sigma = k\cdot\sigma_2` with `\sigma_2 = \sqrt{1/(2\log 2)}` and accepted
with probability proportional to `\exp(-(x-c)^2/(2\sigma^2))` where
`\exp(-(x-c)^2/(2\sigma^2))` is computed using logarithmically many calls to Bernoulli
distributions (but no calls to `\exp`). See [DDLL2013]_ for details. Note that this
sampler adjusts `σ` to match `k·σ_2` for some integer `k`.
sampler adjusts `\sigma` to match `k\cdot\sigma_2` for some integer `k`.
Only integer-valued `c` are supported.

EXAMPLES::
Expand All @@ -224,7 +224,7 @@ cdef class DiscreteGaussianDistributionIntegerSampler(SageObject):
sage: DiscreteGaussianDistributionIntegerSampler(3.0, algorithm='uniform+logtable')
Discrete Gaussian sampler over the Integers with sigma = 3.000000 and c = 0.000000

Note that ``'sigma2+logtable'`` adjusts `σ`::
Note that ``'sigma2+logtable'`` adjusts `\sigma`::

sage: DiscreteGaussianDistributionIntegerSampler(3.0, algorithm='sigma2+logtable')
Discrete Gaussian sampler over the Integers with sigma = 3.397287 and c = 0.000000
Expand Down
4 changes: 2 additions & 2 deletions src/sage/stats/distributions/discrete_gaussian_polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

This class realizes oracles which returns polynomials in `\ZZ[x]`
where each coefficient is sampled independently with a probability
proportional to `\exp(-(x-c)²/(2σ²))`.
proportional to `\exp(-(x-c)^2/(2\sigma^2))`.

AUTHORS:

Expand Down Expand Up @@ -89,7 +89,7 @@ def __init__(self, P, n, sigma):
- ``P`` -- a univariate polynomial ring over the Integers
- ``n`` -- number of coefficients to be sampled
- ``sigma`` -- coefficients `x` are accepted with probability
proportional to `\exp(-x²/(2σ²))`. If an object of type
proportional to `\exp(-x^2/(2\sigma^2))`. If an object of type
:class:`sage.stats.distributions.discrete_gaussian_integer.DiscreteGaussianDistributionIntegerSampler`
is passed, then this sampler is used to sample coefficients.

Expand Down
Loading