Idris2Doc : Data.Tree.Perfect

Data.Tree.Perfect(source)

Definitions

dataTree : Nat->Type->Type
Totality: total
Visibility: public export
Constructors:
Leaf : a->Tree0a
Node : Treena->Treena->Tree (Sn) a

Hints:
Applicative (Treen)
Functor (Treen)
replicate : (n : Nat) ->a->Treena
Totality: total
Visibility: public export
dataPath : Nat->Type
Totality: total
Visibility: public export
Constructors:
Here : Path0
Left : Pathn->Path (Sn)
Right : Pathn->Path (Sn)
toNat : Pathn->Nat
Totality: total
Visibility: public export
toNatBounded : (n : Nat) -> (p : Pathn) ->LT (toNatp) (pow2n)
Totality: total
Visibility: export
dataView : Nat->Nat->Type
  This pattern-matching in `fromNat` is annoying:
The `Z (S _)` case is impossible
In the `k (S n)` case we want to branch on whether `k `LT` pow2 n`
and get our hands on some proofs.
This view factors out that work.

Totality: total
Visibility: public export
Constructors:
ZZ : View00
SLT : (0_ : LTk (pow2n)) ->Viewk (Sn)
SNLT : (0_ : GTEk (pow2n)) -> (0_ : LT (minusk (pow2n)) (pow2n)) ->Viewk (Sn)
view : (k : Nat) -> (n : Nat) -> (0_ : LTk (pow2n)) ->Viewkn
Totality: total
Visibility: public export
fromNat : (k : Nat) -> (n : Nat) -> (0_ : LTk (pow2n)) ->Pathn
  Convert a natural number to a path in a perfect binary tree

Totality: total
Visibility: public export
fromNatCorrect : (k : Nat) -> (n : Nat) -> (0p : LTk (pow2n)) ->toNat (fromNatknp) =k
  The `fromNat` conversion is compatible with the semantics `toNat`

Totality: total
Visibility: export
lookup : Treena->Pathn->a
Totality: total
Visibility: public export