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.Wed, 06 May 2020 01:15:20 +0200Hochschild cohomology of a matrix subalgebrahttps://ask.sagemath.org/question/51290/hochschild-cohomology-of-a-matrix-subalgebra/ Let $M_n(R)$ be the $n\times n$ matrix algebra over the polynomial ring $R=K[t]$. It is spanned by $\{e_{ij}; i,j\in[n]\}$.
> Let $A$ be a subalgebra of $M_n(R)$,
> spanned by $\{p_{ij}e_{ij}\}$, where
> $(i,j)$ ranges over some subset of
> $[n]\times[n]$ and $p_{ij}\in R$ are
> some polynomials. How can I compute
> with SageMath the hochschild
> (co)homology $HH^\ast(A;A)$?
So far, I know how to do some basics:
R.<t>=GF(3)[];
A.<x,y> = ExteriorAlgebra(QQ);
C = A.hochschild_complex(A); print(type(A),'\n',type(C))
show(C.homology(0),', ',C.homology(1),', ',C.homology(2))
show(C.cohomology(0),', ',C.cohomology(1),', ',C.cohomology(2))
However, I don't know how to create my matrix subalgebra $A$ over $R$. Also, I don't think this really computes hochschild cohomology. Is it dualised over $\mathbb{Q}$ or over $A=\Lambda_\mathbb{Q}[x,y]$?LeonWed, 06 May 2020 01:15:20 +0200https://ask.sagemath.org/question/51290/Partial Algebrashttps://ask.sagemath.org/question/8022/partial-algebras/Hi!
As part of a future package for matroid theory, I would like to implement an algebraic structure called a "partial field".
A partial field is a tuple P = (S, 0, 1, +, *) such that
1. S - {0} is a group G under * with identity 1
2. Every element p has an additive inverse q such that p + q = 0
3. Otherwise, the sum p + q is defined for only some choices of p + q.
Associativity of + is respected "as much as possible". Formally, this means that there exists a ring R such that G is contained in the group of units of R, and addition in the partial field is the restriction of addition in the ring to S.
Example: the regular partial field. This has elements {-1, 0, 1}, with addition and multiplication as in ZZ, but 1 + 1 is not defined.
How can we best implement such structures? That is, where should the category PartialFields go? One choice would be to subclass Rings. However, for various reasons it is desirable to return an "undefined_element" instead of the sum in the ring. This would break associativity tests that seem to be required for rings.
Example: take the partial field {(-1)^s 2^k : s,k in ZZ} U {0}, with usual multiplication and addition in QQ restricted to this set (e.g. 1/2 - 1 = -1/2 is ok, but 4 - 1/4 is undefined).
* (1 + 1) + (1 -2) = 1
* ((1 + 1) + 1) - 2 = undefined_element
If we do not subclass Ring, then a whole new can of worms is opened: we're no longer allowed to fill matrices with our elements. I'm not looking forward to re-implementing the Matrix class (though we would probably subclass it anyway as PMatrix, since we need a different determinant and rank algorithm, as well as some new methods).
P.S. How does one define ZZ[1/2] in Sage?
P.P.S. How would I coerce from my own, custom ring into QQ?
StefanFri, 25 Mar 2011 04:54:01 +0100https://ask.sagemath.org/question/8022/