Idris2Doc : Search.Auto

Search.Auto

(source)
The content of this module is based on the paper
Auto in Agda - Programming proof search using reflection
by Wen Kokke and Wouter Swierstra

Definitions

dataRuleName : Type
Totality: total
Visibility: public export
Constructors:
Free : Name->RuleName
Bound : Nat->RuleName

Hint: 
ShowRuleName
toName : RuleName->Name
Totality: total
Visibility: export
dataTermName : Type
Totality: total
Visibility: public export
Constructors:
UName : Name->TermName
Bound : Nat->TermName
Arrow : TermName

Hint: 
EqTermName
dataTm : Nat->Type
  Proof search terms

Totality: total
Visibility: public export
Constructors:
Var : Finn->Tmn
Con : TermName->List (Tmn) ->Tmn
showTerm : (ns : SnocListName) ->Tm (lengthns) ->String
Totality: total
Visibility: export
Env : (Nat->Type) ->Nat->Nat->Type
Totality: total
Visibility: public export
rename : EnvFinmn->Tmm->Tmn
Totality: total
Visibility: export
subst : EnvTmmn->Tmm->Tmn
Totality: total
Visibility: export
split : Tmm-> (List (Tmm), Tmm)
Totality: total
Visibility: export
thin : Fin (Sn) ->Finn->Fin (Sn)
Totality: total
Visibility: export
thinInjective : (x : Fin (Sn)) -> (y : Finn) -> (z : Finn) ->thinxy=thinxz->y=z
Totality: total
Visibility: export
thinnedApart : (x : Fin (Sn)) -> (y : Finn) ->Not (thinxy=x)
Totality: total
Visibility: export
thinApart : (x : Fin (Sn)) -> (y : Fin (Sn)) ->Not (x=y) -> (y' : Finn**thinxy'=y)
Totality: total
Visibility: export
dataThicken : Finn->Finn->Type
Totality: total
Visibility: public export
Constructors:
EQ : Thickenxx
NEQ : (y : Finn) ->Thickenx (thinxy)
thicken : (x : Finn) -> (y : Finn) ->Thickenxy
Totality: total
Visibility: export
check : Fin (Sn) ->Tm (Sn) ->Maybe (Tmn)
Totality: total
Visibility: export
for : Tmn->Fin (Sn) ->EnvTm (Sn) n
Totality: total
Visibility: export
dataAList : Nat->Nat->Type
Totality: total
Visibility: public export
Constructors:
Lin : AListmm
(:<) : AListmn-> (Fin (Sm), Tmm) ->AList (Sm) n
(++) : AListmn->AListlm->AListln
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7
toSubst : AListmn->EnvTmmn
Totality: total
Visibility: export
mgu : Tmm->Tmm->Maybe (Unifyingm)
Totality: total
Visibility: export
recordRule : Type
Totality: total
Visibility: export
Constructor: 
MkRule : (context : SnocListName) ->RuleName->Vectarity (Tm (lengthcontext)) ->Tm (lengthcontext) ->Rule

Projections:
.arity : Rule->Nat
.conclusion : ({rec:0} : Rule) ->Tm (length (context{rec:0}))
.context : Rule->SnocListName
.premises : ({rec:0} : Rule) ->Vect (arity{rec:0}) (Tm (length (context{rec:0})))
.ruleName : Rule->RuleName

Hint: 
ShowRule
.scope : Rule->Nat
Totality: total
Visibility: export
HintDB : Type
Totality: total
Visibility: public export
dataSpace : Type->Type
  A search Space represents the space of possible solutions to a problem.
It is a finitely branching, potentially infinitely deep, tree.
E.g. we can prove `Nat` using:
1. either Z or S (finitely branching)
2. arbitrarily many S constructor (unbounded depth)

Totality: total
Visibility: public export
Constructors:
Solution : a->Spacea
Candidates : List (Inf (Spacea)) ->Spacea
dataProof : Type
  A proof is a completed tree where each node is the invocation of a rule
together with proofs for its premises, or a lambda abstraction with a
subproof.

Totality: total
Visibility: public export
Constructors:
Call : RuleName->ListProof->Proof
Lam : Nat->Proof->Proof

Hint: 
ShowProof
recordPartialProof : Nat->Type
  A partial proof is a vector of goals and a continuation which, provided
a proof for each of the goals, returns a completed proof

Totality: total
Visibility: public export
Constructor: 
MkPartialProof : (leftovers : Nat) ->Vectleftovers (Tmm) -> (VectleftoversProof->Proof) ->PartialProofm

Projections:
.continuation : ({rec:0} : PartialProofm) ->Vect (leftovers{rec:0}) Proof->Proof
.goals : ({rec:0} : PartialProofm) ->Vect (leftovers{rec:0}) (Tmm)
.leftovers : PartialProofm->Nat
.leftovers : PartialProofm->Nat
Totality: total
Visibility: public export
leftovers : PartialProofm->Nat
Totality: total
Visibility: public export
.goals : ({rec:0} : PartialProofm) ->Vect (leftovers{rec:0}) (Tmm)
Totality: total
Visibility: public export
goals : ({rec:0} : PartialProofm) ->Vect (leftovers{rec:0}) (Tmm)
Totality: total
Visibility: public export
.continuation : ({rec:0} : PartialProofm) ->Vect (leftovers{rec:0}) Proof->Proof
Totality: total
Visibility: public export
continuation : ({rec:0} : PartialProofm) ->Vect (leftovers{rec:0}) Proof->Proof
Totality: total
Visibility: public export
apply : (r : Rule) ->Vect (r.arity+k) Proof->Vect (Sk) Proof
  Helper function to manufacture a proof step

Totality: total
Visibility: export
solve : Nat->HintDB->Tmm->SpaceProof
  Solve takes a database of hints, a goal to prove and returns
the full search space.

Totality: total
Visibility: export
dfs : Nat->Spacea->Lista
  Depth first search strategy to explore a search space.
This is made total by preemptively limiting the depth the search
is willing to explore.

Totality: total
Visibility: export
convert : (0f : (SnocListName->Nat)) -> ((vars : SnocListName) ->Name->Tm (fvars)) -> (vars : SnocListName) ->TTImp->EitherTTImp (Tm (fvars))
  Converts a type of the form (a -> (a -> b -> c) -> b -> c)
to our internal representation

Totality: total
Visibility: export
parseType : (0f : (SnocListName->Nat)) -> ((vars : SnocListName) ->Name->Tm (fvars)) ->TTImp->EitherTTImp (vars : SnocListName**Tm (fvars))
  Parse a type of the form
forall a b c. a -> (a -> b -> c) -> b -> c to
1. a scope [<a,b,c]
2. a representation of the rest

Totality: total
Visibility: export
parseRule : TTImp->EitherTTImp (vars : SnocListName**Tm (lengthvars))
  Parse a type, where bound variables are flexible variables

Totality: total
Visibility: export
parseGoal : TTImp->EitherTTImp (SnocListName, Tm0)
  Parse a type, where bound variables are rigid variables

Totality: total
Visibility: export
mkRule : Name->ElabRule
Totality: total
Visibility: export
getGoal : Elab (HintDB, Tm0)
Totality: total
Visibility: export
unquote : Proof->TTImp
Totality: total
Visibility: export
intros : Lista->TTImp->TTImp
Totality: total
Visibility: export
bySearch : Nat->HintDB->Elaba
Totality: total
Visibility: export