bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
sage: def my_carmichael(n): | sage: def my_carmichael(n): | 460,400 |
sage: def my_carmichael(n): | sage: def my_carmichael(n): | 460,401 |
sage: def my_carmichael(n): | sage: def my_carmichael(n): | 460,402 |
sage: def my_carmichael(n): | sage: def my_carmichael(n): | 460,403 |
def least_significant_bits(n, k): r""" Return the ``k`` least significant bits of ``n``. INPUT: - ``n`` -- an integer. - ``k`` -- a positive integer. OUTPUT: - The ``k`` least significant bits of the integer ``n``. If ``k=1``, then return the parity bit of the integer ``n``. Let `b` be the binary representation of... | def least_significant_bits(n, k): r""" Return the ``k`` least significant bits of ``n``. INPUT: - ``n`` -- an integer. - ``k`` -- a positive integer. OUTPUT: - The ``k`` least significant bits of the integer ``n``. If ``k=1``, then return the parity bit of the integer ``n``. Let `b` be the binary representation of... | 460,404 |
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th... | def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th... | 460,405 |
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th... | def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th... | 460,406 |
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th... | def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th... | 460,407 |
def _ambient_space_point(self, data): r""" Try to convert ``data`` to a point of the ambient space of ``self``. | def _ambient_space_point(self, data): r""" Try to convert ``data`` to a point of the ambient space of ``self``. | 460,408 |
def contains(self, *args): r""" Check if a given point is contained in ``self``. | def contains(self, *args): r""" Check if a given point is contained in ``self``. | 460,409 |
def contains(self, *args): r""" Check if a given point is contained in ``self``. | def contains(self, *args): r""" Check if a given point is contained in ``self``. | 460,410 |
def dual(self): r""" Return the dual cone of ``self``. OUTPUT: - :class:`cone <ConvexRationalPolyhedralCone>`. EXAMPLES:: sage: cone = Cone([(1,0), (-1,3)]) sage: cone.dual().rays() (M(3, 1), M(0, 1)) Now let's look at a more complicated case:: sage: cone = Cone([(-2,-1,2), (4,1,0), (-4,-1,-5), (4,1,5)]) sage: co... | def dual(self): r""" Return the dual cone of ``self``. OUTPUT: - :class:`cone <ConvexRationalPolyhedralCone>`. EXAMPLES:: sage: cone = Cone([(1,0), (-1,3)]) sage: cone.dual().rays() (M(3, 1), M(0, 1)) Now let's look at a more complicated case:: sage: cone = Cone([(-2,-1,2), (4,1,0), (-4,-1,-5), (4,1,5)]) sage: co... | 460,411 |
def facet_normals(self): r""" Return normals to facets of ``self``. | def facet_normals(self): r""" Return normals to facets of ``self``. | 460,412 |
def facet_normals(self): r""" Return normals to facets of ``self``. | def facet_normals(self): r""" Return normals to facets of ``self``. | 460,413 |
def _split_ambient_lattice(self): r""" Compute a decomposition of the ``N``-lattice into `N_\sigma` and its complement `N(\sigma)`. | def _split_ambient_lattice(self): r""" Compute a decomposition of the ``N``-lattice into `N_\sigma` and its complement `N(\sigma)`. | 460,414 |
def _split_ambient_lattice(self): r""" Compute a decomposition of the ``N``-lattice into `N_\sigma` and its complement `N(\sigma)`. | def _split_ambient_lattice(self): r""" Compute a decomposition of the ``N``-lattice into `N_\sigma` and its complement `N(\sigma)`. | 460,415 |
def orthogonal_sublattice(self, *args, **kwds): r""" The sublattice (in the dual lattice) orthogonal to the sublattice spanned by the cone. Let `M=` ``self.lattice().dual()`` be the lattice dual to the ambient lattice of the given cone `\sigma`. Then, in the notation of [Fulton]_, this method returns the sublattice | def orthogonal_sublattice(self, *args, **kwds): r""" The sublattice (in the dual lattice) orthogonal to the sublattice spanned by the cone. Let `M=` ``self.dual_lattice()`` be the lattice dual to the ambient lattice of the given cone `\sigma`. Then, in the notation of [Fulton]_, this method returns the sublattice | 460,416 |
def old_cremona_letter_code(n): r""" Returns the *old* Cremona letter code corresponding to an integer. integer. For example, :: 1 --> A 26 --> Z 27 --> AA 52 --> ZZ 53 --> AAA etc. INPUT: - ``n`` - int OUTPUT: str EXAMPLES:: sage: old_cremona_letter_code(1) 'A' sage: old_cremona_letter_code(26) 'Z' sage: ol... | def old_cremona_letter_code(n): r""" Returns the *old* Cremona letter code corresponding to an integer. integer. For example:: 1 --> A 26 --> Z 27 --> AA 52 --> ZZ 53 --> AAA etc. INPUT: - ``n`` - int OUTPUT: str EXAMPLES:: sage: old_cremona_letter_code(1) 'A' sage: old_cremona_letter_code(26) 'Z' sage: old_... | 460,417 |
def __iter__(self): """ Returns an iterator through all EllipticCurve objects in the Cremona database. | def __iter__(self): """ Returns an iterator through all EllipticCurve objects in the Cremona database. | 460,418 |
def iter(self, conductors): """ Returns an iterator through all curves with conductor between Nmin and Nmax-1, inclusive, in the database. INPUT: - ``conductors`` - list or generator of ints OUTPUT: generator that iterates over EllipticCurve objects. | def iter(self, conductors): """ Return an iterator through all curves in the database with given conductors. INPUT: - ``conductors`` - list or generator of ints OUTPUT: generator that iterates over EllipticCurve objects. | 460,419 |
def iter_optimal(self, conductors): """ Returns an iterator through all optimal curves with conductor between Nmin and Nmax-1 in the database. INPUT: | def iter_optimal(self, conductors): """ Return an iterator through all optimal curves in the database with given conductors. INPUT: | 460,420 |
def list(self, conductors): """ Returns a list of all curves with conductor between Nmin and Nmax-1, inclusive, in the database. INPUT: - ``conductors`` - list or generator of ints OUTPUT: - list of EllipticCurve objects. | def list(self, conductors): """ Returns a list of all curves with given conductors. INPUT: - ``conductors`` - list or generator of ints OUTPUT: - list of EllipticCurve objects. | 460,421 |
def list_optimal(self, conductors): """ Returns a list of all optimal curves with conductor between Nmin and Nmax-1, inclusive, in the database. INPUT: - ``conductors`` - list or generator of ints list of EllipticCurve objects. OUTPUT: list of EllipticCurve objects. | def list_optimal(self, conductors): """ Returns a list of all optimal curves with given conductors. INPUT: - ``conductors`` - list or generator of ints list of EllipticCurve objects. OUTPUT: list of EllipticCurve objects. | 460,422 |
def smallest_conductor(self): """ The smallest conductor for which the database is complete. (Always 1.) OUTPUT: - ``int`` - smallest conductor EXAMPLES:: sage: CremonaDatabase().smallest_conductor() 1 """ return 1 | def smallest_conductor(self): """ The smallest conductor for which the database is complete: always 1. OUTPUT: - ``int`` - smallest conductor EXAMPLES:: sage: CremonaDatabase().smallest_conductor() 1 """ return 1 | 460,423 |
def conductor_range(self): """ Return the range of conductors that are covered by the database. OUTPUT: - ``int`` - smallest cond - ``int`` - largest conductor plus one EXAMPLES:: sage: from sage.databases.cremona import LargeCremonaDatabase # optional - database_cremona_ellcurve sage: c = LargeCremonaDatabas... | def conductor_range(self): """ Return the range of conductors that are covered by the database. OUTPUT: tuple of ints (N1,N2+1) where N1 is the smallest and N2 the largest conductor for which the database is complete. EXAMPLES:: sage: from sage.databases.cremona import LargeCremonaDatabase # optional - database_c... | 460,424 |
def _init_allgens(self, ftpdata, largest_conductor=0): """ Initialize the allgens table by reading the corresponding ftpdata files and importing them into the database. """ if self.read_only: raise RuntimeError, "The database must not be read_only." files = os.listdir(ftpdata) files.sort() name = "allgens" c = _map[nam... | def _init_allgens(self, ftpdata, largest_conductor=0): """ Initialize the allgens table by reading the corresponding ftpdata files and importing them into the database. """ if self.read_only: raise RuntimeError, "The database must not be read_only." files = os.listdir(ftpdata) files.sort() name = "allgens" c = _map[nam... | 460,425 |
def KolakoskiWord(self, alphabet=(1,2)): r""" Returns the Kolakoski word over the given alphabet and starting with the first letter of the alphabet. | def KolakoskiWord(self, alphabet=(1,2)): r""" Returns the Kolakoski word over the given alphabet and starting with the first letter of the alphabet. | 460,426 |
def KolakoskiWord(self, alphabet=(1,2)): r""" Returns the Kolakoski word over the given alphabet and starting with the first letter of the alphabet. | def KolakoskiWord(self, alphabet=(1,2)): r""" Returns the Kolakoski word over the given alphabet and starting with the first letter of the alphabet. | 460,427 |
def map(self, f, name=None): """ Returns the image `\{f(x) x in self\}` of this combinatorial class by `f`, as a combinatorial class. | def map(self, f, name=None): r""" Returns the image `\{f(x) | x \in \text{self}\}` of this combinatorial class by `f`, as a combinatorial class. | 460,428 |
def map(self, f, name=None): """ Returns the image `\{f(x) x in self\}` of this combinatorial class by `f`, as a combinatorial class. | def map(self, f, name=None): """ Returns the image `\{f(x) x in self\}` of this combinatorial class by `f`, as a combinatorial class. | 460,429 |
def map(self, f, name=None): """ Returns the image `\{f(x) x in self\}` of this combinatorial class by `f`, as a combinatorial class. | def map(self, f, name=None): """ Returns the image `\{f(x) x in self\}` of this combinatorial class by `f`, as a combinatorial class. | 460,430 |
def _sage_(self, R=None): """ Coerces self to Sage. EXAMPLES:: sage: R = singular.ring(0, '(x,y,z)', 'dp') sage: A = singular.matrix(2,2) sage: A._sage_(ZZ) [0 0] [0 0] sage: A = random_matrix(ZZ,3,3); A [ -8 2 1] [ -1 2 1] [-95 -1 -2] sage: As = singular(A); As -8 2 1 -1 2 1 -95 -1 -2... | def _sage_(self, R=None): """ Coerces self to Sage. EXAMPLES:: sage: R = singular.ring(0, '(x,y,z)', 'dp') sage: A = singular.matrix(2,2) sage: A._sage_(ZZ) [0 0] [0 0] sage: A = random_matrix(ZZ,3,3); A [ -8 2 1] [ -1 2 1] [-95 -1 -2] sage: As = singular(A); As -8 2 1 -1 2 1 -95 -1 -2 ... | 460,431 |
def Tableau(t): """ Returns the tableau object corresponding to t. Note that Sage uses the English convention for partitions and tableaux. EXAMPLES:: sage: t = Tableau([[1,2,3],[4,5]]); t [[1, 2, 3], [4, 5]] sage: t.shape() [3, 2] sage: t.is_standard() True """ if isinstance(t, Tableau_class): return t elif t in Tab... | def Tableau(t): """ Returns the tableau object corresponding to t. A tableau in sage is a finite list of lists, whose lengths are weakly decreasing, or an empty list, representing the empty tableau. The entries of a tableau can be any sage object. Note that Sage uses the English convention for partitions and tableau... | 460,432 |
def anti_restrict(self, n): """ Returns the skew tableau formed by removing all of the cells from self that are filled with a number less than EXAMPLES:: sage: t = Tableau([[1,2,3],[4,5]]); t [[1, 2, 3], [4, 5]] sage: t.anti_restrict(1) [[None, 2, 3], [4, 5]] sage: t.anti_restrict(2) [[None, None, 3], [4, 5]] sage: t... | def anti_restrict(self, n): """ Returns the skew tableau formed by removing all of the cells from self that are filled with a number less than `n`. EXAMPLES:: sage: t = Tableau([[1,2,3],[4,5]]); t [[1, 2, 3], [4, 5]] sage: t.anti_restrict(1) [[None, 2, 3], [4, 5]] sage: t.anti_restrict(2) [[None, None, 3], [4, 5]] sa... | 460,433 |
def up(self): """ An iterator for all the tableaux that can be obtained from self by adding a cell. EXAMPLES:: sage: t = Tableau([[1,2]]) sage: [x for x in t.up()] [[[1, 2, 3]], [[1, 2], [3]]] """ #Get a list of all places where we can add a cell #to the shape of self outside_corners = self.shape().outside_corners() | def up(self): """ An iterator for all the tableaux that can be obtained from self by adding a cell. EXAMPLES:: sage: t = Tableau([[1,2]]) sage: [x for x in t.up()] [[[1, 2, 3]], [[1, 2], [3]]] """ #Get a list of all places where we can add a cell #to the shape of self outside_corners = self.shape().outside_corners() | 460,434 |
def Tableaux(n=None): """ Returns the combinatorial class of tableaux. If n is specified, then it returns the combinatorial class of all tableaux of size n. EXAMPLES:: sage: T = Tableaux(); T Tableaux sage: [[1,2],[3,4]] in T True sage: [[1,2],[3]] in T True sage: [1,2,3] in T False :: sage: T = Tableaux(4); T Tabl... | def Tableaux(n=None): """ Returns the combinatorial class of tableaux. If n is specified, then it returns the combinatorial class of all tableaux of size n. A tableau in sage is a finite list of lists, whose lengths are weakly decreasing. The entries can be anything at all. EXAMPLES:: sage: T = Tableaux(); T Tablea... | 460,435 |
def Tableaux(n=None): """ Returns the combinatorial class of tableaux. If n is specified, then it returns the combinatorial class of all tableaux of size n. EXAMPLES:: sage: T = Tableaux(); T Tableaux sage: [[1,2],[3,4]] in T True sage: [[1,2],[3]] in T True sage: [1,2,3] in T False :: sage: T = Tableaux(4); T Tabl... | def Tableaux(n=None): """ Returns the combinatorial class of tableaux. If n is specified, then it returns the combinatorial class of all tableaux of size n. EXAMPLES:: sage: T = Tableaux(); T Tableaux sage: [[1,2],[3,4]] in T True sage: [[1,2],[3]] in T True :: sage: T = Tableaux(4); T Tableaux of size 4 sage: [[1,... | 460,436 |
def __repr__(self): """ TESTS:: sage: repr(Tableaux()) 'Tableaux' """ return "Tableaux" | def _repr_(self): """ TESTS:: sage: repr(Tableaux()) 'Tableaux' """ return "Tableaux" | 460,437 |
def __repr__(self): """ TESTS:: sage: repr(Tableaux(4)) 'Tableaux of size 4' """ return "Tableaux of size %s"%self.n | def _repr_(self): """ TESTS:: sage: repr(Tableaux(4)) 'Tableaux of size 4' """ return "Tableaux of size %s"%self.n | 460,438 |
def __repr__(self): """ TESTS:: sage: repr(StandardTableaux()) 'Standard tableaux' """ return "Standard tableaux" | def _repr_(self): """ TESTS:: sage: repr(StandardTableaux()) 'Standard tableaux' """ return "Standard tableaux" | 460,439 |
def __repr__(self): """ TESTS:: sage: repr(StandardTableaux(3)) 'Standard tableaux of size 3' """ return "Standard tableaux of size %s"%self.n | def _repr_(self): """ TESTS:: sage: repr(StandardTableaux(3)) 'Standard tableaux of size 3' """ return "Standard tableaux of size %s"%self.n | 460,440 |
def __repr__(self): """ TESTS:: sage: repr(StandardTableaux([2,1,1])) 'Standard tableaux of shape [2, 1, 1]' """ return "Standard tableaux of shape %s"%str(self.p) | def _repr_(self): """ TESTS:: sage: repr(StandardTableaux([2,1,1])) 'Standard tableaux of shape [2, 1, 1]' """ return "Standard tableaux of shape %s"%str(self.p) | 460,441 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None, max_entry=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard ... | 460,442 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p. If p is specified and is an integer, it returns the class of semistandard tableaux of size p. If mu is also spe... | 460,443 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,444 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,445 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,446 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,447 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,448 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,449 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,450 |
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size... | 460,451 |
def __init__(self): """ TESTS:: sage: SST = SemistandardTableaux() sage: SST == loads(dumps(SST)) True """ | def __init__(self, max_entry=None): """ TESTS:: sage: SST = SemistandardTableaux() sage: SST == loads(dumps(SST)) True """ | 460,452 |
def __init__(self): """ TESTS:: sage: SST = SemistandardTableaux() sage: SST == loads(dumps(SST)) True """ | def __init__(self): """ TESTS:: sage: SST = SemistandardTableaux() sage: SST == loads(dumps(SST)) True """ | 460,453 |
def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[5]] in SemistandardTableaux(max_entry=4) False """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to m... | 460,454 |
def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | 460,455 |
def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | 460,456 |
def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | def __contains__(self, x): """ TESTS:: sage: [[1,2],[1]] in SemistandardTableaux() False sage: SST = SemistandardTableaux() sage: all([st in SST for st in StandardTableaux(4)]) True sage: [[1,1],[2]] in SemistandardTableaux() True """ if x not in Tableaux(): return False else: t = Tableau(x) #Check to make sure the f... | 460,457 |
def __init__(self, n): """ TESTS:: sage: SST = SemistandardTableaux(3) sage: SST == loads(dumps(SST)) True """ self.n = n | def __init__(self, n, max_entry=None): """ TESTS:: sage: SST = SemistandardTableaux(3) sage: SST == loads(dumps(SST)) True """ self.n = n | 460,458 |
def __repr__(self): """ TESTS:: sage: repr(SemistandardTableaux(3)) 'Semistandard tableaux of size 3' """ return "Semistandard tableaux of size %s"%str(self.n) | self.max_entry = None if max_entry is None: self.max_entry = n else: self.max_entry = max_entry def _repr_(self): """ TESTS:: sage: repr(SemistandardTableaux(3)) 'Semistandard tableaux of size 3' """ return "Semistandard tableaux of size %s"%str(self.n) | 460,459 |
def __repr__(self): """ TESTS:: sage: repr(SemistandardTableaux(3)) 'Semistandard tableaux of size 3' """ return "Semistandard tableaux of size %s"%str(self.n) | def __repr__(self): """ TESTS:: sage: repr(SemistandardTableaux(3)) 'Semistandard tableaux of size 3' """ return "Semistandard tableaux of size %s"%str(self.n) | 460,460 |
def __contains__(self, x): """ EXAMPLES:: sage: [[1,2],[3,3]] in SemistandardTableaux(3) False sage: [[1,2],[3,3]] in SemistandardTableaux(4) True sage: SST = SemistandardTableaux(4) sage: all([sst in SST for sst in SST]) True """ return x in SemistandardTableaux() and sum(map(len, x)) == self.n | def __contains__(self, x): """ EXAMPLES:: sage: [[1,2],[3,3]] in SemistandardTableaux(3) False sage: [[1,2],[3,3]] in SemistandardTableaux(4) True sage: SST = SemistandardTableaux(4) sage: all([sst in SST for sst in SST]) True """ return x in SemistandardTableaux() and sum(map(len, x)) == self.n | 460,461 |
def cardinality(self): """ EXAMPLES:: sage: SemistandardTableaux(3).cardinality() 19 sage: SemistandardTableaux(4).cardinality() 116 sage: ns = range(1, 6) sage: ssts = [ SemistandardTableaux(n) for n in ns ] sage: all([sst.cardinality() == len(sst.list()) for sst in ssts]) True """ c = 0 for part in partition.Partiti... | def cardinality(self): """ EXAMPLES:: sage: SemistandardTableaux(3).cardinality() 19 sage: SemistandardTableaux(4).cardinality() 116 sage: ns = range(1, 6) sage: ssts = [ SemistandardTableaux(n) for n in ns ] sage: all([sst.cardinality() == len(sst.list()) for sst in ssts]) True """ c = 0 for part in partition.Partiti... | 460,462 |
def __iter__(self): """ EXAMPLES:: sage: [ t for t in SemistandardTableaux(2) ] [[[1, 1]], [[1, 2]], [[2, 2]], [[1], [2]]] sage: [ t for t in SemistandardTableaux(3) ] [[[1, 1, 1]], [[1, 1, 2]], [[1, 1, 3]], [[1, 2, 2]], [[1, 2, 3]], [[1, 3, 3]], [[2, 2, 2]], [[2, 2, 3]], [[2, 3, 3]], [[3, 3, 3]], [[1, 1], [2]], [[1, ... | def __iter__(self): """ EXAMPLES:: sage: [ t for t in SemistandardTableaux(2) ] [[[1, 1]], [[1, 2]], [[2, 2]], [[1], [2]]] sage: [ t for t in SemistandardTableaux(3) ] [[[1, 1, 1]], [[1, 1, 2]], [[1, 1, 3]], [[1, 2, 2]], [[1, 2, 3]], [[1, 3, 3]], [[2, 2, 2]], [[2, 2, 3]], [[2, 3, 3]], [[3, 3, 3]], [[1, 1], [2]], [[1, ... | 460,463 |
def __repr__(self): """ TESTS:: sage: repr(SemistandardTableaux([2,1],[2,1])) 'Semistandard tableaux of shape [2, 1] and evaluation [2, 1]' """ return "Semistandard tableaux of shape %s and evaluation %s"%(self.p, self.mu) | def _repr_(self): """ TESTS:: sage: repr(SemistandardTableaux([2,1],[2,1])) 'Semistandard tableaux of shape [2, 1] and evaluation [2, 1]' """ return "Semistandard tableaux of shape %s and evaluation %s"%(self.p, self.mu) | 460,464 |
def __contains__(self, x): """ EXAMPLES:: sage: SST = SemistandardTableaux([2,1], [2,1]) sage: all([sst in SST for sst in SST]) True sage: len(filter(lambda x: x in SST, SemistandardTableaux(3))) 1 sage: SST.cardinality() 1 """ if not x in SemistandardTableaux(self.p): return False n = sum(self.p) | def __contains__(self, x): """ EXAMPLES:: sage: SST = SemistandardTableaux([2,1], [2,1]) sage: all([sst in SST for sst in SST]) True sage: len(filter(lambda x: x in SST, SemistandardTableaux(3))) 1 sage: SST.cardinality() 1 """ if x not in SemistandardTableaux_p(self.p, self.max_entry): return False n = sum(self.p) | 460,465 |
def __init__(self, p): """ TESTS:: sage: SST = SemistandardTableaux([2,1]) sage: SST == loads(dumps(SST)) True """ self.p = p | def __init__(self, p, max_entry=None): """ TESTS:: sage: SST = SemistandardTableaux([2,1]) sage: SST == loads(dumps(SST)) True """ self.p = p | 460,466 |
def __contains__(self, x): """ EXAMPLES:: sage: SST = SemistandardTableaux([2,1]) sage: all([sst in SST for sst in SST]) True sage: len(filter(lambda x: x in SST, SemistandardTableaux(3))) 8 sage: SST.cardinality() 8 """ return x in SemistandardTableaux_all() and map(len, x) == self.p | def __contains__(self, x): """ EXAMPLES:: sage: SST = SemistandardTableaux([2,1]) sage: all([sst in SST for sst in SST]) True sage: len(filter(lambda x: x in SST, SemistandardTableaux(3))) 8 sage: SST.cardinality() 8 """ return x in SemistandardTableaux_all() and map(len, x) == self.p | 460,467 |
def __repr__(self): """ TESTS:: sage: repr(SemistandardTableaux([2,1])) 'Semistandard tableaux of shape [2, 1]' """ return "Semistandard tableaux of shape %s" % str(self.p) | def __repr__(self): """ TESTS:: sage: repr(SemistandardTableaux([2,1])) 'Semistandard tableaux of shape [2, 1]' """ return "Semistandard tableaux of shape %s" % str(self.p) | 460,468 |
def cardinality(self): """ EXAMPLES:: sage: SemistandardTableaux([2,1]).cardinality() 8 sage: SemistandardTableaux([2,2,1]).cardinality() 75 sage: s = SFASchur(QQ) sage: s([2,2,1]).expand(5)(1,1,1,1,1) 75 sage: SemistandardTableaux([5]).cardinality() 126 sage: SemistandardTableaux([3,2,1]).cardinality() 896 """ c = 0 ... | def cardinality(self): """ EXAMPLES:: sage: SemistandardTableaux([2,1]).cardinality() 8 sage: SemistandardTableaux([2,2,1]).cardinality() 75 sage: s = SFASchur(QQ) sage: s([2,2,1]).expand(5)(1,1,1,1,1) 75 sage: SemistandardTableaux([5]).cardinality() 126 sage: SemistandardTableaux([3,2,1]).cardinality() 896 """ c = 0 ... | 460,469 |
def __iter__(self): """ An iterator for the semistandard partitions of shape p. EXAMPLES:: sage: [ t for t in SemistandardTableaux([3]) ] [[[1, 1, 1]], [[1, 1, 2]], [[1, 1, 3]], [[1, 2, 2]], [[1, 2, 3]], [[1, 3, 3]], [[2, 2, 2]], [[2, 2, 3]], [[2, 3, 3]], [[3, 3, 3]]] sage: [ t for t in SemistandardTableaux([2,1]) ] ... | def __iter__(self): """ An iterator for the semistandard partitions of shape p. EXAMPLES:: sage: [ t for t in SemistandardTableaux([3]) ] [[[1, 1, 1]], [[1, 1, 2]], [[1, 1, 3]], [[1, 2, 2]], [[1, 2, 3]], [[1, 3, 3]], [[2, 2, 2]], [[2, 2, 3]], [[2, 3, 3]], [[3, 3, 3]]] sage: [ t for t in SemistandardTableaux([2,1]) ] ... | 460,470 |
def __init__(self, n, mu): """ TESTS:: sage: SST = SemistandardTableaux(3, [2,1]) sage: SST == loads(dumps(SST)) True """ self.n = n self.mu = mu | def __init__(self, n, mu): """ TESTS:: sage: SST = SemistandardTableaux(3, [2,1]) sage: SST == loads(dumps(SST)) True """ self.n = n self.mu = mu | 460,471 |
def __contains__(self, x): """ TESTS:: sage: SST = SemistandardTableaux(6, [2,2,2]) sage: all([sst in SST for sst in SST]) True sage: all([sst in SST for sst in SemistandardTableaux([3,2,1],[2,2,2])]) True """ return x in SemistandardTableaux_all() and x in SemistandardTableaux(map(len, x), self.mu) | def __contains__(self, x): """ TESTS:: sage: SST = SemistandardTableaux(6, [2,2,2]) sage: all([sst in SST for sst in SST]) True sage: all([sst in SST for sst in SemistandardTableaux([3,2,1],[2,2,2])]) True """ return x in SemistandardTableaux_all() and x in SemistandardTableaux(map(len, x), self.mu) | 460,472 |
def diamond_bracket_operator(self, d): r""" Return the diamond bracket d operator on this modular symbols space. | def diamond_bracket_operator(self, d): r""" Return the diamond bracket d operator on this modular symbols space. | 460,473 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 460,474 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 460,475 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 460,476 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 460,477 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 460,478 |
def _allowed_options(self): """ Return the allowed options for the Point class. | def _allowed_options(self): """ Return the allowed options for the Point class. | 460,479 |
def _allowed_options(self): """ Return the allowed options for the Point class. | def _allowed_options(self): """ Return the allowed options for the Point class. | 460,480 |
def point(points, **kwds): """ Returns either a 2-dimensional or 3-dimensional point or sum of points. INPUT: - ``points`` - either a single point (as a tuple) or a list of points. For information regarding additional arguments, see either point2d? or point3d?. EXAMPLES:: sage: point((1,2)) sage: point((1,2,3)) s... | def point(points, **kwds): """ Returns either a 2-dimensional or 3-dimensional point or sum of points. INPUT: - ``points`` - either a single point (as a tuple) or a list of points. For information regarding additional arguments, see either point2d? or point3d?. EXAMPLES:: sage: point((1,2)) sage: point((1,2,3)) s... | 460,481 |
def sturm_bound(self, M=None): r""" For a space M of modular forms, this function returns an integer B such that two modular forms in either self or M are equal if and only if their q-expansions are equal to precision B (note that this is 1+ the usual Sturm bound, since `O(q^\mathrm{prec})` has precision prec). If M is... | def sturm_bound(self, M=None): r""" For a space M of modular forms, this function returns an integer B such that two modular forms in either self or M are equal if and only if their q-expansions are equal to precision B (note that this is 1+ the usual Sturm bound, since `O(q^\mathrm{prec})` has precision prec). If M is... | 460,482 |
def _S_class_group_and_units(self, S, proof=True): """ Compute S class group and units. INPUT: - ``S`` - a tuple of primes of the base field - ``proof`` - if False, assume Pari's GRH++ in computing the class group OUTPUT: - ``units, clgp_gens``, where: - ``units`` - A list of generators of the unit group. - ``cl... | def sage: K.<a> = NumberField(polygen(QQ)) sage: K._S_class_group_and_units( (K.ideal(5),) ) ([5, -1], []) _S_class_group_and_units(self, sage: K.<a> = NumberField(polygen(QQ)) sage: K._S_class_group_and_units( (K.ideal(5),) ) ([5, -1], []) S, sage: K.<a> = NumberField(polygen(QQ)) sage: K._S_class_group_and_units( (K.... | 460,483 |
def selmer_group(self, S, m, proof=True): """ Compute the Selmer group `K(S,m)`, which is defined to be the subgroup of `K^\times/(K^\times)^m` consisting of elements `a` such that `K(\sqrt[m]{a})/K` is unramified at all primes of `K` lying above a place outside of `S`. INPUT: - ``S`` - A set of primes of self. - ``... | def selmer_group(self, S, m, proof=True): r""" Compute the Selmer group `K(S,m)`, which is defined to be the subgroup of `K^\times/(K^\times)^m` consisting of elements `a` such that `K(\sqrt[m]{a})/K` is unramified at all primes of `K` lying above a place outside of `S`. INPUT: - ``S`` - A set of primes of self. - `... | 460,484 |
def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial. INPUT: - ``R`` - (default: None) PolynomialRing If this polynomial is not in at most one variable, then a ValueError exception is raised. This is checked using the is_univariate() method. The n... | def univariate_polynomial(self, R=None): TESTS:: sage: P = PolynomialRing(QQ, 0, '') sage: P(5).univariate_polynomial() 5 """ if self.parent().ngens() == 0: if R is None: return self.base_ring()(self) else: return R(self) Returns a univariate polynomial associated to this multivariate polynomial. INPUT: - ``R`` ... | 460,485 |
def factor(self, proof=True): r""" Compute the irreducible factorization of this polynomial. INPUT: - ``proof'' - insist on provably correct results (ignored, always ``True``) ALGORITHM: Use univariate factorization code. If a polynomial is univariate, the appropriate univariate factorization code is called. :: s... | def if self == 0: raise ArithmeticError, "Prime factorization of 0 not defined." if R.ngens() == 0: base_ring = self.base_ring() if base_ring.is_field(): return Factorization([],unit=self.base_ring()(self)) else: F = base_ring(self).factor() return Factorization([(R(f),m) for f,m in F], unit=F.unit()) factor(self, ... | 460,486 |
def is_S_integral(self,S): r""" Return True if this fractional ideal is integral with respect to the list of primes ``S``. | def is_S_integral(self,S): r""" Return True if this fractional ideal is integral with respect to the list of primes ``S``. | 460,487 |
def install_package(package=None, force=False): """ Install a package or return a list of all packages that have been installed into this Sage install. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. It is not needed to provide the version number. INPUT: - ... | def install_package(package=None, force=False): """ Install a package or return a list of all packages that have been installed into this Sage install. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. It is not needed to provide the version number. INPUT: - ... | 460,488 |
def install_package(package=None, force=False): """ Install a package or return a list of all packages that have been installed into this Sage install. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. It is not needed to provide the version number. INPUT: - ... | def install_package(package=None, force=False): """ Install a package or a list of all packages that have been installed into this Sage install. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. It is not needed to provide the version number. INPUT: - ``pac... | 460,489 |
def upgrade(): """ Download and build the latest version of Sage. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. This upgrades to the latest version of core packages (optional packages are not automatically upgraded). This will not work on systems that don't... | def upgrade(): """ Download and build the latest version of Sage. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. This upgrades to the latest version of core packages (optional packages are not automatically upgraded). This will not work on systems that don't... | 460,490 |
def derivative(self, ex, operator): """ EXAMPLES:: | def derivative(self, ex, operator): """ EXAMPLES:: | 460,491 |
def derivative(self, ex, operator): """ EXAMPLES:: | def derivative(self, ex, operator): """ EXAMPLES:: | 460,492 |
def derivative(self, ex, operator): """ EXAMPLES:: | def derivative(self, ex, operator): """ EXAMPLES:: | 460,493 |
def derivative(self, ex, operator): """ EXAMPLES:: | def derivative(self, ex, operator): """ EXAMPLES:: | 460,494 |
... def __reduce__(self): | ... def __reduce__(self): | 460,495 |
def CPS_height_bound(self): r""" Return the Cremona-Prickett-Siksek height bound. This is a floating point number B such that if P is a rational point on the curve, then `|h(P) - \hat{h}(P)| \leq B`, where `h(P)` is the naive logarithmic height of `P` and `\hat{h}(P)` is the canonical height. | def CPS_height_bound(self): r""" Return the Cremona-Prickett-Siksek height bound. This is a floating point number B such that if P is a rational point on the curve, then `h(P) \le \hat{h}(P) + B`, where `h(P)` is the naive logarithmic height of `P` and `\hat{h}(P)` is the canonical height. | 460,496 |
def show(self, **kwds): """ Show this graphics image with the default image viewer. | def show(self, **kwds): """ Show this graphics image with the default image viewer. | 460,497 |
def __init__(self, s): """ TESTS:: sage: S = Subsets([1,2,3]) sage: S == loads(dumps(S)) True sage: s = Subsets(Set([1])) sage: e = s.first() sage: isinstance(e, s.element_class) True """ self.s = Set(s) | def __init__(self, s): """ TESTS:: sage: S = Subsets([1,2,3]) sage: TestSuite(S).run() sage: s = Subsets(Set([1])) sage: e = s.first() sage: isinstance(e, s.element_class) True """ self.s = Set(s) | 460,498 |
def unrank(self, r): """ Returns the subset of s that has rank k. EXAMPLES:: sage: Subsets(3).unrank(0) {} sage: Subsets([2,4,5]).unrank(1) {2} sage: s = Subsets([2,4,5]) """ | def unrank(self, r): """ Returns the subset of s that has rank k. EXAMPLES:: sage: Subsets(3).unrank(0) {} sage: Subsets([2,4,5]).unrank(1) {2} sage: s = Subsets([2,4,5]) """ | 460,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.