safe-tensor: Dependently typed tensor algebra

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/nilsalex/safe-tensor#readme


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.2.1.1
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), constraints (>=0.10 && <0.13), containers (>=0.6 && <0.7), hmatrix (>=0.20 && <0.21), mtl (>=2.2 && <2.3), singletons (>=2.5 && <2.8) [details]
License MIT
Copyright 2020 Nils Alex
Author Nils Alex
Maintainer nils.alex@fau.de
Category Math
Home page https://github.com/nilsalex/safe-tensor#readme
Bug tracker https://github.com/nilsalex/safe-tensor/issues
Source repo head: git clone https://github.com/nilsalex/safe-tensor
Uploaded by nalex at 2020-07-07T18:54:45Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for safe-tensor-0.1.0.0

[back to package description]

safe-tensor

Dependently typed tensor algebra in Haskell. Useful for applications in field theory, e.g., carrying out calculations for https://doi.org/10.1103/PhysRevD.101.084025

Rationale

Tensor calculus is reflected in the type system. Let us view a tensor as a multilinear map from a product of vector spaces and duals thereof to the common field. The type of each tensor is its generalized rank, describing the vector spaces it acts on and assigning a label to each vector space. There are a few rules for tensor operations:

It is thus impossible to perform inconsistent tensor operations.

There is also an existentially typed variant of the tensor type useful for runtime computations. These computations take place in the Error monad, throwing errors if operand types are not consistent.