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.Tue, 22 Mar 2022 12:34:10 +0100Wrong quaternion order membership testinghttps://ask.sagemath.org/question/61572/wrong-quaternion-order-membership-testing/Let `Q = QuaternionAlgebra(-2167, -7)` be a rational quaternion algebra
with standard basis `{1, i , j, k}` as follows.
sage: Q.<i, j, k> = QuaternionAlgebra(-2161,-7)
sage: B = [1/2 + 2/7*j + 1/14*k, 1/32*i + 13/32*j + 19/8*k, 4/7*j + 1/7*k, 4*k]
sage: O = Q.quaternion_order(B)
sage: O
Order of Quaternion Algebra (-2161, -7) with base ring Rational Field
with basis (1/2 + 2/7*j + 1/14*k, 1/32*i + 13/32*j + 19/8*k, 4/7*j + 1/7*k, 4*k)
I think this (maximal Z-)order doesn't contain `k` but I get
sage: k in O
True
The is inconsistent with the result on Magma:
> K := Rationals();
> Q<i, j, k> := QuaternionAlgebra<K|-2161, -7>;
> B := [ 1/2 + 2/7*j + 1/14*k, 1/32*i + 13/32*j + 19/8*k, 4/7*j + 1/7*k, 4*k ];
> O := QuaternionOrder(B);
> O;
Order of Quaternion Algebra with base ring Rational Field, defined by i^2 = -2161, j^2 = -7
with coefficient ring Integer Ring
> k in O;
false
> 2*k in O;
false
> 4*k in O;
true
What is the issue here?DrewCTue, 22 Mar 2022 12:34:10 +0100https://ask.sagemath.org/question/61572/Change degree in InfinitePolynomialRinghttps://ask.sagemath.org/question/44059/change-degree-in-infinitepolynomialring/If I use
<pre><code> P.<x,y,z> = InfinitePolynomialRing(QQ)</code></pre>
Assuming any of the orderings 'lex, deglex, degrevlex' I will have
$z_0 < z_1 < z_2 < ... < y_0 < y_1 < ... < x_0 < x_1 < ...$
And each variable having degree 1. I would like to obtain something like 'deglex' but assigning degree $n$ to $x_n,y_n,z_n$ so that in particular I would obtain
$z_0 < y_0 < x_0 < z_1 < y_1 < x_1 < ... $
Is there a way to implement this. It seems that in order to compute Grobner bases on arc schemes these orderings are much more natural that the ones implemented, but I just started looking at Sage so I may have missed the right implementation of polynomial rings in infinitely many variables to work. heluaniWed, 24 Oct 2018 19:38:41 +0200https://ask.sagemath.org/question/44059/To check whether a given ideal of an order is principal or nothttps://ask.sagemath.org/question/32527/to-check-whether-a-given-ideal-of-an-order-is-principal-or-not/ Suppose $\theta$ is a root of a irreducible monic polynomial $f$ of degree $n$. (In practice, I would like to deal with $n=3$ case.) Then, define the ideal class group of $\mathbb{Z}[\theta]$, $C(\mathbb{Z}[\theta])$ by the set of invertible fractional ideals modulo principal ideals.
Given a polynomial $f$ and a fractional ideal $I$ of $\mathbb{Z}[\theta]$, is there any way to decide I is principal or not? user2893829Thu, 11 Feb 2016 15:53:14 +0100https://ask.sagemath.org/question/32527/Posets O(P) Algorithm, how to?https://ask.sagemath.org/question/10586/posets-op-algorithm-how-to/Hi!
I an new here :). I am doing some work with Posets, and I want to create O(P) given a Poset P. The idea is to give a graphic representation. I want to use sage for this (it has the functions for it). But, The graphical representation is bad (It does not show the elements of the poset, just a number, it represents the structure though).
We (we are a team) implemented something in php (to have it online). Now we want to implement O(P) (We have how to construct P) so that we can see in each node the corresponding element. Can anyone tell me how to do this? or where I can find an algorithm or the source code in sage? What I want is (in sage):
P = Poset((divisors(12), attrcall("divides")), facade=True)
A = P.directed_subsets('up')
L = sorted(list(A))
PP = Poset(([Set(s) for s in L], attrcall("issubset")))
PP._hasse_diagram.plot()
(If there is a way to see the elements with PP._hasse_diagram.plot() will be appreciated.)
Where I can find the source code or (better I think) an algorithm to create O(P) in an efficient way? For example, how to calculate the antichains (if this helps) to create each element (each down-set) of O(P) and then how to create O(P)?ShariffTue, 01 Oct 2013 16:55:26 +0200https://ask.sagemath.org/question/10586/How to plot O(P) of a Poset P in sage?https://ask.sagemath.org/question/10571/how-to-plot-op-of-a-poset-p-in-sage/Hello,
I just installed sage. I want to use it to do some things with Posets for my Modern ALgebra Class. For example, I want to use it to compute and plot the O(P) of a poset P. (The Poset of the order ideals of P).
1- Where I can find examples of how to construct Posets? I know that in the references they are some examples, but is there some type of tutorial with Posets or pdf with examples?
2- How I can plot O(P)? I know that there is a method called P.directed_subsets('down') to compute the down sets of P. The problem is that this method returns a List... So I can't plot a hasse diagram of it... For example:
P = Poset((divisors(12), attrcall("divides")), facade=True)
A = P.directed_subsets('up')
sorted(list(A))
[[], [1, 2, 4, 3, 6, 12], [2, 4, 3, 6, 12], [2, 4, 6, 12], [3, 6, 12], [4, 3, 6, 12], [4, 6, 12], [4, 12], [6, 12], [12]]
3- I dont understand the order_ideals method. What are the parameters of this function??
Thanks!!
Note: As you see, I am very new here, some insight of how to work with sage is appreciated!ShariffFri, 27 Sep 2013 22:03:42 +0200https://ask.sagemath.org/question/10571/