# Computing basis of local artinian ring as a vector space.

Given a local artinian ring $A$ with residue field $\mathbb{C}$, we know two facts:

1) The ring A is isomorphic as a $\mathbb{C}$-algebra to $\mathbb{C}[x_1,\ldots,x_n]/(f_1(x_1,\ldots,x_n),\ldots,f_m(x_1,\ldots,x_n))$ where $f_i$ are some polynomials in the variables $x_1,\ldots,x_n$.

2) There exists a collection of monomials $M_t$ for $t=1,\ldots,l$ in the variables $x_1,\ldots, x_n$ such that $A$ is isomorphic to a vector space over $\mathbb{C}$ with basis {$M_1,\ldots, M_l$}.

My question is if there is a way to move from 1 to 2 in Sage. In other words, if I write down a finitely generated $\mathbb{C}$-algebra $A$, then by checking that dim A = 0, I will know that $A$ is artinian. Is there some function in Sage which will find a (ordered) basis for $A$ as a vector space when $dim A = 0$?

I suppose that this is an easy question. One can just compute the groebner basis for the extension of $(x_1,\ldots,x_n)$ in $A$ and then use singular to find the monomial ideal.