ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 18 Sep 2020 10:10:48 +0200Defining Hyperplanearrangements over NumberFieldshttps://ask.sagemath.org/question/53485/defining-hyperplanearrangements-over-numberfields/Hello,
I read the documentation and it seems that when working with HyperplaneArrangements one can only create arrangements over a finite field or QQ. I was asking myself if there was any way to define it over NumberFields. I tried the following:
VarTDef.(a)=QQ[]
K.(z) = NumberField(a^2-5, embedding=1.2)
H.(r,s,t,u)=HyperplaneArrangements(K)
Arrangement=H([(1,0,0,0),0],[(0,1,0,0),0])
Arrangement.characteristic_polynomial()
(I know that the brackets surrounding a,z and r,s,t,u are wrong, but I don't know how to write them in this post without getting taken away because they get handled like HTML tags)
But after calling the restriction function and trying to hand over the new arrangement it gives out a "TypeError: entries must be a list of length 3". After calculating the restriction it wants to "return H(*hyperplanes, signed=False)" this leads to "hyperplanes = [AA(_) for _ in arg]" and this reaches "coeffs = self.ambient_module()(coeffs)" and the TypeError gets triggered.
Since the creation of the arrangement succeeds my guess would be that the HyperplaneArrangement functions aren't implemented for arrangements over NumberFields. I'm just curious if there is any trick to make it work or if it just isn't implemented yet (or if I possibly just messed up during the creation).Fri, 18 Sep 2020 09:34:45 +0200https://ask.sagemath.org/question/53485/defining-hyperplanearrangements-over-numberfields/Comment by FrédéricC for <p>Hello,</p>
<p>I read the documentation and it seems that when working with HyperplaneArrangements one can only create arrangements over a finite field or QQ. I was asking myself if there was any way to define it over NumberFields. I tried the following:</p>
<pre><code>VarTDef.(a)=QQ[]
K.(z) = NumberField(a^2-5, embedding=1.2)
H.(r,s,t,u)=HyperplaneArrangements(K)
Arrangement=H([(1,0,0,0),0],[(0,1,0,0),0])
Arrangement.characteristic_polynomial()
</code></pre>
<p>(I know that the brackets surrounding a,z and r,s,t,u are wrong, but I don't know how to write them in this post without getting taken away because they get handled like HTML tags)</p>
<p>But after calling the restriction function and trying to hand over the new arrangement it gives out a "TypeError: entries must be a list of length 3". After calculating the restriction it wants to "return H(*hyperplanes, signed=False)" this leads to "hyperplanes = [AA(_) for _ in arg]" and this reaches "coeffs = self.ambient_module()(coeffs)" and the TypeError gets triggered.</p>
<p>Since the creation of the arrangement succeeds my guess would be that the HyperplaneArrangement functions aren't implemented for arrangements over NumberFields. I'm just curious if there is any trick to make it work or if it just isn't implemented yet (or if I possibly just messed up during the creation).</p>
https://ask.sagemath.org/question/53485/defining-hyperplanearrangements-over-numberfields/?comment=53487#post-id-53487There seems to be a bug here:
ambient=Arrangement.ambient_space()
L = [[1,0,0,0],0]
ambient(L)Fri, 18 Sep 2020 10:10:48 +0200https://ask.sagemath.org/question/53485/defining-hyperplanearrangements-over-numberfields/?comment=53487#post-id-53487