# Ticket #8800: some_ideas.patch

File some_ideas.patch, 32.0 KB (added by lftabera, 10 years ago)

Ideas to consider merging

• ## doc/en/reference/categories.rst

```# HG changeset patch
# Parent 74c911071a9a7ea5e77000bc00f3de2a9f0fdb07

diff -r 74c911071a9a doc/en/reference/categories.rst```
 a sage/categories/homset sage/categories/morphism sage/categories/functor sage/categories/pushout Functorial constructions ========================
• ## sage/categories/functor.pyx

`diff -r 74c911071a9a sage/categories/functor.pyx`
 a result is a homomorphism that is defined on the base ring:: sage: F = QQ['t'].construction()[0] sage: F Poly[t] sage: F(f) Ring morphism: From: Univariate Polynomial Ring in t over Univariate Polynomial Ring in x over Integer Ring def _apply_functor(self, x): """ Apply the functor to an object of ``self``'s domain Apply the functor to an object of ``self``'s domain. NOTE: def _apply_functor_to_morphism(self, f): """ Apply the functor to a morphism between two objects of ``self``'s domain Apply the functor to a morphism between two objects of ``self``'s domain. NOTE: def _coerce_into_domain(self, x): """ Interprete the argument as an object of self's domain Interprete the argument as an object of self's domain. NOTE: ... TypeError: x (=Integer Ring) is not in Category of fields """ if not (x in  self.__domain): raise TypeError, "x (=%s) is not in %s"%(x, self.__domain) ... TypeError: x (=Integer Ring) is not in Category of fields TESTS:: sage: R = IdentityFunctor(Rings()) sage: P, _ = QQ['t'].construction() sage: R == P False sage: P == R False sage: R == QQ False """ def __init__(self, C): """ def _apply_functor(self, x): """ Apply the functor to an object of ``self``'s domain. TESTS:: sage: fields = Fields()
• ## sage/categories/pushout.py

`diff -r 74c911071a9a sage/categories/pushout.py`
• ## sage/groups/perm_gps/permgroup.py

`diff -r 74c911071a9a sage/groups/perm_gps/permgroup.py`
 a if gens is None: self._gap_string = gap_group if isinstance(gap_group, str) else str(gap_group) self._gens = self._gens_from_gap() return return None gens = [self._element_class()(x, check=False).list() for x in gens] self._deg = max([0]+[max(g) for g in gens])
• ## sage/rings/number_field/number_field.py

`diff -r 74c911071a9a sage/rings/number_field/number_field.py`
 a sage: P. = QQ[] sage: K. = NumberField(x^3-5,embedding=0) sage: L. = K.extension(x^2+a) sage: F,R = L.construction() sage: F, R = L.construction() sage: F(R) == L    # indirect doctest True sage: S.coerce(y) is y True Fields with embeddings into an ambient field coerce naturally by the given embedding. :: Fields with embeddings into an ambient field coerce naturally by the given embedding:: sage: CyclotomicField(15).coerce(CyclotomicField(5).0 - 17/3) zeta15^3 - 17/3 # R is embedded, self isn't. So, we could only have # the forgetful coercion. But this yields to non-commuting # coercions, as was pointed out at ticket #8800 return return None def _magma_init_(self, magma): """
• ## sage/rings/number_field/number_field_ideal.py

`diff -r 74c911071a9a sage/rings/number_field/number_field_ideal.py`
 a sage: L. = NumberField(x^8-x^4+1) sage: F_2 = L.fractional_ideal(b^2-1) sage: F_4 = L.fractional_ideal(b^4-1) sage: F_2==F_4 sage: F_2 == F_4 True """
• ## sage/rings/polynomial/polynomial_quotient_ring.py

`diff -r 74c911071a9a sage/rings/polynomial/polynomial_quotient_ring.py`
 a sage: P.=ZZ[] sage: Q = P.quo(5+t^2) sage: F,R = Q.construction() sage: F, R = Q.construction() sage: F(R) == Q True sage: P. = GF(3)[] sage: Q = P.quo([2+t^2]) sage: F,R = Q.construction() sage: F, R = Q.construction() sage: F(R) == Q True