Skip to content

jyp/linear-smc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linear-smc

Linear Types, Symmetric Monoidal Categories, and Tensors

2021-08: “Evaluating Linear Functions to Symmetric Monoidal Categories” published at Haskell 2021

2023-12-05: Submitted “Domain-Specific Tensor Languages” to JFP [published 2025-03-12 - see below]

2024-03-01: Talk: Tensors DSLs and Curved Space-Time [Patrik Jansson]

Abstract:

Tensor calculus uses a terse but effective language for expressing physical laws. It was instrumental already a century ago in the formulation of Einstein’s general relativity, and its usage has spread to many areas of science. We use category theory, linear types, and algebraic simplifications to implement two tensor DSLs embedded in Haskell, and the conversions between them. We also provide helper functions to view the tensors in Einstein index notation and as diagrams. As an example we express Einstein’s General Relativity equation for the curvature of space-time and verify that the Schwarzschild metric tensor is a solution.

2025-03-12: Paper published in J. of Functional Programming

@article{BERNARDY_JANSSON_2025,
  title   = {Domain-specific tensor languages},
  author  = {Bernardy, Jean-Philippe and Jansson, Patrik},
  journal = {Journal of Functional Programming},
  volume  = {35},
  year    = {2025},
  pages   = {e9},
  doi     = {10.1017/S0956796825000048}
}

2025-10-14: Paper presented at ICFP 2025

About

Linear Types, Symmetric Monoidal Categories, and Tensors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors