Idris2Doc : Data.Tensor.Shape.Shape

Data.Tensor.Shape.Shape

(source)

Reexports

importpublic Decidable.Equality

Definitions

dataTensorShape : Nat->Type
  Datatype defining the shape of a tensor
It is a vector of consistently named axes

Totality: total
Visibility: public export
Constructors:
Nil : TensorShape0
(::) : (a : Axis) -> (as : TensorShapek) ->ConsistentWithaas=>TensorShape (Sk)

Hints:
Absa=>AllCTensorMonoidshape=>Abs (Tensorshapea)
AllAlgebrashapea=>Algebra (Tensorshape) a
AllIsCubicalshape->AllCIsFoldableshape
AllCTensorMonoidshape=>Applicative (Tensorshape)
AllDisplay2Dshapea=>TensorCubEvidenceshape=>Display2D (Tensorshapea)
AllEqshapea=>Eq (Tensorshapea)
Expa=>AllCTensorMonoidshape=>Exp (Tensorshapea)
AllCIsFoldableshape=>Foldable (Tensorshape)
Fractionala=>AllCTensorMonoidshape=>Fractional (Tensorshapea)
FromDoublea=>AllCTensorMonoidshape=>FromDouble (Tensorshapea)
Functor (Tensorshape)
Nega=>AllCTensorMonoidshape=>Neg (Tensorshapea)
Numa=>AllCTensorMonoidshape=>Num (Tensorshapea)
Randoma=>Applicative (Tensorshape) =>Traversable (Tensorshape) =>Random (Tensorshapea)
AllDisplay2Dshapea=>TensorCubEvidenceshape=>Show (Tensorshapea)
AllTraversableshape=>AllCIsFoldableshape=>Traversable (Tensorshape)
dataConsistentWith : Axis->TensorShapek->Type
  An axis is named consistently with respect to an existing tensor shape
if its name does not appear in the shape, or it if it appears and
references the same container

Totality: total
Visibility: public export
Constructors:
NewAxis : NotElem (a.name) as->ConsistentWithaas
ExistingAxis : (e : Elem (a.name) as) ->indexas (a.name) =a.cont->ConsistentWithaas
dataElem : AxisName->TensorShaperank->Type
  A proof that an axis name `a` is found in a tensor shape `as`
Notably this could have been implemented to check whether the
*entire axis* is in vector, and not just the name.
But since a tensor shape is more akin to a dictionary, keeping this form

Totality: total
Visibility: public export
Constructors:
Here : {auto{conArg:17303} : ConsistentWithaas} ->axisName=a.name=>ElemaxisName (a::as)
There : {auto{conArg:17325} : ConsistentWithaas} ->ElemaxisNameas=>ElemaxisName (a::as)
dataNotElem : AxisName->TensorShaperank->Type
  A proof that an axis name `a` is not found in a tensor shape `as`

Totality: total
Visibility: public export
Constructors:
NotInEmpty : NotElemaxisElem []
NotInNonEmpty : IsNo (decEqaxisElem (a.name)) ->NotElemaxisElemas=> ({arg:17368} : ConsistentWithaas) ->NotElemaxisElem (a::as)
index : (shape : TensorShaperank) -> (axisName : AxisName) ->ElemaxisNameshape=>Cont
  Indexing into a tensor shape.
Could be many occurences - recovers the one provided by `isElem`

Visibility: public export
rename : TensorShaperank->AxisName->AxisName->TensorShaperank
  to get rid of believe_me this might need to be put in a mutual block too

Visibility: public export
rename : TensorShaperank->Finrank->AxisName->TensorShaperank
  to get rid of believe_me this might need to be put in a mutual block too

Visibility: public export
dataAll : (Axis->Type) ->TensorShapek->Type
Totality: total
Visibility: public export
Constructors:
Nil : Allp []
(::) : pa->Allpas-> {auto{conArg:17531} : ConsistentWithaas} ->Allp (a::as)

Hint: 
AllIsCubicalshape->AllCIsFoldableshape
dataAny : (Axis->Type) ->TensorShapek->Type
Totality: total
Visibility: public export
Constructors:
Here : {auto{conArg:17564} : ConsistentWithaas} ->pa->Anyp (a::as)
There : {auto{conArg:17590} : ConsistentWithaas} ->Anypas->Anyp (a::as)
dataAllC : (Cont->Type) ->TensorShapek->Type
Totality: total
Visibility: public export
Constructors:
Nil : AllCp []
(::) : p (a.cont) ->AllCpas-> {auto{conArg:17644} : ConsistentWithaas} ->AllCp (a::as)

Hints:
Absa=>AllCTensorMonoidshape=>Abs (Tensorshapea)
AllIsCubicalshape->AllCIsFoldableshape
AllCTensorMonoidshape=>Applicative (Tensorshape)
Expa=>AllCTensorMonoidshape=>Exp (Tensorshapea)
AllCIsFoldableshape=>Foldable (Tensorshape)
Fractionala=>AllCTensorMonoidshape=>Fractional (Tensorshapea)
FromDoublea=>AllCTensorMonoidshape=>FromDouble (Tensorshapea)
Nega=>AllCTensorMonoidshape=>Neg (Tensorshapea)
Numa=>AllCTensorMonoidshape=>Num (Tensorshapea)
AllTraversableshape=>AllCIsFoldableshape=>Traversable (Tensorshape)
dataAnyC : (Cont->Type) ->TensorShapek->Type
Totality: total
Visibility: public export
Constructors:
Here : {auto{conArg:17677} : ConsistentWithaas} ->p (a.cont) ->AnyCp (a::as)
There : {auto{conArg:17703} : ConsistentWithaas} ->AnyCpas->AnyCp (a::as)
tensorShapesConsistent : TensorShapek->TensorShapek'->Type
Visibility: public export
toVect : TensorShapek->VectkAxis
  (::) here pattern matches on the proof `axisConsistent` and discards it

Visibility: public export
toList : TensorShapek->ListAxis
Visibility: public export
conts : TensorShapek->ListCont
  Convenience function, turns it also into a list
Because `Tensor` from `Data.Container` uses lists with tensors

Visibility: public export
renamePreservesConts : (shape : TensorShaperank) -> (axisName : AxisName) -> (newAxisName : AxisName) ->conts (renameshapeaxisNamenewAxisName) =contsshape
  Renaming the shape preserves the underlying data

Visibility: public export
renamePreservesConts : (shape : TensorShaperank) -> (axisIndex : Finrank) -> (newAxisName : AxisName) ->conts (renameshapeaxisIndexnewAxisName) =contsshape
  Renaming a shape at a specific index preserves the underlying containers.

Visibility: public export
axisNames : TensorShapek->VectkAxisName
  Names of the axes in a tensor shape

Visibility: public export
axisSizes : TensorShapek->VectkCont
  Sizes of the axes in a tensor shape

Visibility: public export
size : (shape : TensorShapek) ->AllIsCubical (contsshape) =>Nat
  Size of a tensor shape, i.e. its number of elements

Visibility: public export
0TensorCubEvidence : TensorShapek->Type
  Cubicality evidence for a tensor shape, using `Either` so that
auto-search tries `Left prf` (positive evidence) before `Right ()`
(fallback). Standard `Maybe` can't be used because `Nothing` is
listed first in its definition and auto-search would always pick it.

Visibility: public export
dataUniqueElem : AxisName->TensorShaperank->Type
  A proof that an axis name only appears once in the tensor shape

Totality: total
Visibility: public export
Constructors:
Here : axisName=ax.name=>NotElemaxisNameas=> {auto{conArg:17995} : ConsistentWithaxas} ->UniqueElemaxisName (ax::as)
There : IsSuccrank=>UniqueElemaxisNameas=>IsNo (decEqaxisName (ax.name)) => {auto{conArg:18025} : ConsistentWithaxas} ->UniqueElemaxisName (ax::as)
forgetUnique : UniqueElemaxisNameas->ElemaxisNameas
  Forgets that the axis name only appears once in the tensor shape

Visibility: public export
index : (shape : TensorShaperank) -> (axisName : AxisName) ->UniqueElemaxisNameshape=>Cont
Visibility: public export
removeAxis : (toRemove : AxisName) -> (shape : TensorShape (Srank)) ->UniqueElemtoRemoveshape=>TensorShaperank
Visibility: public export
consistentAfterRemoving : (a : Axis) -> (as : TensorShape (Srank)) ->ConsistentWithaas=> (toRemove : AxisName) -> {autouElem : UniqueElemtoRemoveas} ->ConsistentWitha (removeAxistoRemoveas)
Visibility: public export
TensorTest1 : TensorShape3
Visibility: public export
TensorTest2 : (i : Axis) ->ConsistentWithi [i]
Visibility: public export