From 15e1b50c34f3529c808165974797ad4744c55119 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:11:47 +0000 Subject: [PATCH 01/24] Store Williamson type matrices as strings --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 342fa853af3..bb8b52ee97b 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -347,31 +347,29 @@ def williamson_type_quadruples_smallcases(n, existence=False): ValueError: The Williamson type quadruple of order 123 is not yet implemented. """ db = { - 1: ([1], [1], [1], [1]), - 7: ([1, -1, -1, 1, 1, -1, -1], - [1, -1, 1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, 1], - [1, -1, -1, -1, -1, -1, -1]), - 9: ([1, -1, -1, -1, 1, 1, -1, -1, -1], - [1, -1, -1, 1, -1, -1, 1, -1, -1], - [1, -1, 1, -1, -1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, -1, -1, 1]), - 29: ([1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1], - [1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1], - [1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1], - [1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1]), - 43: ([1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1], - [1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1], - [1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1], - [1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), + 1: ('+', '+', '+', '+'), + 7: ('+--++--', '+-+--+-', '++----+', '+------'), + 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), + 29: ('+++---++--+-+----+-+--++---++', + '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', + '++--+--+-+++-++++-+++-+--+--+'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', + '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', + '+---++--++++-+-+++-++--++-+++-+-++++--++---'), } + def pmtoZ(s): + return [1 if x == '+' else -1 for x in s] + if existence: return n in db if n not in db: raise ValueError("The Williamson type quadruple of order %s is not yet implemented." % n) - a, b, c, d = map(vector, db[n]) + + a, b, c, d = map(lambda s: vector(pmtoZ(s)), db[n]) return a, b, c, d From 5832798800e7c8b646423599889cdbff000ab45e Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:44:26 +0000 Subject: [PATCH 02/24] Add more williamson type matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index bb8b52ee97b..9a7d0df284a 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -312,7 +312,7 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for n=29 and n=43 are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. INPUT: @@ -348,12 +348,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): """ db = { 1: ('+', '+', '+', '+'), + 3: ('+++', '+--', '+--', '+--'), + 5: ('+-++-', '++--+', '+----', '+----'), 7: ('+--++--', '+-+--+-', '++----+', '+------'), 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), - 29: ('+++---++--+-+----+-+--++---++', - '+-+---++--+-++++++-+--++---+-', - '++++-++-+---++++++---+-++-+++', - '++--+--+-+++-++++-+++-+--+--+'), + 11: ('++--------+', '++-+-++-+-+', '++-++--++-+', '+-++----++-'), + 13: ('++++-+--+-+++', '+---+-++-+---', '++---+--+---+', '++---+--+---+'), + 15: ('+-+---++++---+-', '++-++------++-+', + '++-++++--++++-+', '++-++-+--+-++-+'), + 17: ('+---+++----+++---', '++-+---+--+---+-+', + '+--+-++++++++-+--', '+-++-+++--+++-++-'), + 19: ('++--+++-+--+-+++--+', '++-++--+-++-+--++-+', + '+-+---++++++++---+-', '++--+-++++++++-+--+'), + 21: ('+--++++---++---++++--', '++++-+---+--+---+-+++', + '++--+-+-++--++-+-+--+', '++-+++++-+--+-+++++-+'), + 23: ('++---+---+-++-+---+---+', '+-++-++--++++++--++-++-', + '+++---++-+-++-+-++---++', '+++-+++-+------+-+++-++'), + 25: ('++++-+-+-+--++--+-+-+-+++', '++--+--+-++++++++-+--+--+', + '+++--+--++++--++++--+--++', '+-+--+++--++++++--+++--+-'), + 27: ('+--+--+-+++--++--+++-+--+--', '+++-++-+---++--++---+-++-++', + '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), + 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', + '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', + '+--+++-+-----+----++----+-----+-+++--'), 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', '++-++++++----+-+--++-++-++--+-+----++++++-+', @@ -397,10 +417,10 @@ def williamson_hadamard_matrix_smallcases(n, existence=False, check=True): 116 x 116 dense matrix over Integer Ring... sage: williamson_hadamard_matrix_smallcases(172) 172 x 172 dense matrix over Integer Ring... - sage: williamson_hadamard_matrix_smallcases(100) + sage: williamson_hadamard_matrix_smallcases(1000) Traceback (most recent call last): ... - ValueError: The Williamson type Hadamard matrix of order 100 is not yet implemented. + ValueError: The Williamson type Hadamard matrix of order 1000 is not yet implemented. """ assert n % 4 == 0 From 80eddce6b09208250626f5ac37c55df3e009853b Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 19:28:08 +0000 Subject: [PATCH 03/24] Add other Williamson type matrices --- src/doc/en/reference/references/index.rst | 5 +++ src/sage/combinat/matrices/hadamard_matrix.py | 37 ++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index caeacee26ab..a10b5889127 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4109,6 +4109,11 @@ REFERENCES: of a genus 2 Jacobian*, Mathematics of Computation 88 (2019), 889-929. :doi:`10.1090/mcom/3358`. +.. [Lon2013] \S. London, + *Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*. + PhD Thesis, University of Illinois at Chicago, 2013. + https://hdl.handle.net/10027/9916 + .. [LOS2012] \C. Lecouvey, M. Okado, M. Shimozono. "Affine crystals, one-dimensional sums and parabolic Lusztig `q`-analogues". Mathematische Zeitschrift. **271** (2012). Issue 3-4. diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 9a7d0df284a..c48f8fc8505 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -312,7 +312,8 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. The matrices + for `n = 31, 33, 39, 41, 45, 49, 51, 55, 57, 61, 63` are given in [Lon2013]_. INPUT: @@ -370,14 +371,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), - 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', - '+---++-++--+-+-++----++-+-+--++-++---', - '+++++-+-----++----++----++-----+-++++', - '+--+++-+-----+----++----+-----+-+++--'), - 43: ('++---++++-+--+--++--------++--+--+-++++---+', - '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', - '++-++++++----+-+--++-++-++--+-+----++++++-+', - '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 31: ('++++++-+--+---++++---+--+-+++++', '+--++---+-+-++----++-+-+---++--', + '+--++---+-+-++----++-+-+---++--', '+-----+-++-+++----+++-++-+-----'), + 33: ('++++++-+-+-+++------+++-+-+-+++++', '++-+-++-+----+++--+++----+-++-+-+', + '++--++-+++-+--+-++-+--+-+++-++--+', '+--++--+++++-++----++-+++++--++--'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', '+--+++-+-----+----++----+-----+-+++--'), + 39: ('+++--+-+-----+--++----++--+-----+-+--++', '+++--++-+---+-+--+----+--+-+---+-++--++', + '++++---+--++----+-+--+-+----++--+---+++', '+---++-+-+-----+++-++-+++-----+-+-++---'), + 41: ('++++--+-++++-++--++----++--++-++++-+--+++', '++++--+-++++-++--++----++--++-++++-+--+++', + '+++-++-+-+-+-----+++--+++-----+-+-+-++-++', '+--+--+-+-+-+++++---++---+++++-+-+-+--+--'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 45: ('+++++-++----+-++--++-++-++--++-+----++-++++', '+++---++--+-+-+-++--------++-+-+-+--++---++', + '++-+-++++-+--+--+++--++--+++--+--+-++++-+-+', '+-++-----++++-+-+++-++++-+++-+-++++-----++-'), + 49: ('++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', '++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', + '+----+-++++--+-+++-+-+++--+++-+-+++-+--++++-+----', '+++++-+----++-+---+-+---++---+-+---+-++----+-++++'), + 51: ('+---+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', '----+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', + '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+', '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+'), + 55: ('+-+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', '--+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', + '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++', '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++'), + 57: ('+---++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', '----++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', + '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-', '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-'), + 61: ('++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', '++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', + '+---+-+-++++---++--+-++-+---++++++---+-++-+--++---++++-+-+---', '++++-+-+----+++--++-+--+-+++------+++-+--+-++--+++----+-+-+++'), + 63: ('++-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', '-+-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', + '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++', '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++'), } def pmtoZ(s): From 1e460a9fa9ac9d676bbd9f6456d7467a78948f94 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 08:58:24 +0000 Subject: [PATCH 04/24] Rename supplementary_difference_set_from_rel_diff_set --- .../combinat/designs/difference_family.py | 28 +++++++++---------- src/sage/combinat/matrices/hadamard_matrix.py | 10 +++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index a32f8193e26..3e8747fc167 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1618,8 +1618,8 @@ def is_supplementary_difference_set(Ks, v, lmbda): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set, is_supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(17) + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set, is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(17) sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 16) True sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 14) @@ -1651,7 +1651,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): return True -def supplementary_difference_set(q, existence=False, check=True): +def supplementary_difference_set_from_rel_diff_set(q, existence=False, check=True): r"""Construct `4-\{2v; v, v+1, v, v; 2v\}` supplementary difference sets where `q=2v+1`. The sets are created from relative difference sets as detailed in Theorem 3.3 of [Spe1975]_. this construction @@ -1682,8 +1682,8 @@ def supplementary_difference_set(q, existence=False, check=True): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: supplementary_difference_set(17) #random + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set + sage: supplementary_difference_set_from_rel_diff_set(17) #random ([0, 2, 5, 6, 8, 10, 13, 14], [0, 1, 2, 6, 7, 9, 10, 14, 15], [0, 1, 2, 6, 11, 12, 13, 15], @@ -1691,31 +1691,31 @@ def supplementary_difference_set(q, existence=False, check=True): If existence is ``True``, the function returns a boolean:: - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(17, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(17, existence=True) True TESTS:: sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set - sage: is_supplementary_difference_set(supplementary_difference_set(17), 16, 16) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(17), 16, 16) True - sage: is_supplementary_difference_set(supplementary_difference_set(9), 8, 8) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(9), 8, 8) True - sage: supplementary_difference_set(7) + sage: supplementary_difference_set_from_rel_diff_set(7) Traceback (most recent call last): ... ValueError: There is no s for which m-1 is an odd prime power - sage: supplementary_difference_set(8) + sage: supplementary_difference_set_from_rel_diff_set(8) Traceback (most recent call last): ... ValueError: q must be an odd prime power - sage: supplementary_difference_set(8, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(8, existence=True) False - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(1, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(1, existence=True) False .. SEEALSO:: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index c48f8fc8505..cd66b394948 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -1163,7 +1163,7 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): r"""Create an Hadamard matrix of order `n` using Spence construction. This construction (detailed in [Spe1975]_), uses supplementary difference sets implemented in - :func:`sage.combinat.designs.difference_family.supplementary_difference_set` to create the + :func:`sage.combinat.designs.difference_family.supplementary_difference_set_from_rel_diff_set` to create the desired matrix. INPUT: @@ -1210,19 +1210,19 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): ... AssertionError """ - from sage.combinat.designs.difference_family import supplementary_difference_set + from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set assert n % 4 == 0 and n > 0 q = n//4 if existence: - return supplementary_difference_set(q, existence=True) + return supplementary_difference_set_from_rel_diff_set(q, existence=True) - if not supplementary_difference_set(q, existence=True): + if not supplementary_difference_set_from_rel_diff_set(q, existence=True): raise ValueError(f'The order {n} is not covered by Spence construction.') - S1, S2, S3, S4 = supplementary_difference_set(q, check=False) + S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(q, check=False) A1 = matrix.circulant([1 if j in S1 else -1 for j in range(q-1)]) A2 = matrix.circulant([1 if j in S4 else -1 for j in range(q-1)]) From e715e0db51169225b6c7e308d955bf634b2dfb7a Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:10:26 +0000 Subject: [PATCH 05/24] Extract construction of sds --- .../combinat/designs/difference_family.py | 106 +++++++++++++++--- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 3e8747fc167..5cfe9c69c96 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1629,7 +1629,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): .. SEEALSO:: - :func:`supplementary_difference_set` + :func:`supplementary_difference_set_from_rel_diff_set` """ from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup @@ -1823,7 +1823,7 @@ def get_fixed_relative_difference_set(rel_diff_set, as_elements=False): `\{td | d\in R\}= R`. In addition, the set returned by this function will contain the element `0`. This is needed in the - construction of supplementary difference sets (see :func:`supplementary_difference_set`). + construction of supplementary difference sets (see :func:`supplementary_difference_set_from_rel_diff_set`). INPUT: @@ -2155,6 +2155,88 @@ def skew_supplementary_difference_set(n, existence=False, check=True): 267: [1, 4, 16, 64, 67, 91, 97, 121, 217, 223, 256], } + if existence: + return n in indices + + if n not in indices: + raise ValueError(f'Skew SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + assert _is_skew_set(S1, n) + + return S1, S2, S3, S4 + + +def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + This construction is described in [Djo1994]_. + + Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets + `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: + `\alpha_{2i} = a_iH` and `\alpha_{2i+1} = -\alpha_{2i}`. + + Then, we use four indices sets `J_1, J_2, J_3, J_4` to construct the four + supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that + if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. + + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + element of the list `A` with the desired set. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``H`` -- list of integers, the set `H` used to construct the cosets. + + - ``indices`` -- list containing four list of integers, which are the sets + `J_1, J_2, J_3, J_4` described above. + + - ``cosets_gen`` -- list containing integers or list of integers, is the set `A` + described above. + + - ``check`` -- boolean (default True). If true, check that the sets + are supplementary difference sets. Setting this parameter to False may speed + up the computation considerably. + + OUTPUT: + + The function returns the 4 sets (containing integers modulo `n`). + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set, _construction_supplementary_difference_set + sage: H = [1, 10, -11] + sage: cosets_gen = [1, 2, 3, 5, 6, 9] + sage: indices = [[0, 3, 5, 7, 9, 10], [0, 5, 6, 7, 8], [1, 2, 6, 7, 9], [2, 6, 8, 9, 10]] + sage: _construction_supplementary_difference_set(37, H, indices, cosets_gen) + ([1, 10, 26, 35, 17, 22, 34, 7, 33, 32, 24, 18, 31, 14, 29, 9, 16, 12], + [1, 10, 26, 34, 7, 33, 5, 13, 19, 32, 24, 18, 6, 23, 8], + [36, 27, 11, 2, 20, 15, 5, 13, 19, 32, 24, 18, 31, 14, 29], + [2, 20, 15, 5, 13, 19, 6, 23, 8, 31, 14, 29, 9, 16, 12]) + sage: H = [1, 16, 22] + sage: cosets_gen = [1, 2, 3, 4, 6, 8, [13]] + sage: indices = [[1, 3, 5, 6, 8, 10, 12], [0, 1, 5, 8, 12, 13], [1, 3, 4, 7, 9, 12, 13], [0, 1, 2, 3, 7, 8]] + sage: _construction_supplementary_difference_set(39, H, indices, cosets_gen) + ([38, 23, 17, 37, 7, 34, 36, 30, 12, 4, 25, 10, 6, 18, 15, 8, 11, 20, 13], + [1, 16, 22, 38, 23, 17, 36, 30, 12, 6, 18, 15, 13, 26], + [38, 23, 17, 37, 7, 34, 3, 9, 27, 35, 14, 29, 33, 21, 24, 13, 26], + [1, 16, 22, 38, 23, 17, 2, 32, 5, 37, 7, 34, 35, 14, 29, 6, 18, 15]) + sage: H = [1, 4, 11, 16, 21, -2, -8] + sage: cosets_gen = [1, 3, 7] + sage: indices = [[1, 2, 4], [1, 2, 4], [0, 2, 3], [3, 4, -1]] + sage: sets = _construction_supplementary_difference_set(43, H, indices, cosets_gen, check=False) + sage: is_supplementary_difference_set(sets, 43, 35) + True + + .. SEEALSO:: + + :func:`skew_supplementary_difference_set` + """ def generate_set(index_set, cosets): S = [] for idx in index_set: @@ -2164,17 +2246,11 @@ def generate_set(index_set, cosets): S += cosets[idx] return S - if existence: - return n in indices - - if n not in indices: - raise ValueError(f'Skew SDS of order {n} not yet implemented.') - Z = Zmod(n) - H = list(map(Z, H_db[n])) + H = list(map(Z, H)) cosets = [] - for el in cosets_gens[n]: + for el in cosets_gen: if isinstance(el, list): even_coset = [Z(x) for x in el] else: @@ -2183,18 +2259,18 @@ def generate_set(index_set, cosets): cosets.append(even_coset) cosets.append(odd_coset) - S1 = generate_set(indices[n][0], cosets) - S2 = generate_set(indices[n][1], cosets) - S3 = generate_set(indices[n][2], cosets) - S4 = generate_set(indices[n][3], cosets) + S1 = generate_set(indices[0], cosets) + S2 = generate_set(indices[1], cosets) + S3 = generate_set(indices[2], cosets) + S4 = generate_set(indices[3], cosets) if check: lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) - assert _is_skew_set(S1, n) return S1, S2, S3, S4 + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. From 4a5989e334b52307fdfbe3054d8450267cd9f694 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:46:15 +0000 Subject: [PATCH 06/24] Add construction for SDS --- src/doc/en/reference/references/index.rst | 12 +- .../combinat/designs/difference_family.py | 106 +++++++++++++++++- src/sage/combinat/matrices/hadamard_matrix.py | 2 +- 3 files changed, 113 insertions(+), 7 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index a10b5889127..8a8081c28f5 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -2051,10 +2051,15 @@ REFERENCES: *Ten New Orders for Hadamard Matrices of Skew Type*, Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. -.. [Djo1994] \D. Đoković. +.. [Djo1994a] \D. Đoković. *Five New Orders for Hadamard Matrices of Skew Type*, Australasian Journal of Combinatorics 10 (1994): 259-264. +.. [Djo1994b] \D. Đoković. + *Two Hadamard matrices of order 956 of Goethals-Seidel type*, + Combinatorica 14(3) (1994): 375-377. + :doi:`10.1007/BF01212983` + .. [Djo2008a] \D. Đoković. *Skew-Hadamard matrices of orders 188 and 388 exist*, International Mathematical Forum 3 no.22 (2008): 1063-1068. @@ -2065,6 +2070,11 @@ REFERENCES: Journal of Combinatorial Designs 16 (2008): 493-498. :arxiv:`0706.1973` +.. [Djo2008c] \D. Đoković. + *Hadamard matrices of order 764 exist*, + Combinatorica 28(4) (2008): 487-489. + :doi:`10.1007/s00493-008-2384-z` + .. [Djo2023a] \D. Đoković. *Skew-Hadamard matrices of order 276*. :arxiv:`10.48550/ARXIV.2301.02751` diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 5cfe9c69c96..be6e029b0dc 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1929,12 +1929,12 @@ def is_fixed_relative_difference_set(R, q): def skew_supplementary_difference_set(n, existence=False, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `S_1` is skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - These sets are constructed from available data, as described in [Djo1994]_. The set `S_1 \subset G` is + These sets are constructed from available data, as described in [Djo1994a]_. The set `S_1 \subset G` is always skew, i.e. `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G \setminus \{0\}`. The data is taken from: - * `n = 103, 151`: [Djo1994]_ + * `n = 103, 151`: [Djo1994a]_ * `n = 67, 113, 127, 157, 163, 181, 241`: [Djo1992a]_ * `n = 37, 43`: [Djo1992b]_ * `n = 39, 49, 65, 93, 121, 129, 133, 217, 219, 267`: [Djo1992c]_ @@ -2174,7 +2174,7 @@ def skew_supplementary_difference_set(n, existence=False, check=True): def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - This construction is described in [Djo1994]_. + This construction is described in [Djo1994a]_. Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: @@ -2184,7 +2184,7 @@ def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check= supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. - To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th element of the list `A` with the desired set. INPUT: @@ -2271,10 +2271,106 @@ def generate_set(index_set, cosets): return S1, S2, S3, S4 +def supplementary_difference_set(n, existence=False, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + These sets are constructed from available data, as described in [Djo1994a]_. + + The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + Additional SDS are constructed using :func:`skew_supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``existence`` -- boolean (dafault False). If true, only check whether the + supplementary difference sets can be constructed. + + - ``check`` -- boolean (default True). If true, check that the sets are + supplementary difference sets before returning them. Setting this parameter + to False may speed up the computation considerably. + + OUTPUT: + + If ``existence`` is false, the function returns the 4 sets (containing integers + modulo `n`), or raises an error if data for the given ``n`` is not available. + If ``existence`` is true, the function returns a boolean representing whether + skew supplementary difference sets can be constructed. + + EXAMPLES:: + + sage: from sage.combinat.designs.difference_family import supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191) + + If existence is ``True``, the function returns a boolean :: + + sage: supplementary_difference_set(191, existence=True) + True + sage: supplementary_difference_set(17, existence=True) + False + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + True + sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) + sage: supplementary_difference_set(7) + Traceback (most recent call last): + ... + ValueError: SDS of order 7 not yet implemented. + sage: supplementary_difference_set(7, existence=True) + False + sage: supplementary_difference_set(127, existence=True) + True + """ + + indices = { + 191: [[1, 7, 9, 10, 11, 13, 17, 18, 25, 26, 30, 31, 33, 34, 35, 36, 37], + [1, 4, 7, 9, 11, 12, 13, 14, 19, 21, 22, 23, 24, 25, 26, 29, 36, 37], + [0, 3, 4, 5, 7, 8, 9, 16, 17, 19, 24, 25, 29, 30, 31, 33, 35, 37], + [1, 3, 4, 5, 8, 11, 14, 18, 19, 20, 21, 23, 24, 25, 28, 29, 30, 32, 34, 35]], + 239: [[0, 1, 2, 3, 4, 5, 6, 7, 14, 18, 19, 21, 24, 25, 29, 30], + [0, 1, 3, 7, 9, 12, 15, 18, 20, 22, 26, 28, 29, 30, 31, 32, 33], + [2, 3, 4, 5, 8, 9, 10, 11, 13, 17, 19, 21, 22, 24, 27, 31, 32], + [0, 1, 2, 3, 6, 7, 8, 11, 13, 15, 17, 18, 19, 22, 25, 26, 27, 32, 33]], + } + + cosets_gens = { + 191: [1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 32, 36, 38, 41], + 239: [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 18, 21, 28, 35, 42], + } + + H_db = { + 191: [1, 39, 184, 109, 49], + 239: [1, 10, 24, 44, 98, 100, 201], + } + + if existence: + return n in indices or skew_supplementary_difference_set(n, existence=True) + + sets = None + if n in indices: + sets = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + elif skew_supplementary_difference_set(n, existence=True): + sets = skew_supplementary_difference_set(n, check=False) + + if sets is None: + raise ValueError(f'SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = sets + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + + return S1, S2, S3, S4 + + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. - From [Djo1994]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew + From [Djo1994a]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew type if `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G\setminus \{0\}`. INPUT: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index cd66b394948..fdf0958e127 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -2290,7 +2290,7 @@ def skew_hadamard_matrix_324(): r""" Construct a skew Hadamard matrix of order 324. - The construction is taken from [Djo1994]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, + The construction is taken from [Djo1994a]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, with `S_1` of skew type. These are then used to generate four matrices of order `81`, which are inserted into the Goethals-Seidel array. From ccff87ed38ed8c6bbd42c27c7d3e4ff08ff1e35c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 13:34:58 +0000 Subject: [PATCH 07/24] Add construction for hadamard matrix from sds --- src/sage/combinat/matrices/hadamard_matrix.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index fdf0958e127..ff64da31099 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -768,6 +768,92 @@ def _construction_goethals_seidel_matrix(A, B, C, D): [-D*R, -C.T*R, B.T*R, A]]) +def hadamard_matrix_from_sds(n, existence=False, check=True): + r"""Construction of Hadamard matrices from supplementary difference sets. + + Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with + `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` + where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an + Hadamard matrix of order `4n` (see [Djo1994b]_). + + The supplementary difference sets are taken from + :func:`sage.combinat.designs.difference_family.supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default The function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds + sage: hadamard_matrix_from_sds(148) + 148 x 148 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_from_sds(764, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds, is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_from_sds(172)) + True + sage: hadamard_matrix_from_sds(64, existence=True) + False + sage: hadamard_matrix_from_sds(64) + Traceback (most recent call last): + ... + ValueError: SDS of order 16 not yet implemented. + sage: hadamard_matrix_from_sds(14) + Traceback (most recent call last): + ... + ValueError: n must be a positive multiple of four. + """ + from sage.combinat.designs.difference_family import supplementary_difference_set + + if n <= 0 or n % 4 != 0: + raise ValueError(f'n must be a positive multiple of four.') + t = n // 4 + + if existence: + return supplementary_difference_set(t, existence=True) + + S1, S2, S3, S4 = supplementary_difference_set(t, check=False) + a = [-1 if i in S1 else 1 for i in range(t)] + b = [-1 if i in S2 else 1 for i in range(t)] + c = [-1 if i in S3 else 1 for i in range(t)] + d = [-1 if i in S4 else 1 for i in range(t)] + + if n == 956: + a, b, c, d = [-el for el in d], a, b, c + + A, B, C, D = map(matrix.circulant, [a, b, c, d]) + if check: + assert A*A.T+B*B.T+C*C.T+D*D.T == 4*t*I(t) + + H = _construction_goethals_seidel_matrix(A, B, C, D) + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_cooper_wallis_construction(x1, x2, x3, x4, A, B, C, D, check=True): r""" Create an Hadamard matrix using the contruction detailed in [CW1972]_. @@ -1531,6 +1617,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_from_sds(n, existence=True): + if existence: + return True + M = hadamard_matrix_from_sds(n, check=False) elif hadamard_matrix_spence_construction(n, existence=True): if existence: return True From 2fd3af6d507d628f47a5892c845de2bce8c6ab3e Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 18:27:59 +0000 Subject: [PATCH 08/24] Create function to construct symmetric conference matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 62 +++++++++++++++---- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index ff64da31099..e05f05ad559 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -172,6 +172,56 @@ def hadamard_matrix_paleyI(n, normalize=True): return H +def symmetric_conference_matrix_paley(n): + r""" + Construct a symmetric conference matrix of order n. + + A conference matrix is an `n\times n` matrix `C` with 0s on the main diagonal + and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes + that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. + + These matrices are used in the :func:`hadamard_matrix_paleyII`. + + INPUT: + + - ``n`` -- integer, the order of the symmetric conference matrix to consruct. + + EXAMPLES:: + + sage: from sage.combinat.matrices.hadamard_matrix import symmetric_conference_matrix_paley + sage: symmetric_conference_matrix_paley(6) + [ 0 1 1 1 1 1] + [ 1 0 1 -1 -1 1] + [ 1 1 0 1 -1 -1] + [ 1 -1 1 0 1 -1] + [ 1 -1 -1 1 0 1] + [ 1 1 -1 -1 1 0] + + TESTS:: + + sage: symmetric_conference_matrix_paley(5) + Traceback (most recent call last): + ... + ValueError: The order 5 is not covered by Paley construction of symmetric conference matrices. + """ + q = n - 1 + if not (is_prime_power(q) and (q % 4 == 1)): + raise ValueError("The order %s is not covered by Paley construction of symmetric conference matrices." % n) + + from sage.rings.finite_rings.finite_field_constructor import FiniteField + K = FiniteField(q, 'x') + K_list = list(K) + K_list.insert(0, K.zero()) + H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) + for x in K_list] + for y in K_list]) + for i in range(n): + H[0, i] = 1 + H[i, 0] = 1 + H[i, i] = 0 + return H + + def hadamard_matrix_paleyII(n): r""" Implement the Paley type II construction. @@ -219,17 +269,7 @@ def hadamard_matrix_paleyII(n): if not (n % 2 == 0 and is_prime_power(q) and (q % 4 == 1)): raise ValueError("The order %s is not covered by the Paley type II construction." % n) - from sage.rings.finite_rings.finite_field_constructor import FiniteField - K = FiniteField(q, 'x') - K_list = list(K) - K_list.insert(0, K.zero()) - H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) - for x in K_list] - for y in K_list]) - for i in range(q+1): - H[0, i] = 1 - H[i, 0] = 1 - H[i, i] = 0 + H = symmetric_conference_matrix_paley(q+1) tr = { 0: matrix(2, 2, [ 1, -1, -1, -1]), 1: matrix(2, 2, [ 1, 1, 1, -1]), From 2b38a4c0bcdc1ef13d2f395b4c5b9292164cda52 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 19:23:12 +0000 Subject: [PATCH 09/24] Add miyamoto construction --- src/doc/en/reference/references/index.rst | 5 + src/sage/combinat/matrices/hadamard_matrix.py | 112 ++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 8a8081c28f5..6c8b4f644d7 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4499,6 +4499,11 @@ REFERENCES: .. [Mit2008] \A. Mitra. *On the construction of M-sequences via primitive polynomials with a fast identification method*, International Journal of Electronics and Communication Engineering 2(9) (2008): 1991-1996. +.. [Miy1991] \M. Miyamoto. + *A construction of Hadamard matrices*, + Journal of Combinatorial Theory, Series A 57(1) (1991): 86-108. + :doi:`10.1016/0097-3165(91)90008-5` + .. [MKO1998] Hans Munthe--Kaas and Brynjulf Owren. *Computations in a free Lie algebra*. (1998). `Downloadable from Munthe-Kaas's website diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index e05f05ad559..760d73e6f86 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -280,6 +280,114 @@ def hadamard_matrix_paleyII(n): return normalise_hadamard(H) +def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): + r""" + Construct Hadamard matrix using Miyamoto construction. + + If `q = n/4` is a prime power, and there exists an Hadamard matrix of order + `q-1`, then a Hadamard matrix of order `n` can be constructed (see [Miy1991]_). + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default the function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_miyamoto_construction + sage: hadamard_matrix_miyamoto_construction(20) + 20 x 20 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_miyamoto_construction(36, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_miyamoto_construction(68, check=False)) + True + sage: hadamard_matrix_miyamoto_construction(64, existence=True) + False + sage: hadamard_matrix_miyamoto_construction(64) + Traceback (most recent call last): + ... + ValueError: The order 64 is not covered by Miyamoto construction. + sage: hadamard_matrix_miyamoto_construction(14) + Traceback (most recent call last): + ... + ValueError: No Hadamard matrix of order 14 exists. + """ + if n < 0 or n % 4 != 0: + raise ValueError(f'No Hadamard matrix of order {n} exists.') + + q = n // 4 + if existence: + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + + if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): + raise ValueError(f'The order {n} is not covered by Miyamoto construction.') + + m = (q-1) // 2 + + C = symmetric_conference_matrix_paley(q + 1) + + neg = [i for i in range(2, m+2) if C[1, i] == -1] + pos = [i for i in range(m+2, 2*m+2) if C[1, i] == 1] + + for i, j in zip(neg, pos): + C.swap_rows(i, j) + C.swap_columns(i, j) + + C1 = -C.submatrix(row=2, col=2, nrows=m, ncols=m) + C2 = C.submatrix(row=2, col=m+2, nrows=m, ncols=m) + C4 = C.submatrix(row=m+2, col=m+2, nrows=m, ncols=m) + + K = hadamard_matrix(q - 1) + K1 = K.submatrix(row=0, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K2 = K.submatrix(row=0, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + K3 = -K.submatrix(row=(q-1)//2, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K4 = K.submatrix(row=(q-1)//2, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + + Zr = zero_matrix(m) + Us = [[C1, C2, Zr, Zr], [C2.T, C4, Zr, Zr], [Zr, Zr, C1, C2], [Zr, Zr, C2.T, C4]] + Vs = [[I(m), Zr, K1, K2], [Zr, I(m), K3, K4], [K1.T, K3.T, I(m), Zr], [K2.T, K4.T, Zr, I(m)]] + + def T(i, j): + return block_matrix([[Us[i][j]+Vs[i][j], Us[i][j]-Vs[i][j]], + [Us[i][j]-Vs[i][j], Us[i][j]+Vs[i][j]]]) + + e = matrix([[1] * (2*m)]) + one = matrix([1]) + H = block_matrix([[ one, -e, one, e, one, e, one, e], + [-e.T, T(0, 0), e.T, T(0, 1), e.T, T(0, 2), e.T, T(0, 3)], + [-one, -e, one, -e, one, e, -one, -e], + [-e.T, -T(1, 0), -e.T, T(1, 1), e.T, T(1, 2), -e.T, -T(1, 3)], + [-one, -e, -one, -e, one, -e, one, e], + [-e.T, -T(2, 0), -e.T, -T(2, 1), -e.T, T(2, 2), e.T, T(2, 3)], + [-one, -e, one, e, -one, -e, one, -e], + [-e.T, -T(3, 0), e.T, T(3, 1), -e.T, -T(3, 2), -e.T, T(3, 3)]]) + + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_williamson_type(a, b, c, d, check=True): r""" Construction of Williamson type Hadamard matrix. @@ -1657,6 +1765,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_miyamoto_construction(n, existence=True): + if existence: + return True + M = hadamard_matrix_miyamoto_construction(n, check=False) elif hadamard_matrix_from_sds(n, existence=True): if existence: return True From df08b978a1f8e8da584d5b9a4f4dede93f94c152 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 12 Feb 2023 17:39:59 +0000 Subject: [PATCH 10/24] tagged tests at long time --- src/sage/combinat/designs/difference_family.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index be6e029b0dc..c9949678e3f 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2300,7 +2300,7 @@ def supplementary_difference_set(n, existence=False, check=True): EXAMPLES:: sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(191) + sage: S1, S2, S3, S4 = supplementary_difference_set(191) # long time If existence is ``True``, the function returns a boolean :: @@ -2313,7 +2313,7 @@ def supplementary_difference_set(n, existence=False, check=True): sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) - sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) # long time True sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) sage: supplementary_difference_set(7) From 0d3ec5e28433ed8859f39a0bddc3b24b466913a0 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Mon, 13 Feb 2023 15:44:29 +0000 Subject: [PATCH 11/24] Fix docstrings --- src/sage/combinat/designs/difference_family.py | 6 +++--- src/sage/combinat/matrices/hadamard_matrix.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index c9949678e3f..61653c14685 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2272,18 +2272,18 @@ def generate_set(index_set, cosets): def supplementary_difference_set(n, existence=False, check=True): - r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. These sets are constructed from available data, as described in [Djo1994a]_. - The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + The data for `n=191` is taken from [Djo2008c]_, and data for `n=239` is from [Djo1994b]_. Additional SDS are constructed using :func:`skew_supplementary_difference_set`. INPUT: - ``n`` -- integer, the parameter of the supplementary difference set. - - ``existence`` -- boolean (dafault False). If true, only check whether the + - ``existence`` -- boolean (default False). If true, only check whether the supplementary difference sets can be constructed. - ``check`` -- boolean (default True). If true, check that the sets are diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 760d73e6f86..b65a412ab63 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -180,7 +180,7 @@ def symmetric_conference_matrix_paley(n): and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. - These matrices are used in the :func:`hadamard_matrix_paleyII`. + These matrices are used in :func:`hadamard_matrix_paleyII`. INPUT: @@ -300,7 +300,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises an error if no data is available to construct the matrix of the given order, - or if `n` is not a multiple of `4`. + or if `n` does not satisfies the constraints. If ``existence`` is true, returns a boolean representing whether the matrix can be constructed or not. @@ -338,7 +338,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): q = n // 4 if existence: - return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) is True if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): raise ValueError(f'The order {n} is not covered by Miyamoto construction.') @@ -921,7 +921,7 @@ def hadamard_matrix_from_sds(n, existence=False, check=True): Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` - where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + where `a_{i,j} = -1` iff `j \in S_i`. These will be the fist rows of four circulant matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an Hadamard matrix of order `4n` (see [Djo1994b]_). From 9aac7409cd45f387ab304ece9bdca1b344e6e3be Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:11:47 +0000 Subject: [PATCH 12/24] Store Williamson type matrices as strings --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index bf915399d20..df799d902ce 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -354,31 +354,29 @@ def williamson_type_quadruples_smallcases(n, existence=False): ValueError: The Williamson type quadruple of order 123 is not yet implemented. """ db = { - 1: ([1], [1], [1], [1]), - 7: ([1, -1, -1, 1, 1, -1, -1], - [1, -1, 1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, 1], - [1, -1, -1, -1, -1, -1, -1]), - 9: ([1, -1, -1, -1, 1, 1, -1, -1, -1], - [1, -1, -1, 1, -1, -1, 1, -1, -1], - [1, -1, 1, -1, -1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, -1, -1, 1]), - 29: ([1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1], - [1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1], - [1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1], - [1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1]), - 43: ([1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1], - [1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1], - [1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1], - [1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), + 1: ('+', '+', '+', '+'), + 7: ('+--++--', '+-+--+-', '++----+', '+------'), + 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), + 29: ('+++---++--+-+----+-+--++---++', + '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', + '++--+--+-+++-++++-+++-+--+--+'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', + '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', + '+---++--++++-+-+++-++--++-+++-+-++++--++---'), } + def pmtoZ(s): + return [1 if x == '+' else -1 for x in s] + if existence: return n in db if n not in db: raise ValueError("The Williamson type quadruple of order %s is not yet implemented." % n) - a, b, c, d = map(vector, db[n]) + + a, b, c, d = map(lambda s: vector(pmtoZ(s)), db[n]) return a, b, c, d From 225770934c8e057c0a404beb748c8bb691bc73a4 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:44:26 +0000 Subject: [PATCH 13/24] Add more williamson type matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index df799d902ce..3354952afd6 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -319,7 +319,7 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for n=29 and n=43 are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. INPUT: @@ -355,12 +355,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): """ db = { 1: ('+', '+', '+', '+'), + 3: ('+++', '+--', '+--', '+--'), + 5: ('+-++-', '++--+', '+----', '+----'), 7: ('+--++--', '+-+--+-', '++----+', '+------'), 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), - 29: ('+++---++--+-+----+-+--++---++', - '+-+---++--+-++++++-+--++---+-', - '++++-++-+---++++++---+-++-+++', - '++--+--+-+++-++++-+++-+--+--+'), + 11: ('++--------+', '++-+-++-+-+', '++-++--++-+', '+-++----++-'), + 13: ('++++-+--+-+++', '+---+-++-+---', '++---+--+---+', '++---+--+---+'), + 15: ('+-+---++++---+-', '++-++------++-+', + '++-++++--++++-+', '++-++-+--+-++-+'), + 17: ('+---+++----+++---', '++-+---+--+---+-+', + '+--+-++++++++-+--', '+-++-+++--+++-++-'), + 19: ('++--+++-+--+-+++--+', '++-++--+-++-+--++-+', + '+-+---++++++++---+-', '++--+-++++++++-+--+'), + 21: ('+--++++---++---++++--', '++++-+---+--+---+-+++', + '++--+-+-++--++-+-+--+', '++-+++++-+--+-+++++-+'), + 23: ('++---+---+-++-+---+---+', '+-++-++--++++++--++-++-', + '+++---++-+-++-+-++---++', '+++-+++-+------+-+++-++'), + 25: ('++++-+-+-+--++--+-+-+-+++', '++--+--+-++++++++-+--+--+', + '+++--+--++++--++++--+--++', '+-+--+++--++++++--+++--+-'), + 27: ('+--+--+-+++--++--+++-+--+--', '+++-++-+---++--++---+-++-++', + '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), + 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', + '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', + '+--+++-+-----+----++----+-----+-+++--'), 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', '++-++++++----+-+--++-++-++--+-+----++++++-+', @@ -404,10 +424,10 @@ def williamson_hadamard_matrix_smallcases(n, existence=False, check=True): 116 x 116 dense matrix over Integer Ring... sage: williamson_hadamard_matrix_smallcases(172) 172 x 172 dense matrix over Integer Ring... - sage: williamson_hadamard_matrix_smallcases(100) + sage: williamson_hadamard_matrix_smallcases(1000) Traceback (most recent call last): ... - ValueError: The Williamson type Hadamard matrix of order 100 is not yet implemented. + ValueError: The Williamson type Hadamard matrix of order 1000 is not yet implemented. """ assert n % 4 == 0 From 9a9d661f80aadcb07e4572cf2d5da173199a713b Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 19:28:08 +0000 Subject: [PATCH 14/24] Add other Williamson type matrices --- src/doc/en/reference/references/index.rst | 5 +++ src/sage/combinat/matrices/hadamard_matrix.py | 37 ++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index cf75fe5eb36..1e218493aa9 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4118,6 +4118,11 @@ REFERENCES: of a genus 2 Jacobian*, Mathematics of Computation 88 (2019), 889-929. :doi:`10.1090/mcom/3358`. +.. [Lon2013] \S. London, + *Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*. + PhD Thesis, University of Illinois at Chicago, 2013. + https://hdl.handle.net/10027/9916 + .. [LOS2012] \C. Lecouvey, M. Okado, M. Shimozono. "Affine crystals, one-dimensional sums and parabolic Lusztig `q`-analogues". Mathematische Zeitschrift. **271** (2012). Issue 3-4. diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 3354952afd6..5f4c829684d 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -319,7 +319,8 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. The matrices + for `n = 31, 33, 39, 41, 45, 49, 51, 55, 57, 61, 63` are given in [Lon2013]_. INPUT: @@ -377,14 +378,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), - 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', - '+---++-++--+-+-++----++-+-+--++-++---', - '+++++-+-----++----++----++-----+-++++', - '+--+++-+-----+----++----+-----+-+++--'), - 43: ('++---++++-+--+--++--------++--+--+-++++---+', - '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', - '++-++++++----+-+--++-++-++--+-+----++++++-+', - '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 31: ('++++++-+--+---++++---+--+-+++++', '+--++---+-+-++----++-+-+---++--', + '+--++---+-+-++----++-+-+---++--', '+-----+-++-+++----+++-++-+-----'), + 33: ('++++++-+-+-+++------+++-+-+-+++++', '++-+-++-+----+++--+++----+-++-+-+', + '++--++-+++-+--+-++-+--+-+++-++--+', '+--++--+++++-++----++-+++++--++--'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', '+--+++-+-----+----++----+-----+-+++--'), + 39: ('+++--+-+-----+--++----++--+-----+-+--++', '+++--++-+---+-+--+----+--+-+---+-++--++', + '++++---+--++----+-+--+-+----++--+---+++', '+---++-+-+-----+++-++-+++-----+-+-++---'), + 41: ('++++--+-++++-++--++----++--++-++++-+--+++', '++++--+-++++-++--++----++--++-++++-+--+++', + '+++-++-+-+-+-----+++--+++-----+-+-+-++-++', '+--+--+-+-+-+++++---++---+++++-+-+-+--+--'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 45: ('+++++-++----+-++--++-++-++--++-+----++-++++', '+++---++--+-+-+-++--------++-+-+-+--++---++', + '++-+-++++-+--+--+++--++--+++--+--+-++++-+-+', '+-++-----++++-+-+++-++++-+++-+-++++-----++-'), + 49: ('++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', '++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', + '+----+-++++--+-+++-+-+++--+++-+-+++-+--++++-+----', '+++++-+----++-+---+-+---++---+-+---+-++----+-++++'), + 51: ('+---+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', '----+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', + '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+', '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+'), + 55: ('+-+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', '--+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', + '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++', '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++'), + 57: ('+---++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', '----++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', + '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-', '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-'), + 61: ('++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', '++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', + '+---+-+-++++---++--+-++-+---++++++---+-++-+--++---++++-+-+---', '++++-+-+----+++--++-+--+-+++------+++-+--+-++--+++----+-+-+++'), + 63: ('++-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', '-+-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', + '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++', '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++'), } def pmtoZ(s): From 95073d25c5a0c5395b50e79516c5e4094acbf91c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 08:58:24 +0000 Subject: [PATCH 15/24] Rename supplementary_difference_set_from_rel_diff_set --- .../combinat/designs/difference_family.py | 28 +++++++++---------- src/sage/combinat/matrices/hadamard_matrix.py | 10 +++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 4257d4489e4..53e03023947 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1618,8 +1618,8 @@ def is_supplementary_difference_set(Ks, v, lmbda): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set, is_supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(17) + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set, is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(17) sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 16) True sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 14) @@ -1651,7 +1651,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): return True -def supplementary_difference_set(q, existence=False, check=True): +def supplementary_difference_set_from_rel_diff_set(q, existence=False, check=True): r"""Construct `4-\{2v; v, v+1, v, v; 2v\}` supplementary difference sets where `q=2v+1`. The sets are created from relative difference sets as detailed in Theorem 3.3 of [Spe1975]_. this construction @@ -1682,8 +1682,8 @@ def supplementary_difference_set(q, existence=False, check=True): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: supplementary_difference_set(17) #random + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set + sage: supplementary_difference_set_from_rel_diff_set(17) #random ([0, 2, 5, 6, 8, 10, 13, 14], [0, 1, 2, 6, 7, 9, 10, 14, 15], [0, 1, 2, 6, 11, 12, 13, 15], @@ -1691,31 +1691,31 @@ def supplementary_difference_set(q, existence=False, check=True): If existence is ``True``, the function returns a boolean:: - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(17, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(17, existence=True) True TESTS:: sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set - sage: is_supplementary_difference_set(supplementary_difference_set(17), 16, 16) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(17), 16, 16) True - sage: is_supplementary_difference_set(supplementary_difference_set(9), 8, 8) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(9), 8, 8) True - sage: supplementary_difference_set(7) + sage: supplementary_difference_set_from_rel_diff_set(7) Traceback (most recent call last): ... ValueError: There is no s for which m-1 is an odd prime power - sage: supplementary_difference_set(8) + sage: supplementary_difference_set_from_rel_diff_set(8) Traceback (most recent call last): ... ValueError: q must be an odd prime power - sage: supplementary_difference_set(8, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(8, existence=True) False - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(1, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(1, existence=True) False .. SEEALSO:: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 5f4c829684d..2a2681e98fb 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -1170,7 +1170,7 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): r"""Create an Hadamard matrix of order `n` using Spence construction. This construction (detailed in [Spe1975]_), uses supplementary difference sets implemented in - :func:`sage.combinat.designs.difference_family.supplementary_difference_set` to create the + :func:`sage.combinat.designs.difference_family.supplementary_difference_set_from_rel_diff_set` to create the desired matrix. INPUT: @@ -1217,19 +1217,19 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): ... AssertionError """ - from sage.combinat.designs.difference_family import supplementary_difference_set + from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set assert n % 4 == 0 and n > 0 q = n//4 if existence: - return supplementary_difference_set(q, existence=True) + return supplementary_difference_set_from_rel_diff_set(q, existence=True) - if not supplementary_difference_set(q, existence=True): + if not supplementary_difference_set_from_rel_diff_set(q, existence=True): raise ValueError(f'The order {n} is not covered by Spence construction.') - S1, S2, S3, S4 = supplementary_difference_set(q, check=False) + S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(q, check=False) A1 = matrix.circulant([1 if j in S1 else -1 for j in range(q-1)]) A2 = matrix.circulant([1 if j in S4 else -1 for j in range(q-1)]) From 2ee94365ac2cb77ed039409e5f0f31441af8dd99 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:10:26 +0000 Subject: [PATCH 16/24] Extract construction of sds --- .../combinat/designs/difference_family.py | 106 +++++++++++++++--- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 53e03023947..4a4e6c09156 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1629,7 +1629,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): .. SEEALSO:: - :func:`supplementary_difference_set` + :func:`supplementary_difference_set_from_rel_diff_set` """ from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup @@ -1823,7 +1823,7 @@ def get_fixed_relative_difference_set(rel_diff_set, as_elements=False): `\{td | d\in R\}= R`. In addition, the set returned by this function will contain the element `0`. This is needed in the - construction of supplementary difference sets (see :func:`supplementary_difference_set`). + construction of supplementary difference sets (see :func:`supplementary_difference_set_from_rel_diff_set`). INPUT: @@ -2155,6 +2155,88 @@ def skew_supplementary_difference_set(n, existence=False, check=True): 267: [1, 4, 16, 64, 67, 91, 97, 121, 217, 223, 256], } + if existence: + return n in indices + + if n not in indices: + raise ValueError(f'Skew SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + assert _is_skew_set(S1, n) + + return S1, S2, S3, S4 + + +def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + This construction is described in [Djo1994]_. + + Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets + `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: + `\alpha_{2i} = a_iH` and `\alpha_{2i+1} = -\alpha_{2i}`. + + Then, we use four indices sets `J_1, J_2, J_3, J_4` to construct the four + supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that + if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. + + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + element of the list `A` with the desired set. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``H`` -- list of integers, the set `H` used to construct the cosets. + + - ``indices`` -- list containing four list of integers, which are the sets + `J_1, J_2, J_3, J_4` described above. + + - ``cosets_gen`` -- list containing integers or list of integers, is the set `A` + described above. + + - ``check`` -- boolean (default True). If true, check that the sets + are supplementary difference sets. Setting this parameter to False may speed + up the computation considerably. + + OUTPUT: + + The function returns the 4 sets (containing integers modulo `n`). + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set, _construction_supplementary_difference_set + sage: H = [1, 10, -11] + sage: cosets_gen = [1, 2, 3, 5, 6, 9] + sage: indices = [[0, 3, 5, 7, 9, 10], [0, 5, 6, 7, 8], [1, 2, 6, 7, 9], [2, 6, 8, 9, 10]] + sage: _construction_supplementary_difference_set(37, H, indices, cosets_gen) + ([1, 10, 26, 35, 17, 22, 34, 7, 33, 32, 24, 18, 31, 14, 29, 9, 16, 12], + [1, 10, 26, 34, 7, 33, 5, 13, 19, 32, 24, 18, 6, 23, 8], + [36, 27, 11, 2, 20, 15, 5, 13, 19, 32, 24, 18, 31, 14, 29], + [2, 20, 15, 5, 13, 19, 6, 23, 8, 31, 14, 29, 9, 16, 12]) + sage: H = [1, 16, 22] + sage: cosets_gen = [1, 2, 3, 4, 6, 8, [13]] + sage: indices = [[1, 3, 5, 6, 8, 10, 12], [0, 1, 5, 8, 12, 13], [1, 3, 4, 7, 9, 12, 13], [0, 1, 2, 3, 7, 8]] + sage: _construction_supplementary_difference_set(39, H, indices, cosets_gen) + ([38, 23, 17, 37, 7, 34, 36, 30, 12, 4, 25, 10, 6, 18, 15, 8, 11, 20, 13], + [1, 16, 22, 38, 23, 17, 36, 30, 12, 6, 18, 15, 13, 26], + [38, 23, 17, 37, 7, 34, 3, 9, 27, 35, 14, 29, 33, 21, 24, 13, 26], + [1, 16, 22, 38, 23, 17, 2, 32, 5, 37, 7, 34, 35, 14, 29, 6, 18, 15]) + sage: H = [1, 4, 11, 16, 21, -2, -8] + sage: cosets_gen = [1, 3, 7] + sage: indices = [[1, 2, 4], [1, 2, 4], [0, 2, 3], [3, 4, -1]] + sage: sets = _construction_supplementary_difference_set(43, H, indices, cosets_gen, check=False) + sage: is_supplementary_difference_set(sets, 43, 35) + True + + .. SEEALSO:: + + :func:`skew_supplementary_difference_set` + """ def generate_set(index_set, cosets): S = [] for idx in index_set: @@ -2164,17 +2246,11 @@ def generate_set(index_set, cosets): S += cosets[idx] return S - if existence: - return n in indices - - if n not in indices: - raise ValueError(f'Skew SDS of order {n} not yet implemented.') - Z = Zmod(n) - H = list(map(Z, H_db[n])) + H = list(map(Z, H)) cosets = [] - for el in cosets_gens[n]: + for el in cosets_gen: if isinstance(el, list): even_coset = [Z(x) for x in el] else: @@ -2183,18 +2259,18 @@ def generate_set(index_set, cosets): cosets.append(even_coset) cosets.append(odd_coset) - S1 = generate_set(indices[n][0], cosets) - S2 = generate_set(indices[n][1], cosets) - S3 = generate_set(indices[n][2], cosets) - S4 = generate_set(indices[n][3], cosets) + S1 = generate_set(indices[0], cosets) + S2 = generate_set(indices[1], cosets) + S3 = generate_set(indices[2], cosets) + S4 = generate_set(indices[3], cosets) if check: lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) - assert _is_skew_set(S1, n) return S1, S2, S3, S4 + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. From 49ee5c7f820dd45e38c44c549c6e710b7d18643c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:46:15 +0000 Subject: [PATCH 17/24] Add construction for SDS --- src/doc/en/reference/references/index.rst | 12 +- .../combinat/designs/difference_family.py | 106 +++++++++++++++++- src/sage/combinat/matrices/hadamard_matrix.py | 2 +- 3 files changed, 113 insertions(+), 7 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 1e218493aa9..c3e036bfe88 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -2060,10 +2060,15 @@ REFERENCES: *Ten New Orders for Hadamard Matrices of Skew Type*, Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. -.. [Djo1994] \D. Đoković. +.. [Djo1994a] \D. Đoković. *Five New Orders for Hadamard Matrices of Skew Type*, Australasian Journal of Combinatorics 10 (1994): 259-264. +.. [Djo1994b] \D. Đoković. + *Two Hadamard matrices of order 956 of Goethals-Seidel type*, + Combinatorica 14(3) (1994): 375-377. + :doi:`10.1007/BF01212983` + .. [Djo2008a] \D. Đoković. *Skew-Hadamard matrices of orders 188 and 388 exist*, International Mathematical Forum 3 no.22 (2008): 1063-1068. @@ -2074,6 +2079,11 @@ REFERENCES: Journal of Combinatorial Designs 16 (2008): 493-498. :arxiv:`0706.1973` +.. [Djo2008c] \D. Đoković. + *Hadamard matrices of order 764 exist*, + Combinatorica 28(4) (2008): 487-489. + :doi:`10.1007/s00493-008-2384-z` + .. [Djo2023a] \D. Đoković. *Skew-Hadamard matrices of order 276*. :arxiv:`10.48550/ARXIV.2301.02751` diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 4a4e6c09156..2ff4d125650 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1929,12 +1929,12 @@ def is_fixed_relative_difference_set(R, q): def skew_supplementary_difference_set(n, existence=False, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `S_1` is skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - These sets are constructed from available data, as described in [Djo1994]_. The set `S_1 \subset G` is + These sets are constructed from available data, as described in [Djo1994a]_. The set `S_1 \subset G` is always skew, i.e. `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G \setminus \{0\}`. The data is taken from: - * `n = 103, 151`: [Djo1994]_ + * `n = 103, 151`: [Djo1994a]_ * `n = 67, 113, 127, 157, 163, 181, 241`: [Djo1992a]_ * `n = 37, 43`: [Djo1992b]_ * `n = 39, 49, 65, 93, 121, 129, 133, 217, 219, 267`: [Djo1992c]_ @@ -2174,7 +2174,7 @@ def skew_supplementary_difference_set(n, existence=False, check=True): def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - This construction is described in [Djo1994]_. + This construction is described in [Djo1994a]_. Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: @@ -2184,7 +2184,7 @@ def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check= supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. - To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th element of the list `A` with the desired set. INPUT: @@ -2271,10 +2271,106 @@ def generate_set(index_set, cosets): return S1, S2, S3, S4 +def supplementary_difference_set(n, existence=False, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + These sets are constructed from available data, as described in [Djo1994a]_. + + The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + Additional SDS are constructed using :func:`skew_supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``existence`` -- boolean (dafault False). If true, only check whether the + supplementary difference sets can be constructed. + + - ``check`` -- boolean (default True). If true, check that the sets are + supplementary difference sets before returning them. Setting this parameter + to False may speed up the computation considerably. + + OUTPUT: + + If ``existence`` is false, the function returns the 4 sets (containing integers + modulo `n`), or raises an error if data for the given ``n`` is not available. + If ``existence`` is true, the function returns a boolean representing whether + skew supplementary difference sets can be constructed. + + EXAMPLES:: + + sage: from sage.combinat.designs.difference_family import supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191) + + If existence is ``True``, the function returns a boolean :: + + sage: supplementary_difference_set(191, existence=True) + True + sage: supplementary_difference_set(17, existence=True) + False + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + True + sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) + sage: supplementary_difference_set(7) + Traceback (most recent call last): + ... + ValueError: SDS of order 7 not yet implemented. + sage: supplementary_difference_set(7, existence=True) + False + sage: supplementary_difference_set(127, existence=True) + True + """ + + indices = { + 191: [[1, 7, 9, 10, 11, 13, 17, 18, 25, 26, 30, 31, 33, 34, 35, 36, 37], + [1, 4, 7, 9, 11, 12, 13, 14, 19, 21, 22, 23, 24, 25, 26, 29, 36, 37], + [0, 3, 4, 5, 7, 8, 9, 16, 17, 19, 24, 25, 29, 30, 31, 33, 35, 37], + [1, 3, 4, 5, 8, 11, 14, 18, 19, 20, 21, 23, 24, 25, 28, 29, 30, 32, 34, 35]], + 239: [[0, 1, 2, 3, 4, 5, 6, 7, 14, 18, 19, 21, 24, 25, 29, 30], + [0, 1, 3, 7, 9, 12, 15, 18, 20, 22, 26, 28, 29, 30, 31, 32, 33], + [2, 3, 4, 5, 8, 9, 10, 11, 13, 17, 19, 21, 22, 24, 27, 31, 32], + [0, 1, 2, 3, 6, 7, 8, 11, 13, 15, 17, 18, 19, 22, 25, 26, 27, 32, 33]], + } + + cosets_gens = { + 191: [1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 32, 36, 38, 41], + 239: [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 18, 21, 28, 35, 42], + } + + H_db = { + 191: [1, 39, 184, 109, 49], + 239: [1, 10, 24, 44, 98, 100, 201], + } + + if existence: + return n in indices or skew_supplementary_difference_set(n, existence=True) + + sets = None + if n in indices: + sets = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + elif skew_supplementary_difference_set(n, existence=True): + sets = skew_supplementary_difference_set(n, check=False) + + if sets is None: + raise ValueError(f'SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = sets + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + + return S1, S2, S3, S4 + + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. - From [Djo1994]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew + From [Djo1994a]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew type if `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G\setminus \{0\}`. INPUT: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 2a2681e98fb..9bf4a94a843 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -2298,7 +2298,7 @@ def skew_hadamard_matrix_324(): r""" Construct a skew Hadamard matrix of order 324. - The construction is taken from [Djo1994]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, + The construction is taken from [Djo1994a]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, with `S_1` of skew type. These are then used to generate four matrices of order `81`, which are inserted into the Goethals-Seidel array. From 383a1b9c3c0533d967722d165b07f0ef671139f7 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 13:34:58 +0000 Subject: [PATCH 18/24] Add construction for hadamard matrix from sds --- src/sage/combinat/matrices/hadamard_matrix.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 9bf4a94a843..3e11e656ce9 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -775,6 +775,92 @@ def _construction_goethals_seidel_matrix(A, B, C, D): [-D*R, -C.T*R, B.T*R, A]]) +def hadamard_matrix_from_sds(n, existence=False, check=True): + r"""Construction of Hadamard matrices from supplementary difference sets. + + Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with + `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` + where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an + Hadamard matrix of order `4n` (see [Djo1994b]_). + + The supplementary difference sets are taken from + :func:`sage.combinat.designs.difference_family.supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default The function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds + sage: hadamard_matrix_from_sds(148) + 148 x 148 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_from_sds(764, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds, is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_from_sds(172)) + True + sage: hadamard_matrix_from_sds(64, existence=True) + False + sage: hadamard_matrix_from_sds(64) + Traceback (most recent call last): + ... + ValueError: SDS of order 16 not yet implemented. + sage: hadamard_matrix_from_sds(14) + Traceback (most recent call last): + ... + ValueError: n must be a positive multiple of four. + """ + from sage.combinat.designs.difference_family import supplementary_difference_set + + if n <= 0 or n % 4 != 0: + raise ValueError(f'n must be a positive multiple of four.') + t = n // 4 + + if existence: + return supplementary_difference_set(t, existence=True) + + S1, S2, S3, S4 = supplementary_difference_set(t, check=False) + a = [-1 if i in S1 else 1 for i in range(t)] + b = [-1 if i in S2 else 1 for i in range(t)] + c = [-1 if i in S3 else 1 for i in range(t)] + d = [-1 if i in S4 else 1 for i in range(t)] + + if n == 956: + a, b, c, d = [-el for el in d], a, b, c + + A, B, C, D = map(matrix.circulant, [a, b, c, d]) + if check: + assert A*A.T+B*B.T+C*C.T+D*D.T == 4*t*I(t) + + H = _construction_goethals_seidel_matrix(A, B, C, D) + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_cooper_wallis_construction(x1, x2, x3, x4, A, B, C, D, check=True): r""" Create an Hadamard matrix using the contruction detailed in [CW1972]_. @@ -1538,6 +1624,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_from_sds(n, existence=True): + if existence: + return True + M = hadamard_matrix_from_sds(n, check=False) elif hadamard_matrix_spence_construction(n, existence=True): if existence: return True From 8901eb6da0486ec99d1afebcd956fc8bc47be87a Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 18:27:59 +0000 Subject: [PATCH 19/24] Create function to construct symmetric conference matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 62 +++++++++++++++---- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 3e11e656ce9..6dcf34767ab 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -179,6 +179,56 @@ def hadamard_matrix_paleyI(n, normalize=True): return H +def symmetric_conference_matrix_paley(n): + r""" + Construct a symmetric conference matrix of order n. + + A conference matrix is an `n\times n` matrix `C` with 0s on the main diagonal + and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes + that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. + + These matrices are used in the :func:`hadamard_matrix_paleyII`. + + INPUT: + + - ``n`` -- integer, the order of the symmetric conference matrix to consruct. + + EXAMPLES:: + + sage: from sage.combinat.matrices.hadamard_matrix import symmetric_conference_matrix_paley + sage: symmetric_conference_matrix_paley(6) + [ 0 1 1 1 1 1] + [ 1 0 1 -1 -1 1] + [ 1 1 0 1 -1 -1] + [ 1 -1 1 0 1 -1] + [ 1 -1 -1 1 0 1] + [ 1 1 -1 -1 1 0] + + TESTS:: + + sage: symmetric_conference_matrix_paley(5) + Traceback (most recent call last): + ... + ValueError: The order 5 is not covered by Paley construction of symmetric conference matrices. + """ + q = n - 1 + if not (is_prime_power(q) and (q % 4 == 1)): + raise ValueError("The order %s is not covered by Paley construction of symmetric conference matrices." % n) + + from sage.rings.finite_rings.finite_field_constructor import FiniteField + K = FiniteField(q, 'x') + K_list = list(K) + K_list.insert(0, K.zero()) + H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) + for x in K_list] + for y in K_list]) + for i in range(n): + H[0, i] = 1 + H[i, 0] = 1 + H[i, i] = 0 + return H + + def hadamard_matrix_paleyII(n): r""" Implement the Paley type II construction. @@ -226,17 +276,7 @@ def hadamard_matrix_paleyII(n): if not (n % 2 == 0 and is_prime_power(q) and (q % 4 == 1)): raise ValueError("The order %s is not covered by the Paley type II construction." % n) - from sage.rings.finite_rings.finite_field_constructor import FiniteField - K = FiniteField(q, 'x') - K_list = list(K) - K_list.insert(0, K.zero()) - H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) - for x in K_list] - for y in K_list]) - for i in range(q+1): - H[0, i] = 1 - H[i, 0] = 1 - H[i, i] = 0 + H = symmetric_conference_matrix_paley(q+1) tr = { 0: matrix(2, 2, [ 1, -1, -1, -1]), 1: matrix(2, 2, [ 1, 1, 1, -1]), From ed7a93933c24f8b2a1d6c9759fd62b9b4b9d521c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 19:23:12 +0000 Subject: [PATCH 20/24] Add miyamoto construction --- src/doc/en/reference/references/index.rst | 5 + src/sage/combinat/matrices/hadamard_matrix.py | 112 ++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index c3e036bfe88..70dda6c3940 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4508,6 +4508,11 @@ REFERENCES: .. [Mit2008] \A. Mitra. *On the construction of M-sequences via primitive polynomials with a fast identification method*, International Journal of Electronics and Communication Engineering 2(9) (2008): 1991-1996. +.. [Miy1991] \M. Miyamoto. + *A construction of Hadamard matrices*, + Journal of Combinatorial Theory, Series A 57(1) (1991): 86-108. + :doi:`10.1016/0097-3165(91)90008-5` + .. [MKO1998] Hans Munthe--Kaas and Brynjulf Owren. *Computations in a free Lie algebra*. (1998). `Downloadable from Munthe-Kaas's website diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 6dcf34767ab..8078f9cecae 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -287,6 +287,114 @@ def hadamard_matrix_paleyII(n): return normalise_hadamard(H) +def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): + r""" + Construct Hadamard matrix using Miyamoto construction. + + If `q = n/4` is a prime power, and there exists an Hadamard matrix of order + `q-1`, then a Hadamard matrix of order `n` can be constructed (see [Miy1991]_). + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default the function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_miyamoto_construction + sage: hadamard_matrix_miyamoto_construction(20) + 20 x 20 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_miyamoto_construction(36, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_miyamoto_construction(68, check=False)) + True + sage: hadamard_matrix_miyamoto_construction(64, existence=True) + False + sage: hadamard_matrix_miyamoto_construction(64) + Traceback (most recent call last): + ... + ValueError: The order 64 is not covered by Miyamoto construction. + sage: hadamard_matrix_miyamoto_construction(14) + Traceback (most recent call last): + ... + ValueError: No Hadamard matrix of order 14 exists. + """ + if n < 0 or n % 4 != 0: + raise ValueError(f'No Hadamard matrix of order {n} exists.') + + q = n // 4 + if existence: + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + + if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): + raise ValueError(f'The order {n} is not covered by Miyamoto construction.') + + m = (q-1) // 2 + + C = symmetric_conference_matrix_paley(q + 1) + + neg = [i for i in range(2, m+2) if C[1, i] == -1] + pos = [i for i in range(m+2, 2*m+2) if C[1, i] == 1] + + for i, j in zip(neg, pos): + C.swap_rows(i, j) + C.swap_columns(i, j) + + C1 = -C.submatrix(row=2, col=2, nrows=m, ncols=m) + C2 = C.submatrix(row=2, col=m+2, nrows=m, ncols=m) + C4 = C.submatrix(row=m+2, col=m+2, nrows=m, ncols=m) + + K = hadamard_matrix(q - 1) + K1 = K.submatrix(row=0, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K2 = K.submatrix(row=0, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + K3 = -K.submatrix(row=(q-1)//2, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K4 = K.submatrix(row=(q-1)//2, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + + Zr = zero_matrix(m) + Us = [[C1, C2, Zr, Zr], [C2.T, C4, Zr, Zr], [Zr, Zr, C1, C2], [Zr, Zr, C2.T, C4]] + Vs = [[I(m), Zr, K1, K2], [Zr, I(m), K3, K4], [K1.T, K3.T, I(m), Zr], [K2.T, K4.T, Zr, I(m)]] + + def T(i, j): + return block_matrix([[Us[i][j]+Vs[i][j], Us[i][j]-Vs[i][j]], + [Us[i][j]-Vs[i][j], Us[i][j]+Vs[i][j]]]) + + e = matrix([[1] * (2*m)]) + one = matrix([1]) + H = block_matrix([[ one, -e, one, e, one, e, one, e], + [-e.T, T(0, 0), e.T, T(0, 1), e.T, T(0, 2), e.T, T(0, 3)], + [-one, -e, one, -e, one, e, -one, -e], + [-e.T, -T(1, 0), -e.T, T(1, 1), e.T, T(1, 2), -e.T, -T(1, 3)], + [-one, -e, -one, -e, one, -e, one, e], + [-e.T, -T(2, 0), -e.T, -T(2, 1), -e.T, T(2, 2), e.T, T(2, 3)], + [-one, -e, one, e, -one, -e, one, -e], + [-e.T, -T(3, 0), e.T, T(3, 1), -e.T, -T(3, 2), -e.T, T(3, 3)]]) + + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_williamson_type(a, b, c, d, check=True): r""" Construction of Williamson type Hadamard matrix. @@ -1664,6 +1772,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_miyamoto_construction(n, existence=True): + if existence: + return True + M = hadamard_matrix_miyamoto_construction(n, check=False) elif hadamard_matrix_from_sds(n, existence=True): if existence: return True From da46f5813237f8b9c68b1cc1b8b86af15484f340 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 12 Feb 2023 17:39:59 +0000 Subject: [PATCH 21/24] tagged tests at long time --- src/sage/combinat/designs/difference_family.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 2ff4d125650..3afad208d7c 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2300,7 +2300,7 @@ def supplementary_difference_set(n, existence=False, check=True): EXAMPLES:: sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(191) + sage: S1, S2, S3, S4 = supplementary_difference_set(191) # long time If existence is ``True``, the function returns a boolean :: @@ -2313,7 +2313,7 @@ def supplementary_difference_set(n, existence=False, check=True): sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) - sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) # long time True sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) sage: supplementary_difference_set(7) From f1f11cc4651291499a1d54e3f7271a2f1c24cad6 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Mon, 13 Feb 2023 15:44:29 +0000 Subject: [PATCH 22/24] Fix docstrings --- src/sage/combinat/designs/difference_family.py | 6 +++--- src/sage/combinat/matrices/hadamard_matrix.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 3afad208d7c..90df86e3e41 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2272,18 +2272,18 @@ def generate_set(index_set, cosets): def supplementary_difference_set(n, existence=False, check=True): - r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. These sets are constructed from available data, as described in [Djo1994a]_. - The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + The data for `n=191` is taken from [Djo2008c]_, and data for `n=239` is from [Djo1994b]_. Additional SDS are constructed using :func:`skew_supplementary_difference_set`. INPUT: - ``n`` -- integer, the parameter of the supplementary difference set. - - ``existence`` -- boolean (dafault False). If true, only check whether the + - ``existence`` -- boolean (default False). If true, only check whether the supplementary difference sets can be constructed. - ``check`` -- boolean (default True). If true, check that the sets are diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 8078f9cecae..0434d20d8c2 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -187,7 +187,7 @@ def symmetric_conference_matrix_paley(n): and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. - These matrices are used in the :func:`hadamard_matrix_paleyII`. + These matrices are used in :func:`hadamard_matrix_paleyII`. INPUT: @@ -307,7 +307,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises an error if no data is available to construct the matrix of the given order, - or if `n` is not a multiple of `4`. + or if `n` does not satisfies the constraints. If ``existence`` is true, returns a boolean representing whether the matrix can be constructed or not. @@ -345,7 +345,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): q = n // 4 if existence: - return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) is True if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): raise ValueError(f'The order {n} is not covered by Miyamoto construction.') @@ -928,7 +928,7 @@ def hadamard_matrix_from_sds(n, existence=False, check=True): Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` - where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + where `a_{i,j} = -1` iff `j \in S_i`. These will be the fist rows of four circulant matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an Hadamard matrix of order `4n` (see [Djo1994b]_). From 6ee79be1521d2da8d33352f73cbf64ee97a6878e Mon Sep 17 00:00:00 2001 From: MatteoCati <53347703+MatteoCati@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:36:23 +0000 Subject: [PATCH 23/24] Merge updates from add_new_skew_hadamard_matrices (#2) * Improve camera positioning for threejs * Changes to sagedoc, stopgap and superseded; one mass replacement * Another mass replacement * Another mass replacement * Another replacement * Another replacement * Remove comment numbers * Fix a couple of strays * trac ticket -> github issue * Change checksums back, fix meta-ticket * Another mass replacement * Another mass replacement * Another mass replacement * Manual fixes * Small replacement * Small replacement * Fix typo * Add github role to tox * add explicit formulas to documentation of WeierstrassIsomorphism * lift documentation from .__init__() to class and tweak * add doctest for #20847 * add .torsion_basis() method to EllipticCurve_finite_field * Revert "Remove comment numbers" This reverts commit 27cdf3e9959fbbd8ee81c6b2abcd2af7b74d71bc. * Revert changes to git_trac.rst * Switch :github: to :issue: * Switch from sage-prod to sage in attachment links * Change trac_number to issue_number * cross linked matrix method * Add construction of strongly regular digraph * A few manual fixes * Another automatic change * Undo a bunch of changes in the doc directory * Another fix * Try to fix sphinx problem * Move comment tag inside * allowing iterables as input * Fix code style * generalized fix * converting iterables * added is_supergreedy() function * implemented diff algo, for borderline cases * correcting function for disjoint set of points * correcting function * documentation changes * minor chagnges * fixing_failing_tests * minor documentation correction * Update linear_extensions.py * corrected TeX maths in docstrings * further fixes to supergreedy docstring * Added Reference * adding reference * minor updates * correcting documentation errors * correct a wrong change to :trac: * remove spurrious blank line * another spurrious line removed * compute matrix kernels modulo composites * fix doctests * docstring style tweak * adding doctests * correct the import location (duh...) * adding colored permutation doctests * doctests fixes * replaced "Combining Caron"+c with one unicode character * Updated SageMath version to 10.0.beta1 --------- Co-authored-by: Kwankyu Lee Co-authored-by: David Roe Co-authored-by: Lorenz Panny Co-authored-by: Marc Mezzarobba Co-authored-by: Tobias Diez Co-authored-by: Sandstorm831 Co-authored-by: Rohan Garg <76916164+Sandstorm831@users.noreply.github.com> Co-authored-by: Dima Pasechnik Co-authored-by: Release Manager --- .devcontainer/portability-updateContent.sh | 4 +- .github/workflows/ci-macos.yml | 2 +- .github/workflows/ci-wsl.yml | 2 +- .gitignore | 2 +- .zenodo.json | 8 +- Makefile | 6 +- README.md | 2 +- VERSION.txt | 2 +- bootstrap | 6 +- build/bin/sage-bootstrap-python | 2 +- build/bin/sage-build-num-threads | 2 +- build/bin/sage-dist-helpers | 6 +- build/bin/sage-flock | 2 +- build/bin/sage-site | 2 +- build/bin/sage-spkg | 2 +- build/bin/sage-spkg-info | 4 +- build/bin/sage-venv | 2 +- build/make/Makefile.in | 2 +- build/pkgs/_prereq/distros/cygwin.txt | 4 +- build/pkgs/_prereq/distros/fedora.txt | 6 +- build/pkgs/cddlib/spkg-configure.m4 | 2 +- build/pkgs/cmake/spkg-check.in | 4 +- build/pkgs/configure/checksums.ini | 6 +- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/curl/spkg-check.in | 4 +- build/pkgs/ecl/SPKG.rst | 2 +- build/pkgs/ecl/spkg-install.in | 2 +- build/pkgs/ecm/spkg-install.in | 4 +- build/pkgs/elliptic_curves/spkg-install.py | 2 +- build/pkgs/fflas_ffpack/spkg-install.in | 4 +- build/pkgs/gap/spkg-install.in | 4 +- build/pkgs/gc/spkg-install.in | 4 +- build/pkgs/gcc/dependencies | 2 +- build/pkgs/gcc/spkg-configure.m4 | 6 +- build/pkgs/gdb/distros/conda.txt | 2 +- .../patches/fix-int64-for-32bit-archs.patch | 2 +- build/pkgs/gfan/spkg-install.in | 2 +- build/pkgs/gfortran/spkg-configure.m4 | 2 +- build/pkgs/giac/patches/cygwin-icas.patch | 2 +- build/pkgs/giac/patches/isnan-conflict.patch | 2 +- build/pkgs/giac/patches/pari_2_11.patch | 2 +- build/pkgs/glpk/patches/error_recovery.patch | 2 +- build/pkgs/glpk/spkg-install.in | 4 +- build/pkgs/glucose/spkg-install.in | 2 +- build/pkgs/iconv/spkg-check.in | 2 +- build/pkgs/iconv/spkg-install.in | 12 +- build/pkgs/jupyterlab/requirements.txt | 2 +- build/pkgs/libgd/spkg-install.in | 2 +- build/pkgs/linbox/spkg-install.in | 6 +- build/pkgs/matplotlib/make-setup-config.py | 2 +- build/pkgs/maxima/spkg-install.in | 2 +- build/pkgs/meataxe/spkg-install.in | 2 +- .../pkgs/notebook/jupyter_notebook_config.py | 2 +- .../don-t-rely-on-pandoc-for-the-readme.patch | 2 +- build/pkgs/numpy/spkg-install.in | 2 +- build/pkgs/openblas/spkg-install.in | 4 +- build/pkgs/pcre/patches/8.39-cygwin-jit.patch | 2 +- build/pkgs/pcre/spkg-install.in | 2 +- .../ppl/patches/cygwin-weak-symbols.patch | 2 +- build/pkgs/ppl/spkg-install.in | 2 +- .../pkgs/prompt_toolkit/install-requires.txt | 2 +- build/pkgs/ptyprocess/install-requires.txt | 2 +- build/pkgs/python3/spkg-build.in | 6 +- build/pkgs/python3/spkg-configure.m4 | 4 +- build/pkgs/python3/spkg-install.in | 2 +- .../patches/0002-WIP-Don-t-add-lrt.patch | 2 +- build/pkgs/qepcad/spkg-install.in | 6 +- build/pkgs/sage_conf/install-requires.txt | 2 +- build/pkgs/sage_docbuild/install-requires.txt | 2 +- build/pkgs/sage_setup/install-requires.txt | 2 +- build/pkgs/sage_sws2rst/install-requires.txt | 2 +- build/pkgs/sagelib/install-requires.txt | 2 +- build/pkgs/sagelib/spkg-install | 2 +- .../sagemath_categories/install-requires.txt | 2 +- .../sagemath_environment/install-requires.txt | 2 +- .../sagemath_objects/install-requires.txt | 2 +- build/pkgs/sagemath_repl/install-requires.txt | 2 +- build/pkgs/setuptools/distros/conda.txt | 2 +- build/pkgs/snappy/dependencies | 2 +- build/pkgs/snappy/requirements.txt | 4 +- build/pkgs/sympow/SPKG.rst | 4 +- build/pkgs/wheel/install-requires.txt | 2 +- build/sage_bootstrap/flock.py | 2 +- build/sage_bootstrap/uncompress/action.py | 4 +- build/sage_bootstrap/uncompress/tar_file.py | 4 +- build/sage_bootstrap/uninstall.py | 2 +- docker/Dockerfile | 2 +- docker/README.md | 2 +- m4/sage_spkg_collect.m4 | 2 +- pkgs/sage-conf/README.rst | 4 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/README.rst | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-categories/MANIFEST.in.m4 | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-standard/README.rst | 2 +- src/.relint.yml | 2 +- src/VERSION.txt | 2 +- src/bin/sage | 12 +- src/bin/sage-cleaner | 2 +- src/bin/sage-coverage | 2 +- src/bin/sage-cython | 2 +- src/bin/sage-env | 16 +-- src/bin/sage-num-threads.py | 2 +- src/bin/sage-runtests | 10 +- src/bin/sage-version.sh | 6 +- src/conftest.py | 2 +- src/doc/bootstrap | 4 +- src/doc/en/constructions/contributions.rst | 2 +- src/doc/en/prep/Advanced-2DPlotting.rst | 2 +- src/doc/en/reference/references/index.rst | 13 +- .../nf_galois_groups.rst | 2 +- src/sage/algebras/free_algebra_element.py | 2 +- src/sage/algebras/fusion_rings/fusion_ring.py | 2 +- .../free_algebra_element_letterplace.pyx | 2 +- .../algebras/lie_algebras/free_lie_algebra.py | 2 +- src/sage/algebras/lie_algebras/lie_algebra.py | 2 +- .../lie_algebras/lie_algebra_element.pyx | 2 +- src/sage/algebras/lie_algebras/morphism.py | 2 +- .../algebras/quatalg/quaternion_algebra.py | 4 +- src/sage/arith/constants.pxd | 2 +- src/sage/arith/long.pxd | 2 +- src/sage/calculus/wester.py | 2 +- src/sage/categories/category_with_axiom.py | 2 +- .../finite_complex_reflection_groups.py | 2 +- src/sage/categories/homset.py | 4 +- src/sage/categories/magmas.py | 2 +- src/sage/categories/modules.py | 2 +- src/sage/categories/morphism.pyx | 2 +- src/sage/categories/primer.py | 4 +- src/sage/categories/pushout.py | 4 +- src/sage/categories/unital_algebras.py | 4 +- src/sage/coding/gabidulin_code.py | 2 +- src/sage/combinat/colored_permutations.py | 114 +++++++++------- src/sage/combinat/combinat.py | 2 +- .../combinat/designs/difference_family.py | 2 +- src/sage/combinat/finite_state_machine.py | 2 +- src/sage/combinat/free_module.py | 2 +- src/sage/combinat/k_regular_sequence.py | 2 +- src/sage/combinat/permutation.py | 6 +- src/sage/combinat/posets/hasse_diagram.py | 4 +- src/sage/combinat/posets/lattices.py | 2 +- src/sage/combinat/posets/linear_extensions.py | 70 ++++++++++ src/sage/combinat/posets/posets.py | 4 +- src/sage/combinat/recognizable_series.py | 4 +- src/sage/combinat/root_system/type_relabel.py | 2 +- src/sage/combinat/set_partition.py | 4 +- src/sage/combinat/sf/dual.py | 2 +- src/sage/combinat/sf/hall_littlewood.py | 2 +- src/sage/combinat/tiling.py | 2 +- src/sage/combinat/words/finite_word.py | 10 +- src/sage/combinat/words/morphic.py | 2 +- src/sage/combinat/words/morphism.py | 10 +- src/sage/cpython/__init__.py | 8 +- src/sage/cpython/atexit.pyx | 2 +- src/sage/crypto/boolean_function.pyx | 2 +- src/sage/databases/findstat.py | 2 +- src/sage/databases/oeis.py | 4 +- src/sage/doctest/forker.py | 16 +-- .../dynamics/surface_dynamics_deprecation.py | 2 +- src/sage/ext/memory_allocator.pxd | 4 +- src/sage/ext/memory_allocator.pyx | 4 +- src/sage/ext/mod_int.h | 2 +- .../ext_data/threejs/threejs_template.html | 14 +- src/sage/features/__init__.py | 2 +- src/sage/features/join_feature.py | 2 +- src/sage/functions/exp_integral.py | 2 +- src/sage/functions/other.py | 2 +- src/sage/game_theory/normal_form_game.py | 4 +- src/sage/game_theory/parser.py | 2 +- src/sage/geometry/cone.py | 6 +- .../hyperplane_arrangement/arrangement.py | 2 +- src/sage/geometry/lattice_polytope.py | 2 +- src/sage/geometry/polyhedron/base3.py | 2 +- .../combinatorial_polyhedron/base.pyx | 4 +- src/sage/geometry/polyhedron/parent.py | 2 +- .../polyhedron/ppl_lattice_polytope.py | 6 +- src/sage/graphs/base/c_graph.pyx | 2 +- .../graphs/base/static_sparse_backend.pyx | 2 +- src/sage/graphs/bipartite_graph.py | 4 +- src/sage/graphs/connectivity.pyx | 4 +- src/sage/graphs/digraph.py | 2 +- src/sage/graphs/digraph_generators.py | 47 +++++++ src/sage/graphs/generic_graph.py | 16 +-- src/sage/graphs/graph.py | 4 +- src/sage/graphs/graph_coloring.pyx | 4 +- src/sage/graphs/graph_latex.py | 2 +- src/sage/graphs/graph_plot.py | 4 +- src/sage/graphs/spanning_tree.pyx | 8 +- src/sage/groups/abelian_gps/abelian_group.py | 2 +- .../additive_abelian_wrapper.py | 2 +- src/sage/groups/braid.py | 2 +- src/sage/groups/class_function.py | 2 +- src/sage/groups/galois_group.py | 2 +- .../groups/matrix_gps/finitely_generated.py | 2 +- src/sage/groups/matrix_gps/homset.py | 2 +- src/sage/groups/matrix_gps/morphism.py | 2 +- src/sage/groups/perm_gps/permgroup.py | 8 +- src/sage/homology/chain_complex.py | 4 +- src/sage/homology/tests.py | 8 +- src/sage/interacts/library.py | 2 +- src/sage/interfaces/axiom.py | 2 +- src/sage/interfaces/chomp.py | 18 +-- src/sage/interfaces/expect.py | 8 +- src/sage/interfaces/fricas.py | 2 +- src/sage/interfaces/gap.py | 2 +- src/sage/interfaces/gfan.py | 2 +- src/sage/interfaces/gp.py | 2 +- src/sage/interfaces/interface.py | 2 +- src/sage/interfaces/kash.py | 2 +- src/sage/interfaces/lie.py | 2 +- src/sage/interfaces/lisp.py | 2 +- src/sage/interfaces/macaulay2.py | 4 +- src/sage/interfaces/magma.py | 2 +- src/sage/interfaces/maxima.py | 4 +- src/sage/interfaces/maxima_lib.py | 4 +- src/sage/interfaces/qepcad.py | 2 +- src/sage/interfaces/r.py | 2 +- src/sage/interfaces/sagespawn.pyx | 2 +- src/sage/interfaces/singular.py | 4 +- src/sage/interfaces/tachyon.py | 2 +- src/sage/interfaces/tides.py | 4 +- src/sage/libs/coxeter3/coxeter_group.py | 2 +- src/sage/libs/linbox/fflas.pxd | 2 +- src/sage/libs/ntl/ntl_lzz_pContext.pyx | 2 +- src/sage/libs/singular/function.pyx | 2 +- src/sage/libs/singular/groebner_strategy.pyx | 2 +- src/sage/libs/singular/singular.pyx | 9 +- src/sage/manifolds/chart.py | 4 +- src/sage/manifolds/chart_func.py | 2 +- .../differentiable/examples/euclidean.py | 2 +- .../manifolds/differentiable/mixed_form.py | 2 +- .../differentiable/vectorfield_module.py | 2 +- src/sage/manifolds/scalarfield.py | 2 +- src/sage/matrix/matrix0.pyx | 4 +- src/sage/matrix/matrix1.pyx | 4 +- src/sage/matrix/matrix2.pyx | 90 ++++++++++--- src/sage/matrix/matrix_complex_ball_dense.pyx | 6 +- src/sage/matrix/matrix_double_dense.pyx | 4 +- src/sage/matrix/matrix_double_sparse.pyx | 4 +- src/sage/matrix/matrix_gfpn_dense.pyx | 2 +- .../matrix/matrix_modn_dense_template.pxi | 11 +- src/sage/matrix/matrix_modn_sparse.pyx | 2 +- src/sage/matrix/matrix_space.py | 2 +- src/sage/media/wav.py | 2 +- src/sage/misc/cachefunc.pyx | 4 +- src/sage/misc/compat.py | 2 +- src/sage/misc/cython.py | 8 +- src/sage/misc/decorators.py | 12 +- src/sage/misc/dev_tools.py | 6 +- src/sage/misc/dist.py | 2 +- src/sage/misc/functional.py | 6 +- src/sage/misc/latex_standalone.py | 12 +- src/sage/misc/lazy_import.pyx | 22 +-- src/sage/misc/misc.py | 12 +- src/sage/misc/package.py | 4 +- src/sage/misc/persist.pyx | 2 +- src/sage/misc/rest_index_of_methods.py | 2 +- src/sage/misc/sagedoc.py | 17 +-- src/sage/misc/sagedoc_conf.py | 2 +- src/sage/misc/sageinspect.py | 2 +- src/sage/misc/stopgap.pyx | 14 +- src/sage/misc/superseded.py | 127 +++++++++--------- src/sage/misc/weak_dict.pyx | 4 +- src/sage/modular/dirichlet.py | 2 +- src/sage/modular/modform/find_generators.py | 8 +- src/sage/modular/modsym/p1list.pyx | 2 +- src/sage/modules/matrix_morphism.py | 2 +- src/sage/modules/vector_mod2_dense.pyx | 2 +- .../modules/with_basis/indexed_element.pyx | 2 +- .../numerical/backends/generic_backend.pyx | 2 +- .../numerical/interactive_simplex_method.py | 4 +- src/sage/numerical/optimize.py | 2 +- src/sage/parallel/map_reduce.py | 6 +- src/sage/plot/graphics.py | 2 +- src/sage/plot/histogram.py | 2 +- src/sage/plot/matrix_plot.py | 2 +- src/sage/plot/plot.py | 4 +- src/sage/plot/plot3d/implicit_surface.pyx | 2 +- src/sage/plot/plot3d/list_plot3d.py | 2 +- src/sage/plot/plot3d/texture.py | 2 +- ...uadratic_form__local_density_congruence.py | 2 +- src/sage/quivers/representation.py | 2 +- src/sage/repl/configuration.py | 6 +- src/sage/repl/load.py | 2 +- src/sage/repl/preparse.py | 2 +- src/sage/rings/all.py | 6 +- .../asymptotic_expansion_generators.py | 4 +- src/sage/rings/asymptotic/asymptotic_ring.py | 2 +- ...otics_multivariate_generating_functions.py | 2 +- src/sage/rings/asymptotic/term_monoid.py | 6 +- src/sage/rings/bernmm/README.txt | 2 +- src/sage/rings/complex_double.pyx | 2 +- src/sage/rings/complex_field.py | 2 +- src/sage/rings/complex_interval_field.py | 2 +- src/sage/rings/complex_mpfr.pyx | 2 +- src/sage/rings/complex_number.pyx | 2 +- .../rings/finite_rings/integer_mod_ring.py | 2 +- src/sage/rings/fraction_field_FpT.pyx | 2 +- src/sage/rings/function_field/order.py | 2 +- src/sage/rings/ideal.py | 2 +- src/sage/rings/integer.pyx | 2 +- .../rings/laurent_series_ring_element.pyx | 2 +- src/sage/rings/lazy_series.py | 6 +- src/sage/rings/morphism.pyx | 6 +- src/sage/rings/number_field/galois_group.py | 22 +-- src/sage/rings/number_field/number_field.py | 16 +-- .../number_field/number_field_element.pyx | 8 +- .../number_field_element_quadratic.pyx | 2 +- src/sage/rings/padics/factory.py | 2 +- src/sage/rings/padics/generic_nodes.py | 6 +- src/sage/rings/padics/lattice_precision.py | 2 +- src/sage/rings/padics/local_generic.py | 2 +- .../rings/padics/local_generic_element.pyx | 2 +- src/sage/rings/padics/padic_base_generic.py | 2 +- src/sage/rings/padics/padic_base_leaves.py | 4 +- src/sage/rings/padics/padic_generic.py | 10 +- .../rings/padics/padic_generic_element.pyx | 2 +- .../rings/padics/padic_lattice_element.py | 2 +- .../polynomial/infinite_polynomial_element.py | 2 +- .../rings/polynomial/laurent_polynomial.pyx | 4 +- .../multi_polynomial_libsingular.pyx | 6 +- .../polynomial/ore_polynomial_element.pyx | 2 +- .../polynomial_padic_capped_relative_dense.py | 2 +- src/sage/rings/polynomial/pbori/pbori.pyx | 4 +- .../rings/polynomial/polynomial_element.pyx | 6 +- .../polynomial/polynomial_element_generic.py | 4 +- .../polynomial/polynomial_rational_flint.pyx | 2 +- src/sage/rings/polynomial/polynomial_ring.py | 6 +- .../polynomial/skew_polynomial_element.pyx | 4 +- .../rings/polynomial/skew_polynomial_ring.py | 2 +- src/sage/rings/polynomial/term_order.py | 2 +- src/sage/rings/power_series_poly.pyx | 9 +- src/sage/rings/power_series_ring.py | 2 +- src/sage/rings/qqbar.py | 24 ++-- src/sage/rings/rational.pyx | 6 +- src/sage/rings/real_double.pyx | 2 +- src/sage/rings/real_interval_field.py | 2 +- src/sage/rings/real_mpfi.pyx | 8 +- src/sage/rings/real_mpfr.pyx | 16 +-- src/sage/rings/ring_extension.pyx | 4 +- src/sage/sat/solvers/satsolver.pyx | 2 +- src/sage/schemes/elliptic_curves/ell_field.py | 10 +- .../elliptic_curves/ell_finite_field.py | 61 +++++++++ .../schemes/elliptic_curves/ell_local_data.py | 2 +- .../elliptic_curves/ell_number_field.py | 5 + .../schemes/elliptic_curves/ell_torsion.py | 2 +- .../schemes/elliptic_curves/formal_group.py | 2 +- src/sage/schemes/elliptic_curves/hom.py | 4 +- src/sage/schemes/elliptic_curves/padics.py | 2 +- .../elliptic_curves/weierstrass_morphism.py | 95 +++++++------ src/sage/schemes/generic/algebraic_scheme.py | 4 +- src/sage/schemes/hyperelliptic_curves/all.py | 8 +- .../hyperelliptic_finite_field.py | 10 +- .../hyperelliptic_curves/monsky_washnitzer.py | 6 +- .../schemes/projective/proj_bdd_height.py | 2 +- .../schemes/projective/projective_morphism.py | 6 +- .../schemes/projective/projective_point.py | 2 +- src/sage/schemes/toric/variety.py | 6 +- src/sage/sets/recursively_enumerated_set.pyx | 2 +- src/sage/sets/set.py | 2 +- src/sage/stats/basic_stats.py | 16 +-- src/sage/stats/time_series.pyx | 2 +- src/sage/structure/coerce_actions.pyx | 2 +- src/sage/structure/coerce_maps.pyx | 2 +- src/sage/structure/dynamic_class.py | 2 +- src/sage/structure/element.pyx | 2 +- src/sage/structure/global_options.py | 2 +- src/sage/structure/graphics_file.py | 2 +- src/sage/structure/list_clone.pxd | 2 +- src/sage/structure/parent.pyx | 2 +- src/sage/structure/support_view.py | 4 +- src/sage/symbolic/callable.py | 4 +- src/sage/symbolic/expression.pyx | 12 +- src/sage/symbolic/expression_conversions.py | 2 +- src/sage/symbolic/function.pyx | 2 +- src/sage/symbolic/ginac/README.md | 2 +- src/sage/symbolic/ginac/templates.cpp | 2 +- src/sage/symbolic/pynac_impl.pxi | 2 +- src/sage/symbolic/ring.pyx | 2 +- src/sage/tensor/modules/comp.py | 2 +- .../tensor/modules/ext_pow_free_module.py | 4 +- .../tensor/modules/finite_rank_free_module.py | 4 +- src/sage/tensor/modules/reflexive_module.py | 4 +- .../tensor/modules/tensor_free_submodule.py | 2 +- .../graphique_doctest.py | 6 +- src/sage/tests/lazy_imports.py | 4 +- src/sage/tests/test_deprecation.py | 4 +- src/sage/topology/cubical_complex.py | 2 +- src/sage/topology/simplicial_complex.py | 2 +- .../topology/simplicial_complex_examples.py | 2 +- src/sage/typeset/character_art.py | 2 +- src/sage/version.py | 6 +- src/sage_docbuild/__main__.py | 4 +- src/sage_docbuild/builders.py | 2 +- src/sage_docbuild/conf.py | 4 +- src/sage_docbuild/ext/sage_autodoc.py | 16 +-- src/sage_docbuild/sphinxbuild.py | 2 +- src/sage_setup/command/sage_build_cython.py | 2 +- src/sage_setup/run_parallel.py | 2 +- src/sage_setup/setenv.py | 2 +- src/tox.ini | 1 + 408 files changed, 1212 insertions(+), 889 deletions(-) diff --git a/.devcontainer/portability-updateContent.sh b/.devcontainer/portability-updateContent.sh index a923fc0d106..41033933911 100755 --- a/.devcontainer/portability-updateContent.sh +++ b/.devcontainer/portability-updateContent.sh @@ -5,14 +5,14 @@ # The script assumes that it is run from SAGE_ROOT. # # If "config.log" or "logs" are symlinks (for example, created by 'tox -e local-...', -# or after https://trac.sagemath.org/ticket/33262), they might point outside of +# or after https://github.com/sagemath/sage/issues/33262), they might point outside of # the dev container, so remove them. Likewise for upstream. for f in config.log logs upstream; do if [ -L $f ]; then rm -f $f fi done -# If possible (ensured after https://trac.sagemath.org/ticket/33262), keep the +# If possible (ensured after https://github.com/sagemath/sage/issues/33262), keep the # logs in the container. if [ ! -d logs ]; then ln -s /sage/logs logs diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 015f1c8fb4f..c07c6968095 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -38,7 +38,7 @@ jobs: matrix: stage: ["1", "2", "2-optional-0-o", "2-optional-p-z", "2-experimental-0-o", "2-experimental-p-z"] # python3_xcode is only accepted if enough packages are available from the system - # --> to test "minimal", we would need https://trac.sagemath.org/ticket/30949 + # --> to test "minimal", we would need https://github.com/sagemath/sage/issues/30949 tox_env: [homebrew-macos-usrlocal-minimal, homebrew-macos-usrlocal-standard, homebrew-macos-usrlocal-maximal, homebrew-macos-usrlocal-python3_xcode-standard, conda-forge-macos-minimal, conda-forge-macos-standard, conda-forge-macos-maximal] xcode_version_factor: [default] os: [ macos-11, macos-12 ] diff --git a/.github/workflows/ci-wsl.yml b/.github/workflows/ci-wsl.yml index 4093af802b0..e6d4d30cfc3 100644 --- a/.github/workflows/ci-wsl.yml +++ b/.github/workflows/ci-wsl.yml @@ -13,7 +13,7 @@ jobs: windows: runs-on: windows-latest name: Ubuntu 20.04 - # Following https://trac.sagemath.org/ticket/25206#comment:63 + # Following https://github.com/sagemath/sage/issues/25206#comment:63 steps: - name: Configure git run: git config --global core.symlinks true diff --git a/.gitignore b/.gitignore index b93c5dbd12b..2faf325a44c 100644 --- a/.gitignore +++ b/.gitignore @@ -187,7 +187,7 @@ build/bin/sage-build-env-config /pkgs/sagemath-repl/requirements.txt /pkgs/sagemath-categories/MANIFEST.in -# same for old locations - before Trac #31577 +# same for old locations - before Issue #31577 /build/pkgs/*/src/build /build/pkgs/*/src/dist /build/pkgs/*/src/MANIFEST diff --git a/.zenodo.json b/.zenodo.json index da76244bfa7..45c935970a7 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,10 +1,10 @@ { "description": "Mirror of the Sage https://sagemath.org/ source tree", "license": "other-open", - "title": "sagemath/sage: 10.0.beta0", - "version": "10.0.beta0", + "title": "sagemath/sage: 10.0.beta1", + "version": "10.0.beta1", "upload_type": "software", - "publication_date": "2023-02-12", + "publication_date": "2023-02-19", "creators": [ { "affiliation": "SageMath.org", @@ -15,7 +15,7 @@ "related_identifiers": [ { "scheme": "url", - "identifier": "https://github.com/sagemath/sage/tree/10.0.beta0", + "identifier": "https://github.com/sagemath/sage/tree/10.0.beta1", "relation": "isSupplementTo" }, { diff --git a/Makefile b/Makefile index 414398ddf0d..008d6ff2221 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ SAGE_ROOT_LOGS = logs # The --stop flag below is just a random flag to induce graceful # breakage with non-GNU versions of make. -# See https://trac.sagemath.org/ticket/24617 +# See https://github.com/sagemath/sage/issues/24617 # Defer unknown targets to build/make/Makefile %:: @@ -259,8 +259,8 @@ TEST_FILES = --all TEST_FLAGS = # When the documentation is installed, "optional" also includes all tests marked 'sagemath_doc_html', -# see https://trac.sagemath.org/ticket/25345, https://trac.sagemath.org/ticket/26110, and -# https://trac.sagemath.org/ticket/32759 +# see https://github.com/sagemath/sage/issues/25345, https://github.com/sagemath/sage/issues/26110, and +# https://github.com/sagemath/sage/issues/32759 TEST_OPTIONAL = sage,optional # Keep track of the top-level *test* Makefile target for logging. diff --git a/README.md b/README.md index 1a0582d87c5..1233f17de73 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,7 @@ in the Installation Guide. manager. For a large [list of Sage - packages](https://trac.sagemath.org/ticket/27330), Sage is able to + packages](https://github.com/sagemath/sage/issues/27330), Sage is able to detect whether an installed system package is suitable for use with Sage; in that case, Sage will not build another copy from source. diff --git a/VERSION.txt b/VERSION.txt index ec675a255a2..8b731a891fa 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.0.beta0, Release Date: 2023-02-12 +SageMath version 10.0.beta1, Release Date: 2023-02-19 diff --git a/bootstrap b/bootstrap index 75bd9c78b9d..48c4801d4b5 100755 --- a/bootstrap +++ b/bootstrap @@ -47,17 +47,17 @@ AS_VAR_SET_IF([SAGE_ENABLE_$pkgname], [], [AS_VAR_SET([SAGE_ENABLE_$pkgname], [y done # --enable-SPKG options for pkgname in $(sage-package list :optional: :experimental: | sort); do - # Trac #29629: Temporary solution for Sage 9.1: Do not provide + # Issue #29629: Temporary solution for Sage 9.1: Do not provide # --enable-SPKG options for installing pip packages if [ ! -f build/pkgs/$pkgname/requirements.txt ]; then pkgtype="$(cat build/pkgs/$pkgname/type)" - # Trac #29124: Do not provide --enable-_recommended and similar + # Issue #29124: Do not provide --enable-_recommended and similar case "$pkgname" in _*) ;; *) spkg_configures="$spkg_configures AC_SUBST(SAGE_ENABLE_$pkgname, [if_installed])" if [ -f build/pkgs/$pkgname/spkg-install -o -f build/pkgs/$pkgname/spkg-install.in ]; then - # Trac #31163: Not just an optional dummy package + # Issue #31163: Not just an optional dummy package spkg_configures="$spkg_configures SAGE_SPKG_ENABLE([$pkgname], [$pkgtype], [$(grep -v ^= build/pkgs/$pkgname/SPKG.rst | head -n1 2>/dev/null || echo $pkgname)])" fi diff --git a/build/bin/sage-bootstrap-python b/build/bin/sage-bootstrap-python index db4cea35dfd..1fa3ea565b1 100755 --- a/build/bin/sage-bootstrap-python +++ b/build/bin/sage-bootstrap-python @@ -30,7 +30,7 @@ SAGE_ORIG_PATH=${NEW_PATH%%':'} # Also, Trac #20023 removed the vendored argparse library from sage_bootstrap, # so we test that python is new enough (>= 2.7) to run it. # -# See https://trac.sagemath.org/ticket/29090 +# See https://github.com/sagemath/sage/issues/29090 # Trac #29890: Our first choice is "python", not "python3". This is to avoid # a defect of sage_bootstrap on macOS regarding SSL URLs. diff --git a/build/bin/sage-build-num-threads b/build/bin/sage-build-num-threads index 5dbdc5d5029..1ba165b1a21 100755 --- a/build/bin/sage-build-num-threads +++ b/build/bin/sage-build-num-threads @@ -10,7 +10,7 @@ # 3) The number of CPU cores in the system, as determined by # multiprocessing.cpu_count() # -# AUTHOR: Jeroen Demeyer (2011-12-08): Trac ticket #12016 +# AUTHOR: Jeroen Demeyer (2011-12-08): Github issue #12016 # from __future__ import print_function diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers index 24769ebfffc..4eac9626ffa 100644 --- a/build/bin/sage-dist-helpers +++ b/build/bin/sage-dist-helpers @@ -98,7 +98,7 @@ # (Linux only--no-op on other platforms.) Check shared libraries loaded by # EXECUTABLE (may be a program or another library) for a library starting # with SONAME, and if found appends SONAME to the LD_PRELOAD environment -# variable. See https://trac.sagemath.org/24885. +# variable. See https://github.com/sagemath/sage/issues/24885. set -o allexport @@ -166,7 +166,7 @@ sdh_configure() { echo "Configuring $PKG_NAME" # Run all configure scripts with bash to work around bugs with # non-portable scripts. - # See https://trac.sagemath.org/ticket/24491 + # See https://github.com/sagemath/sage/issues/24491 if [ -z "$CONFIG_SHELL" ]; then export CONFIG_SHELL=`command -v bash` fi @@ -290,7 +290,7 @@ sdh_pip_install() { sdh_pip_editable_install() { echo "Installing $PKG_NAME (editable mode)" - # Until https://trac.sagemath.org/ticket/34209 switches us to PEP 660 editable wheels + # Until https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels export SETUPTOOLS_ENABLE_FEATURES=legacy-editable python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable "$@" || \ sdh_die "Error installing $PKG_NAME" diff --git a/build/bin/sage-flock b/build/bin/sage-flock index d10eaf55091..9611cfde80b 100755 --- a/build/bin/sage-flock +++ b/build/bin/sage-flock @@ -11,7 +11,7 @@ # This is originally motivated by pip, but has since been generalized. We # should avoid running pip while uninstalling a package because that is prone # to race conditions. This script can be used to run pip under a lock. For -# details, see https://trac.sagemath.org/ticket/21672 +# details, see https://github.com/sagemath/sage/issues/21672 try: import sage_bootstrap diff --git a/build/bin/sage-site b/build/bin/sage-site index f9d13d53047..f36eb4d415d 100755 --- a/build/bin/sage-site +++ b/build/bin/sage-site @@ -184,7 +184,7 @@ if [ "$1" = '-i' ]; then for PKG in $PACKAGES; do echo # Check that $PKG is actually a Makefile target - # See https://trac.sagemath.org/ticket/25078 + # See https://github.com/sagemath/sage/issues/25078 if ! echo "$ALL_TARGETS" | grep "^${PKG}$" >/dev/null; then echo >&2 "Error: package '$PKG' not found" echo >&2 "Note: if it is an old-style package, installing these is no longer supported" diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg index 53835babf27..9b38ed6afc7 100755 --- a/build/bin/sage-spkg +++ b/build/bin/sage-spkg @@ -686,7 +686,7 @@ echo "Copying package files from temporary location $SAGE_DESTDIR to $SAGE_INST_ if [ -d "$SAGE_DESTDIR" ]; then # Some `find` implementations will put superfluous slashes in the # output if we give them a directory name with a slash; so make sure - # any trailing slash is removed; https://trac.sagemath.org/ticket/26013 + # any trailing slash is removed; https://github.com/sagemath/sage/issues/26013 PREFIX="${SAGE_DESTDIR_LOCAL%/}" rm -f "$PREFIX"/lib/*.la diff --git a/build/bin/sage-spkg-info b/build/bin/sage-spkg-info index ffc864320ed..4e53139fa7e 100755 --- a/build/bin/sage-spkg-info +++ b/build/bin/sage-spkg-info @@ -116,10 +116,10 @@ else echo "However, these system packages will not be used for building Sage" if [ -f "$PKG_SCRIPTS"/install-requires.txt ]; then echo "because using Python site-packages is not supported by the Sage distribution;" - echo "see https://trac.sagemath.org/ticket/29023" + echo "see https://github.com/sagemath/sage/issues/29023" else echo "because spkg-configure.m4 has not been written for this package;" - echo "see https://trac.sagemath.org/ticket/27330" + echo "see https://github.com/sagemath/sage/issues/27330" fi fi fi diff --git a/build/bin/sage-venv b/build/bin/sage-venv index 9ee9fc794be..c2728ba1143 100755 --- a/build/bin/sage-venv +++ b/build/bin/sage-venv @@ -38,7 +38,7 @@ if options.upgrade and options.clear: raise ValueError('you cannot supply --upgrade and --clear together.') if sys.platform == 'cygwin': - # default for Cygwin; see https://trac.sagemath.org/ticket/30149 + # default for Cygwin; see https://github.com/sagemath/sage/issues/30149 use_symlinks = False else: # default for posix diff --git a/build/make/Makefile.in b/build/make/Makefile.in index e971def2416..84f6f877e3d 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -78,7 +78,7 @@ DUMMY_PACKAGES = @SAGE_DUMMY_PACKAGES@ # Set to the path to Sage's GCC (if GCC is installed) to force rebuilds # of packages if GCC changed. -# See m4/sage_spkg_collect.m4 and https://trac.sagemath.org/ticket/24703 +# See m4/sage_spkg_collect.m4 and https://github.com/sagemath/sage/issues/24703 GCC_DEP = @SAGE_GCC_DEP@ # Versions of all the packages, in the format diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt index 115d2555745..2bf3164005b 100644 --- a/build/pkgs/_prereq/distros/cygwin.txt +++ b/build/pkgs/_prereq/distros/cygwin.txt @@ -12,14 +12,14 @@ binutils make m4 -# a system python is needed for downloading the sage packages, https://trac.sagemath.org/ticket/29090 +# a system python is needed for downloading the sage packages, https://github.com/sagemath/sage/issues/29090 python39-urllib3 python39 perl perl-ExtUtils-MakeMaker tar gcc-core gcc-g++ -# Needed according to embray at https://trac.sagemath.org/ticket/26964: +# Needed according to embray at https://github.com/sagemath/sage/issues/26964: # The need for which comes [...] from MPIR's configure script findutils which diff --git a/build/pkgs/_prereq/distros/fedora.txt b/build/pkgs/_prereq/distros/fedora.txt index a82e29abc30..79919eef51b 100644 --- a/build/pkgs/_prereq/distros/fedora.txt +++ b/build/pkgs/_prereq/distros/fedora.txt @@ -15,7 +15,7 @@ binutils make m4 -# a system python is needed for downloading the sage packages, https://trac.sagemath.org/ticket/29090 +# a system python is needed for downloading the sage packages, https://github.com/sagemath/sage/issues/29090 python3 perl perl-ExtUtils-MakeMaker @@ -26,11 +26,11 @@ gcc # configure: error: in `/sage': # configure: error: C++ preprocessor "/lib/cpp" fails sanity check gcc-c++ -# Needed according to embray at https://trac.sagemath.org/ticket/26964: +# Needed according to embray at https://github.com/sagemath/sage/issues/26964: # The need for which comes [...] from MPIR's configure script findutils which -# Needed for pcre configure, see https://trac.sagemath.org/ticket/29129: +# Needed for pcre configure, see https://github.com/sagemath/sage/issues/29129: diffutils # Needed for openssl 3.0 perl-IPC-Cmd diff --git a/build/pkgs/cddlib/spkg-configure.m4 b/build/pkgs/cddlib/spkg-configure.m4 index 8508f28512d..b18cd879b00 100644 --- a/build/pkgs/cddlib/spkg-configure.m4 +++ b/build/pkgs/cddlib/spkg-configure.m4 @@ -16,7 +16,7 @@ SAGE_SPKG_CONFIGURE([cddlib], [ AC_CHECK_PROGS(SCDD, [scdd_gmp scdd]) AS_IF([test x$SCDD = x], [sage_spkg_install_cddlib=yes]) - dnl https://trac.sagemath.org/ticket/30319 + dnl https://github.com/sagemath/sage/issues/30319 AS_IF([test -n "$CDDEXEC"], [ AC_MSG_CHECKING([whether $CDDEXEC --redcheck works correctly for real input]) cat > conftest.ine <&2 "Warning: Disabling debug symbols on MacOS X 10.5" \ "PowerPC because of a linker (?) bug." - echo >&2 "See http://trac.sagemath.org/sage_trac/ticket/5847#comment:35" \ + echo >&2 "See https://github.com/sagemath/sage/issues/5847#comment:35" \ "ff. for details." echo >&2 CFLAGS="-O3 $ORIGINAL_CFLAGS" diff --git a/build/pkgs/elliptic_curves/spkg-install.py b/build/pkgs/elliptic_curves/spkg-install.py index 79b6c423446..c6e9bbcffa9 100644 --- a/build/pkgs/elliptic_curves/spkg-install.py +++ b/build/pkgs/elliptic_curves/spkg-install.py @@ -60,7 +60,7 @@ def install_ellcurves(): ellcurves_root = os.path.join(SAGE_SHARE, 'ellcurves') # Remove previous installs (possibly with bad permissions, see - # https://trac.sagemath.org/ticket/21641) + # https://github.com/sagemath/sage/issues/21641) import shutil try: shutil.rmtree(ellcurves_root) diff --git a/build/pkgs/fflas_ffpack/spkg-install.in b/build/pkgs/fflas_ffpack/spkg-install.in index 55684dd8a5f..b9dd851875f 100644 --- a/build/pkgs/fflas_ffpack/spkg-install.in +++ b/build/pkgs/fflas_ffpack/spkg-install.in @@ -24,13 +24,13 @@ if [ "$SAGE_FAT_BINARY" = yes ]; then fi # Need to use 'bash' for configure, see -# https://trac.sagemath.org/ticket/23451 +# https://github.com/sagemath/sage/issues/23451 if [ -z "$CONFIG_SHELL" ]; then export CONFIG_SHELL=`command -v bash` fi # We disable openmp because of build failures, see -# http://trac.sagemath.org/ticket/17635#comment:67 +# https://github.com/sagemath/sage/issues/17635#comment:67 sdh_configure --with-default="$SAGE_LOCAL" --with-blas-libs="$LINBOX_BLAS" \ "$LINBOX_BLAS_CFLAGS" --disable-static \ --enable-precompilation $FFLAS_FFPACK_CONFIGURE diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index 2ceadf99db4..30320027274 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -53,7 +53,7 @@ sdh_install pkg/GAPDoc-* pkg/primgrp-* pkg/SmallGrp-* pkg/transgrp "$GAP_ROOT"/p # typically "expected" to be loaded: These are the default packages that are # autoloaded at GAP startup (via the PackagesToLoad UserPreference) with an # out-of-the-box GAP installation; see -# https://trac.sagemath.org/ticket/22626#comment:393 for discussion on this +# https://github.com/sagemath/sage/issues/22626#comment:393 for discussion on this # # Also include atlasrep which is a dependency of tomlib sdh_install \ @@ -96,7 +96,7 @@ done # be going away. This breaks the build toolchain for some compiled GAP # packages. We need to replace these paths with the final GAP_ROOT path. The # below will work so long as neither of these paths contain '|', and if they do -# then god help you. https://trac.sagemath.org/ticket/27218 +# then god help you. https://github.com/sagemath/sage/issues/27218 sed -i -e "s|$GAP_BUILD_ROOT|$GAP_ROOT|g" \ "$SAGE_DESTDIR$SAGE_BIN/gac" "$DESTDIR_GAP_ROOT/sysinfo.gap" \ "$DESTDIR_GAP_ROOT/bin/gap.sh" "$DESTDIR_GAP_ROOT/doc/make_doc" || \ diff --git a/build/pkgs/gc/spkg-install.in b/build/pkgs/gc/spkg-install.in index e5d254c86fe..4acf5cf8b19 100644 --- a/build/pkgs/gc/spkg-install.in +++ b/build/pkgs/gc/spkg-install.in @@ -3,9 +3,9 @@ cd src GC_CONFIGURE="--enable-large-config" if [ "$UNAME" = "CYGWIN" ]; then - # See https://trac.sagemath.org/ticket/22694 + # See https://github.com/sagemath/sage/issues/22694 GC_CONFIGURE="$GC_CONFIGURE --enable-threads=posix --enable-handle-fork --enable-shared --disable-static" - # Force use of mmap on Cygwin https://trac.sagemath.org/ticket/23973 + # Force use of mmap on Cygwin https://github.com/sagemath/sage/issues/23973 export CFLAGS="$CFLAGS -DUSE_MMAP -DUSE_MUNMAP" fi diff --git a/build/pkgs/gcc/dependencies b/build/pkgs/gcc/dependencies index 9af2c9534bb..34a0cdf783d 100644 --- a/build/pkgs/gcc/dependencies +++ b/build/pkgs/gcc/dependencies @@ -5,5 +5,5 @@ NOTE: all dependencies of GCC must be order-only dependencies (appearing after the | symbol). This is to prevent rebuilds of GCC even if the dependencies are updated. There is logic in the top-level configure file to ensure that GCC is rebuilt anyway if required. See -https://trac.sagemath.org/ticket/24907 +https://github.com/sagemath/sage/issues/24907 ------------------------------------------------------------------------ diff --git a/build/pkgs/gcc/spkg-configure.m4 b/build/pkgs/gcc/spkg-configure.m4 index 63335eb7357..fe4d220a189 100644 --- a/build/pkgs/gcc/spkg-configure.m4 +++ b/build/pkgs/gcc/spkg-configure.m4 @@ -78,7 +78,7 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ SAGE_MUST_INSTALL_GCC([gcc is already installed in SAGE_LOCAL]) # Check whether it actually works... - # See https://trac.sagemath.org/ticket/24599 + # See https://github.com/sagemath/sage/issues/24599 SAGE_CHECK_BROKEN_GCC() if test x$SAGE_BROKEN_GCC = xyes; then # Prentend that GCC is not installed. @@ -167,7 +167,7 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ ], [1[[3-9]].*], [ # Install our own GCC if the system-provided one is newer than 12.x. - # See https://trac.sagemath.org/ticket/29456 + # See https://github.com/sagemath/sage/issues/29456 SAGE_SHOULD_INSTALL_GCC([$CXX is g++ version $GXX_VERSION, which is too recent for this version of Sage]) ]) fi @@ -181,7 +181,7 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ fi # Check that the assembler and linker used by $CXX match $AS and $LD. - # See http://trac.sagemath.org/sage_trac/ticket/14296 + # See https://github.com/sagemath/sage/issues/14296 if test -n "$AS"; then CXX_as=`$CXX -print-prog-name=as 2>/dev/null` CXX_as=`command -v $CXX_as 2>/dev/null` diff --git a/build/pkgs/gdb/distros/conda.txt b/build/pkgs/gdb/distros/conda.txt index 5d13af10681..b7a56f9afb3 100644 --- a/build/pkgs/gdb/distros/conda.txt +++ b/build/pkgs/gdb/distros/conda.txt @@ -1,2 +1,2 @@ -# Disabled for now because of https://trac.sagemath.org/ticket/30845#comment:269 +# Disabled for now because of https://github.com/sagemath/sage/issues/30845#comment:269 # gdb diff --git a/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch b/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch index 0d1baf45cec..773b71d08c0 100644 --- a/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch +++ b/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch @@ -3,7 +3,7 @@ On 32-bit architectures, longs are only 32 bits. The resulting overflow was causing an infinite loop in the 0602ResultantFanProjection test. References: -https://trac.sagemath.org/ticket/32088 +https://github.com/sagemath/sage/issues/32088 https://salsa.debian.org/math-team/gfan/-/commit/acaaa70 https://github.com/void-linux/void-packages/pull/34182 diff --git a/build/pkgs/gfan/spkg-install.in b/build/pkgs/gfan/spkg-install.in index f3224735e4f..5c31e18ec54 100644 --- a/build/pkgs/gfan/spkg-install.in +++ b/build/pkgs/gfan/spkg-install.in @@ -8,7 +8,7 @@ cd src find src -type f -print0 | xargs -0 sed -i.bak "s/log2/logger2/g" # To let testsuite/0009RenderStairCase pass on 32bit machines -# See https://trac.sagemath.org/ticket/32088 +# See https://github.com/sagemath/sage/issues/32088 case "$($CC -dumpmachine)" in i[3456]86*) CXXFLAGS+=" -ffloat-store" diff --git a/build/pkgs/gfortran/spkg-configure.m4 b/build/pkgs/gfortran/spkg-configure.m4 index db7c4e7bc14..1a2d6ba767c 100644 --- a/build/pkgs/gfortran/spkg-configure.m4 +++ b/build/pkgs/gfortran/spkg-configure.m4 @@ -88,7 +88,7 @@ SAGE_SPKG_CONFIGURE([gfortran], [ ], [1[[3-9]].*], [ # Install our own gfortran if the system-provided one is newer than 12.x. - # See https://trac.sagemath.org/ticket/29456, https://trac.sagemath.org/ticket/31838 + # See https://github.com/sagemath/sage/issues/29456, https://github.com/sagemath/sage/issues/31838 SAGE_MUST_INSTALL_GFORTRAN([$FC is version $GFORTRAN_VERSION, which is too recent for this version of Sage]) ]) ]) diff --git a/build/pkgs/giac/patches/cygwin-icas.patch b/build/pkgs/giac/patches/cygwin-icas.patch index 88669806647..56321e78b26 100644 --- a/build/pkgs/giac/patches/cygwin-icas.patch +++ b/build/pkgs/giac/patches/cygwin-icas.patch @@ -1,6 +1,6 @@ Disable threaded eval function on Cygwin since it's currently buggy, and not strictly needed in the first place since we don't -build giac with FLTK support; see https://trac.sagemath.org/ticket/27385 +build giac with FLTK support; see https://github.com/sagemath/sage/issues/27385 --- a/src/icas.cc 2018-12-22 17:08:24.000000000 +0100 +++ b/src/icas.cc 2019-03-06 14:38:19.814030200 +0100 @@ -160,7 +160,7 @@ diff --git a/build/pkgs/giac/patches/isnan-conflict.patch b/build/pkgs/giac/patches/isnan-conflict.patch index 88ca5f715a6..20af63aa806 100644 --- a/build/pkgs/giac/patches/isnan-conflict.patch +++ b/build/pkgs/giac/patches/isnan-conflict.patch @@ -1,7 +1,7 @@ Just always use std::isnan and std::isinf so there is no risk of conflicting with the libc math.h equivalents thereof. -See https://trac.sagemath.org/ticket/27263 +See https://github.com/sagemath/sage/issues/27263 --- a/src/global.cc 2019-02-12 15:49:03.082594000 +0000 +++ b/src/global.cc 2019-02-12 15:49:43.438594000 +0000 @@ -4139,11 +4139,7 @@ diff --git a/build/pkgs/giac/patches/pari_2_11.patch b/build/pkgs/giac/patches/pari_2_11.patch index 24142257a34..27de3f12fac 100644 --- a/build/pkgs/giac/patches/pari_2_11.patch +++ b/build/pkgs/giac/patches/pari_2_11.patch @@ -1,6 +1,6 @@ Change test output for PARI 2.11 -See https://trac.sagemath.org/ticket/25567 +See https://github.com/sagemath/sage/issues/25567 and https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=2102 diff -ru a/check/TP11-sol.cas.out1 b/check/TP11-sol.cas.out1 diff --git a/build/pkgs/glpk/patches/error_recovery.patch b/build/pkgs/glpk/patches/error_recovery.patch index f040f4b4a19..a383e25769b 100644 --- a/build/pkgs/glpk/patches/error_recovery.patch +++ b/build/pkgs/glpk/patches/error_recovery.patch @@ -1,6 +1,6 @@ From: Jeroen Demeyer Allow error recovery. See discussion at -http://trac.sagemath.org/ticket/20710#comment:18 +https://github.com/sagemath/sage/issues/20710#comment:18 diff --git a/src/env/error.c b/src/env/error.c index a898b76..154de0f 100644 diff --git a/build/pkgs/glpk/spkg-install.in b/build/pkgs/glpk/spkg-install.in index cdb4b4a168e..a911c46f024 100644 --- a/build/pkgs/glpk/spkg-install.in +++ b/build/pkgs/glpk/spkg-install.in @@ -1,6 +1,6 @@ cd src/ -# Use newer version of config.guess and config.sub (see Trac #19713) +# Use newer version of config.guess and config.sub (see Github issue #19713) cp "$SAGE_ROOT"/config/config.* . # Note: The following doesn't work with spaces in `$SAGE_LOCAL`, but we don't @@ -26,7 +26,7 @@ sdh_configure --with-gmp --disable-static sdh_make # Remove old libraries to make sure we can downgrade it if needed. -# See https://trac.sagemath.org/ticket/23596#comment:4 and later. +# See https://github.com/sagemath/sage/issues/23596#comment:4 and later. rm -f "$SAGE_LOCAL"/lib/libglpk.* sdh_make_install diff --git a/build/pkgs/glucose/spkg-install.in b/build/pkgs/glucose/spkg-install.in index 8dabc6458fb..f99cca1ae18 100644 --- a/build/pkgs/glucose/spkg-install.in +++ b/build/pkgs/glucose/spkg-install.in @@ -8,7 +8,7 @@ sdh_make sdh_install glucose ${SAGE_LOCAL}/bin/ cd .. -# Possible license issue, see warning below and discussion on https://trac.sagemath.org/ticket/26361 +# Possible license issue, see warning below and discussion on https://github.com/sagemath/sage/issues/26361 cd parallel sdh_make sdh_install glucose-syrup ${SAGE_LOCAL}/bin/ diff --git a/build/pkgs/iconv/spkg-check.in b/build/pkgs/iconv/spkg-check.in index 4ae5a6c622d..c0e91eff164 100644 --- a/build/pkgs/iconv/spkg-check.in +++ b/build/pkgs/iconv/spkg-check.in @@ -7,7 +7,7 @@ SunOS) # We must test iconv, but on Solaris some tests will always fail. echo "If you see 3 core dumps, don't be too alarmed." echo "This is a known Solaris bug and can safely be ignored. See" - echo " http://trac.sagemath.org/sage_trac/ticket/8270" + echo " https://github.com/sagemath/sage/issues/8270" echo "It will probably be fixed in later releases of Solaris 10," echo "and was fixed in build 66 of OpenSolaris:" echo " http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6550204" diff --git a/build/pkgs/iconv/spkg-install.in b/build/pkgs/iconv/spkg-install.in index 9dc19c7bdab..89b401c70e9 100644 --- a/build/pkgs/iconv/spkg-install.in +++ b/build/pkgs/iconv/spkg-install.in @@ -1,6 +1,6 @@ # Only build iconv on Solaris, HP-UX and Cygwin. See -# http://trac.sagemath.org/sage_trac/ticket/8567 and -# http://trac.sagemath.org/sage_trac/ticket/9603 +# https://github.com/sagemath/sage/issues/8567 and +# https://github.com/sagemath/sage/issues/9603 # for details. case "$UNAME" in @@ -8,8 +8,8 @@ CYGWIN|HP-UX|SunOS) echo "iconv will be installed as the operating system is Cygwin, HP-UX or Solaris." echo "These systems either lack iconv, or do not have a sufficiently capable" echo "version of iconv. See:" - echo " http://trac.sagemath.org/sage_trac/ticket/8567" - echo " http://trac.sagemath.org/sage_trac/ticket/9603" + echo " https://github.com/sagemath/sage/issues/8567" + echo " https://github.com/sagemath/sage/issues/9603" # Disable NLS on Cygwin to be able to build libiconv without the Cygwin # libiconv package. @@ -29,8 +29,8 @@ CYGWIN|HP-UX|SunOS) echo "Solaris, HP-UX and Cygwin, as the system's iconv will be used" echo "on other platforms, rather than the one shipped with Sage." echo "See:" - echo " http://trac.sagemath.org/sage_trac/ticket/8567" - echo " http://trac.sagemath.org/sage_trac/ticket/9603" + echo " https://github.com/sagemath/sage/issues/8567" + echo " https://github.com/sagemath/sage/issues/9603" exit 0 esac diff --git a/build/pkgs/jupyterlab/requirements.txt b/build/pkgs/jupyterlab/requirements.txt index 802d33d22f1..f03a26674fd 100644 --- a/build/pkgs/jupyterlab/requirements.txt +++ b/build/pkgs/jupyterlab/requirements.txt @@ -1,3 +1,3 @@ jupyterlab ~= 3.3 -# See https://trac.sagemath.org/ticket/33607 +# See https://github.com/sagemath/sage/issues/33607 jupyterlab-server < 2.11 diff --git a/build/pkgs/libgd/spkg-install.in b/build/pkgs/libgd/spkg-install.in index dc73d868fa5..d291869a923 100644 --- a/build/pkgs/libgd/spkg-install.in +++ b/build/pkgs/libgd/spkg-install.in @@ -6,7 +6,7 @@ if [ "$UNAME" = "CYGWIN" ]; then # Compiling with vpx support creates a broken library in some cases # because the vpx package itself is broken on some older Cygwin versions; # we don't need this feature so safer to just disable - # https://trac.sagemath.org/ticket/27970 + # https://github.com/sagemath/sage/issues/27970 LIBGD_CONFIGURE="--without-vpx $LIBGD_CONFIGURE" fi if [ -n "$SAGE_FREETYPE_PREFIX" ]; then diff --git a/build/pkgs/linbox/spkg-install.in b/build/pkgs/linbox/spkg-install.in index a2ad194837a..8d415e81fd8 100644 --- a/build/pkgs/linbox/spkg-install.in +++ b/build/pkgs/linbox/spkg-install.in @@ -20,13 +20,13 @@ fi # Disable fplll as version 5.x is not supported by linbox <= 1.5.0. # This is harmless as no functionality using fplll is exposed in Sage. -# See trac ticket #21221. +# See github issue #21221. LINBOX_CONFIGURE="--without-fplll $LINBOX_CONFIGURE" # We disable openmp because of build failures, see -# http://trac.sagemath.org/ticket/17635#comment:67 +# https://github.com/sagemath/sage/issues/17635#comment:67 # We disable ocl because of build failures, see -# https://trac.sagemath.org/ticket/32076 +# https://github.com/sagemath/sage/issues/32076 sdh_configure --with-default="$SAGE_LOCAL" \ --disable-static --disable-openmp --without-ocl \ $LINBOX_CONFIGURE diff --git a/build/pkgs/matplotlib/make-setup-config.py b/build/pkgs/matplotlib/make-setup-config.py index 4f9acf1f04c..61f61806810 100644 --- a/build/pkgs/matplotlib/make-setup-config.py +++ b/build/pkgs/matplotlib/make-setup-config.py @@ -11,7 +11,7 @@ config.set('libs', 'system_qhull', 'True') # lto is problematic if we mix libraries from the OS with our own libraries, # which are not necessarily compiled with the same gcc version -# https://trac.sagemath.org/ticket/27754 +# https://github.com/sagemath/sage/issues/27754 config.set('libs', 'enable_lto', 'False') ##################################################################### diff --git a/build/pkgs/maxima/spkg-install.in b/build/pkgs/maxima/spkg-install.in index 3516e1b3146..3ae6382f9ba 100644 --- a/build/pkgs/maxima/spkg-install.in +++ b/build/pkgs/maxima/spkg-install.in @@ -1,6 +1,6 @@ # Sometimes, ECL gives interactive prompts when something goes wrong # during the build. Avoid this by redirecting stdin from /dev/null. -# See http://trac.sagemath.org/sage_trac/ticket/11884#comment:34 +# See https://github.com/sagemath/sage/issues/11884#comment:34 exec Date: Tue, 6 Mar 2018 00:18:41 +0100 Don't rely on pandoc for the readme -See https://trac.sagemath.org/ticket/24901 +See https://github.com/sagemath/sage/issues/24901 and https://github.com/aaren/notedown/issues/76 diff --git a/setup.py b/setup.py diff --git a/build/pkgs/numpy/spkg-install.in b/build/pkgs/numpy/spkg-install.in index 2b555d8b871..e28660f393f 100644 --- a/build/pkgs/numpy/spkg-install.in +++ b/build/pkgs/numpy/spkg-install.in @@ -7,7 +7,7 @@ if [ `uname` = "Darwin" ]; then unset ATLAS unset BLAS unset LAPACK - # https://trac.sagemath.org/ticket/34110#comment:35 + # https://github.com/sagemath/sage/issues/34110#comment:35 # The fix for "reciprocal" (affected by a clang compiler bug) in # https://github.com/numpy/numpy/pull/19926 relies on -ftrapping-math # being used when Apple clang v12+ is used. diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index f6ac7753838..00413ca517d 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -34,7 +34,7 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" -# Ensure USE_TLS=1 ; see https://trac.sagemath.org/ticket/27256 +# Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then @@ -51,7 +51,7 @@ if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then fi fi -# See https://trac.sagemath.org/ticket/30335 +# See https://github.com/sagemath/sage/issues/30335 rm -f "$SAGE_LOCAL/lib/pkgconfig/cblas.pc" "$SAGE_LOCAL/lib/pkgconfig/blas.pc" "$SAGE_LOCAL/lib/pkgconfig/lapack.pc" sdh_make_install PREFIX="$SAGE_LOCAL" NO_STATIC=1 $OPENBLAS_CONFIGURE diff --git a/build/pkgs/pcre/patches/8.39-cygwin-jit.patch b/build/pkgs/pcre/patches/8.39-cygwin-jit.patch index e581623b0c5..ca1ea43c435 100644 --- a/build/pkgs/pcre/patches/8.39-cygwin-jit.patch +++ b/build/pkgs/pcre/patches/8.39-cygwin-jit.patch @@ -1,5 +1,5 @@ Patch from Cygwin to fix segfault when using the JIT compiler; see -https://trac.sagemath.org/ticket/23291 +https://github.com/sagemath/sage/issues/23291 --- a/sljit/sljitConfigInternal.h 2016-04-06 03:05:43.000000000 -0500 +++ b/sljit/sljitConfigInternal.h 2016-08-11 14:33:58.201820000 -0500 @@ -564,7 +564,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free diff --git a/build/pkgs/pcre/spkg-install.in b/build/pkgs/pcre/spkg-install.in index 892e1aa84f7..fb0c49272fe 100644 --- a/build/pkgs/pcre/spkg-install.in +++ b/build/pkgs/pcre/spkg-install.in @@ -8,7 +8,7 @@ sdh_make # The JIT feature of pcre is known to be broken on some systems, in # particular on Solaris. We run the testsuite of pcre (this takes only # a few seconds). It the testsuite fails, we rebuild pcre without JIT -# support. See https://trac.sagemath.org/ticket/24628 +# support. See https://github.com/sagemath/sage/issues/24628 if ! $MAKE check; then echo >&2 "*** Rebuilding pcre without JIT support ***" $MAKE clean diff --git a/build/pkgs/ppl/patches/cygwin-weak-symbols.patch b/build/pkgs/ppl/patches/cygwin-weak-symbols.patch index 81215ea432c..535a009f82d 100644 --- a/build/pkgs/ppl/patches/cygwin-weak-symbols.patch +++ b/build/pkgs/ppl/patches/cygwin-weak-symbols.patch @@ -1,6 +1,6 @@ weak symbols don't work properly in 64-bit Cygwin and should not be used (even though it will compile with __attribute__((weak)), -it will not linke; see https://trac.sagemath.org/ticket/16152 +it will not linke; see https://github.com/sagemath/sage/issues/16152 --- a/src/assertions.hh 2016-07-26 16:21:22.591434100 +0200 +++ b/src/assertions.hh 2016-07-26 16:35:09.500888200 +0200 @@ -98,7 +98,7 @@ diff --git a/build/pkgs/ppl/spkg-install.in b/build/pkgs/ppl/spkg-install.in index bc570b95cfc..1f3162a6269 100644 --- a/build/pkgs/ppl/spkg-install.in +++ b/build/pkgs/ppl/spkg-install.in @@ -19,7 +19,7 @@ fi # Workaround to disable PPL's "watchdog timer", preventing it from clobbering # Cysignals' SIGALRM handler on Cygwin; see -# https://trac.sagemath.org/ticket/21190 +# https://github.com/sagemath/sage/issues/21190 if [ "$UNAME" = "CYGWIN" ]; then sed -i 's/#define HAVE_DECL_SETITIMER 1/#define HAVE_DECL_SETITIMER 0/' config.h fi diff --git a/build/pkgs/prompt_toolkit/install-requires.txt b/build/pkgs/prompt_toolkit/install-requires.txt index fe90872577d..30d49fc8454 100644 --- a/build/pkgs/prompt_toolkit/install-requires.txt +++ b/build/pkgs/prompt_toolkit/install-requires.txt @@ -1,2 +1,2 @@ -# https://trac.sagemath.org/ticket/33428 - prompt_toolkit 3.0.25+ breaks Ctrl-C +# https://github.com/sagemath/sage/issues/33428 - prompt_toolkit 3.0.25+ breaks Ctrl-C prompt_toolkit >=3.0.5, <3.0.25 diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt index de89260872b..a89be777b4a 100644 --- a/build/pkgs/ptyprocess/install-requires.txt +++ b/build/pkgs/ptyprocess/install-requires.txt @@ -1,3 +1,3 @@ ptyprocess ==0.5.1 -# https://trac.sagemath.org/ticket/31280#comment:42 and following +# https://github.com/sagemath/sage/issues/31280#comment:42 and following # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7 diff --git a/build/pkgs/python3/spkg-build.in b/build/pkgs/python3/spkg-build.in index 3cb837b3be6..0c08814a242 100644 --- a/build/pkgs/python3/spkg-build.in +++ b/build/pkgs/python3/spkg-build.in @@ -52,7 +52,7 @@ elif [ "$UNAME" = SunOS ]; then # Enable some C99 features on Solaris. This in particular enables # the isinf() and isfinite() functions. It works both for C and # C++ code (which is not true for -std=c99). See - # http://trac.sagemath.org/sage_trac/ticket/14265 + # https://github.com/sagemath/sage/issues/14265 export CFLAGS="-D__C99FEATURES__ $CFLAGS" fi @@ -69,14 +69,14 @@ rm -f "$SAGE_LOCAL/lib/python" # Remove old libraries. We really need to do this before building Python # since Python tries to import some modules (e.g. ctypes) at build-time. # We need to make sure that the old installed libraries in local/lib are -# not used for that. See https://trac.sagemath.org/ticket/24605 +# not used for that. See https://github.com/sagemath/sage/issues/24605 rm -f "$SAGE_LOCAL"/lib/lib"$PKG_BASE"* # Note: --without-ensurepip ensures that setuptools+pip are *not* installed # automatically when installing python3. They will be installed instead by # the separate setuptools and pip packages; see - # https://trac.sagemath.org/ticket/23398 + # https://github.com/sagemath/sage/issues/23398 PYTHON_CONFIGURE="$PYTHON_CONFIGURE --without-ensurepip" sdh_configure --enable-shared $PYTHON_CONFIGURE diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4 index 19642b59dd9..d8ece39683a 100644 --- a/build/pkgs/python3/spkg-configure.m4 +++ b/build/pkgs/python3/spkg-configure.m4 @@ -33,7 +33,7 @@ SAGE_SPKG_CONFIGURE([python3], [ MIN_VERSION, LT_VERSION, $check_modules, [ AS_IF([[conftest_venv/bin/python3 -m sysconfig | grep '^\sw*\(C\|LD\)FLAGS *=.*[" ]-[IL] *[^.]' ]] [>& AS_MESSAGE_LOG_FD 2>&1 ], [ - AC_MSG_WARN([this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://trac.sagemath.org/ticket/31132]) + AC_MSG_WARN([this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://github.com/sagemath/sage/issues/31132]) ]) dnl It is good ac_cv_path_PYTHON3="$ac_path_PYTHON3" @@ -52,7 +52,7 @@ SAGE_SPKG_CONFIGURE([python3], [ MIN_VERSION, LT_VERSION, $check_modules, [ AS_IF([[conftest_venv/bin/python3 -m sysconfig | grep '^\sw*\(C\|LD\)FLAGS *=.*[" ]-[IL] *[^.]' ]] [>& AS_MESSAGE_LOG_FD 2>&1 ], [ - AC_MSG_RESULT([no, this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://trac.sagemath.org/ticket/31132; to use it anyway, use ./configure --with-python=$ac_path_PYTHON3]) + AC_MSG_RESULT([no, this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://github.com/sagemath/sage/issues/31132; to use it anyway, use ./configure --with-python=$ac_path_PYTHON3]) ], [ dnl It is good ac_cv_path_PYTHON3="$ac_path_PYTHON3" diff --git a/build/pkgs/python3/spkg-install.in b/build/pkgs/python3/spkg-install.in index 20c039cc81a..eae0f39647a 100644 --- a/build/pkgs/python3/spkg-install.in +++ b/build/pkgs/python3/spkg-install.in @@ -60,7 +60,7 @@ if [ "$UNAME" = "Darwin" ] && \ [ `uname -r | cut '-d.' -f1` -gt 9 ]; then rm -f "${SAGE_DESTDIR}${PYTHON_CONFIG_DIR}/libpython${PYTHON_LDVERSION}.a" elif [ "$UNAME" = "CYGWIN" ]; then - # See http://trac.sagemath.org/ticket/20437 + # See https://github.com/sagemath/sage/issues/20437 ln -sf "${PYTHON_CONFIG_DIR}/libpython${PYTHON_LDVERSION}.dll.a" \ "${SAGE_DESTDIR_LOCAL}/lib/libpython${PYTHON_LDVERSION}.dll.a" fi diff --git a/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch b/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch index 54282fbf8f0..08e2d8644df 100644 --- a/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch +++ b/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch @@ -18,7 +18,7 @@ index d184650..f13113b 100644 +LIBS = -lreadline + +# On macOS, librt is not available, -+# see https://trac.sagemath.org/ticket/28388 ++# see https://github.com/sagemath/sage/issues/28388 +#ifeq ($(findstring darwin,${OSTYPE}),) +#LIBS += -lrt +#endif diff --git a/build/pkgs/qepcad/spkg-install.in b/build/pkgs/qepcad/spkg-install.in index 11fbea86b16..4287c3e4f1a 100644 --- a/build/pkgs/qepcad/spkg-install.in +++ b/build/pkgs/qepcad/spkg-install.in @@ -5,11 +5,11 @@ export saclib="$SAGE_LOCAL/lib/saclib" export qe=$(pwd -P) # * Override SHELL: use /bin/sh instead of /bin/csh, see -# https://trac.sagemath.org/ticket/10224 +# https://github.com/sagemath/sage/issues/10224 # * Add rpath to compiler flags, see -# https://trac.sagemath.org/ticket/22653 +# https://github.com/sagemath/sage/issues/22653 # * Use ARFLAGS that also work on macOS, avoiding the U option, see -# https://trac.sagemath.org/ticket/28388 +# https://github.com/sagemath/sage/issues/28388 LIBS=-lreadline if [ "$UNAME" = "Linux" ]; then LIBS="$LIBS -lrt" diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index 819432d90ff..87a8f39f3f0 100644 --- a/build/pkgs/sage_conf/install-requires.txt +++ b/build/pkgs/sage_conf/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.0b0 +sage-conf ~= 10.0b1 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index 73f499affef..dc1652133a1 100644 --- a/build/pkgs/sage_docbuild/install-requires.txt +++ b/build/pkgs/sage_docbuild/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.0b0 +sage-docbuild ~= 10.0b1 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index 169a4c5d9cc..f418d8648ec 100644 --- a/build/pkgs/sage_setup/install-requires.txt +++ b/build/pkgs/sage_setup/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.0b0 +sage-setup ~= 10.0b1 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index e2b85444aca..d62c0ef4662 100644 --- a/build/pkgs/sage_sws2rst/install-requires.txt +++ b/build/pkgs/sage_sws2rst/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.0b0 +sage-sws2rst ~= 10.0b1 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index 565dfde8395..c231384faae 100644 --- a/build/pkgs/sagelib/install-requires.txt +++ b/build/pkgs/sagelib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagelib ~= 10.0b0 +sagelib ~= 10.0b1 diff --git a/build/pkgs/sagelib/spkg-install b/build/pkgs/sagelib/spkg-install index ad8b2ed43fc..ed6bb969f31 100755 --- a/build/pkgs/sagelib/spkg-install +++ b/build/pkgs/sagelib/spkg-install @@ -29,7 +29,7 @@ fi ## Building takes places in the build/ subdirectory. ## ## As a special exception, we feed SAGE_PKGS. -## They are needed by src/sage/misc/package.py. See meta-ticket #28815 for planned changes to this. +## They are needed by src/sage/misc/package.py. See github issue #28815 for planned changes to this. export SAGE_PKGS="$SAGE_ROOT"/build/pkgs export SAGE_ROOT=/doesnotexist diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index 15c1dfbcc42..1ddff9fc8f8 100644 --- a/build/pkgs/sagemath_categories/install-requires.txt +++ b/build/pkgs/sagemath_categories/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.0b0 +sagemath-categories ~= 10.0b1 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index 73ef51c4e92..760c1dcf2e9 100644 --- a/build/pkgs/sagemath_environment/install-requires.txt +++ b/build/pkgs/sagemath_environment/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.0b0 +sagemath-environment ~= 10.0b1 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index a03b35802fe..51e5c5a346d 100644 --- a/build/pkgs/sagemath_objects/install-requires.txt +++ b/build/pkgs/sagemath_objects/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.0b0 +sagemath-objects ~= 10.0b1 diff --git a/build/pkgs/sagemath_repl/install-requires.txt b/build/pkgs/sagemath_repl/install-requires.txt index 306890d9db9..ca64cd6b39f 100644 --- a/build/pkgs/sagemath_repl/install-requires.txt +++ b/build/pkgs/sagemath_repl/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.0b0 +sagemath-repl ~= 10.0b1 diff --git a/build/pkgs/setuptools/distros/conda.txt b/build/pkgs/setuptools/distros/conda.txt index 0a486bd850f..2602d0f6344 100644 --- a/build/pkgs/setuptools/distros/conda.txt +++ b/build/pkgs/setuptools/distros/conda.txt @@ -1,4 +1,4 @@ -# Set this bound until https://trac.sagemath.org/ticket/34209 adds support for PEP660 editable builds +# Set this bound until https://github.com/sagemath/sage/issues/34209 adds support for PEP660 editable builds # By setting this version bound, we avoid having to include the following in our installation instructions. # export SETUPTOOLS_ENABLE_FEATURES=legacy-editable "setuptools<64" diff --git a/build/pkgs/snappy/dependencies b/build/pkgs/snappy/dependencies index 8e4fca87caa..db96ccc42e0 100644 --- a/build/pkgs/snappy/dependencies +++ b/build/pkgs/snappy/dependencies @@ -7,4 +7,4 @@ The dependency cypari above is actually cypari2. An installed sagelib is needed when snappy is installed from source (instead of a wheel) because snappy's setup.py tests its presence to adjust dependencies. -https://trac.sagemath.org/ticket/31180 +https://github.com/sagemath/sage/issues/31180 diff --git a/build/pkgs/snappy/requirements.txt b/build/pkgs/snappy/requirements.txt index 33e93e66a1a..0799f0eac11 100644 --- a/build/pkgs/snappy/requirements.txt +++ b/build/pkgs/snappy/requirements.txt @@ -2,9 +2,9 @@ # if installed as a wheel but will actually use Sage's cypari2. # cypari contains a statically linked copy of pari and other libraries # and will remain completely unused (wastes 30M). Snappy is about 165M. -# See https://trac.sagemath.org/ticket/31180 +# See https://github.com/sagemath/sage/issues/31180 snappy -# cypari 2.4.0 has a broken sdist, https://trac.sagemath.org/ticket/31180 +# cypari 2.4.0 has a broken sdist, https://github.com/sagemath/sage/issues/31180 cypari !=2.4.0 # An optional database (110M uncompressed) snappy_15_knots diff --git a/build/pkgs/sympow/SPKG.rst b/build/pkgs/sympow/SPKG.rst index c1f33b6a00c..1a436e3b7ba 100644 --- a/build/pkgs/sympow/SPKG.rst +++ b/build/pkgs/sympow/SPKG.rst @@ -43,7 +43,7 @@ Special Update/Build Instructions that might show up. I (David Kirkby) would personally not trust this code much at all. -- This is a difficult package to maintain. A trac ticket (#9758) has +- This is a difficult package to maintain. A github issue (#9758) has been opened to implement Watkins-Delaunay's algorithm for computing modular @@ -58,7 +58,7 @@ Special Update/Build Instructions This has been fixed in the Gentoo Linux distribution. Some information from Christopher can be seen on - http://trac.sagemath.org/sage_trac/ticket/9703 + https://github.com/sagemath/sage/issues/9703 This package will generate binary versions of all shipped datafiles, so these will work. However, creating totally new datafiles from scratch diff --git a/build/pkgs/wheel/install-requires.txt b/build/pkgs/wheel/install-requires.txt index fb07166d42c..43f74ab0144 100644 --- a/build/pkgs/wheel/install-requires.txt +++ b/build/pkgs/wheel/install-requires.txt @@ -1,2 +1,2 @@ -# https://trac.sagemath.org/ticket/31050 - version constraint for macOS Big Sur support +# https://github.com/sagemath/sage/issues/31050 - version constraint for macOS Big Sur support wheel >=0.36.2 diff --git a/build/sage_bootstrap/flock.py b/build/sage_bootstrap/flock.py index ee723113b5e..483482a6edf 100644 --- a/build/sage_bootstrap/flock.py +++ b/build/sage_bootstrap/flock.py @@ -8,7 +8,7 @@ # This is originally motivated by pip, but has since been generalized. We # should avoid running pip while uninstalling a package because that is prone # to race conditions. This script runs pip under a lock. For details, see -# https://trac.sagemath.org/ticket/21672 +# https://github.com/sagemath/sage/issues/21672 import fcntl import os diff --git a/build/sage_bootstrap/uncompress/action.py b/build/sage_bootstrap/uncompress/action.py index 9655f76860c..8d8af71da5e 100644 --- a/build/sage_bootstrap/uncompress/action.py +++ b/build/sage_bootstrap/uncompress/action.py @@ -74,8 +74,8 @@ def unpack_archive(archive, dirname=None): retry(rename, OSError, tries=len(archive.names)) # Apply typical umask to the top-level directory in case it wasn't - # already; see https://trac.sagemath.org/ticket/24567 - # and later https://trac.sagemath.org/ticket/28596 + # already; see https://github.com/sagemath/sage/issues/24567 + # and later https://github.com/sagemath/sage/issues/28596 os.chmod(dirname, os.stat(dirname).st_mode & ~0o022) finally: os.chdir(prev_cwd) diff --git a/build/sage_bootstrap/uncompress/tar_file.py b/build/sage_bootstrap/uncompress/tar_file.py index 9777d265b4d..fdfa8d240e8 100644 --- a/build/sage_bootstrap/uncompress/tar_file.py +++ b/build/sage_bootstrap/uncompress/tar_file.py @@ -41,8 +41,8 @@ class SageBaseTarFile(tarfile.TarFile): time (the current time), not the timestamps stored in the tarball. This is meant to work around https://bugs.python.org/issue32773 - See http://trac.sagemath.org/ticket/20218#comment:16 and - https://trac.sagemath.org/ticket/24567 for more background. + See https://github.com/sagemath/sage/issues/20218#comment:16 and + https://github.com/sagemath/sage/issues/24567 for more background. """ umask = 0o022 diff --git a/build/sage_bootstrap/uninstall.py b/build/sage_bootstrap/uninstall.py index 1ce039921fc..7cd808d0fe7 100644 --- a/build/sage_bootstrap/uninstall.py +++ b/build/sage_bootstrap/uninstall.py @@ -186,7 +186,7 @@ def rmdir(dirname): # from it, remove the directory too. for filename in files: # Just in case: use lstrip to remove leading "/" from - # filename. See https://trac.sagemath.org/ticket/26013. + # filename. See https://github.com/sagemath/sage/issues/26013. filename = pth.join(sage_local, filename.lstrip(os.sep)) dirname = pth.dirname(filename) if pth.lexists(filename): diff --git a/docker/Dockerfile b/docker/Dockerfile index bf14547cd38..9d56b10b9c5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -196,7 +196,7 @@ ENV MAKEFLAGS $MAKEFLAGS ARG SAGE_NUM_THREADS="2" ENV SAGE_NUM_THREADS $SAGE_NUM_THREADS RUN make configure -# Old default before https://trac.sagemath.org/ticket/32406 +# Old default before https://github.com/sagemath/sage/issues/32406 RUN ./configure --disable-editable RUN make build diff --git a/docker/README.md b/docker/README.md index eb0f1ba344d..14c49b5d4fe 100644 --- a/docker/README.md +++ b/docker/README.md @@ -26,7 +26,7 @@ There are several flavours of this image. ``` docker run -p8888:8888 sagemath/sagemath:latest sage-jupyter ``` -* [`sagemath/sagemath-dev`![image size](https://img.shields.io/microbadger/image-size/sagemath/sagemath-dev.svg)](https://hub.docker.com/r/sagemath/sagemath-dev) contains all the build artifacts to rebuild Sage quickly (currently, this is broken, see [#34241](https://trac.sagemath.org/ticket/34241).) This version is probably only relevant for Sage developers. Run this image with: +* [`sagemath/sagemath-dev`![image size](https://img.shields.io/microbadger/image-size/sagemath/sagemath-dev.svg)](https://hub.docker.com/r/sagemath/sagemath-dev) contains all the build artifacts to rebuild Sage quickly (currently, this is broken, see [#34241](https://github.com/sagemath/sage/issues/34241).) This version is probably only relevant for Sage developers. Run this image with: ``` docker run -it sagemath/sagemath-dev:develop ``` diff --git a/m4/sage_spkg_collect.m4 b/m4/sage_spkg_collect.m4 index 75903603c49..d52dc6205ee 100644 --- a/m4/sage_spkg_collect.m4 +++ b/m4/sage_spkg_collect.m4 @@ -81,7 +81,7 @@ AC_DEFUN([SAGE_SPKG_COLLECT_INIT], [ dnl Intialize the collection variables. # To deal with ABI incompatibilities when gcc is upgraded, every package # (except gcc) should depend on gcc if gcc is already installed. -# See https://trac.sagemath.org/ticket/24703 +# See https://github.com/sagemath/sage/issues/24703 if test x$SAGE_INSTALL_GCC = xexists; then SAGE_GCC_DEP='$(SAGE_LOCAL)/bin/gcc' else diff --git a/pkgs/sage-conf/README.rst b/pkgs/sage-conf/README.rst index ec4ba0dd631..c968612aef2 100644 --- a/pkgs/sage-conf/README.rst +++ b/pkgs/sage-conf/README.rst @@ -22,7 +22,7 @@ sage_conf sdist on PyPI ----------------------- This implementation of the ``sage_conf`` distribution package comes from -https://trac.sagemath.org/ticket/29039, which added the directory +https://github.com/sagemath/sage/issues/29039, which added the directory `pkgs/sage-conf_pypi `_. To install, use ``pip install -v sage_conf``. Using ``-v`` ensures that diagnostic @@ -48,7 +48,7 @@ sage_conf wheels Prebuilt binary wheels of the ``sage_conf`` distribution package are available at https://github.com/sagemath/sage-wheels/releases/ -This implementation of ``sage_conf`` comes from https://trac.sagemath.org/ticket/31396, +This implementation of ``sage_conf`` comes from https://github.com/sagemath/sage/issues/31396, which adds the directory ``pkgs/sage-conf_relocatable/``. On building a wheel, it invokes ``sage_bootstrap`` to establish a diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-sws2rst/README.rst b/pkgs/sage-sws2rst/README.rst index 8098507fff4..f20d3e636cf 100644 --- a/pkgs/sage-sws2rst/README.rst +++ b/pkgs/sage-sws2rst/README.rst @@ -8,4 +8,4 @@ Provides a script `sage-sws2rst`, which translates a Sage worksheet file (.sws) Sage worksheet files (.sws) are a file format that was used by the now-obsolete Sage notebook (https://github.com/sagemath/sagenb), superseded by the Jupyter notebook. SageNB was dropped in the course of the transition of SageMath to Python 3. -This package was extracted from the SageNB sources in https://trac.sagemath.org/ticket/28838 to provide a way to convert pedagogical material written available in Sage worksheet format. +This package was extracted from the SageNB sources in https://github.com/sagemath/sage/issues/28838 to provide a way to convert pedagogical material written available in Sage worksheet format. diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-categories/MANIFEST.in.m4 b/pkgs/sagemath-categories/MANIFEST.in.m4 index 98d10a91fef..361132e0cfa 100644 --- a/pkgs/sagemath-categories/MANIFEST.in.m4 +++ b/pkgs/sagemath-categories/MANIFEST.in.m4 @@ -35,7 +35,7 @@ exclude sage/categories/__init__.py include sage/rings/ideal.* include sage/rings/ring.* graft sage/typeset # dep of sage.categories.tensor -# include sage/rings/integer*.* # depends on cypari, flint - https://trac.sagemath.org/ticket/30022 +# include sage/rings/integer*.* # depends on cypari, flint - https://github.com/sagemath/sage/issues/30022 # include sage/rings/rational*.* # include sage/rings/infinity.* diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-standard/README.rst b/pkgs/sagemath-standard/README.rst index 5709c22249b..f624d1414a7 100644 --- a/pkgs/sagemath-standard/README.rst +++ b/pkgs/sagemath-standard/README.rst @@ -28,4 +28,4 @@ for partial lists for various systems. The connection to the system environment is facilitated through the https://pypi.org/project/sage-conf/ distribution package. -A modularization effort is in progress with the goal of making it possible to install parts of the Sage Library with fewer prerequisites. https://trac.sagemath.org/ticket/29705 +A modularization effort is in progress with the goal of making it possible to install parts of the Sage Library with fewer prerequisites. https://github.com/sagemath/sage/issues/29705 diff --git a/src/.relint.yml b/src/.relint.yml index 2b49c758dc0..86684ad1040 100644 --- a/src/.relint.yml +++ b/src/.relint.yml @@ -35,7 +35,7 @@ # From various typo tickets -# https://trac.sagemath.org/ticket/30585 +# https://github.com/sagemath/sage/issues/30585 - name: 'typo "homogenous" detected' hint: | in mathematics it should be "homogeneous" diff --git a/src/VERSION.txt b/src/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/src/bin/sage b/src/bin/sage index 03aec9cfbfc..97f6b2d540b 100755 --- a/src/bin/sage +++ b/src/bin/sage @@ -77,7 +77,7 @@ resolvelinks() { } # Resolve the links in $0 so that local/bin/sage can be executed from -# a symlink (Trac #30888). +# a symlink (Issue #30888). SELF=$(resolvelinks "${0}") # Display the current version of Sage @@ -173,7 +173,7 @@ if [ -z "$SAGE_VENV" -a -x "${SELF}-venv-config" ]; then export SAGE_VENV=$("${SELF}-venv-config" SAGE_VENV) fi if [ -f "${SELF}-env-config" ]; then - # As of Trac #22731, sage-env-config is optional. + # As of Issue #22731, sage-env-config is optional. . "${SELF}-env-config" >&2 fi @@ -577,7 +577,7 @@ fi if [ "$1" = '-c' ]; then shift sage_setup - unset TERM # See Trac #12263 + unset TERM # See Issue #12263 exec sage-eval "$@" fi @@ -1028,7 +1028,7 @@ fi if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then shift - # Trac #30002: ensure an English locale so that it is possible to + # Issue #30002: ensure an English locale so that it is possible to # scrape out warnings by pattern matching. export LANG=C export LANGUAGE=C @@ -1039,7 +1039,7 @@ if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then export OMP_NUM_THREADS=1 fi - # Trac #33650: Make sure that user configuration of Jupyter does not + # Issue #33650: Make sure that user configuration of Jupyter does not # shadow our sagemath kernel when jupyter-sphinx is invoked export JUPYTER_CONFIG_DIR=/doesnotexist export JUPYTER_CONFIG_PATH=/doesnotexist @@ -1153,7 +1153,7 @@ if [ $# -ge 1 ]; then exit 1 fi sage_setup - unset TERM # See Trac #12263 + unset TERM # See Issue #12263 # sage-run rejects all command line options as the first argument. exec sage-run "$@" fi diff --git a/src/bin/sage-cleaner b/src/bin/sage-cleaner index 7fe6784ee26..e2e578eec60 100755 --- a/src/bin/sage-cleaner +++ b/src/bin/sage-cleaner @@ -169,7 +169,7 @@ def fix_old_mistakes(): """ Experience is simply the name we give our mistakes. """ - # inconsistently escaped hyphens with underscores (http://trac.sagemath.org/14055) + # inconsistently escaped hyphens with underscores (https://github.com/sagemath/sage/issues/14055) wrong_hostname = HOSTNAME.replace('-','_').replace('/','_').replace('\\','_') wrong_sage_tmp_root = os.path.join(DOT_SAGE, 'temp', wrong_hostname) if wrong_sage_tmp_root != SAGE_TMP_ROOT and os.path.exists(wrong_sage_tmp_root): diff --git a/src/bin/sage-coverage b/src/bin/sage-coverage index 45c4073a18c..f4920600528 100755 --- a/src/bin/sage-coverage +++ b/src/bin/sage-coverage @@ -37,7 +37,7 @@ def coverage_all(directory): print(''.join(s)) - # Trac #5859: Don't crash if there isn't anything to test. + # Issue #5859: Don't crash if there isn't anything to test. score = 100.0 if total != 0: score = (float(scr) / total) diff --git a/src/bin/sage-cython b/src/bin/sage-cython index 157cf76a23f..a52a729dd02 100755 --- a/src/bin/sage-cython +++ b/src/bin/sage-cython @@ -1,7 +1,7 @@ #!/usr/bin/env sage-python # This script is a deprecated wrapper around the "cython" program. -# It is deprecated since Trac #27041 (Sage 8.7) because one should +# It is deprecated since Issue #27041 (Sage 8.7) because one should # simply use "cython" directly. We display deprecation messages whenever # "sage-cython" does something different from plain "cython". # diff --git a/src/bin/sage-env b/src/bin/sage-env index 3a02640bc97..28f86bc52ef 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -31,7 +31,7 @@ # absolute path (a relative path remains relative), nor does it treat # "." or ".." specially. # -# AUTHOR: Jeroen Demeyer (2011-08-23): Trac tickets #5852 and #11704 +# AUTHOR: Jeroen Demeyer (2011-08-23): Github issues #5852 and #11704 # resolvelinks() { # $in is what still needs to be converted (normally has no starting slash) @@ -278,7 +278,7 @@ if [ "$UNAME" = "Darwin" ]; then export MACOSX_VERSION=`uname -r | awk -F. '{print $1}'` # Work around problems on recent OS X crashing with an error message # "... may have been in progress in another thread when fork() was called" - # when objective-C functions are called after fork(). See Trac #25921. + # when objective-C functions are called after fork(). See Issue #25921. # Most likely, these errors are false positives, so we disable them: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES fi @@ -355,12 +355,12 @@ if [ "$PYTHON_EGG_CACHE" = "" ]; then fi # Set PYTHONUSERBASE to avoid picking up non-Sage versions of -# Matplotlib, numpy, etc. See http://trac.sagemath.org/ticket/19612. +# Matplotlib, numpy, etc. See https://github.com/sagemath/sage/issues/19612. # # For more history (it used to be PYTHONNOUSERSITE=yes which killed # the ability to do "sage -pip install PACKAGE --user"), see -# http://trac.sagemath.org/ticket/14243 and -# http://trac.sagemath.org/ticket/18955. +# https://github.com/sagemath/sage/issues/14243 and +# https://github.com/sagemath/sage/issues/18955. if [ "$PYTHONUSERBASE" = "" ]; then PYTHONUSERBASE="$DOT_SAGE/local" @@ -449,7 +449,7 @@ if [ -n "$SAGE_LOCAL" ]; then PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB fi -# Allow SAGE_BROWSER to override BROWSER (Trac #22449) +# Allow SAGE_BROWSER to override BROWSER (Issue #22449) if [ -n "$SAGE_BROWSER" ]; then export BROWSER="$SAGE_BROWSER" fi @@ -558,7 +558,7 @@ case "$SAGE_NUM_THREADS,$SAGE_NUM_THREADS_PARALLEL" in # sage-num-threads.py would just recompute them ;; *) - # See Trac Ticket #12016 + # See Issue Ticket #12016 # First, figure out the right values for SAGE_NUM_THREADS (default # number of threads) and SAGE_NUM_THREADS_PARALLEL (default number of # threads when parallel execution is asked explicitly). @@ -615,7 +615,7 @@ fi if [ -n "$SAGE_LOCAL" ]; then # If we move the Sage tree then ncurses cannot find terminfo, hence, we - # tell it where to find it. See Trac Ticket #15091 + # tell it where to find it. See Issue Ticket #15091 export TERMINFO="$SAGE_LOCAL/share/terminfo" # If nodejs is installed, activate the nodeenv containing it. diff --git a/src/bin/sage-num-threads.py b/src/bin/sage-num-threads.py index 1b920182690..7c70a3cbe3a 100755 --- a/src/bin/sage-num-threads.py +++ b/src/bin/sage-num-threads.py @@ -11,7 +11,7 @@ # 3) The number of CPU cores in the system, as determined by # multiprocessing.cpu_count() # -# AUTHOR: Jeroen Demeyer (2011-12-08): Trac ticket #12016 +# AUTHOR: Jeroen Demeyer (2011-12-08): Github issue #12016 # import os import multiprocessing diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests index 81dff8d5bf3..ed1e56953ff 100755 --- a/src/bin/sage-runtests +++ b/src/bin/sage-runtests @@ -8,7 +8,7 @@ import sys DOT_SAGE = os.environ.get('DOT_SAGE', os.path.join(os.environ.get('HOME'), '.sage')) -# Override to not pick up user configuration, see Trac #20270 +# Override to not pick up user configuration, see Issue #20270 os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage') @@ -41,8 +41,8 @@ if __name__ == "__main__": type=float, default=-1.0, const=1.0, metavar="SECONDS", help="warn if tests take more time than SECONDS") # By default, include all tests marked 'sagemath_doc_html' -- see - # https://trac.sagemath.org/ticket/25345 and - # https://trac.sagemath.org/ticket/26110: + # https://github.com/sagemath/sage/issues/25345 and + # https://github.com/sagemath/sage/issues/26110: parser.add_argument("--optional", metavar="FEATURES", default=_get_optional_defaults(), help='only run tests including one of the "# optional" tags listed in FEATURES (separated by commas); ' 'if "sage" is listed, will also run the standard doctests; ' @@ -141,7 +141,7 @@ if __name__ == "__main__": sys.exit(2) # Limit the number of threads to 2 to save system resources. - # See Trac #23713, #23892, #30351 + # See Issue #23713, #23892, #30351 if sys.platform == 'darwin': os.environ["OMP_NUM_THREADS"] = "1" else: @@ -153,7 +153,7 @@ if __name__ == "__main__": DC = DocTestController(args, args.filenames) err = DC.run() - # Trac #33521: Do not run pytest if the pytest configuration is not available. + # Issue #33521: Do not run pytest if the pytest configuration is not available. # This happens when the source tree is not available and SAGE_SRC falls back # to SAGE_LIB. from sage.env import SAGE_SRC diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index 127b827342d..d8c6b161134 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.0.beta0' -SAGE_RELEASE_DATE='2023-02-12' -SAGE_VERSION_BANNER='SageMath version 10.0.beta0, Release Date: 2023-02-12' +SAGE_VERSION='10.0.beta1' +SAGE_RELEASE_DATE='2023-02-19' +SAGE_VERSION_BANNER='SageMath version 10.0.beta1, Release Date: 2023-02-19' diff --git a/src/conftest.py b/src/conftest.py index f12f0aa0cbc..9448087cc7a 100644 --- a/src/conftest.py +++ b/src/conftest.py @@ -25,7 +25,7 @@ from _pytest.pathlib import import_path, ImportMode # Import sage.all is necessary to: -# - avoid cyclic import errors, see Trac #33580 +# - avoid cyclic import errors, see Issue #33580 # - inject it into globals namespace for doctests import sage.all from sage.doctest.parsing import SageDocTestParser, SageOutputChecker diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 6b44bc828d8..6dd50fd5cec 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -155,8 +155,8 @@ for PKG_BASE in $(sage-package list --has-file SPKG.rst | sort); do PKG_SCRIPTS=build/pkgs/$PKG_BASE # Instead of just copying, we may want to call # a version of sage-spkg-info to format extra information. - # for sphinx 4.4 we need to replace all direct links by some "extlink" (ticket 33272) + # for sphinx 4.4 we need to replace all direct links by some "extlink" (issue 33272) - (echo ".. _spkg_$PKG_BASE:" && echo && OUTPUT_RST=1 sage-spkg-info $PKG_BASE) | sed -e "s|https://trac.sagemath.org/ticket/\([0-9]*\)|:trac:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" > "$OUTPUT_DIR"/$PKG_BASE.rst + (echo ".. _spkg_$PKG_BASE:" && echo && OUTPUT_RST=1 sage-spkg-info $PKG_BASE) | sed -e "s|https://github.com/sagemath/sage/issues/\([0-9]*\)|:issue:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" > "$OUTPUT_DIR"/$PKG_BASE.rst echo >> "$OUTPUT_INDEX" " $PKG_BASE" done diff --git a/src/doc/en/constructions/contributions.rst b/src/doc/en/constructions/contributions.rst index 66bff2b74f5..c6324e3459e 100644 --- a/src/doc/en/constructions/contributions.rst +++ b/src/doc/en/constructions/contributions.rst @@ -36,4 +36,4 @@ documentation were made by Gary Zablackis. [SAGE] {SJ} William Stein, David Joyner, SAGE: System for Algebra and Geometry Experimentation, Comm. Computer Algebra 39(2005)61-64. (SIGSAM Bull. June 2005) https://sagemath.org/ - https://trac.sagemath.org/ + https://github.com/sagemath/sage/issues/ diff --git a/src/doc/en/prep/Advanced-2DPlotting.rst b/src/doc/en/prep/Advanced-2DPlotting.rst index 633e33d68b3..4ac7465ccf7 100644 --- a/src/doc/en/prep/Advanced-2DPlotting.rst +++ b/src/doc/en/prep/Advanced-2DPlotting.rst @@ -239,7 +239,7 @@ to put together. ....: graph += arrow( [0,0], [360, 0], color = "#000" ) ....: # let's set tics ....: # or http://aghitza.org/posts/tweak_labels_and_ticks_in_2d_plots_using_matplotlib/ - ....: # or wayt for http://trac.sagemath.org/sage_trac/ticket/1431 + ....: # or wayt for https://github.com/sagemath/sage/issues/1431 ....: # ['$-\pi/3$', '$2\pi/3$', '$5\pi/3$'] ....: for x in range(0, 361, 30): ....: graph += point( [x, 0] ) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 70dda6c3940..04b7919bc80 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -624,7 +624,7 @@ REFERENCES: and variants*. :arxiv:`1810.00789` -.. [BDKR2013] \D. Best, D.Z. Dokovic, H. Kharaghani and H. Ramp. +.. [BDKR2013] \D. Best, D.Ž. Đoković, H. Kharaghani and H. Ramp. *Turyn-Type Sequences: Classification, Enumeration, and Construction*, Journal of Combinatorial Designs 21(1) (2013): 24-35. :doi:`10.1002/jcd.21318` @@ -2058,7 +2058,7 @@ REFERENCES: .. [Djo1992c] \D. Đoković. *Ten New Orders for Hadamard Matrices of Skew Type*, - Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. + Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. .. [Djo1994a] \D. Đoković. *Five New Orders for Hadamard Matrices of Skew Type*, @@ -2223,6 +2223,11 @@ REFERENCES: .. [Duv1983] J.-P. Duval, Factorizing words over an ordered alphabet, J. Algorithms 4 (1983) 363--381. +.. [Duv1988] \A. Duval. + *A directed graph version of strongly regular graphs*, + Journal of Combinatorial Theory, Series A 47(1) (1988): 71-100. + :doi:`10.1016/0097-3165(88)90043-X` + .. [DW1995] Andreas W.M. Dress and Walter Wenzel, *A Simple Proof of an Identity Concerning Pfaffians of Skew Symmetric Matrices*, Advances in Mathematics, volume 112, Issue 1, @@ -3866,6 +3871,10 @@ REFERENCES: *Bethe ansatz and inverse scattering transform in a periodic box-ball system*, Nuclear Phys. B **747**, no. 3 (2006), 354--397. +.. [KTZ1987] Kierstead, H.A., Trotter, W.T. & Zhou, B. Representing an ordered + set as the intersection of super greedy linear extensions. Order 4, + 293-311 (1987). + :doi:`10.1007/BF00337892` .. [Kuh1987] \W. Kühnel, "Minimal triangulations of Kummer varieties", Abh. Math. Sem. Univ. Hamburg 57 (1987), 7-20. diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst index 4832272f1cb..fb7697587c5 100644 --- a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst +++ b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst @@ -41,7 +41,7 @@ Some more advanced number-theoretical tools are available via G: sage: P = K.primes_above(2)[0] sage: G.inertia_group(P) Subgroup generated by [(1,4,6)(2,5,3)] of (Galois group 6T2 ([3]2) with order 6 of x^6 + 40*x^3 + 1372) - sage: sorted([G.artin_symbol(Q) for Q in K.primes_above(5)]) # random order, see Trac #18308 + sage: sorted([G.artin_symbol(Q) for Q in K.primes_above(5)]) # random order, see Issue #18308 [(1,3)(2,6)(4,5), (1,2)(3,4)(5,6), (1,5)(2,4)(3,6)] If the number field is not Galois over `\QQ`, then the ``galois_group`` diff --git a/src/sage/algebras/free_algebra_element.py b/src/sage/algebras/free_algebra_element.py index 378f06479db..559df673fbf 100644 --- a/src/sage/algebras/free_algebra_element.py +++ b/src/sage/algebras/free_algebra_element.py @@ -92,7 +92,7 @@ def _repr_(self): sage: repr(-x+3*y*z) # indirect doctest '-x + 3*y*z' - Trac ticket :trac:`11068` enables the use of local variable names:: + Github issue :trac:`11068` enables the use of local variable names:: sage: from sage.structure.parent_gens import localvars sage: with localvars(A, ['a','b','c']): diff --git a/src/sage/algebras/fusion_rings/fusion_ring.py b/src/sage/algebras/fusion_rings/fusion_ring.py index d36faae2b34..915ca62e73b 100644 --- a/src/sage/algebras/fusion_rings/fusion_ring.py +++ b/src/sage/algebras/fusion_rings/fusion_ring.py @@ -1349,7 +1349,7 @@ def get_braid_generators(self, set_start_method('fork') except RuntimeError: pass - # Turn off multiprocessing when field is QQbar due to pickling issues introduced by PARI upgrade in trac ticket #30537 + # Turn off multiprocessing when field is QQbar due to pickling issues introduced by PARI upgrade in github issue #30537 pool = Pool() if use_mp and self.fvars_field() != QQbar else None # Set up computational basis and compute generators one at a time diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx index 41444812c49..80ac48b202c 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx @@ -3,7 +3,7 @@ Weighted homogeneous elements of free algebras, in letterplace implementation AUTHOR: -- Simon King (2011-03-23): Trac ticket :trac:`7797` +- Simon King (2011-03-23): Github issue :trac:`7797` """ diff --git a/src/sage/algebras/lie_algebras/free_lie_algebra.py b/src/sage/algebras/lie_algebras/free_lie_algebra.py index 8a02e5265c6..af001d0fa57 100644 --- a/src/sage/algebras/lie_algebras/free_lie_algebra.py +++ b/src/sage/algebras/lie_algebras/free_lie_algebra.py @@ -59,7 +59,7 @@ def __init__(self, lie, basis_name): doctest:warning ... FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See https://github.com/sagemath/sage/issues/16823 for details. Free Lie algebra generated by (x, y) over Rational Field in the Hall basis """ self._basis_name = basis_name diff --git a/src/sage/algebras/lie_algebras/lie_algebra.py b/src/sage/algebras/lie_algebras/lie_algebra.py index 0aa08d2a823..87b1a8cee37 100644 --- a/src/sage/algebras/lie_algebras/lie_algebra.py +++ b/src/sage/algebras/lie_algebras/lie_algebra.py @@ -273,7 +273,7 @@ class LieAlgebra(Parent, UniqueRepresentation): # IndexedGenerators): sage: H = L.Hall() doctest:warning...: FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See https://github.com/sagemath/sage/issues/16823 for details. sage: H Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis sage: Lyn = L.Lyndon() diff --git a/src/sage/algebras/lie_algebras/lie_algebra_element.pyx b/src/sage/algebras/lie_algebras/lie_algebra_element.pyx index ffe27c69797..d0a1f70510a 100644 --- a/src/sage/algebras/lie_algebras/lie_algebra_element.pyx +++ b/src/sage/algebras/lie_algebras/lie_algebra_element.pyx @@ -95,7 +95,7 @@ cdef class LieAlgebraElement(IndexedFreeModuleElement): sage: H = L.Hall() doctest:warning...: FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See https://github.com/sagemath/sage/issues/16823 for details. sage: elt = Lyn.an_element() sage: elt._im_gens_(H, H.gens()) x + y + z diff --git a/src/sage/algebras/lie_algebras/morphism.py b/src/sage/algebras/lie_algebras/morphism.py index ca65bb162aa..f71001ce98f 100644 --- a/src/sage/algebras/lie_algebras/morphism.py +++ b/src/sage/algebras/lie_algebras/morphism.py @@ -54,7 +54,7 @@ class LieAlgebraHomomorphism_im_gens(Morphism): sage: H = L.Hall() doctest:warning...: FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See https://github.com/sagemath/sage/issues/16823 for details. sage: phi = Lyn.coerce_map_from(H); phi Lie algebra morphism: From: Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 45a4d512c0a..4b7af26d31c 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -2197,7 +2197,7 @@ def quaternion_order(self): sage: R = QuaternionAlgebra(-11,-1).maximal_order() sage: R.unit_ideal().quaternion_order() is R doctest:...: DeprecationWarning: quaternion_order() is deprecated, please use left_order() or right_order() - See https://trac.sagemath.org/31583 for details. + See https://github.com/sagemath/sage/issues/31583 for details. True """ from sage.misc.superseded import deprecation @@ -2229,7 +2229,7 @@ def ring(self): sage: R = QuaternionAlgebra(-11,-1).maximal_order() sage: R.unit_ideal().ring() is R doctest:...: DeprecationWarning: ring() will return the quaternion algebra in the future, please use left_order() or right_order() - See https://trac.sagemath.org/31583 for details. + See https://github.com/sagemath/sage/issues/31583 for details. True """ from sage.misc.superseded import deprecation diff --git a/src/sage/arith/constants.pxd b/src/sage/arith/constants.pxd index ec6f59074ce..6e5e713707f 100644 --- a/src/sage/arith/constants.pxd +++ b/src/sage/arith/constants.pxd @@ -3,7 +3,7 @@ # float. We use these instead of decimal constants like 3.1415... # because the hex floats are exactly representable as "double", so there # shouldn't be any rounding issues in the compiler. -# See https://trac.sagemath.org/ticket/23919#comment:15 +# See https://github.com/sagemath/sage/issues/23919#comment:15 # # Hex floats are standardized in C99, but GCC accepts them # unconditionally, also for C++ code. diff --git a/src/sage/arith/long.pxd b/src/sage/arith/long.pxd index 1c9a53387a0..4addc8cfc89 100644 --- a/src/sage/arith/long.pxd +++ b/src/sage/arith/long.pxd @@ -296,7 +296,7 @@ cdef inline bint integer_check_long_py(x, long* value, int* err): # - BITS_IN_LONG = 63, PyLong_SHIFT = 30 # - BITS_IN_LONG = 31, PyLong_SHIFT = 15 (python <= 3.10) # - BITS_IN_LONG = 31, PyLong_SHIFT = 30 (new in python 3.11) - # cf. https://trac.sagemath.org/ticket/33842#comment:130 + # cf. https://github.com/sagemath/sage/issues/33842#comment:130 # # This way, we know that 1 digit certainly fits in a C long # and 4 or more digits never fit. diff --git a/src/sage/calculus/wester.py b/src/sage/calculus/wester.py index 10a64d25471..0a2a374cd5f 100644 --- a/src/sage/calculus/wester.py +++ b/src/sage/calculus/wester.py @@ -390,7 +390,7 @@ sage: # domain. sage: # To stick with the behaviour of previous versions, the domain is set sage: # to 'real' in the following. - sage: # See Trac #10682 for further details. + sage: # See Issue #10682 for further details. sage: n = var('n') sage: f = x^(1/n)*y^(1/n)-(x*y)^(1/n) sage: assume(real(x) > 0, real(y) > 0) diff --git a/src/sage/categories/category_with_axiom.py b/src/sage/categories/category_with_axiom.py index e8811e9f25e..9850f4d4c85 100644 --- a/src/sage/categories/category_with_axiom.py +++ b/src/sage/categories/category_with_axiom.py @@ -927,7 +927,7 @@ def _(): return LazyImport('sage.categories.rngs', 'Rngs', at_startup=True) Supporting similar deduction rules will be an important feature in the future, with quite a few occurrences already implemented in - upcoming tickets. For the time being though there is a single + upcoming issues. For the time being though there is a single occurrence of this idiom outside of the tests. So this would be an easy thing to refactor after :trac:`10963` if a better idiom is found. diff --git a/src/sage/categories/finite_complex_reflection_groups.py b/src/sage/categories/finite_complex_reflection_groups.py index bb3df827890..9c91c2af549 100644 --- a/src/sage/categories/finite_complex_reflection_groups.py +++ b/src/sage/categories/finite_complex_reflection_groups.py @@ -795,7 +795,7 @@ def elements_below_coxeter_element(self, c=None): sage: W = CoxeterGroup(['A', 3]) sage: len(list(W.elements_below_coxeter_element())) doctest:...: DeprecationWarning: The method elements_below_coxeter_element is deprecated. Please use absolute_order_ideal instead. - See https://trac.sagemath.org/27924 for details. + See https://github.com/sagemath/sage/issues/27924 for details. 14 """ from sage.misc.superseded import deprecation diff --git a/src/sage/categories/homset.py b/src/sage/categories/homset.py index 1b488a03b69..88b162c5845 100644 --- a/src/sage/categories/homset.py +++ b/src/sage/categories/homset.py @@ -74,9 +74,9 @@ ################################### # Use the weak "triple" dictionary -# introduced in trac ticket #715 +# introduced in github issue #715 # with weak values, as introduced in -# trac ticket #14159 +# github issue #14159 from sage.structure.coerce_dict import TripleDict _cache = TripleDict(weak_values=True) diff --git a/src/sage/categories/magmas.py b/src/sage/categories/magmas.py index 975ea0491b3..ff1a7f955c5 100644 --- a/src/sage/categories/magmas.py +++ b/src/sage/categories/magmas.py @@ -785,7 +785,7 @@ def __init_extra__(self): # This should instead register the multiplication to the coercion model # But this is not yet implemented in the coercion model # - # Trac ticket #11900: The following used to test whether + # Github issue #11900: The following used to test whether # self.product != self.product_from_element_class_mul. But # that is, of course, a bug. Namely otherwise, if the parent # has an optimized `product` then its elements will *always* use diff --git a/src/sage/categories/modules.py b/src/sage/categories/modules.py index 2e3eb65dc3d..cb878f1c6f2 100644 --- a/src/sage/categories/modules.py +++ b/src/sage/categories/modules.py @@ -973,6 +973,6 @@ def tensor_factors(self): sage: M.construction() doctest:warning... DeprecationWarning: implementations of Modules().TensorProducts() now must define the method tensor_factors - See https://trac.sagemath.org/34393 for details. + See https://github.com/sagemath/sage/issues/34393 for details. (VectorFunctor, Integer Ring) """ diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx index 121dc3bbd15..59a73a43c62 100644 --- a/src/sage/categories/morphism.pyx +++ b/src/sage/categories/morphism.pyx @@ -393,7 +393,7 @@ cdef class Morphism(Map): # multiplying it with the gens of the scalar ring. # # It is known that this way of comparing morphisms may give - # a mathematically wrong answer. See Trac #28617 and #31783. + # a mathematically wrong answer. See Issue #28617 and #31783. if e is not None and isinstance(e, ModuleElement): B = (e)._parent._base gens = [e * B.coerce(x) for x in gens] diff --git a/src/sage/categories/primer.py b/src/sage/categories/primer.py index b3624ad4dc1..96dff8e2631 100644 --- a/src/sage/categories/primer.py +++ b/src/sage/categories/primer.py @@ -440,12 +440,12 @@ class implements: For plain Python methods, one can also just ask in which module they are implemented:: - sage: i._pow_.__module__ # not tested (Trac #24275) + sage: i._pow_.__module__ # not tested (Issue #24275) 'sage.categories.semigroups' sage: pQ._mul_.__module__ 'sage.rings.polynomial.polynomial_element_generic' - sage: pQ._pow_.__module__ # not tested (Trac #24275) + sage: pQ._pow_.__module__ # not tested (Issue #24275) 'sage.categories.semigroups' We see that integers and polynomials have each their own diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py index 86e33e45b1e..6c5b08e003a 100644 --- a/src/sage/categories/pushout.py +++ b/src/sage/categories/pushout.py @@ -2878,8 +2878,8 @@ def _apply_functor(self, R): Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x^2 + 2, y^2 + 3*x) Note that the ``quo()`` method of a field used to return the - integer zero. That strange behaviour was removed in trac - ticket :trac:`9138`. It now returns a trivial quotient ring + integer zero. That strange behaviour was removed in github + issue :trac:`9138`. It now returns a trivial quotient ring when applied to a field:: sage: F = ZZ.quo([5]*ZZ).construction()[0] diff --git a/src/sage/categories/unital_algebras.py b/src/sage/categories/unital_algebras.py index 43ffa76d47c..d245b4de8c1 100644 --- a/src/sage/categories/unital_algebras.py +++ b/src/sage/categories/unital_algebras.py @@ -109,7 +109,7 @@ def __init_extra__(self): sage: Bar(category=Algebras(QQ)) doctest:warning...: DeprecationWarning: the attribute _no_generic_basering_coercion is deprecated, implement _coerce_map_from_base_ring() instead - See http://trac.sagemath.org/19225 for details. + See https://github.com/sagemath/sage/issues/19225 for details. <__main__.Bar_with_category object at 0x...> """ if getattr(self, '_no_generic_basering_coercion', False): @@ -227,7 +227,7 @@ def _coerce_map_from_base_ring(self): elif isinstance(generic_from_base_ring, lazy_attribute): # If the category implements from_base_ring() as lazy # attribute, then we always use it. - # This is for backwards compatibility, see Trac #25181 + # This is for backwards compatibility, see Issue #25181 use_from_base_ring = True else: try: diff --git a/src/sage/coding/gabidulin_code.py b/src/sage/coding/gabidulin_code.py index b29b85d6359..b6d2e2bac4d 100644 --- a/src/sage/coding/gabidulin_code.py +++ b/src/sage/coding/gabidulin_code.py @@ -544,7 +544,7 @@ class GabidulinPolynomialEvaluationEncoder(Encoder): sage: p = (z9^6 + z9^2 + z9 + 1)*x + z9^7 + z9^5 + z9^4 + z9^2 sage: vector(p.multi_point_evaluation(C.evaluation_points())) doctest:...: FutureWarning: This class/method/function is marked as experimental. It, its functionality or its interface might change without a formal deprecation. - See http://trac.sagemath.org/13215 for details. + See https://github.com/sagemath/sage/issues/13215 for details. (z9^7 + z9^6 + z9^5 + z9^4 + z9 + 1, z9^6 + z9^5 + z9^3 + z9) EXAMPLES:: diff --git a/src/sage/combinat/colored_permutations.py b/src/sage/combinat/colored_permutations.py index 4ace496fbdb..28b20e502af 100644 --- a/src/sage/combinat/colored_permutations.py +++ b/src/sage/combinat/colored_permutations.py @@ -436,7 +436,7 @@ class ColoredPermutations(Parent, UniqueRepresentation): [[0, 1, 0], [1, 2, 3]] We can also create a colored permutation by passing - either a list of tuples consisting of ``(color, element)``:: + an iterable consisting of tuples consisting of ``(color, element)``:: sage: x = C([(2,1), (3,3), (3,2)]); x [[2, 3, 3], [1, 3, 2]] @@ -445,6 +445,8 @@ class ColoredPermutations(Parent, UniqueRepresentation): sage: C([[3,3,1], [1,3,2]]) [[3, 3, 1], [1, 3, 2]] + sage: C(([3,3,1], [1,3,2])) + [[3, 3, 1], [1, 3, 2]] There is also the natural lift from permutations:: @@ -452,6 +454,12 @@ class ColoredPermutations(Parent, UniqueRepresentation): sage: C(P.an_element()) [[0, 0, 0], [3, 1, 2]] + + A colored permutation:: + + sage: C(C.an_element()) == C.an_element() + True + REFERENCES: - :wikipedia:`Generalized_symmetric_group` @@ -688,20 +696,22 @@ def _element_constructor_(self, x): sage: x == C([[2,3,3], [1,3,2]]) True """ - if isinstance(x, list): - if isinstance(x[0], tuple): - c = [] - p = [] - for k in x: - if len(k) != 2: - raise ValueError("input must be pairs (color, element)") - c.append(self._C(k[0])) - p.append(k[1]) - return self.element_class(self, c, self._P(p)) - - if len(x) != 2: - raise ValueError("input must be a pair of a list of colors and a permutation") - return self.element_class(self, [self._C(v) for v in x[0]], self._P(x[1])) + if isinstance(x, self.element_class) and x.parent() is self: + return self + x = list(x) + if isinstance(x[0], tuple): + c = [] + p = [] + for k in x: + if len(k) != 2: + raise ValueError("input must be pairs (color, element)") + c.append(self._C(k[0])) + p.append(k[1]) + return self.element_class(self, c, self._P(p)) + + if len(x) != 2: + raise ValueError("input must be a pair of a list of colors and a permutation") + return self.element_class(self, [self._C(v) for v in x[0]], self._P(x[1])) def _coerce_map_from_(self, C): """ @@ -989,6 +999,11 @@ def __classcall_private__(cls, pi): sage: SignedPermutation([2, 1, -3]) [2, 1, -3] + sage: SignedPermutation((2,1,-3)) + [2, 1, -3] + + sage: SignedPermutation(range(1,4)) + [1, 2, 3] """ return SignedPermutations(len(list(pi)))(pi) @@ -1360,38 +1375,43 @@ def _element_constructor_(self, x): sage: S([]) == list(S)[0] True - """ - if isinstance(x, list): - if x and isinstance(x[0], tuple): - c = [] - p = [] - for k in x: - if len(k) != 2: - raise ValueError("input must be pairs (sign, element)") - if k[0] != 1 and k[0] != -1: - raise ValueError("the sign must be +1 or -1") - c.append(ZZ(k[0])) - p.append(k[1]) - return self.element_class(self, c, self._P(p)) - - if len(x) == self._n: - c = [] - p = [] - one = ZZ.one() - for v in x: - if v > 0: - c.append(one) - p.append(v) - else: - c.append(-one) - p.append(-v) - return self.element_class(self, c, self._P(p)) - - if len(x) != 2: - raise ValueError("input must be a pair of a list of signs and a permutation") - if any(s != 1 and s != -1 for s in x[0]): - raise ValueError("the sign must be +1 or -1") - return self.element_class(self, [ZZ(v) for v in x[0]], self._P(x[1])) + sage: T = SignedPermutation(range(1,4)) + sage: SignedPermutations(3)(T) + [1, 2, 3] + """ + if isinstance(x, self.element_class) and x.parent() is self: + return self + x = list(x) + if x and isinstance(x[0], tuple): + c = [] + p = [] + for k in x: + if len(k) != 2: + raise ValueError("input must be pairs (sign, element)") + if k[0] != 1 and k[0] != -1: + raise ValueError("the sign must be +1 or -1") + c.append(ZZ(k[0])) + p.append(k[1]) + return self.element_class(self, c, self._P(p)) + + if len(x) == self._n: + c = [] + p = [] + one = ZZ.one() + for v in x: + if v > 0: + c.append(one) + p.append(v) + else: + c.append(-one) + p.append(-v) + return self.element_class(self, c, self._P(p)) + + if len(x) != 2: + raise ValueError("input must be a pair of a list of signs and a permutation") + if any(s != 1 and s != -1 for s in x[0]): + raise ValueError("the sign must be +1 or -1") + return self.element_class(self, [ZZ(v) for v in x[0]], self._P(x[1])) def __iter__(self): """ diff --git a/src/sage/combinat/combinat.py b/src/sage/combinat/combinat.py index af2bc0da8c8..a4ad56b0170 100644 --- a/src/sage/combinat/combinat.py +++ b/src/sage/combinat/combinat.py @@ -2528,7 +2528,7 @@ def cardinality(self) -> Integer | infinity: sage: R = InfiniteAbstractCombinatorialClass() doctest:warning... DeprecationWarning: this class is deprecated, do not use - See https://trac.sagemath.org/31545 for details. + See https://github.com/sagemath/sage/issues/31545 for details. sage: R.cardinality() +Infinity diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 90df86e3e41..95c9104e4b3 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1050,7 +1050,7 @@ def are_mcfarland_1973_parameters(v, k, lmbda, return_parameters=False): # NOTE: below we compute the value of s so that qs = q^s. If the method # is_power_of of integers would be able to return the exponent, we could use # that... but currently this is not the case - # see trac ticket #19792 + # see github issue #19792 p1,a1 = qs.is_prime_power(get_data=True) p2,a2 = q.is_prime_power(get_data=True) diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finite_state_machine.py index 6be4e0e2683..29671fb28ed 100644 --- a/src/sage/combinat/finite_state_machine.py +++ b/src/sage/combinat/finite_state_machine.py @@ -4887,7 +4887,7 @@ def key_function(s): return (s.from_state, s.to_state) # We use an OrderedDict instead of a dict in order to have a # defined ordering of the transitions in the output. See - # http://trac.sagemath.org/ticket/16580#comment:3 . As the + # https://github.com/sagemath/sage/issues/16580#comment:3 . As the # transitions have to be sorted anyway, the performance # penalty should be bearable; nevertheless, this is only # required for doctests. diff --git a/src/sage/combinat/free_module.py b/src/sage/combinat/free_module.py index 3432e18b27d..c8269e5f96f 100644 --- a/src/sage/combinat/free_module.py +++ b/src/sage/combinat/free_module.py @@ -256,7 +256,7 @@ class CombinatorialFreeModule(UniqueRepresentation, Module, IndexedGenerators): sage: XQ == XQ True - We check that ticket :trac:`28681` is fixed:: + We check that issue :trac:`28681` is fixed:: sage: F = CombinatorialFreeModule(ZZ, ZZ); F.rename("F") sage: FF = tensor((F,F)) diff --git a/src/sage/combinat/k_regular_sequence.py b/src/sage/combinat/k_regular_sequence.py index 95a9283f7f0..50ae558aaad 100644 --- a/src/sage/combinat/k_regular_sequence.py +++ b/src/sage/combinat/k_regular_sequence.py @@ -18,7 +18,7 @@ doctest:...: FutureWarning: This class/method/function is marked as experimental. It, its functionality or its interface might change without a formal deprecation. - See http://trac.sagemath.org/21202 for details. + See https://github.com/sagemath/sage/issues/21202 for details. Examples diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index a237f2398a9..ec1958ee313 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -7248,7 +7248,7 @@ def has_left_descent(self, i, mult=None): doctest:warning ... DeprecationWarning: The mult option is deprecated and ignored. - See https://trac.sagemath.org/27467 for details. + See https://github.com/sagemath/sage/issues/27467 for details. True sage: x.has_left_descent(2, mult='r2l') True @@ -7302,7 +7302,7 @@ def has_right_descent(self, i, mult=None): doctest:warning ... DeprecationWarning: The mult option is deprecated and ignored. - See https://trac.sagemath.org/27467 for details. + See https://github.com/sagemath/sage/issues/27467 for details. True sage: x.has_right_descent(3, mult='r2l') True @@ -9063,7 +9063,7 @@ def a(self): sage: P = Permutations(3, avoiding=[[2,1,3],[1,2,3]]) sage: P.a doctest:...: DeprecationWarning: The attribute a for the list of patterns to avoid is deprecated, use the method patterns instead. - See https://trac.sagemath.org/26810 for details. + See https://github.com/sagemath/sage/issues/26810 for details. ([2, 1, 3], [1, 2, 3]) """ from sage.misc.superseded import deprecation diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index d857092f9c7..f59f4fd951f 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -745,7 +745,7 @@ def rank_function(self): sage: Q.rank_function() is None True - test for ticket :trac:`14006`:: + test for issue :trac:`14006`:: sage: H = Poset()._hasse_diagram sage: s = dumps(H) @@ -2051,7 +2051,7 @@ def orthocomplementations_iterator(self): mt = self.meet_matrix() jn = self.join_matrix() for e in range(n): - # Fix following after ticket #20727 + # Fix following after issue #20727 comps[e] = [x for x in range(n) if mt[e, x] == 0 and jn[e, x] == n - 1 and x in orbits[orbit_number[dual_isomorphism[e]]]] diff --git a/src/sage/combinat/posets/lattices.py b/src/sage/combinat/posets/lattices.py index 43bd9f83fdc..985b61cd6ca 100644 --- a/src/sage/combinat/posets/lattices.py +++ b/src/sage/combinat/posets/lattices.py @@ -3010,7 +3010,7 @@ def vertical_composition(self, other, labels='pairs'): # Todo: This and ordinal_sum() of posets could keep # distinguished linear extension, if it is defined # for both posets/lattices. That can be done after - # trac ticket #21607. + # github issue #21607. if labels not in ['integers', 'pairs']: raise ValueError("labels must be either 'pairs' or 'integers'") diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 5d9aae755d8..48ca0af51d5 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -252,6 +252,73 @@ def is_greedy(self): return False return True + def is_supergreedy(self): + r""" + Return ``True`` if the linear extension is supergreedy. + + A linear extension `[x_1 @@ -793,7 +793,7 @@ def __call__(self, w, order=1, datatype=None): doctest:warning ... DeprecationWarning: the "datatype" argument is deprecated - See https://trac.sagemath.org/26307 for details. + See https://github.com/sagemath/sage/issues/26307 for details. sage: type(w) sage: w = m([0],4,datatype='str') @@ -1907,7 +1907,7 @@ def fixed_points(self): sage: for w in f.fixed_points(): print(w) abcabbccabcabcabbccbccabcabbccabcabbccab... - This shows that ticket :trac:`13668` has been resolved:: + This shows that issue :trac:`13668` has been resolved:: sage: d = {1:[1,2],2:[2,3],3:[4],4:[5],5:[6],6:[7],7:[8],8:[9],9:[10],10:[1]} sage: s = WordMorphism(d) @@ -1918,7 +1918,7 @@ def fixed_points(self): sage: s7r.periodic_point(2) word: 2,1,1,10,9,8,7,6,5,4,3,2,1,10,9,8,7,6,5,4,3,2,10,9,8,7,6,5,4,3,2,9,8,7,6,5,4,3,2,8,... - This shows that ticket :trac:`13668` has been resolved:: + This shows that issue :trac:`13668` has been resolved:: sage: s = "1->321331332133133,2->133321331332133133,3->2133133133321331332133133" sage: s = WordMorphism(s) @@ -1994,7 +1994,7 @@ def periodic_points(self): sage: f.fixed_points() [] - This shows that ticket :trac:`13668` has been resolved:: + This shows that issue :trac:`13668` has been resolved:: sage: d = {1:[1,2],2:[2,3],3:[4],4:[5],5:[6],6:[7],7:[8],8:[9],9:[10],10:[1]} sage: s = WordMorphism(d) diff --git a/src/sage/cpython/__init__.py b/src/sage/cpython/__init__.py index 19c8d87a3be..51974f1e438 100644 --- a/src/sage/cpython/__init__.py +++ b/src/sage/cpython/__init__.py @@ -5,18 +5,18 @@ # Make sure that the correct zlib library is loaded. This is needed # to prevent the system zlib to be loaded instead of the Sage one. -# See https://trac.sagemath.org/ticket/23122 +# See https://github.com/sagemath/sage/issues/23122 import zlib as _zlib del _zlib # Monkey-patch ExtensionFileLoader to allow IPython to find the sources -# of Cython files. See https://trac.sagemath.org/ticket/24681 +# of Cython files. See https://github.com/sagemath/sage/issues/24681 from importlib.machinery import ExtensionFileLoader as _ExtensionFileLoader del _ExtensionFileLoader.get_source del _ExtensionFileLoader # Work around a Cygwin-specific bug caused by sqlite3; see -# https://trac.sagemath.org/ticket/30157 and the docstring for +# https://github.com/sagemath/sage/issues/30157 and the docstring for # fix_for_ticket_30157 # Here we monkey-patch the sqlite3 module to ensure the fix is # applied the very first time a connection is made to a sqlite3 @@ -39,7 +39,7 @@ def _patch_sqlite3(): def connect(*args, **kwargs): if fix_for_ticket_30157(): raise RuntimeError( - 'patch for Trac ticket #30157 failed; please report this ' + 'patch for Github issue #30157 failed; please report this ' 'bug to https://trac.sagemath.org') # Undo the monkey-patch diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx index 3ba391b4cdd..baa3d7a2c0e 100644 --- a/src/sage/cpython/atexit.pyx +++ b/src/sage/cpython/atexit.pyx @@ -51,7 +51,7 @@ cdef class restore_atexit: sage: import atexit sage: from sage.cpython.atexit import restore_atexit sage: def handler(*args, **kwargs): - ....: import sys # see https://trac.sagemath.org/ticket/25270#comment:56 + ....: import sys # see https://github.com/sagemath/sage/issues/25270#comment:56 ....: sys.stdout.write(str((args, kwargs))) ....: sys.stdout.write('\n') sage: atexit.register(handler, 1, 2, c=3) diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index a9ea665475c..d10c0c11546 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -942,7 +942,7 @@ cdef class BooleanFunction(SageObject): doctest:warning ... DeprecationWarning: absolut_indicator is deprecated. Please use absolute_indicator instead. - See https://trac.sagemath.org/28001 for details. + See https://github.com/sagemath/sage/issues/28001 for details. 32 """ cdef long a diff --git a/src/sage/databases/findstat.py b/src/sage/databases/findstat.py index 218a2dff3ff..452abbcce8e 100644 --- a/src/sage/databases/findstat.py +++ b/src/sage/databases/findstat.py @@ -4733,7 +4733,7 @@ def __init__(self): print(" %s: %s" % (id, data["NamePlural"])) print("To use it with this interface, it has to be added to the dictionary") print(" _SupportedFindStatCollections in src/sage/databases/findstat.py") - print("of the SageMath distribution. Please open a ticket on trac!") + print("of the SageMath distribution. Please open an issue on github!") # print("Very likely, the following code would work:") # fields = "SageCodeElementToString,SageCodeElementsOnLevel,SageCodeStringToElement" # url = FINDSTAT_API_COLLECTIONS + id + "?fields=" + fields diff --git a/src/sage/databases/oeis.py b/src/sage/databases/oeis.py index a800db53df2..509f0c10d46 100644 --- a/src/sage/databases/oeis.py +++ b/src/sage/databases/oeis.py @@ -592,7 +592,7 @@ def _imaginary_entry(self, ident='A999999', keywords=''): '%D ' + ident + ' Lewis Carroll, The Hunting of the Snark.\n' '%D ' + ident + ' Deep Thought, The Answer to the Ultimate Question of Life, The Universe, and Everything.\n' '%H ' + ident + ' Wikipedia, 42 (number)\n' - '%H ' + ident + ' See. also trac ticket #42\n' + '%H ' + ident + ' See. also github issue #42\n' '%H ' + ident + ' Do not confuse with the sequence A000042 or the sequence A000024\n' '%H ' + ident + ' The string http://42.com is not a link.\n' '%F ' + ident + ' For n big enough, s(n+1) - s(n) = 0.\n' @@ -1556,7 +1556,7 @@ def links(self, browse=None, format='guess'): sage: HTML = s.links(format="html"); HTML 0: Wikipedia, 42 (number) - 1: See. also trac ticket #42 + 1: See. also github issue #42 ... sage: type(HTML) diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index adbf012ab2e..fe58e2bde3e 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -152,10 +152,10 @@ def init_sage(controller=None): """ try: # We need to ensure that the Matplotlib font cache is built to - # avoid spurious warnings (see Trac #20222). + # avoid spurious warnings (see Issue #20222). import matplotlib.font_manager except ImportError: - # Do not require matplotlib for running doctests (Trac #25106). + # Do not require matplotlib for running doctests (Issue #25106). pass else: # Make sure that the agg backend is selected during doctesting. @@ -170,7 +170,7 @@ def init_sage(controller=None): # Set the Python PRNG class to the Python 2 implementation for consistency # of 'random' test results that use it; see - # https://trac.sagemath.org/ticket/24508 + # https://github.com/sagemath/sage/issues/24508 # We use the baked in copy of the random module for both Python 2 and 3 # since, although the upstream copy is unlikely to change, this further # ensures consistency of test results @@ -214,17 +214,17 @@ def init_sage(controller=None): debug.refine_category_hash_check = True # We import readline before forking, otherwise Pdb doesn't work - # on OS X: http://trac.sagemath.org/14289 + # on OS X: https://github.com/sagemath/sage/issues/14289 try: import readline except ModuleNotFoundError: - # Do not require readline for running doctests (Trac #31160). + # Do not require readline for running doctests (Issue #31160). pass try: import sympy except ImportError: - # Do not require sympy for running doctests (Trac #25106). + # Do not require sympy for running doctests (Issue #25106). pass else: # Disable SymPy terminal width detection @@ -731,7 +731,7 @@ def compiler(example): # exceptions), whereas on Python 2 does not, so we # normalize Python 3 exceptions to match tests written to # Python 2 - # See https://trac.sagemath.org/ticket/24271 + # See https://github.com/sagemath/sage/issues/24271 exc_cls = exception[0] exc_name = exc_cls.__name__ if exc_cls.__module__: @@ -2144,7 +2144,7 @@ def run(self): sys.stdin = os.fdopen(0, "r") except OSError: # We failed to open stdin for reading, this might happen - # for example when running under "nohup" (Trac #14307). + # for example when running under "nohup" (Issue #14307). # Simply redirect stdin from /dev/null and try again. with open(os.devnull) as f: os.dup2(f.fileno(), 0) diff --git a/src/sage/dynamics/surface_dynamics_deprecation.py b/src/sage/dynamics/surface_dynamics_deprecation.py index 9a2a1b4312c..9da8f1d0be3 100644 --- a/src/sage/dynamics/surface_dynamics_deprecation.py +++ b/src/sage/dynamics/surface_dynamics_deprecation.py @@ -25,7 +25,7 @@ def surface_dynamics_deprecation(name): computation that are currently available in Sage. See more information at http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/ - See http://trac.sagemath.org/20695 for details. + See https://github.com/sagemath/sage/issues/20695 for details. """ from sage.misc.superseded import deprecation deprecation(20695, deprecation_msg.format(name)) diff --git a/src/sage/ext/memory_allocator.pxd b/src/sage/ext/memory_allocator.pxd index b612df2110c..5ada54f9535 100644 --- a/src/sage/ext/memory_allocator.pxd +++ b/src/sage/ext/memory_allocator.pxd @@ -65,7 +65,7 @@ cdef class MemoryAllocator: ....: assert ptr == ( ptr) & ~(2**i-1) ....: ''') doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See https://github.com/sagemath/sage/issues/31591 for details. """ cdef size_t extra = alignment - 1 return align(self.malloc(size + extra), alignment) @@ -96,7 +96,7 @@ cdef class MemoryAllocator: ....: ''') sage: foo() doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See https://github.com/sagemath/sage/issues/31591 for details. """ # Find extra such that (nmemb + extra) * size >= nmemb * size + alignment - 1 # ⇔ extra * size >= alignment - 1 diff --git a/src/sage/ext/memory_allocator.pyx b/src/sage/ext/memory_allocator.pyx index cae760c9752..1f271a3e82e 100644 --- a/src/sage/ext/memory_allocator.pyx +++ b/src/sage/ext/memory_allocator.pyx @@ -27,7 +27,7 @@ cdef class MemoryAllocator: ....: mem.aligned_allocarray(8, n, 8) ....: ''') doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See https://github.com/sagemath/sage/issues/31591 for details. """ def __cinit__(self): """ @@ -44,7 +44,7 @@ cdef class MemoryAllocator: ....: ''') sage: foo() doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See https://github.com/sagemath/sage/issues/31591 for details. 1 16 """ diff --git a/src/sage/ext/mod_int.h b/src/sage/ext/mod_int.h index bb18adf3c11..9bb5043ec71 100644 --- a/src/sage/ext/mod_int.h +++ b/src/sage/ext/mod_int.h @@ -14,7 +14,7 @@ * Hence, we use signed 64-bit ints. This gives us fast conversion * to/from Python on 64-bit Linux and OSX, and a large number of * available (but not quite as fast) primes on 64-bit Windows and all - * 32-bit platforms (see Trac #10281) + * 32-bit platforms (see Issue #10281) */ typedef int64_t mod_int; diff --git a/src/sage/ext_data/threejs/threejs_template.html b/src/sage/ext_data/threejs/threejs_template.html index 38800560c47..172d0cec4aa 100644 --- a/src/sage/ext_data/threejs/threejs_template.html +++ b/src/sage/ext_data/threejs/threejs_template.html @@ -214,7 +214,17 @@ camera.up.set( 0, 0, 1 ); camera.position.set( a[0]*xMid, a[1]*yMid, a[2]*zMid ); - var offset = new THREE.Vector3( a[0]*xRange, a[1]*yRange, a[2]*zRange ); + // camera is positioned so that the line from the camera to the center + // of the bounding sphere of the objects makes an angle of 60 degrees with x-axis + // and an angle of 30 degrees with z-axis and the field of view of the camera looking + // at the center has an angle of 45 degrees. + const sin8 = Math.sin(Math.PI / 8); + const sin5 = Math.sin(Math.PI / 5); + const cos5 = Math.cos(Math.PI / 5); + const sin3 = Math.sin(Math.PI / 3); + const cos3 = Math.cos(Math.PI / 3); + var r = midToCorner / sin8; + var offset = new THREE.Vector3( r * sin3 * cos5, r * sin3 * sin5, r * cos3 ); if ( options.viewpoint ) { @@ -569,7 +579,7 @@ setTimeout( function() { m.style.display = 'none'; }, 2000 ); } - +