Closed YijunYuan closed 11 months ago
Without importing henselization
, does this return True
for you?
K = QuadraticField(-1, 'i')
loads(dumps(K.maximal_order())) is K.maximal_order()
It does for me with Sage 10.1. So I don't understand how this is possible.
Without importing
henselization
, does this returnTrue
for you?K = QuadraticField(-1, 'i') loads(dumps(K.maximal_order())) is K.maximal_order()
It does for me with Sage 10.1. So I don't understand how this is possible.
Yes, it returns True
for me.
I rebuilt Sage 10.1 to make the environment clean. Here are some tests, all of which start with a fresh startup of Sage 10.1:
sage: import henselization
Your installation of Sage has a known issue: https://trac.sagemath.org/ticket/24934. We tried to install a workaround for this problem but failed to do so. Please make sure that you are using the latest stable version of Sage. If you are using the latest stable version of Sage already, please report this issue at https://github.com/MCLF/henselization/issues including the traceback below.
Traceback (most recent call last):
File "/home/yijunyuan/sage-10.1/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/henselization/monkey/util.py", line 91, in patch
self._patch()
File "/home/yijunyuan/sage-10.1/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/henselization/monkey/trac_24934.py", line 30, in _patch
del sage.rings.number_field.order.AbsoluteOrder.__reduce__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AbsoluteOrderFactory' object has no attribute '__reduce__'
sage: from henselization import *
Your installation of Sage has a known issue: https://trac.sagemath.org/ticket/24934. We tried to install a workaround for this problem but failed to do so. Please make sure that you are using the latest stable version of Sage. If you are using the latest stable version of Sage already, please report this issue at https://github.com/MCLF/henselization/issues including the traceback below.
Traceback (most recent call last):
File "/home/yijunyuan/sage-10.1/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/henselization/monkey/util.py", line 91, in patch
self._patch()
File "/home/yijunyuan/sage-10.1/local/var/lib/sage/venv-python3.11/lib/python3.11/site-packages/henselization/monkey/trac_24934.py", line 30, in _patch
del sage.rings.number_field.order.AbsoluteOrder.__reduce__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AbsoluteOrderFactory' object has no attribute '__reduce__'
sage: K = QuadraticField(-1, 'i')
sage: loads(dumps(K.maximal_order())) is K.maximal_order()
True
wget https://github.com/MCLF/henselization/archive/refs/heads/master.zip
then
./sage --pip install master.zip
Processing ./master.zip
Preparing metadata (setup.py) ... done
Collecting patchy
Downloading patchy-2.8.0-py3-none-any.whl (9.7 kB)
Collecting recursive-monkey-patch==0.3.0
Downloading recursive_monkey_patch-0.3.0-py2.py3-none-any.whl (7.8 kB)
Building wheels for collected packages: henselization
Building wheel for henselization (setup.py) ... done
Created wheel for henselization: filename=henselization-0.0.0-py3-none-any.whl size=49342 sha256=1d77e17169da0060aed42768c46643d49e998f99bc4756de54f5279bd6352539
Stored in directory: /tmp/pip-ephem-wheel-cache-crr_lhrx/wheels/75/66/a4/1fd471f261c84d7ac64dd21aa69e1e63e68a25a145be45c479
Successfully built henselization
Installing collected packages: recursive-monkey-patch, patchy, henselization
Successfully installed henselization-0.0.0 patchy-2.8.0 recursive-monkey-patch-0.3.0
OS: Ubuntu 23.10 on Windows 10 x86_64 Kernel: 5.15.90.1-microsoft-standard-WSL2 CPU: 13th Gen Intel i9-13980HX (32) @ 2.419GHz
That's really bizarre, the system should detect that there is no need to patch here.
A stupid workaround is to do:
sage: QuadraticField(-1, 'i').maximal_order()
Gaussian Integers in Number Field in i with defining polynomial x^2 + 1 with i = 1*I
sage: import henselization
I don't understand yet, why this works.
Fixed in #47.