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

Commit

Permalink
Merge #34169
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jul 14, 2022
2 parents e371ff6 + 4950d2b commit e713cec
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/sage/interacts/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def library_interact(
INPUT:
- ``**widgets`` -- keyword arguments that are passed to the
``interact`` function to create the widgets. Each value must be a callable that
returns a widget.
``interact`` function to create the widgets. Each value must
be a callable that returns a widget.
EXAMPLES::
Expand Down
27 changes: 13 additions & 14 deletions src/sage/rings/localization.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
r"""
Localization
Localization is an important ring construction tool. Whenever you have to extend a given
integral domain such that it contains the inverses of a finite set of elements but should
allow non injective homomorphic images this construction will be needed. See the example
on Ariki-Koike algebras below for such an application.
Localization is an important ring construction tool. Whenever you have
to extend a given integral domain such that it contains the inverses
of a finite set of elements but should allow non injective homomorphic
images this construction will be needed. See the example on
Ariki-Koike algebras below for such an application.
EXAMPLES::
Expand All @@ -32,8 +32,8 @@
sage: u = [u0, u1, u2]
sage: S = Set(u)
sage: I = S.cartesian_product(S)
sage: add_units = u + [q, q+1] + [ui -uj for ui, uj in I if ui != uj]\
+ [q*ui -uj for ui, uj in I if ui != uj]
sage: add_units = u + [q, q + 1] + [ui - uj for ui, uj in I if ui != uj]
sage: add_units += [q*ui - uj for ui, uj in I if ui != uj]
sage: L = R.localization(tuple(add_units)); L
Multivariate Polynomial Ring in u0, u1, u2, q over Integer Ring localized at
(q, q + 1, u2, u1, u1 - u2, u0, u0 - u2, u0 - u1, u2*q - u1, u2*q - u0,
Expand All @@ -42,12 +42,12 @@
Define the representation matrices (of one of the three dimensional irreducible representations)::
sage: m1 = matrix(L, [[u1, 0, 0],[0, u0, 0],[0, 0, u0]])
sage: m2 = matrix(L, [[(u0*q - u0)/(u0 - u1), (u0*q - u1)/(u0 - u1), 0],\
[(-u1*q + u0)/(u0 - u1), (-u1*q + u1)/(u0 - u1), 0],\
[0, 0, -1]])
sage: m3 = matrix(L, [[-1, 0, 0],\
[0, u0*(1 - q)/(u1*q - u0), q*(u1 - u0)/(u1*q - u0)],\
[0, (u1*q^2 - u0)/(u1*q - u0), (u1*q^ 2 - u1*q)/(u1*q - u0)]])
sage: m2 = matrix(L, [[(u0*q - u0)/(u0 - u1), (u0*q - u1)/(u0 - u1), 0],
....: [(-u1*q + u0)/(u0 - u1), (-u1*q + u1)/(u0 - u1), 0],
....: [0, 0, -1]])
sage: m3 = matrix(L, [[-1, 0, 0],
....: [0, u0*(1 - q)/(u1*q - u0), q*(u1 - u0)/(u1*q - u0)],
....: [0, (u1*q^2 - u0)/(u1*q - u0), (u1*q^ 2 - u1*q)/(u1*q - u0)]])
sage: m1.base_ring() == L
True
Expand Down Expand Up @@ -100,7 +100,6 @@
[ 0 4 5]
[ 0 7 6]
Obtain specializations in characteristic 0::
sage: fQ = L.hom((3,5,7,11), codomain=QQ); fQ
Expand Down
16 changes: 9 additions & 7 deletions src/sage/rings/number_field/number_field_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3009,13 +3009,15 @@ def _p_quotient(self, p):
computing the quotient of the ring of integers by a prime ideal.
INPUT:
p -- a prime number contained in self.
- ``p`` -- a prime number contained in ``self``
OUTPUT:
V -- a vector space of characteristic p
quo -- a partially defined quotient homomorphism from the
ambient number field to V
lift -- a section of quo.
- ``V`` -- a vector space of characteristic ``p``
- ``quo`` -- a partially defined quotient homomorphism from the
ambient number field to ``V``
- ``lift`` -- a section of ``quo``.
EXAMPLES::
Expand Down Expand Up @@ -3250,7 +3252,7 @@ def __call__(self, x):
return self.__Q( list(w) )

def __repr__(self):
"""
r"""
Return a string representation of this QuotientMap.
EXAMPLES::
Expand Down Expand Up @@ -3315,7 +3317,7 @@ def __call__(self, x):
return self.__OK(sum(z[i] * self.__Kgen ** i for i in range(len(z))))

def __repr__(self):
"""
r"""
Return a string representation of this QuotientMap.
EXAMPLES::
Expand Down
18 changes: 9 additions & 9 deletions src/sage/rings/padics/padic_lattice_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,10 @@ def _div_(self, other):
r"""
Return the quotient of this element and ``other``.
NOTE::
.. NOTE::
The result of division always lives in the fraction field,
even if the element to be inverted is a unit.
The result of division always lives in the fraction field,
even if the element to be inverted is a unit.
EXAMPLES::
Expand Down Expand Up @@ -660,10 +660,10 @@ def __invert__(self):
r"""
Return the multiplicative inverse of this element.
NOTE::
.. NOTE::
The result of division always lives in the fraction field,
even if the element to be inverted is a unit.
The result of division always lives in the fraction field,
even if the element to be inverted is a unit.
EXAMPLES::
Expand Down Expand Up @@ -1278,10 +1278,10 @@ def _is_exact_zero(self):
r"""
Return ``True`` if this element is exactly zero.
NOTE::
.. NOTE::
Since exact zeros are not supported in the precision lattice
model, this function always returns ``False``.
Since exact zeros are not supported in the precision lattice
model, this function always returns ``False``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/quotient_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2])
sage: S = R.quotient_ring(I)
.. todo::
.. TODO::
The following skipped tests should be removed once :trac:`13999` is fixed::
Expand Down

0 comments on commit e713cec

Please sign in to comment.