Open jdemeyer opened 6 years ago
Just adding the branch for reference, it probably isn't a good solution.
New commits:
ea8fa5c | enhance one lifting procedure in code constructions |
Branch: u/chapoton/25379
Description changed:
---
+++
@@ -1,47 +1,16 @@
1. The use of `_lift2smallest_field` is very dubious:
-sage -t --long src/sage/coding/code_constructions.py -** -File "src/sage/coding/code_constructions.py", line 624, in sage.coding.code_constructions.QuadraticResidueCodeOddPair -Failed example:
-3. It doesn't work as documented: +2. It doesn't work as documented:
sage: S1 = [1,3,4,5,7,12,13]; S2 = [2,6,8,9,10,11,14]
@@ -70,3 +39,7 @@
ArithmeticError: multiplicative order of 3 not defined since it is not a unit modulo 15
+ +3. The code assumes implicitly that the generator of a finite field is a multiplicative generator (this is easy to fix). + +I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated.
Description changed:
---
+++
@@ -42,4 +42,6 @@
3. The code assumes implicitly that the generator of a finite field is a multiplicative generator (this is easy to fix).
+4. It becomes very inefficient as `q` gets large.
+
I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated.
Description changed:
---
+++
@@ -42,6 +42,6 @@
3. The code assumes implicitly that the generator of a finite field is a multiplicative generator (this is easy to fix).
-4. It becomes very inefficient as `q` gets large.
+4. It becomes very inefficient as `n` gets moderately large.
I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated.
Description changed:
---
+++
@@ -2,6 +2,9 @@
sage: S1 = [1,3,4,5,7,12,13]; S2 = [2,6,8,9,10,11,14] +sage: from sage.coding.code_constructions import _is_a_splitting +sage: _is_a_splitting(S1, S2, 15) +True sage: codes.DuadicCodeEvenPair(GF(7), S1, S2) ... ValueError: 5*z + 2 is not in the image of (map internal to coercion system -- copy before use) @@ -44,4 +47,6 @@
n
gets moderately large.+5. Since you explicitly refer to the docstring of _is_a_splitting
, the latter should be public and documented.
+
I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated.
Description changed:
---
+++
@@ -49,4 +49,4 @@
5. Since you explicitly refer to the docstring of `_is_a_splitting`, the latter should be public and documented.
-I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated.
+I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated. That's the absolute minimum that must be done before anything else: if we don't even know what the function *should* do, we cannot fix it.
Description changed:
---
+++
@@ -49,4 +49,6 @@
5. Since you explicitly refer to the docstring of `_is_a_splitting`, the latter should be public and documented.
-I can imagine that 1. and 2. should be considered "bad input" but in that case the documentation must be updated. That's the absolute minimum that must be done before anything else: if we don't even know what the function *should* do, we cannot fix it.
+I can imagine that 1. and 2. should be considered "bad input" but that's not clear. It seems that there is an additional hidden assumption that `q S1 = S1` (and then also `q S2 = S2`).
+
+Updating the documentation is the absolute minimum that must be done before anything else: if we don't even know what the function *should* do, we cannot fix it.
Description changed:
---
+++
@@ -45,9 +45,7 @@
3. The code assumes implicitly that the generator of a finite field is a multiplicative generator (this is easy to fix).
-4. It becomes very inefficient as `n` gets moderately large.
-
-5. Since you explicitly refer to the docstring of `_is_a_splitting`, the latter should be public and documented.
+4. Since you explicitly refer to the docstring of `_is_a_splitting`, the latter should be public and documented.
I can imagine that 1. and 2. should be considered "bad input" but that's not clear. It seems that there is an additional hidden assumption that `q S1 = S1` (and then also `q S2 = S2`).
_lift2smallest_field
is very dubious:The code assumes implicitly that the generator of a finite field is a multiplicative generator (this is easy to fix).
Since you explicitly refer to the docstring of
_is_a_splitting
, the latter should be public and documented.I can imagine that 1. and 2. should be considered "bad input" but that's not clear. It seems that there is an additional hidden assumption that
q S1 = S1
(and then alsoq S2 = S2
).Updating the documentation is the absolute minimum that must be done before anything else: if we don't even know what the function should do, we cannot fix it.
Component: coding theory
Stopgaps: #25379
Branch/Commit: u/chapoton/25379 @
ea8fa5c
Issue created by migration from https://trac.sagemath.org/ticket/25896