Idris2Doc : Language.IntrinsicScoping.Variables

Language.IntrinsicScoping.Variables(source)

Definitions

Name : Type
  We do not really care about the notion of names used here
as long as it has a decidable notion of equality.
String will do for now

Totality: total
Visibility: export
IContext : Type
  A context of De Bruijn indices is right-to-left.
Just like in typing rules, newly bound variables are added
at the most local end with index 0, and all other variables
see their index shifted by 1.

Totality: total
Visibility: public export
dataAtIndex : Nat->Name->IContext->Type
  De Bruijn indices are right-to-left, starting from 0

Totality: total
Visibility: public export
Constructors:
Z : AtIndex0nm (g:<nm)
S : AtIndexnnmg->AtIndex (Sn) nm (g:<{_:9456})
recordIndex : Name->IContext->Type
  An index is the pairing of its encoding as a natural number
and the proof it is valid

Totality: total
Visibility: public export
Constructor: 
MkIndex : (getIndex : Nat) -> (0_ : AtIndexgetIndexnmctx) ->Indexnmctx

Projections:
.getIndex : Indexnmctx->Nat
0.validIndex : ({rec:0} : Indexnmctx) ->AtIndex (getIndex{rec:0}) nmctx

Hint: 
Injectiveweaken
.getIndex : Indexnmctx->Nat
Totality: total
Visibility: public export
getIndex : Indexnmctx->Nat
Totality: total
Visibility: public export
0.validIndex : ({rec:0} : Indexnmctx) ->AtIndex (getIndex{rec:0}) nmctx
Totality: total
Visibility: public export
0validIndex : ({rec:0} : Indexnmctx) ->AtIndex (getIndex{rec:0}) nmctx
Totality: total
Visibility: public export
fresh : Indexnm (ctx:<nm)
Totality: total
Visibility: public export
weaken : Indexnmctx->Indexnm (ctx:<{_:9575})
Totality: total
Visibility: public export
dataView : Indexnmctx->Type
Totality: total
Visibility: public export
Constructors:
Z : Viewfresh
S : (p : Indexnmctx) ->View (weakenp)
view : (p : Indexnmctx) ->Viewp
Totality: total
Visibility: public export
isLast : Indexnm ([<x] <+>g) ->Either (nm=x) (Indexnmg)
Totality: total
Visibility: export
delete : Indexnmg->IContext
Totality: total
Visibility: public export
thicken : (v : Indexnmg) -> (v' : Indexnm'g) ->Either (nm=nm', v=v') (Indexnm' (deletev))
Totality: total
Visibility: export
irrelevantAtIndex : (p : AtIndexnnmg) -> (q : AtIndexnnm'g) -> (nm=nm', p=q)
Totality: total
Visibility: export
hetEqDec : (v : Indexnmg) -> (w : Indexnm'g) ->Dec (nm=nm', v=w)
Totality: total
Visibility: export
LContext : Type
  A context of De Bruijn levels is left-to-right
Newly bound variables are added at the far end, with index (length ctx).
This has the advantage that all other variables have an unchanged level.

Totality: total
Visibility: public export
dataAtLevel : Nat->Name->LContext->Type
Totality: total
Visibility: public export
Constructors:
H : n=lengthctx->AtLevelnnm (nm::ctx)
T : AtLevelnnmctx->AtLevelnnm ({_:10379}::ctx)
recordLevel : Name->LContext->Type
  A level is the pairing of its encoding as a natural number
and the proof it is valid

Totality: total
Visibility: public export
Constructor: 
MkLevel : (getLevel : Nat) -> (0_ : AtLevelgetLevelnmctx) ->Levelnmctx

Projections:
.getLevel : Levelnmctx->Nat
0.validIndex : ({rec:0} : Levelnmctx) ->AtLevel (getLevel{rec:0}) nmctx
.getLevel : Levelnmctx->Nat
Totality: total
Visibility: public export
getLevel : Levelnmctx->Nat
Totality: total
Visibility: public export
0.validIndex : ({rec:0} : Levelnmctx) ->AtLevel (getLevel{rec:0}) nmctx
Totality: total
Visibility: public export
0validIndex : ({rec:0} : Levelnmctx) ->AtLevel (getLevel{rec:0}) nmctx
Totality: total
Visibility: public export
weaken : Levelnmctx->Levelnm ({_:10528}::ctx)
Totality: total
Visibility: export
fresh : Levelnm (nm::ctx)
Totality: total
Visibility: export
dataView : Levelnmctx->Type
Totality: total
Visibility: public export
Constructors:
Z : Viewfresh
S : (p : Levelnmctx) ->View (weakenp)
view : (p : Levelnmctx) ->Viewp
Totality: total
Visibility: public export
irrelevantAtLevel : (p : AtLevelnnmctx) -> (q : AtLevelnnm'ctx) -> (nm=nm', p=q)
Totality: total
Visibility: export
hetEqDec : (v : Levelnmg) -> (w : Levelnm'g) ->Dec (nm=nm', v=w)
Totality: total
Visibility: export
rev : Lista->SnocLista
Totality: total
Visibility: public export
lteIsPlus : LTEmn->Plus (minusnm) mn
Totality: total
Visibility: export
asIndex : AtLevelnnmls->AtIndex (minus (lengthls) (Sn)) nm (revls)
Totality: total
Visibility: export
asIndex : Levelnmls->Indexnm (revls)
Totality: total
Visibility: export