Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement arbitrary algebra #39290

Closed
1 task done
user202729 opened this issue Jan 6, 2025 · 1 comment
Closed
1 task done

Implement arbitrary algebra #39290

user202729 opened this issue Jan 6, 2025 · 1 comment

Comments

@user202729
Copy link
Contributor

Problem Description

Currently, only some rings / ℚ-algebras are implemented e.g. number fields, quaternion, octonion, split octonion, matrix algebra. It would be desirable to allow more algebras to be represented in code.

Proposed Solution

We can implement a generic FiniteDimensionalAlgebra (which would also be a ring if it's associative):

  • each element is an element of a n-dimensional vector space over a base ring R (such as ℚ).
  • A multiplication table is defined — essentially it suffices to have a 3-dimensional array t[i, j, k] of size n × n × n, with multiplication defined by e_i ⋅ e_j = ∑_k t[i, j, k] e_k
  • methods such as is_commutative, is_associative, is_alternative etc. can be implemented, this can be checked in finite time using bilinearity of the product

https://en.wikipedia.org/wiki/Algebra_over_a_field#Generalization:_algebra_over_a_ring

Of course, typically multiplication has complexity only O(n^2) (e.g. when the product of two basis elements is another basis element), or Õ(n) (e.g. for number fields where product is just polynomial reduced modulo another polynomial, although for small degree the gain is not worth the overhead implementing FFT). Tensor rank decomposition might be helpful here.

With this structure, it would be possible to implement further things like tensor product of two rings — note that tensor product of two number fields over ℚ is often not a number field.

Alternatives Considered

N/A

Additional Information

No response

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
@fchapoton
Copy link
Contributor

fchapoton commented Jan 6, 2025

This already exists, I think. We have many implemented algebras in src/sage/algebras/.

See src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py

And once again, please add your real true name to your profile !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants