-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | typesafe tensor algebra library -- -- This package is intended to be used as a general purpose tensor -- algebra library. It defines the usual tensor algebra functions such as -- addition, scalar multiplication, tensor product, and contractions, but -- also general symmetrizations and further utility functions. -- -- The implemented tensor data type is capable of being used with an -- arbitrary number of general abstract indices and can incorporate -- values of any type that allow for a meaningful addition, scaling, and -- multiplication. The package is thus very flexible and can easily be -- customised at wish. @package sparse-tensor @version 0.2.1 -- | This module defines the basic data types and functions of the -- sparse-tensor package. -- -- The Tensor n k v data type provides the fundamental -- building block of all further tensor types. It represents a general -- tensor that takes n individual indices all belonging to the -- same index typ k and retrieves values of type v. As -- such the Tensor type can be thought of representing a -- single tensor that only features contravariant indices. -- -- Tensor n k v is internally implemented as an ordered -- forest with nodes of type k and leafs of type -- v. -- -- Additional covariant indices can be incorporated by adjoining leafs of -- type Tensor n2 k v to a Tensor n1 k v. -- This yields the type Tensor2 n1 n2 k v which thus is -- used to represent the tensors in the traditional sense that include -- contravariant and covariant indices of the same type, i.e. running -- over the same index range. -- -- Recursively appending further Tensors as leafs each -- one with possibly different index types and different ranks allows the -- sparse-tensor package cover the treatment of more complicated tensors -- with an arbitrary number of different indices. -- -- The Tensor data type directly incorporates its rank in -- form of a type level natural number n. This results in added -- type safety when performing the usual tensor algebra operations. To -- provide a simple example the addition of two tensors is only -- meaningful if the ranks of the two tensors coincide. Hence then -- sparse-tensor package only incorporates an addition of -- Tensors with the same type. Unintentional additions of -- Tensors with different type then immediately yields a -- type error thus preventing the mistake. -- -- Furthermore the Tensor type employs a sparse storage -- paradigm in the sense that when constructing Tensors -- only non zero values must be specified. Missing values are then taken -- as vanishing automatically. module Math.Tensor data IndList n a [Empty] :: IndList 0 a [Append] :: a -> IndList (n - 1) a -> IndList n a -- | Construct an IndList that only contains a single -- value. singletonInd :: a -> IndList 1 a -- | Infix synonym for Append. (+>) :: Enum a => Int -> IndList (n - 1) a -> IndList n a infixr 5 +> -- | Construction of a length typed IndList from an untyped -- list. fromList :: forall n. KnownNat n => forall (a :: *). [a] -> Maybe (IndList n a) -- | Construction of a length typed IndList (partial -- function). fromListUnsafe :: forall n. KnownNat n => forall (a :: *). [a] -> IndList n a -- | An implementation of the usual head function from Data.List for -- IndLists. The function returns the first element of -- the IndList. headInd :: IndList n a -> a -- | An implementation of the usual tail function from Data.List for -- IndLists. The function removes the first element of -- the IndList. tailInd :: IndList n a -> IndList (n - 1) a -- | Sorts an IndList of elements that satisfy the -- Ord constraint by implementing a version of insertion -- sort. sortInd :: (Ord a, Eq a) => IndList n a -> IndList n a -- | The function replaces the element at index/position specified by its -- first argument with the element that is specified by its second -- argument. updateInd :: Int -> a -> IndList n a -> IndList n a -- | Additional type for the sorted tensor forest. TMap k v -- represents an ordered list of key value pairs. Ordering is always -- defined w.r.t. the keys. All future functions maintain this order when -- acting on a valid, i.e. ordered TMaps. type TMap k v = [(k, v)] data Tensor n k v -- | Constructor of leaf values. [Scalar] :: v -> Tensor 0 k v -- | Constructs a Tensor from a TMap of -- index sub tensor pairs. [Tensor] :: TMap k (Tensor n k v) -> Tensor (n + 1) k v -- | Represents a Tensor that is identical zero. [ZeroTensor] :: Tensor n k v -- | Represents a Tensor with attached -- Scalars being again of Tensor type and -- taking the same index type. This type can be used to represent a -- general Tensor that takes contravariant and covariant -- indices. type Tensor2 n1 n2 k v = Tensor n1 k (Tensor n2 k v) type AbsTensor1 n1 k1 v = Tensor n1 k1 v type AbsTensor2 n1 n2 k1 v = Tensor2 n1 n2 k1 v type AbsTensor3 n1 n2 n3 k1 k2 v = AbsTensor2 n1 n2 k1 (Tensor n3 k2 v) type AbsTensor4 n1 n2 n3 n4 k1 k2 v = AbsTensor2 n1 n2 k1 (Tensor2 n3 n4 k2 v) type AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v = AbsTensor4 n1 n2 n3 n4 k1 k2 (Tensor n5 k3 v) type AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v = AbsTensor4 n1 n2 n3 n4 k1 k2 (Tensor2 n5 n6 k3 v) type AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v = AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (Tensor n7 k4 v) type AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v = AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (Tensor2 n7 n8 k4 v) -- | Type synonym for a Tensor with contravariant and -- covariant spacetime indices. type STTens n1 n2 v = AbsTensor2 n1 n2 Ind3 v -- | Type synonym for a Tensor with three different index -- types ranging from 0 to 20, from 0 to -- 9 and from 0 to 3 each one appearing -- contravariantly and covariantly. type ATens n1 n2 n3 n4 n5 n6 v = AbsTensor6 n1 n2 n3 n4 n5 n6 Ind20 Ind9 Ind3 v -- | The TIndex type class collects a number of class -- constraints that any index type must satisfy. class (Eq a, Ord a, Enum a) => TIndex a -- | Newtype wrapper for an index type that is used to represent indices -- with a range from 0 to 3. newtype Ind3 Ind3 :: Int -> Ind3 [indVal3] :: Ind3 -> Int -- | Newtype wrapper for an index type that is used to represent indices -- with a range from 0 to 9. newtype Ind9 Ind9 :: Int -> Ind9 [indVal9] :: Ind9 -> Int -- | Newtype wrapper for an index type that is used to represent indices -- with a from 0 to 20. newtype Ind20 Ind20 :: Int -> Ind20 [indVal20] :: Ind20 -> Int -- | Type class that encodes the additive group structure of possible -- Tensor values, i.e. addition, neutral element and -- existence of inverse elements. Each possible Tensor -- value must allow for these basic group operations and hence be an -- instance of this type class. class TAdd a -- | Test whether the given element is zero, i.e. the neutral element. scaleZero :: TAdd a => a -> Bool -- | Addition of two elements. addS :: TAdd a => a -> a -> a -- | Maps an element to its additive inverse. negateS :: TAdd a => a -> a -- | Subtraction of two elements. subS :: TAdd a => a -> a -> a -- | Type class for product of two (possibly different) types. The -- resulting type depends on the types that are given as input. class Prod v v' where { -- | Type level function that returns the type of the result of -- prod. type family TProd v v' :: *; } -- | Product function. prod :: Prod v v' => v -> v' -> TProd v v' -- | Newtype wrapper that is used for representing scalar values. newtype SField a SField :: a -> SField a -- | The AnsVar a type represents a basic type for -- variables that must only occur linearly. As such they can for instance -- be used whenever tensorial expression involves a tensor with unknown -- components. This tensor can then be described as having values of type -- AnsVar. The AnsVar type can for -- instance be useful when the tensorial expression that involves the -- Tensor with AnsVar values describes a -- linear equation system. Using the functions -- toMatListT1, ... this equation system can then be -- transformed into a matrix with columns labeling the individual -- AnsVars. newtype AnsVar a AnsVar :: IntMap a -> AnsVar a type AnsVarR = AnsVar (SField Rational) -- | Shifts the labels of the variables that are contained in the -- AnsVar type towards larger index labels by the amount -- specified. shiftVarLabels :: Int -> AnsVar a -> AnsVar a -- |
-- shiftLabels1 s = mapTo1 (shiftVarLabels s) --shiftLabels1 :: Int -> AbsTensor1 n1 k1 (AnsVar a) -> AbsTensor1 n1 k1 (AnsVar a) -- |
-- shiftLabels2 s = mapTo2 (shiftVarLabels s) --shiftLabels2 :: Int -> AbsTensor2 n1 n2 k1 (AnsVar a) -> AbsTensor2 n1 n2 k1 (AnsVar a) -- |
-- shiftLabels3 s = mapTo3 (shiftVarLabels s) --shiftLabels3 :: Int -> AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -> AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -- |
-- shiftLabels4 s = mapTo4 (shiftVarLabels s) --shiftLabels4 :: Int -> AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -> AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -- |
-- shiftLabels5 s = mapTo5 (shiftVarLabels s) --shiftLabels5 :: Int -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -- |
-- shiftLabels6 s = mapTo6 (shiftVarLabels s) --shiftLabels6 :: Int -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -- |
-- shiftLabels7 s = mapTo7 (shiftVarLabels s) --shiftLabels7 :: Int -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -- |
-- shiftLabels8 s = mapTo8 (shiftVarLabels s) --shiftLabels8 :: Int -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -- | Type for representation of functions as Tensor values. newtype CFun a b CFun :: (a -> b) -> CFun a b -- | evaluate a tensor section, i.e. a CFun-valued -- STTens, at given spacetime point evalSec :: (Num b, Eq b, Epsilon b) => STTens n1 n2 (CFun a b) -> a -> STTens n1 n2 (SField b) -- | Newtype wrapper for symbolic values. Note that this version does not -- yet support simplification of symbolic values. newtype SSymbolic SSymbolic :: String -> SSymbolic type IndTuple1 n1 k1 = IndList n1 k1 type IndTuple2 n1 n2 k1 = (IndList n1 k1, IndList n2 k1) type IndTuple3 n1 n2 n3 k1 k2 = (IndList n1 k1, IndList n2 k1, IndList n3 k2) type IndTuple4 n1 n2 n3 n4 k1 k2 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2) type IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3) type IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3) type IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3, IndList n7 k4) type IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 = (IndList n1 k1, IndList n2 k1, IndList n3 k2, IndList n4 k2, IndList n5 k3, IndList n6 k3, IndList n7 k4, IndList n8 k4) -- | Index tuple type for a Tensor that provides only -- contravariant and covariant spacetime indices, i.e. a -- STTens. type IndTupleST n1 n2 = (IndList n1 Ind3, IndList n2 Ind3) -- | Index tuple type for a Tensor with indices of type -- Ind20, ind9 and Ind3 -- each one appearing contravariantly and covariantly, i.e. a -- ‘ATens'. type IndTupleAbs n1 n2 n3 n4 n5 n6 = (IndList n1 Ind20, IndList n2 Ind20, IndList n3 Ind9, IndList n4 Ind9, IndList n5 Ind3, IndList n6 Ind3) -- | This functions construction Tensors with a single -- index type that only appears contravariantly from a list of key value -- pairs, where the keys are provided by a IndList that -- contains the indices under which the corresponding value shall be -- stored. fromListT :: (TIndex k, TAdd v) => [(IndList n k, v)] -> Tensor n k v fromListT1 :: (TIndex k1, TAdd v) => [(IndTuple1 n1 k1, v)] -> AbsTensor1 n1 k1 v fromListT2 :: (TIndex k1, TAdd v) => [(IndTuple2 n1 n2 k1, v)] -> AbsTensor2 n1 n2 k1 v fromListT3 :: (TIndex k1, TIndex k2, TAdd v) => [(IndTuple3 n1 n2 n3 k1 k2, v)] -> AbsTensor3 n1 n2 n3 k1 k2 v fromListT4 :: (TIndex k1, TIndex k2, TAdd v) => [(IndTuple4 n1 n2 n3 n4 k1 k2, v)] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v fromListT5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3, v)] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v fromListT6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3, v)] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v fromListT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4, v)] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v fromListT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4, v)] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Same functionality as fromListT but the indices of the -- various values are specified by usual list. This is certainly more -- flexible however all at the cost of reduced type safety compared to -- fromListT. fromListT' :: forall n k v. (TIndex k, TAdd v, KnownNat n) => [([k], v)] -> Tensor n k v fromListT1' :: forall n1 k1 v. (KnownNat n1, TIndex k1, TAdd v) => [([k1], v)] -> AbsTensor1 n1 k1 v fromListT2' :: forall n1 n2 k1 v. (KnownNat n1, KnownNat n2, TIndex k1, TAdd v) => [(([k1], [k1]), v)] -> AbsTensor2 n1 n2 k1 v fromListT3' :: forall n1 n2 n3 k1 k2 v. (KnownNat n1, KnownNat n2, KnownNat n3, TIndex k1, TIndex k2, TAdd v) => [(([k1], [k1], [k2]), v)] -> AbsTensor3 n1 n2 n3 k1 k2 v fromListT4' :: forall n1 n2 n3 n4 k1 k2 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, TIndex k1, TIndex k2, TAdd v) => [(([k1], [k1], [k2], [k2]), v)] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v fromListT5' :: forall n1 n2 n3 n4 n5 k1 k2 k3 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(([k1], [k1], [k2], [k2], [k3]), v)] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v fromListT6' :: forall n1 n2 n3 n4 n5 n6 k1 k2 k3 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3]), v)] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v fromListT7' :: forall n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3], [k4]), v)] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v fromListT8' :: forall n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v. (KnownNat n1, KnownNat n2, KnownNat n3, KnownNat n4, KnownNat n5, KnownNat n6, KnownNat n7, KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [(([k1], [k1], [k2], [k2], [k3], [k3], [k4], [k4]), v)] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Synonym for fmap. mapTo1 applies a function -- to the values of a tensor. -- --
-- mapTo1 = fmap --mapTo1 :: (v1 -> v2) -> Tensor n1 k v1 -> Tensor n1 k v2 -- | Applies a function one level deeper than mapTo1. In -- other words the leaf values of the Tensor at hand must -- themselves be of type Tensor, mapTo2 -- then applies a function to the values of these leaf -- Tensors. -- --
-- mapTo2 = fmap . fmap --mapTo2 :: (v1 -> v2) -> Tensor2 n1 n2 k v1 -> Tensor2 n1 n2 k v2 -- | Maps a function to the 3rd leaf level. -- --
-- mapTo3 = fmap . fmap . fmap --mapTo3 :: (v1 -> v2) -> AbsTensor3 n1 n2 n3 k1 k2 v1 -> AbsTensor3 n1 n2 n3 k1 k2 v2 -- | Maps a function to the 4th leaf level. -- --
-- mapTo4 = fmap . fmap . fmap . fmap --mapTo4 :: (v1 -> v2) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v1 -> AbsTensor4 n1 n2 n3 n4 k1 k2 v2 -- | Maps a function to the 5th leaf level. -- --
-- mapTo5 = fmap . fmap . fmap . fmap . fmap --mapTo5 :: (v1 -> v2) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v1 -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v2 -- | Maps a function to the 6th leaf level. -- --
-- mapTo6 = fmap . fmap . fmap . fmap . fmap . fmap --mapTo6 :: (v1 -> v2) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v1 -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v2 -- | Maps a function to the 7th leaf level. -- --
-- mapTo7 = fmap . fmap . fmap . fmap . fmap . fmap . fmap --mapTo7 :: (v1 -> v2) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v1 -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v2 -- | Maps a function to the 8th leaf level. -- --
-- mapTo8 = fmap . fmap . fmap . fmap . fmap . fmap . fmap . fmap --mapTo8 :: (v1 -> v2) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v1 -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v2 -- | Addition of two arbitrary tensors. The only requirement is that the -- corresponding values satisfy the TAdd constraint. In -- particular this function can also be used for adding tensors that -- themselves contain tensors as values. (&+) :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v -> Tensor n k v infixl 6 &+ -- | Negation of an arbitrary Tensor. The function uses the -- required group property of the tensor values to map each value of the -- tensors to its additive inverse. negateTens :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v -- | Tensor product of two Tensors. In the result for each -- index type the indices of the first Tensor are -- arranged left of those in the second Tensor argument. -- The values of the two Tensors must satisfy the -- Prod constraint. (&*) :: (TIndex k, Prod v v') => Tensor n k v -> Tensor m k v' -> TProd (Tensor n k v) (Tensor m k v') infixl 7 &* -- | Subtraction of two arbitrary Tensors. The only -- requirement is that the corresponding values satisfy the -- TAdd constraint. In particular this function can also -- be used for adding tensors that themselves contain tensors as values. (&-) :: (TIndex k, TAdd v) => Tensor n k v -> Tensor n k v -> Tensor n k v infixl 6 &- -- | Scalar multiplication of an arbitrary Tensor. Only -- requirement is that the corresponding values and the scalar type -- satisfy the Prod constraint. (&.) :: (TIndex k, Prod s v) => s -> Tensor n k v -> Tensor n k (TProd s v) infix 8 &. -- | This functions compute the contraction of a Tensor in -- two of its indices of the same index type, i.e. the function sets the -- two indices equal and sums over their whole index range. tensorContr :: (TIndex k, TAdd v) => (Int, Int) -> Tensor2 n1 n2 k v -> Tensor2 (n1 - 1) (n2 - 1) k v -- | contrATens1 is a synonym for -- tensorContr. It applies the contraction to the 1st -- index type of a tensor. -- --
-- contrATens1 = tensorContr --contrATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 (n1 + 1) (n2 + 1) k1 v -> AbsTensor2 n1 n2 k1 v -- | contrATens2 applies the contraction to the 2nd index -- type of a tensor. -- --
-- contrATens2 = mapTo2 . tensorContr --contrATens2 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 (n3 + 1) (n4 + 1) k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- | contrATens3 applies the contraction to the 3rd index -- type of a tensor. -- --
-- contrATens3 = mapTo4 . tensorContr --contrATens3 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 (n5 + 1) (n6 + 1) k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- | contrATens4 applies the contraction to the 4th index -- type of a tensor. -- --
-- contrATens4 = mapTo6 . tensorContr --contrATens4 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 (n7 + 1) (n8 + 1) k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Transpose a Tensor in two specified contravariant -- indices of the first index type indices. The result is simply the -- tensor with the two indices with position specified by the two -- Int values swapped. tensorTrans :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v -- |
-- tensorTrans1 = tensorTrans --tensorTrans1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- tensorTrans2 mapTo1 . tensorTrans --tensorTrans2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- tensorTrans3 = mapTo2 . tensorTrans --tensorTrans3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- tensorTrans4 = mapTo3 tensorTrans --tensorTrans4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- tensorTrans5 = mapTo4 . tensorTrans --tensorTrans5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- tensorTrans6 = mapTo5 . tensorTrans --tensorTrans6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- tensorTrans7 = mapTo6 . tensorTrans --tensorTrans7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- tensorTrans8 = mapTo7 . tensorTrans --tensorTrans8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Swap, i.e. transpose two index blocks in a given -- Tensor. The two index blocks must be disjoint. tensorBlockTrans :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v -- |
-- tensorBlockTrans1 = tensorBlockTrans --tensorBlockTrans1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- tensorBlockTrans2 = mapTo1 tensorBlockTrans --tensorBlockTrans2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- tensorBlockTrans3 = mapTo2 . tensorBlockTrans --tensorBlockTrans3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- tensorBlockTrans4 = mapTo3 . tensorBlockTrans --tensorBlockTrans4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- tensorBlockTrans5 = mapTo4 . tensorBlockTrans --tensorBlockTrans5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- tensorBlockTrans6 = mapTo5 . tensorBlockTrans --tensorBlockTrans6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- tensorBlockTrans7 = mapTo6 . tensorBlockTrans --tensorBlockTrans7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- tensorBlockTrans8 = mapTo7 tensorBlockTrans --tensorBlockTrans8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Completely permute the indices of a given tensor. The new index order -- is specified by a list '[Int]' that must be of length given -- by the number of indices the tensor contains. The list then specifies -- in its i-th element the position on which the i-th index of the tensor -- shall be sorted. -- --
-- resortTens [1,2,0,3] (fromListT' [([0,1,2,3],1)] :: Tensor 4 Ind3 Rational) = (fromListT' [([2,0,1,3],1)] :: Tensor 4 Ind3 Rational) --resortTens :: (KnownNat n, TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v -- |
-- resortTens1 = resortTens --resortTens1 :: (KnownNat n1, TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- resortTens2 = mapTo1 . resortTens --resortTens2 :: (KnownNat n2, TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- resortTens3 = mapTo2 . resortTens --resortTens3 :: (KnownNat n3, TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- resortTens4 = mapTo3 . resortTens --resortTens4 :: (KnownNat n4, TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- resortTens5 = mapTo4 . resortTens --resortTens5 :: (KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- resortTens6 = mapTo5 . resortTens --resortTens6 :: (KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- resortTens7 = mapTo6 . resortTens --resortTens7 :: (KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- resortTens8 = mapTo7 . resortTens --resortTens8 :: (KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Basic symmetrization in a pair of contravariant indices of the 1st -- index type. Usual factors of <math> are not include in this -- function. The resulting function hence no longer satisfies the -- property of a projection. The following functions apply -- symTens to the index types of the deeper leaf levels, -- i.e. covariant indices of the 1st index type, contravariant indices of -- the 2nd index type, etc. symTens :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v -- |
-- symATens1 = symTens --symATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- symATens2 = mapTo1 . symTens --symATens2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- symATens3 = mapTo2 . symTens --symATens3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- symATens4 = mapTo3 . symTens --symATens4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- symATens5 = mapTo4 . symTens --symATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- symATens6 = mapTo5 . symTens --symATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- symATens7 = mapTo6 . symTens --symATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- symATens8 = mapTo7 . symTens --symATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Same functionality as symTens but including the -- <math> in the result and thus defining a projection. The -- following functions apply symTensFac to the index -- types of the deeper leaf levels, i.e. covariant indices of the 1st -- index type, contravariant indices of the 2nd index type, etc. -- --
-- symTensFac inds t = SField (1/2 :: Rational) &. symTens inds t --symTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => (Int, Int) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- symATensFac1 = symTensFac --symATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- symATensFac2 = mapTo1 . symTensFac --symATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- symATensFac3 = mapTo2 . symTensFac --symATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- symATensFac4 = mapTo3 . symTensFac --symATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- symATensFac5 = mapTo4 . symTensFac --symATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- symATensFac6 = mapTo5 . symTensFac --symATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- symATensFac7 = mapTo6 . symTensFac --symATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- symATensFac8 = mapTo7 . symTensFac --symATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) -- | Basic anti symmetrization in a pair of contravariant indices of the -- 1st index type. Usual factors of <math> are not include in this -- function. The resulting function hence no longer satisfies the -- property of a projection. The following functions apply -- aSymTens to the index types of the deeper leaf levels, -- i.e. covariant indices of the 1st index type, contravariant indices of -- the 2nd index type, etc. aSymTens :: (TIndex k, TAdd v) => (Int, Int) -> Tensor n k v -> Tensor n k v -- |
-- aSymATens1 = aSymTens --aSymATens1 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- aSymATens2 = mapTo1 . aSymTens --aSymATens2 :: (TIndex k1, TAdd v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- aSymATens3 = mapTo2 . aSymTens --aSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- aSymATens4 = mapTo3 . aSymTens --aSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- aSymATens5 = mapTo4 . aSymTens --aSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- aSymATens6 = mapTo5 . aSymTens --aSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- aSymATens7 = mapTo6 . aSymTens --aSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- aSymATens8 = mapTo7 . aSymTens --aSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Same functionality as aSymTens but including the -- <math> factors in the result and thus defining a projection. The -- following functions apply aSymTensFac to the index -- types of the deeper leaf levels, i.e. covariant indices of the 1st -- index type, contravariant indices of the 2nd index type, etc. -- --
-- aSymTensFac inds t = SField (1/2 :: Rational) &. aSymTens inds t --aSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => (Int, Int) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- aSymATensFac1 = aSymTensFac --aSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- aSymATensFac2 = mapTo1 . aSymTensFac --aSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- aSymATensFac3 = mapTo2 . aSymTensFac --aSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- aSymATensFac4 = mapTo3 . aSymTensFac --aSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- aSymATensFac5 = mapTo4 . aSymTensFac --aSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- aSymATensFac6 = mapTo5 . aSymTensFac --aSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- aSymATensFac7 = mapTo6 . aSymTensFac --aSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- aSymATensFac8 = mapTo7 . aSymTensFac --aSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => (Int, Int) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) -- | Symmetrization w.r.t. the exchange of two blocks of contravariant -- indices of the 1st index type. The index blocks must be disjoint. -- These function does not include the usual <math> factors and -- thus does not define a projection. The following functions apply -- symBlockTens to the index types of the deeper leaf -- levels, i.e. covariant indices of the 1st index type, contravariant -- indices of the 2nd index type, etc. symBlockTens :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v -- |
-- symBlockATens1 = symBlockTens --symBlockATens1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- symBlockATens2 = mapTo1 . symBlockTens --symBlockATens2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- symBlockATens3 = mapTo2 . symBlockTens --symBlockATens3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- symBlockATens4 = mapTo3 . symBlockTens --symBlockATens4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- symBlockATens5 = mapTo4 . symBlockTens --symBlockATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- symBlockATens6 = mapTo5 . symBlockTens --symBlockATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- symBlockATens7 = mapTo6 . symBlockTens --symBlockATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- symBlockATens8 = mapTo7 . symBlockTens --symBlockATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Same functionality as symBlockTens but including the -- usual factors of <math> in the result and thus defining a -- projection. The following functions apply -- symBlockTensFac to the index types of the deeper leaf -- levels, i.e. covariant indices of the 1st index type, contravariant -- indices of the 2nd index type, etc. -- --
-- symBlockTensFac inds t = SField (1/2 :: Rational) &. symBlockTens inds t --symBlockTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- symBlockATensFac1 = symBlockTensFac --symBlockATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- symBlockATensFac2 = mapTo1 . symBlockTensFac --symBlockATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- symBlockATensFac3 = mapTo2 . symBlockTensFac --symBlockATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- symBlockATensFac4 = mapTo3 . symBlockTensFac --symBlockATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- symBlockATensFac5 = mapTo4 . symBlockTensFac --symBlockATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- symBlockATensFac6 = mapTo5 . symBlockTensFac --symBlockATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- symBlockATensFac7 = mapTo6 . symBlockTensFac --symBlockATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- symBlockATensFac8 = mapTo7 . symBlockTensFac --symBlockATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) -- | Anti symmetrization w.r.t. the exchange of two blocks of contravariant -- indices of the 1st index type. The index blocks must be disjoint. -- These function does not include the usual <math> factors and -- thus does not define a projection. The following functions apply -- aSymBlockTens to the index types of the deeper leaf -- levels, i.e. covariant indices of the 1st index type, contravariant -- indices of the 2nd index type, etc. aSymBlockTens :: (TIndex k, TAdd v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k v -- |
-- aSymBlockATens1 = aSymBlockTens --aSymBlockATens1 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- aSymBlockATens2 = mapTo1 . aSymBlockTens --aSymBlockATens2 :: (TIndex k1, TAdd v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- aSymBlockATens3 = mapTo2 . aSymBlockTens --aSymBlockATens3 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- aSymBlockATens4 = mapTo3 . aSymBlockTens --aSymBlockATens4 :: (TIndex k1, TIndex k2, TAdd v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- aSymBlockATens5 = mapTo4 . aSymBlockTens --aSymBlockATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- aSymBlockATens6 = mapTo5 . aSymBlockTens --aSymBlockATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- aSymBlockATens7 = mapTo6 . aSymBlockTens --aSymBlockATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- aSymBlockATens8 = mapTo7 . aSymBlockTens --aSymBlockATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Same functionality as aSymBlockTens but including the -- usual factors of <math> in the result and thus defining a -- projection. The following functions apply -- aSymBlockTensFac to the index types of the deeper leaf -- levels, i.e. covariant indices of the 1st index type, contravariant -- indices of the 2nd index type, etc. -- --
-- aSymBlockTensFac inds t = SField (1/2 :: Rational) &. aSymBlockTens inds t --aSymBlockTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- aSymBlockATensFac1 = aSymBlockTensFac --aSymBlockATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac2 = mapTo1 . aSymBlockTensFac --aSymBlockATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac3 = mapTo2 . aSymBlockTensFac --aSymBlockATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac4 = mapTo3 . aSymBlockTensFac --aSymBlockATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac5 = mapTo4 . aSymBlockTensFac --aSymBlockATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac6 = mapTo5 . aSymBlockTensFac --aSymBlockATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac7 = mapTo6 . aSymBlockTensFac --aSymBlockATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- aSymBlockATensFac8 = mapTo7 . aSymBlockTensFac --aSymBlockATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => ([Int], [Int]) -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) -- | Cyclic symmetrization of the specified subset of contravariant -- Tensor indices of the first index type. The function -- does not include usual factors of <math> where <math> is -- the number of indices w.r.t. which the symmetrization is performed. -- Further functions that are displayed below apply -- cyclicSymTens to the various deeper -- Tensor levels. cyclicSymTens :: (TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v -- |
-- cyclicSymATens1 = cyclicSymTens --cyclicSymATens1 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- cyclicSymATens2 = mapTo1 . cyclicSymTens --cyclicSymATens2 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- cyclicSymATens3 = mapTo2 . cyclicSymTens --cyclicSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- cyclicSymATens4 = mapTo3 . cyclicSymTens --cyclicSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- cyclicSymATens5 = mapTo4 . cyclicSymTens --cyclicSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- cyclicSymATens6 = mapTo5 . cyclicSymTens --cyclicSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- cyclicSymATens7 = mapTo6 . cyclicSymTens --cyclicSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- cyclicSymATens8 = mapTo7 . cyclicSymTens --cyclicSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | This function provides the same functionality as -- cyclicSymTens with the only difference that it -- includes the <math> factors. The functions that are further -- provided apply cyclicSymTensFac to deeper -- Tensor levels. -- --
-- cyclicSymTensFac inds t = fac &. cyclicSymTens inds t --cyclicSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [Int] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- cyclicSymATensFac1 = cyclicSymTensFac --cyclicSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac2 = mapTo1 . cyclicSymTensFac --cyclicSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac3 = mapTo2 . cyclicSymTensFac --cyclicSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac4 = mapTo3 . cyclicSymTensFac --cyclicSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac5 = mapTo4 . cyclicSymTensFac --cyclicSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac6 = mapTo5 . cyclicSymTensFac --cyclicSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac7 = mapTo6 . cyclicSymTensFac --cyclicSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- cyclicSymATensFac8 = mapTo7 . cyclicSymTensFac --cyclicSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) -- | Cyclic anti symmetrization of the specified subset of contravariant -- Tensor indices of the first index type. The function -- does not include usual factors of <math> where <math> is -- the number of indices w.r.t. which the symmetrization is performed. -- Further functions that are displayed below apply -- cyclicASymTens to the various deeper -- Tensor levels. cyclicASymTens :: (TIndex k, TAdd v) => [Int] -> Tensor n k v -> Tensor n k v -- |
-- cyclicASymATens1 = cyclicASymTens --cyclicASymATens1 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- cyclicASymATens2 = mapTo1 . cyclicASymTens --cyclicASymATens2 :: (TIndex k1, TAdd v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- cyclicASymATens3 = mapTo2 . cyclicASymTens --cyclicASymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- cyclicASymATens4 = mapTo3 . cyclicASymTens --cyclicASymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- cyclicASymATens5 = mapTo4 . cyclicASymTens --cyclicASymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- cyclicASymATens6 = mapTo5 . cyclicASymTens --cyclicASymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- cyclicASymATens7 = mapTo6 . cyclicASymTens --cyclicASymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- cyclicASymATens8 = mapTo7 . cyclicASymTens --cyclicASymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | This function provides the same functionality as -- cyclicASymTens with the only difference that it -- includes the <math> factors. The functions that are further -- provided apply cyclicASymTensFac to deeper -- Tensor levels. -- --
-- cyclicASymTensFac inds t = fac &. cyclicASymTens inds t --cyclicASymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [Int] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- cyclicASymATensFac1 = cyclicASymTensFac --cyclicASymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac2 = mapTo1 . cyclicASymTensFac --cyclicASymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac3 = mapTo2 . cyclicASymTensFac --cyclicASymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac4 = mapTo3 . cyclicASymTensFac --cyclicASymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac5 = mapTo4 . cyclicASymTensFac --cyclicASymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac6 = mapTo5 . cyclicASymTensFac --cyclicASymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac7 = mapTo6 . cyclicASymTensFac --cyclicASymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- cyclicASymATensFac8 = mapTo7 . cyclicASymTensFac --cyclicASymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [Int] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) -- | Cyclic block symmetrization, i.e. symmetrization w.r.t. any -- permutation of the specified index blocks of contravariant indices of -- the first index type. Usual factors of <math> where <math> -- is the number of index blocks w.r.t. which the symmetrization is -- performed are not included. The functions that are displayed further -- below apply cyclicBlockSymTens to the various deeper -- Tensor levels. cyclicBlockSymTens :: (TIndex k, TAdd v) => [[Int]] -> Tensor n k v -> Tensor n k v -- |
-- cyclicBlockSymATens1 = cyclicBlockSymTens --cyclicBlockSymATens1 :: (TIndex k1, TAdd v) => [[Int]] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 v -- |
-- cyclicBlockSymATens2 = mapTo1 . cyclicBlockSymTens --cyclicBlockSymATens2 :: (TIndex k1, TAdd v) => [[Int]] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- cyclicBlockSymATens3 = mapTo2 . cyclicBlockSymTens --cyclicBlockSymATens3 :: (TIndex k1, TIndex k2, TAdd v) => [[Int]] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- cyclicBlockSymATens4 = mapTo3 . cyclicBlockSymTens --cyclicBlockSymATens4 :: (TIndex k1, TIndex k2, TAdd v) => [[Int]] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- cyclicBlockSymATens5 = mapTo4 . cyclicBlockSymTens --cyclicBlockSymATens5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [[Int]] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- cyclicBlockSymATens6 = mapTo5 . cyclicBlockSymTens --cyclicBlockSymATens6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => [[Int]] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- cyclicBlockSymATens7 = mapTo6 . cyclicBlockSymTens --cyclicBlockSymATens7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [[Int]] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- cyclicBlockSymATens8 = mapTo7 . cyclicBlockSymTens --cyclicBlockSymATens8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => [[Int]] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | This function provides the same functionality as -- cyclicBlockSymTens with the only difference that it -- includes the <math> factors. The functions that are further -- provided apply cyclicASymTensFac to deeper -- Tensor levels. -- --
-- cyclicBlockSymTensFac inds t = fac &. cyclicBlockSymTens inds t --cyclicBlockSymTensFac :: (TIndex k, TAdd v, Prod (SField Rational) v) => [[Int]] -> Tensor n k v -> Tensor n k (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac1 = cyclicBlockSymTensFac --cyclicBlockSymATensFac1 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor1 n1 k1 v -> AbsTensor1 n1 k1 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac2 = mapTo1 . cyclicBlockSymTensFac --cyclicBlockSymATensFac2 :: (TIndex k1, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor2 n1 n2 k1 v -> AbsTensor2 n1 n2 k1 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac3 = mapTo2 . cyclicBlockSymTensFac --cyclicBlockSymATensFac3 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac4 = mapTo3 . cyclicBlockSymTensFac --cyclicBlockSymATensFac4 :: (TIndex k1, TIndex k2, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac5 = mapTo4 . cyclicBlockSymTensFac --cyclicBlockSymATensFac5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac6 = mapTo5 . cyclicBlockSymTensFac --cyclicBlockSymATensFac6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac7 = mapTo6 . cyclicBlockSymTensFac --cyclicBlockSymATensFac7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (TProd (SField Rational) v) -- |
-- cyclicBlockSymATensFac8 = mapTo7 . cyclicBlockSymTensFac --cyclicBlockSymATensFac8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v, Prod (SField Rational) v) => [[Int]] -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (TProd (SField Rational) v) data TensList1 k1 v [EmptyTList1] :: TensList1 k1 v [AppendTList1] :: AbsTensor1 n1 k1 v -> TensList1 k1 v -> TensList1 k1 v data TensList2 k1 v [EmptyTList2] :: TensList2 k1 v [AppendTList2] :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v -> TensList2 k1 v data TensList3 k1 k2 v [EmptyTList3] :: TensList3 k1 k2 v [AppendTList3] :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v data TensList4 k1 k2 v [EmptyTList4] :: TensList4 k1 k2 v [AppendTList4] :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v data TensList5 k1 k2 k3 v [EmptyTList5] :: TensList5 k1 k2 k3 v [AppendTList5] :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v data TensList6 k1 k2 k3 v [EmptyTList6] :: TensList6 k1 k2 k3 v [AppendTList6] :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v data TensList7 k1 k2 k3 k4 v [EmptyTList7] :: TensList7 k1 k2 k3 k4 v [AppendTList7] :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v data TensList8 k1 k2 k3 k4 v [EmptyTList8] :: TensList8 k1 k2 k3 k4 v [AppendTList8] :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v singletonTList1 :: AbsTensor1 n1 k1 v -> TensList1 k1 v singletonTList2 :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v singletonTList3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v singletonTList4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v singletonTList5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v singletonTList6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v singletonTList7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v singletonTList8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v (...>) :: AbsTensor1 n1 k1 v -> TensList1 k1 v -> TensList1 k1 v infixr 5 ...> (..&>) :: AbsTensor2 n1 n2 k1 v -> TensList2 k1 v -> TensList2 k1 v infixr 5 ..&> (.&.>) :: AbsTensor3 n1 n2 n3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v infixr 5 .&.> (.&&>) :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v infixr 5 .&&> (&..>) :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v infixr 5 &..> (&.&>) :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v infixr 5 &.&> (&&.>) :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v infixr 5 &&.> (&&&>) :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v infixr 5 &&&> (...+) :: TensList1 k1 v -> TensList1 k1 v -> TensList1 k1 v infixr 5 ...+ (..&+) :: TensList2 k1 v -> TensList2 k1 v -> TensList2 k1 v infixr 5 ..&+ (.&.+) :: TensList3 k1 k2 v -> TensList3 k1 k2 v -> TensList3 k1 k2 v infixr 5 .&.+ (.&&+) :: TensList4 k1 k2 v -> TensList4 k1 k2 v -> TensList4 k1 k2 v infixr 5 .&&+ (&..+) :: TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v -> TensList5 k1 k2 k3 v infixr 5 &..+ (&.&+) :: TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v -> TensList6 k1 k2 k3 v infixr 5 &.&+ (&&.+) :: TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v -> TensList7 k1 k2 k3 k4 v infixr 5 &&.+ (&&&+) :: TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v -> TensList8 k1 k2 k3 k4 v infixr 5 &&&+ -- | The following function converts a Tensor to a typed -- index tuple list, i.e. a list of key value pairs with keys of type -- IndList and values being the corresponding -- Tensor value. toListT :: Tensor n k v -> [(IndList n k, v)] toListT1 :: AbsTensor1 n1 k1 v -> [(IndTuple1 n1 k1, v)] toListT2 :: AbsTensor2 n1 n2 k1 v -> [(IndTuple2 n1 n2 k1, v)] toListT3 :: AbsTensor3 n1 n2 n3 k1 k2 v -> [(IndTuple3 n1 n2 n3 k1 k2, v)] toListT4 :: AbsTensor4 n1 n2 n3 n4 k1 k2 v -> [(IndTuple4 n1 n2 n3 n4 k1 k2, v)] toListT5 :: AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> [(IndTuple5 n1 n2 n3 n4 n5 k1 k2 k3, v)] toListT6 :: AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> [(IndTuple6 n1 n2 n3 n4 n5 n6 k1 k2 k3, v)] toListT7 :: AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> [(IndTuple7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4, v)] toListT8 :: AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> [(IndTuple8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4, v)] -- | This function converts a given Tensor to a non-typed -- index tuple list. toListT' :: (TIndex k, TAdd v) => Tensor n k v -> [([Int], v)] toListT1' :: (TIndex k1, TAdd v) => AbsTensor1 n1 k1 v -> [([Int], v)] toListT2' :: (TIndex k1, TAdd v) => AbsTensor2 n1 n2 k1 v -> [(([Int], [Int]), v)] toListT3' :: (TIndex k1, TIndex k2, TAdd v) => AbsTensor3 n1 n2 n3 k1 k2 v -> [(([Int], [Int], [Int]), v)] toListT4' :: (TIndex k1, TIndex k2, TAdd v) => AbsTensor4 n1 n2 n3 n4 k1 k2 v -> [(([Int], [Int], [Int], [Int]), v)] toListT5' :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> [(([Int], [Int], [Int], [Int], [Int]), v)] toListT6' :: (TIndex k1, TIndex k2, TIndex k3, TAdd v) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> [(([Int], [Int], [Int], [Int], [Int], [Int]), v)] toListT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> [(([Int], [Int], [Int], [Int], [Int], [Int], [Int]), v)] toListT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> [(([Int], [Int], [Int], [Int], [Int], [Int], [Int], [Int]), v)] toMatListT1' :: (TIndex k1, TAdd a) => AbsTensor1 n1 k1 (AnsVar a) -> [((Int, Int), a)] toMatListT2' :: (TIndex k1, TAdd a) => AbsTensor2 n1 n2 k1 (AnsVar a) -> [((Int, Int), a)] toMatListT3' :: (TIndex k1, TIndex k2, TAdd a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar a) -> [((Int, Int), a)] toMatListT4' :: (TIndex k1, TIndex k2, TAdd a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar a) -> [((Int, Int), a)] toMatListT5' :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] toMatListT6' :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] toMatListT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] toMatListT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] toMatrixT1' :: (TIndex k1, Real a) => AbsTensor1 n1 k1 (AnsVar (SField a)) -> Matrix Double toMatrixT2' :: (TIndex k1, Real a) => AbsTensor2 n1 n2 k1 (AnsVar (SField a)) -> Matrix Double toMatrixT3' :: (TIndex k1, TIndex k2, Real a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar (SField a)) -> Matrix Double toMatrixT4' :: (TIndex k1, TIndex k2, Real a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar (SField a)) -> Matrix Double toMatrixT5' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double toMatrixT6' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double toMatrixT7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double toMatrixT8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double toMatListT1 :: (TIndex k1, TAdd a) => TensList1 k1 (AnsVar a) -> [((Int, Int), a)] toMatListT2 :: (TIndex k1, TAdd a) => TensList2 k1 (AnsVar a) -> [((Int, Int), a)] toMatListT3 :: (TIndex k1, TIndex k2, TAdd a) => TensList3 k1 k2 (AnsVar a) -> [((Int, Int), a)] toMatListT4 :: (TIndex k1, TIndex k2, TAdd a) => TensList4 k1 k2 (AnsVar a) -> [((Int, Int), a)] toMatListT5 :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => TensList5 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] toMatListT6 :: (TIndex k1, TIndex k2, TIndex k3, TAdd a) => TensList6 k1 k2 k3 (AnsVar a) -> [((Int, Int), a)] toMatListT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => TensList7 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] toMatListT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd a) => TensList8 k1 k2 k3 k4 (AnsVar a) -> [((Int, Int), a)] toMatrixT1 :: (TIndex k1, Real a) => TensList1 k1 (AnsVar (SField a)) -> Matrix Double toMatrixT2 :: (TIndex k1, Real a) => TensList2 k1 (AnsVar (SField a)) -> Matrix Double toMatrixT3 :: (TIndex k1, TIndex k2, Real a) => TensList3 k1 k2 (AnsVar (SField a)) -> Matrix Double toMatrixT4 :: (TIndex k1, TIndex k2, Real a) => TensList4 k1 k2 (AnsVar (SField a)) -> Matrix Double toMatrixT5 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList5 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double toMatrixT6 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList6 k1 k2 k3 (AnsVar (SField a)) -> Matrix Double toMatrixT7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList7 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double toMatrixT8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList8 k1 k2 k3 k4 (AnsVar (SField a)) -> Matrix Double -- | Applying these functions on a given tensor removes all zero values -- from it. Even if zero values are not included in a given tensor when -- it is constructed they might occur during computations. If so they are -- not automatically removed from the tensor. removeZeros :: TAdd v => Tensor n k v -> Tensor n k v -- |
-- removeZeros1 = removeZeros --removeZeros1 :: (TAdd v, TIndex k) => AbsTensor1 n1 k v -> AbsTensor1 n1 k v -- |
-- removeZeros2 = removeZeros . mapTo1 removeZeros --removeZeros2 :: (TAdd v, TIndex k) => AbsTensor2 n1 n2 k v -> AbsTensor2 n1 n2 k v -- |
-- removeZeros3 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros --removeZeros3 :: (TAdd v, TIndex k1, TIndex k2) => AbsTensor3 n1 n2 n3 k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- removeZeros4 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros --removeZeros4 :: (TAdd v, TIndex k1, TIndex k2) => AbsTensor4 n1 n2 n3 n4 k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- removeZeros5 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros --removeZeros5 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- removeZeros6 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros . mapTo5 removeZeros --removeZeros6 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- removeZeros7 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros . mapTo5 removeZeros . mapTo6 removeZeros --removeZeros7 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3, TIndex k4) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- removeZeros8 = removeZeros . mapTo1 removeZeros . mapTo2 removeZeros . mapTo3 removeZeros . mapTo4 removeZeros . mapTo5 removeZeros . mapTo6 removeZeros . mapTo7 removeZeros --removeZeros8 :: (TAdd v, TIndex k1, TIndex k2, TIndex k3, TIndex k4) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v -- | Evaluate a Tensor for a specific value of its first -- contravariant index type returning the corresponding sub -- Tensor. The additional functions specified below apply -- the evaluation function evalTens to the deeper -- Tensor levels. evalTens :: (KnownNat n, 1 <= n, TIndex k, TAdd v) => Int -> k -> Tensor n k v -> Tensor (n - 1) k v -- |
-- evalTens1 = evalTens --evalTens1 :: (KnownNat n1, TIndex k1, TAdd v) => Int -> k1 -> AbsTensor1 (n1 + 1) k1 v -> AbsTensor1 n1 k1 v -- |
-- evalTens2 ind indVal = mapTo1 (evalTens ind indVal) --evalTens2 :: (KnownNat n2, TIndex k1, TAdd v) => Int -> k1 -> AbsTensor2 n1 (n2 + 1) k1 v -> AbsTensor2 n1 n2 k1 v -- |
-- evalTens3 ind indVal = mapTo2 (evalTens ind indVal) --evalTens3 :: (KnownNat n3, TIndex k1, TIndex k2, TAdd v) => Int -> k2 -> AbsTensor3 n1 n2 (n3 + 1) k1 k2 v -> AbsTensor3 n1 n2 n3 k1 k2 v -- |
-- evalTens4 ind indVal = mapTo3 (evalTens ind indVal) --evalTens4 :: (KnownNat n4, TIndex k1, TIndex k2, TAdd v) => Int -> k2 -> AbsTensor4 n1 n2 n3 (n4 + 1) k1 k2 v -> AbsTensor4 n1 n2 n3 n4 k1 k2 v -- |
-- evalTens5 ind indVal = mapTo4 (evalTens ind indVal) --evalTens5 :: (KnownNat n5, TIndex k1, TIndex k2, TIndex k3, TAdd v) => Int -> k3 -> AbsTensor5 n1 n2 n3 n4 (n5 + 1) k1 k2 k3 v -> AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 v -- |
-- evalTens6 ind indVal = mapTo5 (evalTens ind indVal) --evalTens6 :: (KnownNat n6, TIndex k1, TIndex k2, TIndex k3, TAdd v) => Int -> k3 -> AbsTensor6 n1 n2 n3 n4 n5 (n6 + 1) k1 k2 k3 v -> AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 v -- |
-- evalTens7 ind indVal = mapTo6 (evalTens ind indVal) --evalTens7 :: (KnownNat n7, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => Int -> k4 -> AbsTensor7 n1 n2 n3 n4 n5 n6 (n7 + 1) k1 k2 k3 k4 v -> AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 v -- |
-- evalTens8 ind indVal = mapTo7 (evalTens ind indVal) --evalTens8 :: (KnownNat n8, TIndex k1, TIndex k2, TIndex k3, TIndex k4, TAdd v) => Int -> k4 -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 (n8 + 1) k1 k2 k3 k4 v -> AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 v tensorRank1' :: (TIndex k1, Real a, Real a) => AbsTensor1 n1 k1 (AnsVar (SField a)) -> Int tensorRank2' :: (TIndex k1, Real a) => AbsTensor2 n1 n2 k1 (AnsVar (SField a)) -> Int tensorRank3' :: (TIndex k1, TIndex k2, Real a) => AbsTensor3 n1 n2 n3 k1 k2 (AnsVar (SField a)) -> Int tensorRank4' :: (TIndex k1, TIndex k2, Real a) => AbsTensor4 n1 n2 n3 n4 k1 k2 (AnsVar (SField a)) -> Int tensorRank5' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor5 n1 n2 n3 n4 n5 k1 k2 k3 (AnsVar (SField a)) -> Int tensorRank6' :: (TIndex k1, TIndex k2, TIndex k3, Real a) => AbsTensor6 n1 n2 n3 n4 n5 n6 k1 k2 k3 (AnsVar (SField a)) -> Int tensorRank7' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor7 n1 n2 n3 n4 n5 n6 n7 k1 k2 k3 k4 (AnsVar (SField a)) -> Int tensorRank8' :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => AbsTensor8 n1 n2 n3 n4 n5 n6 n7 n8 k1 k2 k3 k4 (AnsVar (SField a)) -> Int tensorRank1 :: (TIndex k1, Real a) => TensList1 k1 (AnsVar (SField a)) -> Int tensorRank2 :: (TIndex k1, Real a) => TensList2 k1 (AnsVar (SField a)) -> Int tensorRank3 :: (TIndex k1, TIndex k2, Real a) => TensList3 k1 k2 (AnsVar (SField a)) -> Int tensorRank4 :: (TIndex k1, TIndex k2, Real a) => TensList4 k1 k2 (AnsVar (SField a)) -> Int tensorRank5 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList5 k1 k2 k3 (AnsVar (SField a)) -> Int tensorRank6 :: (TIndex k1, TIndex k2, TIndex k3, Real a) => TensList6 k1 k2 k3 (AnsVar (SField a)) -> Int tensorRank7 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList7 k1 k2 k3 k4 (AnsVar (SField a)) -> Int tensorRank8 :: (TIndex k1, TIndex k2, TIndex k3, TIndex k4, Real a) => TensList8 k1 k2 k3 k4 (AnsVar (SField a)) -> Int -- | Utility function to serialize and compress a Tensor -- into a ByteString, making use of the -- Serialize instance. encodeTensor :: (KnownNat n, Ord k, Serialize k, Serialize v) => Tensor n k v -> ByteString -- | Utility function to decompress and de-serialize a -- ByteString into a Tensor, making use -- of the Serialize instance. decodeTensor :: (KnownNat n, Ord k, Serialize k, Serialize v) => ByteString -> Either String (Tensor n k v) -- | The function computes partial derivatives of spacetime tensors of type -- STTens with CFun values. partial :: Num a => STTens n1 n2 (CFun [Forward a] (Forward a)) -> STTens n1 (n2 + 1) (CFun [a] a) -- | The function computes partial derivatives of spacetime tensors of type -- STTens with SSymbolic values. -- --
-- g_ab_p = partialSymbolic ["t", "x", "y", "z"] g_ab --partialSymbolic :: [String] -> STTens n1 n2 SSymbolic -> STTens n1 (n2 + 1) SSymbolic instance (Data.Serialize.Serialize v, Data.Serialize.Serialize k) => Data.Serialize.Serialize (Math.Tensor.TensorRep k v) instance GHC.Generics.Generic (Math.Tensor.TensorRep k v) instance (GHC.Show.Show v, GHC.Show.Show k) => GHC.Show.Show (Math.Tensor.TensorRep k v) instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Math.Tensor.AnsVar a) instance GHC.Generics.Generic (Math.Tensor.AnsVar a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Math.Tensor.AnsVar a) instance GHC.Show.Show a => GHC.Show.Show (Math.Tensor.AnsVar a) instance Data.Serialize.Serialize Math.Tensor.SSymbolic instance GHC.Generics.Generic Math.Tensor.SSymbolic instance GHC.Classes.Ord Math.Tensor.SSymbolic instance GHC.Classes.Eq Math.Tensor.SSymbolic instance GHC.Show.Show Math.Tensor.SSymbolic instance Data.Serialize.Serialize a => Data.Serialize.Serialize (Math.Tensor.SField a) instance GHC.Generics.Generic (Math.Tensor.SField a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Math.Tensor.SField a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Math.Tensor.SField a) instance GHC.Show.Show a => GHC.Show.Show (Math.Tensor.SField a) instance Data.Serialize.Serialize Math.Tensor.Ind20 instance Control.DeepSeq.NFData Math.Tensor.Ind20 instance GHC.Generics.Generic Math.Tensor.Ind20 instance GHC.Read.Read Math.Tensor.Ind20 instance GHC.Show.Show Math.Tensor.Ind20 instance GHC.Classes.Eq Math.Tensor.Ind20 instance GHC.Classes.Ord Math.Tensor.Ind20 instance Data.Serialize.Serialize Math.Tensor.Ind9 instance Control.DeepSeq.NFData Math.Tensor.Ind9 instance GHC.Generics.Generic Math.Tensor.Ind9 instance GHC.Read.Read Math.Tensor.Ind9 instance GHC.Show.Show Math.Tensor.Ind9 instance GHC.Classes.Eq Math.Tensor.Ind9 instance GHC.Classes.Ord Math.Tensor.Ind9 instance Data.Serialize.Serialize Math.Tensor.Ind3 instance Control.DeepSeq.NFData Math.Tensor.Ind3 instance GHC.Generics.Generic Math.Tensor.Ind3 instance GHC.Read.Read Math.Tensor.Ind3 instance GHC.Show.Show Math.Tensor.Ind3 instance GHC.Classes.Eq Math.Tensor.Ind3 instance GHC.Classes.Ord Math.Tensor.Ind3 instance GHC.Show.Show (Math.Tensor.IsZero n) instance (GHC.TypeNats.KnownNat n, GHC.Generics.Generic a, Data.Serialize.Serialize a) => Data.Serialize.Serialize (Math.Tensor.IndList n a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Math.Tensor.IndList n a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Math.Tensor.IndList n a) instance GHC.Show.Show a => GHC.Show.Show (Math.Tensor.IndList n a) instance (GHC.TypeNats.KnownNat n, GHC.Classes.Ord k, Data.Serialize.Serialize k, Data.Serialize.Serialize v) => Data.Serialize.Serialize (Math.Tensor.Tensor n k v) instance (GHC.Show.Show a, GHC.Show.Show k) => GHC.Show.Show (Math.Tensor.Tensor n k a) instance (GHC.Classes.Eq a, GHC.Classes.Eq k) => GHC.Classes.Eq (Math.Tensor.Tensor n k a) instance GHC.TypeNats.KnownNat n => GHC.Generics.Generic (Math.Tensor.Tensor n k v) instance (Math.Tensor.TIndex k, Math.Tensor.TAdd v) => Math.Tensor.TAdd (Math.Tensor.Tensor n k v) instance (Math.Tensor.TIndex k, Math.Tensor.Prod (Math.Tensor.SField s) v) => Math.Tensor.Prod (Math.Tensor.SField s) (Math.Tensor.Tensor n k v) instance (Math.Tensor.TIndex k, Math.Tensor.Prod (Math.Tensor.AnsVar s) v) => Math.Tensor.Prod (Math.Tensor.AnsVar s) (Math.Tensor.Tensor n k v) instance (Math.Tensor.TIndex k, Math.Tensor.Prod Math.Tensor.SSymbolic v) => Math.Tensor.Prod Math.Tensor.SSymbolic (Math.Tensor.Tensor n k v) instance (Math.Tensor.TIndex k, Math.Tensor.Prod v v') => Math.Tensor.Prod (Math.Tensor.Tensor n k v) (Math.Tensor.Tensor n' k v') instance (Control.DeepSeq.NFData k, Control.DeepSeq.NFData v) => Control.DeepSeq.NFData (Math.Tensor.Tensor n k v) instance GHC.Base.Functor (Math.Tensor.Tensor n k) instance GHC.Base.Functor (Math.Tensor.CFun a) instance GHC.Base.Applicative (Math.Tensor.CFun a) instance GHC.Num.Num b => GHC.Num.Num (Math.Tensor.CFun a b) instance GHC.Num.Num b => Math.Tensor.TAdd (Math.Tensor.CFun a b) instance GHC.Num.Num b => Math.Tensor.Prod (Math.Tensor.CFun a b) (Math.Tensor.CFun a b) instance GHC.Num.Num b => Math.Tensor.Prod (Math.Tensor.SField b) (Math.Tensor.CFun a b) instance Math.Tensor.TAdd a => Math.Tensor.TAdd (Math.Tensor.AnsVar a) instance Math.Tensor.Prod (Math.Tensor.SField v) (Math.Tensor.SField v') => Math.Tensor.Prod (Math.Tensor.SField v) (Math.Tensor.AnsVar (Math.Tensor.SField v')) instance Math.Tensor.Prod (Math.Tensor.SField v') (Math.Tensor.SField v) => Math.Tensor.Prod (Math.Tensor.AnsVar (Math.Tensor.SField v)) (Math.Tensor.SField v') instance GHC.Num.Num a => Math.Tensor.Prod (Math.Tensor.SField a) (Math.Tensor.SField a) instance Math.Tensor.Prod Math.Tensor.SSymbolic Math.Tensor.SSymbolic instance GHC.Show.Show a => Math.Tensor.Prod (Math.Tensor.SField a) Math.Tensor.SSymbolic instance GHC.Show.Show a => Math.Tensor.Prod Math.Tensor.SSymbolic (Math.Tensor.SField a) instance Math.Tensor.Epsilon GHC.Types.Double instance Math.Tensor.Epsilon GHC.Types.Float instance Math.Tensor.Epsilon GHC.Real.Rational instance Math.Tensor.Epsilon GHC.Types.Int instance Math.Tensor.Epsilon GHC.Integer.Type.Integer instance GHC.Num.Num Math.Tensor.SSymbolic instance Math.Tensor.TAdd Math.Tensor.SSymbolic instance GHC.Base.Functor Math.Tensor.SField instance GHC.Base.Applicative Math.Tensor.SField instance GHC.Num.Num a => GHC.Num.Num (Math.Tensor.SField a) instance (GHC.Num.Num a, GHC.Classes.Eq a) => Math.Tensor.TAdd (Math.Tensor.SField a) instance Math.Tensor.TIndex Math.Tensor.Ind20 instance GHC.Enum.Enum Math.Tensor.Ind20 instance Math.Tensor.TIndex Math.Tensor.Ind9 instance GHC.Enum.Enum Math.Tensor.Ind9 instance Math.Tensor.TIndex Math.Tensor.Ind3 instance GHC.Enum.Enum Math.Tensor.Ind3 instance (GHC.TypeNats.KnownNat n, GHC.Generics.Generic a) => GHC.Generics.Generic (Math.Tensor.IndList n a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Math.Tensor.IndList n a) instance GHC.Base.Functor (Math.Tensor.IndList n) instance Data.Foldable.Foldable (Math.Tensor.IndList n) -- | This module provides a variety of Tensors that are -- currently predefined in the sparse-tensor package. -- -- Amongst many standard tensor from differential geometry and classical -- field theories such as Kronecker deltas <math> in multiple -- different dimensions, the Levi-Civita symbol <math> and the -- Minkowski metric <math> and its inverse <math>, most -- included tensors were implemented during the initial use of the -- sparse-tensor package, the perturbative construction of generalized -- gravity theories. Thus many of the included tensors stem from this -- area of research. -- -- Additionally to providing basic predefined Tensors for -- further computations this module also nicely illustrates how the -- construction of Tensors is achieved. -- -- The majority of the tensors in this module are defined as type -- ATens which describes a tensor that takes the three -- different index types Ind20, Ind9, -- Ind3 each one appearing in contravariant and covariant -- position. If in the following expression that are formed from such -- tensors are additionally explained via their algebraic expression -- using appropriate symbols for the individual tensors we label indices -- of type Ind20 by <math>, indices of type -- <math> and spacetime indices of type ind3 are -- labeled by <math>. Hence a general such tensor is displayed as -- <math>. Such a tensor then has the type ATens m n r s -- p q. module Math.Tensor.Examples.Gravity -- | Standard spacetime Kronecker delta <math> as STTens 1 -- 1 (SField Rational). -- --
-- delta3 = fromListT2 $ zip [(singletonInd (Ind3 i),singletonInd (Ind3 i)) | i <- [0..3]] (repeat $ SField 1) --delta3 :: STTens 1 1 (SField Rational) -- | Standard Kronecker delta for the Ind9 index type -- <math> as ATens 0 0 1 1 0 0 (SField -- Rational). -- --
-- delta9 = fromListT6 $ zip [(Empty, Empty, singletonInd (Ind9 i),singletonInd (Ind9 i), Empty, Empty) | i <- [0..9]] (repeat $ SField 1) --delta9 :: ATens 0 0 1 1 0 0 (SField Rational) -- | Standard Kronecker delta for the Ind20 index type -- <math> as ATens 1 1 0 0 0 0 (SField -- Rational). -- --
-- delta20 = fromListT6 $ zip [(singletonInd (Ind20 i),singletonInd (Ind20 i), Empty, Empty, Empty, Empty) | i <- [0..20]] (repeat $ SField 1) --delta20 :: ATens 1 1 0 0 0 0 (SField Rational) -- | Spacetime Kronecker delta as ATens. delta3A :: ATens 0 0 0 0 1 1 (SField Rational) -- | Spacetime Minkowski metric <math> as ATens 0 0 0 0 0 -- 2 (SField Rational). The Minkowski metric could -- also be defined as STTens 0 2 (SField -- Rational) in similar fashion. -- --
-- eta = fromListT2 map (\(x,y,z) -> ((Empty,Append (Ind3 x) $ Append (Ind3 y) Empty),SField z)) [(0,0,-1),(1,1,1),(2,2,1),(3,3,1)] --eta :: STTens 0 2 (SField Rational) -- | Inverse spacetime Minkowski metric <math> as ATens 0 -- 0 0 0 2 0 (SField Rational). The inverse Minkowski -- metric could also be defined as STTens 2 0 (SField -- Rational) in similar fashion. -- --
-- invEta = fromListT2 $ map (\(x,y,z) -> ((Append (Ind3 x) $ Append (Ind3 y) Empty,Empty),SField z)) [(0,0,-1),(1,1,1),(2,2,1),(3,3,1)] --invEta :: STTens 2 0 (SField Rational) -- | Minkowski metric lifted to ATens. etaA :: ATens 0 0 0 0 0 2 (SField Rational) -- | Inverse Minkowski metric lifted to ATens. invEtaA :: ATens 0 0 0 0 2 0 (SField Rational) -- | The tensor <math> provides an equivalent version of the -- Minkowski metric that uses an index of type Ind9 to -- label the 10 different values of the symmetric spacetime -- index pair. etaAbs :: ATens 0 0 0 1 0 0 (SField Rational) -- | Covariant spacetime Levi-Civita symbol <math> as type -- ATTens 0 4 (SField Rational). epsilon :: STTens 0 4 (SField Rational) -- | Contravariant spacetime Levi-Civita symbol <math> as type -- STTens4 0 (SField Rational). T epsilonInv :: STTens 4 0 (SField Rational) -- | Covariant Levi-Civita symbol lifted to ATens. epsilonA :: ATens 0 0 0 0 0 4 (SField Rational) -- | Contravariant Levi-Civita symbol lifted to ATens. epsilonInvA :: ATens 0 0 0 0 4 0 (SField Rational) lorentzJ1 :: ATens 0 0 0 0 1 1 (SField Rational) lorentzJ2 :: ATens 0 0 0 0 1 1 (SField Rational) lorentzJ3 :: ATens 0 0 0 0 1 1 (SField Rational) lorentzK1 :: ATens 0 0 0 0 1 1 (SField Rational) lorentzK2 :: ATens 0 0 0 0 1 1 (SField Rational) lorentzK3 :: ATens 0 0 0 0 1 1 (SField Rational) -- | Flat area metric tensor. Can be obtained via the -- interJArea intertwiner <math> as: <math>. flatArea :: ATens 0 1 0 0 0 0 (SField Rational) -- | The tensor <math> maps between covariant Ind9 -- indices and symmetric pairs of covariant Ind3 indices. interI2 :: ATens 0 0 1 0 0 2 (SField Rational) -- | The tensor <math> maps between covariant Ind9 -- indices and pairs of covariant Ind3 indices. interJ2 :: ATens 0 0 0 1 2 0 (SField Rational) -- | The tensor <math> maps between covariant Ind20 -- indices and blocks of 4 of covariant Ind3 -- indices. interIArea :: ATens 1 0 0 0 0 4 (SField Rational) -- | The tensor <math> maps between contravariant -- Ind20 indices and blocks of 4 of -- contravariant Ind3 indices. interJArea :: ATens 0 1 0 0 4 0 (SField Rational) -- | Can be obtained as: <math> -- --
-- interArea = SField (-4 :: Rational) &. contrATens3 (1,1) (contrATens3 (2,2) $ contrATens3 (3,3) $ interIArea &* interJArea --interArea :: ATens 1 1 0 0 1 1 (SField Rational) -- | Can be obtained as : <math> -- --
-- interMetric = SField (-2 :: Rational) &. contrATens3 (0,0) (interI2 &* interJ2) --interMetric :: ATens 0 0 1 1 1 1 (SField Rational) -- | Is given by: <math> -- --
-- flatInterMetric = contrATens2 (0,1) $ interMetric &* etaAbs --flatInterMetric :: ATens 0 0 0 1 1 1 (SField Rational) -- | Is given by: <math> -- --
-- flatInter = contrATens1 (0,1) $ interArea &* flatArea --flatInter :: ATens 0 1 0 0 1 1 (SField Rational) -- | Is given by: <math> interEqn2 :: ATens 1 1 0 0 2 2 (SField Rational) -- | Is given by: <math> interEqn3 :: ATens 1 1 1 1 1 1 (SField Rational) -- | Is given by: <math> interEqn4 :: ATens 1 1 0 1 3 1 (SField Rational) -- | Is given by: <math> interEqn5 :: ATens 1 1 0 1 3 1 (SField Rational) -- | Is given by: <math> interEqn2Metric :: ATens 0 0 1 1 2 2 (SField Rational) -- | Is given by: <math> interEqn3Metric :: ATens 0 0 2 2 1 1 (SField Rational) -- | Is given by: <math> interEqn4Metric :: ATens 0 0 1 2 3 1 (SField Rational) -- | Is given by: <math> interEqn5Metric :: ATens 0 0 1 2 3 1 (SField Rational) randArea :: IO (ATens 0 1 0 0 0 0 (SField Rational)) randFlatArea :: IO (ATens 0 1 0 0 0 0 (SField Rational)) randAreaDerivative1 :: IO (ATens 0 1 0 0 0 1 (SField Rational)) randAreaDerivative2 :: IO (ATens 0 1 0 1 0 0 (SField Rational)) randMetric :: IO (ATens 0 0 0 1 0 0 (SField Rational)) randAxon :: IO (ATens 0 1 0 0 0 0 (SField Rational)) -- |
-- tensorRank6' generic4Ansatz = 21 --generic4Ansatz :: ATens 1 0 0 0 0 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic5Ansatz = 21*4 --generic5Ansatz :: ATens 1 0 0 0 1 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic5Ansatz = 21*10 --generic6Ansatz :: ATens 1 0 1 0 0 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic8Ansatz = 21*22/2 --generic8Ansatz :: ATens 2 0 0 0 0 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic21Ansatz = 21*21*4 --generic9Ansatz :: ATens 2 0 0 0 1 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic5Ansatz = 84*85/2 --generic10_1Ansatz :: ATens 2 0 0 0 2 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic5Ansatz = 21*21*10 --generic10_2Ansatz :: ATens 2 0 1 0 0 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic5Ansatz = 21*21*10*4 --generic11Ansatz :: ATens 2 0 1 0 1 0 (AnsVar (SField Rational)) -- |
-- tensorRank6' generic5Ansatz = 210*211/2 --generic12_1Ansatz :: ATens 2 0 2 0 0 0 (AnsVar (SField Rational)) -- | This module collects several tensorial equations. These equations -- arise in the research topic of perturbative constructive gravity and -- are used there to encode perturbative diffeomorphism invariance. -- -- Providing further usage examples of the sparse-tensor package the -- equations included here nicely illustrate the syntax that is used when -- entering tensors. They also show how the sparse-tensor package can be -- used to manipulate not only tenors but linear tensorial equations. The -- sparse-tensor package can for instance be used to extract the -- information that is contained in such a tensorial equation in matrix -- form. This then obviously allows one to computate the rank of the -- linear tensorial equation or even explicitly solve it. -- -- All equations that are contained in this module are functions that -- take possibly several tensors of type ATens -- AnsVarR as input. These tensors then represent the -- individual unknown tensors in the equation. The output that is -- computed by the functions is also of this type. -- -- When illustrating how the individual such equations that are included -- in this module are defined we will use again the same convention as in -- the Math.Tensor.Examples.Gravity module, i.e. we label indices -- of type Ind20 by <math>, indices of type -- <math> and spacetime indices of type ind3 are -- labeled by <math>. Hence a general such tensor is displayed as -- <math>. Such a tensor then has the type ATens m n r s -- p q. module Math.Tensor.Examples.Gravity.DiffeoSymEqns ansatzA :: ATens 1 0 0 0 0 0 AnsVarR -> ATens 1 0 0 0 2 0 AnsVarR ansatzAI :: ATens 1 0 1 0 0 0 AnsVarR -> ATens 1 0 1 0 2 0 AnsVarR ansatzAB :: ATens 2 0 0 0 0 0 AnsVarR -> ATens 2 0 0 0 2 0 AnsVarR ansatzAaBb :: ATens 2 0 0 0 2 0 AnsVarR -> ATens 2 0 0 0 4 0 AnsVarR ansatzABI :: ATens 2 0 1 0 0 0 AnsVarR -> ATens 2 0 1 0 2 0 AnsVarR ansatzAIBJ :: ATens 2 0 2 0 0 0 AnsVarR -> ATens 2 0 2 0 2 0 AnsVarR ansatzABC :: ATens 3 0 0 0 0 0 AnsVarR -> ATens 3 0 0 0 2 0 AnsVarR ansatzABCI :: ATens 3 0 1 0 0 0 AnsVarR -> ATens 3 0 1 0 2 0 AnsVarR ansatzABbCc :: ATens 3 0 0 0 2 0 AnsVarR -> ATens 3 0 0 0 4 0 AnsVarR ansatzAaBbCI :: ATens 3 0 1 0 2 0 AnsVarR -> ATens 3 0 1 0 4 0 AnsVarR ansatzABICJ :: ATens 3 0 2 0 0 0 AnsVarR -> ATens 3 0 2 0 2 0 AnsVarR ansatzAIBJCK :: ATens 3 0 3 0 0 0 AnsVarR -> ATens 3 0 3 0 2 0 AnsVarR ansatzABCD :: ATens 4 0 0 0 0 0 AnsVarR -> ATens 4 0 0 0 2 0 AnsVarR ansatzABCDJ :: ATens 4 0 1 0 0 0 AnsVarR -> ATens 4 0 1 0 2 0 AnsVarR ansatzABCcDd :: ATens 4 0 0 0 2 0 AnsVarR -> ATens 4 0 0 0 4 0 AnsVarR -- | The equation is given by: <math>. eqn1 :: ATens 0 0 0 0 0 0 AnsVarR -> ATens 1 0 0 0 0 0 AnsVarR -> ATens 0 0 0 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn3 :: ATens 1 0 1 0 0 0 AnsVarR -> ATens 0 0 0 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn1A :: ATens 1 0 0 0 0 0 AnsVarR -> ATens 2 0 0 0 0 0 AnsVarR -> ATens 1 0 0 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn1AI :: ATens 1 0 1 0 0 0 AnsVarR -> ATens 2 0 1 0 0 0 AnsVarR -> ATens 1 0 1 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn2Aa :: ATens 1 0 1 0 0 0 AnsVarR -> ATens 2 0 0 0 2 0 AnsVarR -> ATens 1 0 0 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn3A :: ATens 1 0 1 0 0 0 AnsVarR -> ATens 2 0 1 0 0 0 AnsVarR -> ATens 1 0 0 0 3 1 AnsVarR -- | The equation is given by: <math> eqn1AB :: ATens 2 0 0 0 0 0 AnsVarR -> ATens 3 0 0 0 0 0 AnsVarR -> ATens 2 0 0 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn1ABI :: ATens 2 0 1 0 0 0 AnsVarR -> ATens 3 0 1 0 0 0 AnsVarR -> ATens 2 0 1 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn1AaBb :: ATens 2 0 0 0 2 0 AnsVarR -> ATens 3 0 0 0 2 0 AnsVarR -> ATens 2 0 0 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn2ABb :: ATens 2 0 0 0 2 0 AnsVarR -> ATens 2 0 1 0 0 0 AnsVarR -> ATens 3 0 0 0 2 0 AnsVarR -> ATens 2 0 0 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn3AB :: ATens 2 0 1 0 0 0 AnsVarR -> ATens 3 0 1 0 0 0 AnsVarR -> ATens 2 0 0 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn1Met :: ATens 0 0 0 0 0 0 AnsVarR -> ATens 0 0 1 0 0 0 AnsVarR -> ATens 0 0 0 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn3Met :: ATens 0 0 2 0 0 0 AnsVarR -> ATens 0 0 0 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn2AaMet :: ATens 0 0 2 0 0 0 AnsVarR -> ATens 0 0 2 0 2 0 AnsVarR -> ATens 0 0 1 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn3AMet :: ATens 0 0 2 0 0 0 AnsVarR -> ATens 0 0 3 0 0 0 AnsVarR -> ATens 0 0 1 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn1AMet :: ATens 0 0 1 0 0 0 AnsVarR -> ATens 0 0 2 0 0 0 AnsVarR -> ATens 0 0 1 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn1AIMet :: ATens 0 0 2 0 0 0 AnsVarR -> ATens 0 0 3 0 0 0 AnsVarR -> ATens 0 0 2 0 1 1 AnsVarR -- | The equation is given by: <math> eqn1ABMet :: ATens 0 0 2 0 0 0 AnsVarR -> ATens 0 0 3 0 0 0 AnsVarR -> ATens 0 0 2 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn1ABIMet :: ATens 0 0 3 0 0 0 AnsVarR -> ATens 0 0 4 0 0 0 AnsVarR -> ATens 0 0 3 0 1 1 AnsVarR -- | The equation is given by: <math>. eqn1AaBbMet :: ATens 0 0 2 0 2 0 AnsVarR -> ATens 0 0 3 0 2 0 AnsVarR -> ATens 0 0 2 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn2ABbMet :: ATens 0 0 2 0 2 0 AnsVarR -> ATens 0 0 3 0 0 0 AnsVarR -> ATens 0 0 3 0 2 0 AnsVarR -> ATens 0 0 2 0 3 1 AnsVarR -- | The equation is given by: <math>. eqn3ABMet :: ATens 0 0 3 0 0 0 AnsVarR -> ATens 0 0 4 0 0 0 AnsVarR -> ATens 0 0 2 0 3 1 AnsVarR -- | This module provides the metric, inverse metric, Christoffel symbol, -- Ricci tensor and Einstein tensor for the Schwarzschild spacetime as an -- example for tensor sections and partial derivatives thereof. module Math.Tensor.Examples.Gravity.Schwarzschild -- | Schwarzschild metric <math>. schwarzschild :: Floating a => a -> STTens 0 2 (CFun [a] a) -- | Inverse Schwarzschild metric <math>. schwarzschild' :: Floating a => a -> STTens 2 0 (CFun [a] a) -- | Christoffel symbol of the Schwarzschild metric. christoffel :: forall a. Floating a => a -> STTens 1 2 (CFun [a] a) -- | Ricci tensor of the Schwarzschild metric. ricci :: forall a. Floating a => a -> STTens 0 2 (CFun [a] a) -- | Einstein tensor of the Schwarzschild metric. The component functions -- evaluate to zero: -- --
-- >>> let g = einstein 2 -- -- >>> g `evalSec` [1.1, 2.4, 1.7, 2.2] -- ZeroTensor --einstein :: forall a. Floating a => a -> STTens 0 2 (CFun [a] a) -- | This module provides the Schwarzschild metric as an example for a -- tensor with symbolic values as well as functions to calculate -- Christoffel symbols, Ricci tensors and Einstein tensors from metric -- tensors with symbolic values. module Math.Tensor.Examples.Gravity.SchwarzschildSymbolic -- | Schwarzschild metric <math>. schwarzschildS :: STTens 0 2 SSymbolic -- | Inverse Schwarzschild metric <math>. schwarzschildS' :: STTens 2 0 SSymbolic -- | Christoffel symbols of any symbolic metric. christoffelS :: STTens 0 2 SSymbolic -> STTens 2 0 SSymbolic -> STTens 1 2 SSymbolic -- | Ricci tensor of any symbolic metric. ricciS :: STTens 0 2 SSymbolic -> STTens 2 0 SSymbolic -> STTens 0 2 SSymbolic -- | Einstein tensor of any symbolic metric. The components evaluate to -- zero: -- --
-- >>> let g = schwarzschildS -- -- >>> let g' = schwarzschildS' -- -- >>> let e = einsteinS g g' -- -- >>> print e -- ZeroTensor -- modulo symbolic simplification, which is not implemented yet. --einsteinS :: STTens 0 2 SSymbolic -> STTens 2 0 SSymbolic -> STTens 0 2 SSymbolic -- | Gaussian elimination algorithm based on hmatrix. module Math.Tensor.Internal.LinearAlgebra -- | Gaussian elimination perfomed in-place in the ST -- monad. gaussianST :: Int -> Int -> STMatrix s Double -> ST s () -- | Gaussian elimination as pure function. Involves a copy of the input -- matrix. -- --
-- λ let mat = (3 >< 4) [1, 1, -2, 0, 0, 2, -6, -4, 3, 0, 3, 1] -- λ mat -- (3><4) -- [ 1.0, 1.0, -2.0, 0.0 -- , 0.0, 2.0, -6.0, -4.0 -- , 3.0, 0.0, 3.0, 1.0 ] -- λ gaussian mat -- (3><4) -- [ 3.0, 0.0, 3.0, 1.0 -- , 0.0, 2.0, -6.0, -4.0 -- , 0.0, 0.0, 0.0, 1.6666666666666667 ] --gaussian :: Matrix Double -> Matrix Double -- | Returns the indices of a maximal linearly independent subset of the -- columns in the matrix. -- --
-- λ let mat = (3 >< 4) [1, 1, -2, 0, 0, 2, -6, -4, 3, 0, 3, 1] -- λ mat -- (3><4) -- [ 1.0, 1.0, -2.0, 0.0 -- , 0.0, 2.0, -6.0, -4.0 -- , 3.0, 0.0, 3.0, 1.0 ] -- λ independentColumns mat -- [0,1,3] --independentColumns :: Matrix Double -> [Int] -- | Returns a sub matrix containing a maximal linearly independent subset -- of the columns in the matrix. -- --
-- λ let mat = (3 >< 4) [1, 1, -2, 0, 0, 2, -6, -4, 3, 0, 3, 1] -- λ mat -- (3><4) -- [ 1.0, 1.0, -2.0, 0.0 -- , 0.0, 2.0, -6.0, -4.0 -- , 3.0, 0.0, 3.0, 1.0 ] -- λ independentColumnsMat mat -- (3><3) -- [ 1.0, 1.0, 0.0 -- , 0.0, 2.0, -4.0 -- , 3.0, 0.0, 1.0 ] --independentColumnsMat :: Matrix Double -> Matrix Double -- | Returns the pivot columns of an upper triangular matrix. -- --
-- λ let mat = (3 >< 4) [1, 0, 2, -3, 0, 0, 1, 0, 0, 0, 0, 0] -- λ mat -- (3><4) -- [ 1.0, 0.0, 2.0, -3.0 -- , 0.0, 0.0, 1.0, 0.0 -- , 0.0, 0.0, 0.0, 0.0 ] -- λ pivotsU mat -- [0,2] --pivotsU :: Matrix Double -> [Int] -- | Find pivot element below position (i, j) with greatest absolute value -- in the ST monad. findPivotMax :: Int -> Int -> Int -> Int -> STMatrix s Double -> ST s (Maybe (Int, Int)) -- | This module supplements the sparse-tensor package with the -- functionality of constructing bases of the space of Lorentz invariant -- tensors of arbitrary rank and symmetry. -- -- It can be shown that all <math> invariant tensors must be given -- by expressions that are solely composed of the Minkowski metric -- <math>, its inverse <math> and the covariant and -- contravariant Levi-Civita symbols <math> and <math>. Any -- such an expression can be written as a sum of products of these -- tensors, with the individual products containing the appropriate -- number of factors ensuring the required rank of the expression and the -- sum further enforcing the required symmetry. In the following such an -- expression is simply called an ansatz. Thus the goal of the following -- functions is the computation of a set of ansätze of given rank and -- symmetry that are linear independent and allow one to express any -- further Lorentz invariant tensor with the same rank and symmetry as -- appropriate linear combination of them. -- -- Considering tensors with 4 contravariant spacetime indices -- <math> that further satisfy the symmetry property <math> -- as an example, there only exist two linear independent ansätze namely: -- --
-- (1,3) -- | -- +---- (2,4) -- | | -- | `---- (5,6) * (8) * x[1] -- | -- +---- (2,5) -- | | -- | `---- (4,6) * (2) * x[2] -- | -- `---- (2,6) -- | -- `---- (4,5) * (2) * x[2] -- -- (1,4) -- | -- +---- (2,3) -- | | -- | `---- (5,6) * (-8) * x[1] -- | -- +---- (2,5) -- | | -- | `---- (3,6) * (-2) * x[2] -- | -- `---- (2,6) -- | -- `---- (3,5) * (-2) * x[2] -- -- (1,5) -- | -- +---- (2,3) -- | | -- | `---- (4,6) * (-2) * x[2] -- | -- `---- (2,4) -- | -- `---- (3,6) * (2) * x[2] -- -- (1,6) -- | -- +---- (2,3) -- | | -- | `---- (4,5) * (-2) * x[2] -- | -- `---- (2,4) -- | -- `---- (3,5) * (2) * x[2] --drawAnsatzEta :: AnsatzForestEta -> String -- | Returns an ASCII drawing of the AnsatzForestEpsilon in -- the fashion explained in Data.Tree. The ansatz <math> is -- drawn as: -- --
-- (1,2,3,4) -- | -- `---- (5,6) * (16) * x[3] --drawAnsatzEpsilon :: AnsatzForestEpsilon -> String -- | Return a list of the labels of all variables that are contained in the -- AnsatzForestEta. getForestLabels :: AnsatzForestEta -> [Int] -- | Return a list of the labels of all variables that are contained in the -- AnsatzForestEpsilon. getForestLabelsEpsilon :: AnsatzForestEpsilon -> [Int] -- | Remove the branches with variable label contained in the argument -- Int list from the AnsatzForestEta. removeVarsEta :: [Int] -> AnsatzForestEta -> AnsatzForestEta -- | Remove the branches with variable label contained in the argument -- Int list from the AnsatzForestEpsilon. removeVarsEps :: [Int] -> AnsatzForestEpsilon -> AnsatzForestEpsilon -- | Shift the variable labels of all variables that are contained in the -- AnsatzForestEta by the amount specified. relabelAnsatzForest :: Int -> AnsatzForestEta -> AnsatzForestEta -- | Shift the variable labels of all variables that are contained in the -- AnsatzForestEpsilon by the amount specified. relabelAnsatzForestEpsilon :: Int -> AnsatzForestEpsilon -> AnsatzForestEpsilon -- | Map a general function over all variables that are contained in the -- AnsatzForestEta. mapVars :: (Var -> Var) -> AnsatzForestEta -> AnsatzForestEta -- | Map a general function over all variables that are contained in the -- AnsatzForestEpsilon. mapVarsEpsilon :: (Var -> Var) -> AnsatzForestEpsilon -> AnsatzForestEpsilon -- | Return the rank, i.e. the number of different variables that is -- contained in the AnsatzForestEta. ansatzRank :: AnsatzForestEta -> Int -- | Return the rank, i.e. the number of different variables that is -- contained in the AnsatzForestEpsilon. ansatzRankEpsilon :: AnsatzForestEpsilon -> Int -- | Encode an AnsatzForestEta employing the -- Serialize instance. encodeAnsatzForestEta :: AnsatzForestEta -> ByteString -- | Encode an AnsatzForestEpsilon employing the -- Serialize instance. encodeAnsatzForestEpsilon :: AnsatzForestEpsilon -> ByteString -- | Decode an AnsatzForestEta employing the -- Serialize instance. decodeAnsatzForestEta :: ByteString -> AnsatzForestEta -- | Decode an AnsatzForestEpsilon employing the -- Serialize instance. decodeAnsatzForestEpsilon :: ByteString -> AnsatzForestEpsilon -- | The function computes all linear independent ansätze that have rank -- specified by the first integer argument and further satisfy the -- symmetry specified by the Symmetry value. The -- additional argument of type [[Int]] is used to provide -- the information of all (by means of the symmetry at hand) independent -- components of the ansätze. Explicit examples how this information can -- be computed are provided by the functions for -- areaList4, ... and also by -- metricList2, ... . The output is given as spacetime -- tensor STTens and is explicitly symmetrized. mkAnsatzTensorFastSym :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> [[Int]] -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | This function provides the same functionality as -- mkAnsatzTensorFast but without explicit symmetrization -- of the result. In other words from each symmetrization sum only the -- first summand is returned. This is advantageous as for large -- expressions explicit symmetrization might be expensive and further is -- sometime simply not needed as the result might for instance be -- contracted against a symmetric object, which thus enforces the -- symmetry, in further steps of the computation. mkAnsatzTensorFast :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> [[Int]] -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | This function provides the same functionality as -- mkAnsatzTensorFast but returns the result as tensor of -- type ATens AnsVarR. This is achieved by -- explicitly providing not only the list of individual index -- combinations but also their representation using more abstract index -- types as input. The input list consists of triplets where the first -- element as before labels the independent index combinations, the -- second element labels the corresponding multiplicity under the present -- symmetry. The multiplicity simply encodes how many different -- combinations of spacetime indices correspond to the same abstract -- index tuple. The last element of the input triplets labels the -- individual abstract index combinations that then correspond to the -- provided spacetime indices. If some of the initial symmetries are -- still present when using abstract indices this last element might -- consists of more then one index combination. The appropriate value -- that is retrieved from the two ansatz forests is then written to each -- of the provided index combinations. mkAnsatzTensorFastAbs :: Int -> Symmetry -> [([Int], Int, [IndTupleAbs n1 0 n2 0 n3 0])] -> (AnsatzForestEta, AnsatzForestEpsilon, ATens n1 0 n2 0 n3 0 AnsVarR) -- | Provides the same functionality as -- mkAnsatzTensorFastSym with the difference that the -- list of independent index combinations is automatically computed form -- the present symmetry. Note that this yields slightly higher -- computation costs. mkAnsatzTensorFastSym' :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | Provides the same functionality as mkAnsatzTensorFast -- with the difference that the list of independent index combinations is -- automatically computed form the present symmetry. Note that this -- yields slightly higher computation costs. mkAnsatzTensorFast' :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | The function is similar to mkAnsatzTensorFastSym yet -- it uses an algorithm that prioritizes memory usage over fast -- computation times. mkAnsatzTensorIncrementalSym :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> [[Int]] -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | The function is similar to mkAnsatzTensorFast yet it -- uses an algorithm that prioritizes memory usage over fast computation -- times. mkAnsatzTensorIncremental :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> [[Int]] -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | The function is similar to mkAnsatzTensorFastAbs yet -- it uses an algorithm that prioritizes memory usage over fast -- computation times. mkAnsatzTensorIncrementalAbs :: Int -> Symmetry -> [([Int], Int, [IndTupleAbs n1 0 n2 0 n3 0])] -> (AnsatzForestEta, AnsatzForestEpsilon, ATens n1 0 n2 0 n3 0 AnsVarR) -- | The function is similar to mkAnsatzTensorFastSym' yet -- it uses an algorithm that prioritizes memory usage over fast -- computation times. mkAnsatzTensorIncrementalSym' :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | The function is similar to mkAnsatzTensorFast' yet it -- uses an algorithm that prioritizes memory usage over fast computation -- times. mkAnsatzTensorIncremental' :: forall (n :: Nat). KnownNat n => Int -> Symmetry -> (AnsatzForestEta, AnsatzForestEpsilon, STTens n 0 AnsVarR) -- | Type alias to encode the symmetry information. The individual -- Int values label the individual spacetime indices, the -- Symmetry type is the compromised of (SymPairs, -- ASymPairs, BlockSyms, CyclicSyms, CyclicBlockSyms). type Symmetry = ([(Int, Int)], [(Int, Int)], [([Int], [Int])], [[Int]], [[[Int]]]) -- | Evaluation list for <math>. areaList4 :: [([Int], Int, [IndTupleAbs 1 0 0 0 0 0])] -- | Evaluation list for <math>. areaList6 :: [([Int], Int, [IndTupleAbs 1 0 1 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. areaList8 :: [([Int], Int, [IndTupleAbs 2 0 0 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. areaList10_1 :: [([Int], Int, [IndTupleAbs 2 0 0 0 2 0])] -- | Evaluation list for <math>. areaList10_2 :: [([Int], Int, [IndTupleAbs 2 0 1 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the symmetry under -- arbitrary permutations of <math>. areaList12 :: [([Int], Int, [IndTupleAbs 3 0 0 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. areaList14_1 :: [([Int], Int, [IndTupleAbs 3 0 0 0 2 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. areaList14_2 :: [([Int], Int, [IndTupleAbs 3 0 1 0 0 0])] -- | Evaluation list for <math>. metricList2 :: [([Int], Int, [IndTupleAbs 0 0 1 0 0 0])] -- | Evaluation list for <math>. metricList4_1 :: [([Int], Int, [IndTupleAbs 0 0 2 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. metricList4_2 :: [([Int], Int, [IndTupleAbs 0 0 2 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. metricList6_1 :: [([Int], Int, [IndTupleAbs 0 0 2 0 2 0])] -- | Evaluation list for <math>. metricList6_2 :: [([Int], Int, [IndTupleAbs 0 0 3 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the symmetry under -- arbitrary permutations of <math>. metricList6_3 :: [([Int], Int, [IndTupleAbs 0 0 3 0 0 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. metricList8_1 :: [([Int], Int, [IndTupleAbs 0 0 3 0 2 0])] -- | Evaluation list for <math>. Note that also when using the -- abstract indices this ansatz still features the <math> symmetry. metricList8_2 :: [([Int], Int, [IndTupleAbs 0 0 4 0 0 0])] -- | Symmetry list for areaList4. symList4 :: Symmetry -- | Symmetry list for areaList6. symList6 :: Symmetry -- | Symmetry list for areaList8. symList8 :: Symmetry -- | Symmetry list for areaList10_1. symList10_1 :: Symmetry -- | Symmetry list for areaList10_2. symList10_2 :: Symmetry -- | Symmetry list for areaList12. symList12 :: Symmetry -- | Symmetry list for areaList14_1. symList14_1 :: Symmetry -- | Symmetry list for areaList14_2. symList14_2 :: Symmetry -- | Symmetry list for metricList2. metricsymList2 :: Symmetry -- | Symmetry list for metricList4_1. metricsymList4_1 :: Symmetry -- | Symmetry list for metricList4_2. metricsymList4_2 :: Symmetry -- | Symmetry list for metricList6_1. metricsymList6_1 :: Symmetry -- | Symmetry list for metricList6_2. metricsymList6_2 :: Symmetry -- | Symmetry list for metricList6_3. metricsymList6_3 :: Symmetry -- | Symmetry list for metricList8_1. metricsymList8_1 :: Symmetry -- | Symmetry list for metricList8_2. metricsymList8_2 :: Symmetry symList16_1 :: Symmetry areaList16_1 :: [([Int], Int, [IndTupleAbs 3 0 1 0 2 0])] instance Data.Serialize.Serialize Math.Tensor.LorentzGenerator.AnsatzForestEta instance GHC.Generics.Generic Math.Tensor.LorentzGenerator.AnsatzForestEta instance GHC.Classes.Eq Math.Tensor.LorentzGenerator.AnsatzForestEta instance GHC.Read.Read Math.Tensor.LorentzGenerator.AnsatzForestEta instance GHC.Show.Show Math.Tensor.LorentzGenerator.AnsatzForestEta instance Control.DeepSeq.NFData Math.Tensor.LorentzGenerator.Var instance Data.Serialize.Serialize Math.Tensor.LorentzGenerator.Var instance GHC.Generics.Generic Math.Tensor.LorentzGenerator.Var instance GHC.Classes.Ord Math.Tensor.LorentzGenerator.Var instance GHC.Classes.Eq Math.Tensor.LorentzGenerator.Var instance GHC.Read.Read Math.Tensor.LorentzGenerator.Var instance GHC.Show.Show Math.Tensor.LorentzGenerator.Var instance Control.DeepSeq.NFData Math.Tensor.LorentzGenerator.Epsilon instance Data.Serialize.Serialize Math.Tensor.LorentzGenerator.Epsilon instance GHC.Generics.Generic Math.Tensor.LorentzGenerator.Epsilon instance GHC.Classes.Ord Math.Tensor.LorentzGenerator.Epsilon instance GHC.Classes.Eq Math.Tensor.LorentzGenerator.Epsilon instance GHC.Read.Read Math.Tensor.LorentzGenerator.Epsilon instance GHC.Show.Show Math.Tensor.LorentzGenerator.Epsilon instance Control.DeepSeq.NFData Math.Tensor.LorentzGenerator.Eta instance Data.Serialize.Serialize Math.Tensor.LorentzGenerator.Eta instance GHC.Generics.Generic Math.Tensor.LorentzGenerator.Eta instance GHC.Classes.Ord Math.Tensor.LorentzGenerator.Eta instance GHC.Classes.Eq Math.Tensor.LorentzGenerator.Eta instance GHC.Read.Read Math.Tensor.LorentzGenerator.Eta instance GHC.Show.Show Math.Tensor.LorentzGenerator.Eta