Idris2Doc : Misc

Misc

(source)

Definitions

dataIsNo : Deca->Type
  IsNo is a type Idris can automatically synthesise, in contrast to
in contrast to `Not (x = y)`

Totality: total
Visibility: public export
Constructor: 
ItIsNo : IsNo (Nocontra)

Hint: 
{auto{conArg:18435} : DecEqa} ->IsNo (decEqxy) ->NotElemy [x]
isNoSym : {auto{conArg:11389} : DecEqa} ->IsNo (decEqxy) ->IsNo (decEqyx)
  Can this be simplified?

Visibility: public export
proofIneqIsNo : {auto{conArg:11574} : DecEqa} ->Not (x=y) ->IsNo (decEqxy)
  Proof of inequality yields IsNo

Visibility: public export
liftA2 : Applicativef=>fa->fb->f (a, b)
  Definition of liftA2 in terms of (<*>)

Visibility: public export
strength : Applicativef=>a->fb->f (a, b)
  Tensorial strength

Visibility: public export
toList' : Vectna->Lista
  toList with a different foldable implementation

Visibility: public export
drop : (i : Fin (Sn)) ->Vectna->Vect (minusn (finToNati)) a
  Drop the first i elements of a vector
Analogous to Data.Vect.drop, except the index is Fin n instead of Nat

Visibility: public export
drop : DecEqa=> (xs : Vectna) -> (elem : Elemxxs) ->Vect (minusn (finToNat (FS (elemToFinelem)))) a
  Drop all the elements up and until the element `x` from a vector

Visibility: public export
dataNotElem : DecEqa=>a->Vectna->Type
Totality: total
Visibility: public export
Constructors:
NotInEmptyVect : {auto{conArg:12477} : DecEqa} ->NotElemx []
NotInNonEmptyVect : {auto{conArg:12491} : DecEqa} -> (xs : Vectna) ->IsNo (decEqxy) ->NotElemxxs=>NotElemx (y::xs)
notEqualNotElem : {auto{conArg:12529} : DecEqa} ->IsNo (decEqxy) ->NotElemx [y]
Visibility: public export
notElemSym : {auto{conArg:12580} : DecEqa} ->NotElemi [j] ->NotElemj [i]
  If an element `i` is not in the singleton list `[j]`, then `j` is not in
the singleton list `[i]`

Visibility: public export
elemSym : DecEqa=>Elemi [j] ->Elemj [i]
  If an element `i` is in the singleton list `[j]`, then `j` is in the 
singleton list `[i]`

Visibility: public export
cons : x-> (Finl->x) ->Fin (Sl) ->x
  Analogue of `(::)`

Visibility: public export
head : (Fin (Sl) ->x) ->x
Visibility: public export
tail : (Fin (Sl) ->x) ->Finl->x
Visibility: public export
init : (Fin (Sn) ->a) ->Finn->a
  All but the last element

Visibility: public export
takeFin : (s : Fin (Sn)) ->Vectna->Vect (finToNats) a
  Analogus to `Data.Vect.take`

Visibility: public export
sum : Numa=>Vectna->a
Visibility: public export
prod : Numa=>Vectna->a
Visibility: public export
argmax : Orda=>IsSuccn=>Vectna->Finn
Visibility: public export
argmin : Orda=>IsSuccn=>Vectna->Finn
Visibility: public export
unConcat : Vect (n*m) a->Vectn (Vectma)
  Dual to concat from Data.Vect

Visibility: public export
sum : Numa=>Lista->a
Visibility: public export
prod : Numa=>Lista->a
Visibility: public export
listZip : Lista->Listb->List (a, b)
Visibility: public export
maxInList : Orda=>Lista->Maybea
Visibility: public export
weakenN' : (0n : Nat) ->Finm->Fin (n+m)
  Like weakenN from Data.Fin, but where n is on the other side of +

Visibility: public export
weakenMultN : (m : Nat) ->IsSuccm=>Finn->Fin (m*n)
  Like weakenN, but with mutliplication
Like shiftMul, but without changing the value of the index

Visibility: public export
shiftMul : (stride : Nat) ->IsSuccstride=>Finn->Fin (n*stride)
  Variant of `shift` from Data.Fin, but with multiplication
Given an index i : Fin n, it recasts it as one where steps are stride sized
That is, returns stride * i : Fin (stride * n)
Implemented by recursing on i, adding stride each time

Visibility: public export
strengthenN : Fin (m+n) ->Either (Finm) (Finn)
  Analogous to strengthen from Data.Fin
Attempts to strengthen the bound on Fin (m + n) to Fin m
If it doesn't succeed, then returns the remainder in Fin n

Visibility: public export
finS' : Finn->Finn
  Like finS, but without wrapping
finS' last = last

Visibility: public export
addFinsBounded : Finn->Finn->Finn
  Adds two Fin n, and bounds the result
Meaning (93:Fin 5) + (4 : Fin 5) = 4

Visibility: public export
half : Finn->Finn
  Divides a Fin by 2, rounding down

Visibility: public export
mid : (low : Finn) -> (high : Finn) ->So (high>=low) =>Finn
  Computes the midway index between two bounds

Visibility: public export
findBinBetween : Orda=>Vect (Sn) a->a-> (lowInd : Fin (Sn)) -> (highInd : Fin (Sn)) ->So (highInd>=lowInd) =>Maybe (Fin (Sn))
  Given a non-empty sorted vector `xs`, finds the "right bin", i.e. the index 
of the smallest element between the bounds that `x` is not bigger than.
If `x` is bigger than the highest element, returns `Nothing`
`findBinBetween [2,7,10] 1 0 2 = Just 0`
`findBinBetween [2,7,10] 3 0 2 = Just 1`
`findBinBetween [2,7,10] 9 0 2 = Just 2`
`findBinBetween [2,7,10] 7 0 2 = Just 2`
`findBinBetween [1,2,3,4,5] 6 0 4 = Nothing`

Visibility: public export
findBin : Orda=>Vect (Sn) a->a->Maybe (Fin (Sn))
  Todo can this eventually be generalised to non-cubical tensors?
Given a non-empty sorted vector `xs`, finds the "right bin", i.e. the index
of the smallest element between the bounds that `x` is not bigger than.
If `x` is bigger than the highest element, returns `Nothing`
`findBin [2,7,10] 1 = Just 0`
`findBin [2,7,10] 3 = Just 1`
`findBin [2,4,6,8] 7 = Just 3`

Visibility: public export
mkDepPairShow : Showa=> ((x : a) ->Show (bx)) =>DPairab->String
Visibility: public export
interfaceDisplay : Type->Type
  Interface describing how a type can be displayed as a 2d grid of characters

Parameters: a
Methods:
display : a-> (h : Nat** (w : Nat**Vecth (VectwChar)))

Implementation: 
Displaya=>Display (RoseTreeSamea)
display : Displaya=>a-> (h : Nat** (w : Nat**Vecth (VectwChar)))
Visibility: public export
runIf : HasIOio=>Bool->io () ->io ()
Visibility: public export
pairIO : HasIOio=>ioa->iob->io (a, b)
Visibility: public export
multFin : Finm->Finn->Fin (m*n)
  There is a similar function in Data.Fin.Arith, which has the smallest
possible bound. This one does not, but has a simpler type signature.

Visibility: public export
splitList : Eqa=>Lista->Lista-> (n : Nat**Vectn (Lista))
  Splits xs at each occurence of delimeter (general version for lists)

Visibility: public export
splitString : String->String-> (n : Nat**VectnString)
  Splits xs at each occurence of delimeter (string version)

Visibility: public export
replaceString : String->String->String->String
  Simple string replacement function

Visibility: public export
constUnit : a-> ()
Visibility: public export
const2Unit : a->b-> ()
Visibility: public export
fromBool : Numa=>Bool->a
Visibility: public export
applyWhen : Bool-> (a->a) ->a->a
Visibility: public export
rewriteAllMap : Allp (f<$>xs) ->All (p.f) xs
Visibility: public export
rewriteAllMap' : All (p.f) xs->Allp (f<$>xs)
Visibility: public export
rewriteAllMap : Allp (f<$>xs) ->All (p.f) xs
Visibility: public export
allToVect : Allp (replicatena) ->Vectn (pa)
  Cnvert an all to a vector if it's made out of replicated things

Visibility: public export
constantToVect : All (constb) xs->Vectnb
Visibility: public export
dTraverse : Applicativef=> ((p : pType) ->f (qp)) -> (xs : VectnpType) ->f (Allqxs)
  Dependent parametric traverse

Visibility: public export
recordIso : Type->Type->Type
Totality: total
Visibility: public export
Constructor: 
MkIso : (forward : (a->b)) -> (backward : (b->a)) -> ((x : a) ->backward (forwardx) =x) -> ((y : b) ->forward (backwardy) =y) ->Isoab

Projections:
.backward : Isoab->b->a
.backwardForward : ({rec:0} : Isoab) -> (y : b) ->forward{rec:0} (backward{rec:0}y) =y
.forward : Isoab->a->b
.forwardBackward : ({rec:0} : Isoab) -> (x : a) ->backward{rec:0} (forward{rec:0}x) =x
.forward : Isoab->a->b
Visibility: public export
forward : Isoab->a->b
Visibility: public export
.backward : Isoab->b->a
Visibility: public export
backward : Isoab->b->a
Visibility: public export
.forwardBackward : ({rec:0} : Isoab) -> (x : a) ->backward{rec:0} (forward{rec:0}x) =x
Visibility: public export
forwardBackward : ({rec:0} : Isoab) -> (x : a) ->backward{rec:0} (forward{rec:0}x) =x
Visibility: public export
.backwardForward : ({rec:0} : Isoab) -> (y : b) ->forward{rec:0} (backward{rec:0}y) =y
Visibility: public export
backwardForward : ({rec:0} : Isoab) -> (y : b) ->forward{rec:0} (backward{rec:0}y) =y
Visibility: public export
multSucc : IsSuccm->IsSuccn->IsSucc (m*n)
Visibility: public export
allSuccThenProdSucc : (xs : ListNat) ->AllIsSuccxs=>IsSucc (prodxs)
Visibility: public export
updateAt : Eqa=> (a->b) -> (a, b) ->a->b
Visibility: public export
graph : {t : a->Type} -> ((x : a) ->tx) ->a-> (x : a**tx)
  Graph of a dependent function

Visibility: public export
dependentMap : Functorf=> {t : a->Type} -> ((x : a) ->tx) ->fa->f (x : a**tx)
  Version of `map` for dependent function
Note that here `x : a` is identity in some sense, it comes from `f a`

Visibility: public export
index : (i : Fink) ->Allpts->p (indexits)
Visibility: public export