CS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~q      !""#$+*)('&%%&'()*+,--.//0112654334567889HGFEDCBA@?>=<;::;<=>?@ABCDEFGHIMLKJJKLMNOOP ]\[ZYXWVUTSRQQRSTUVWXYZ[\]^_`abcdefhklnopqrstvwxyz{|}~  lf               1 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL-#"!  !"#$%&'()*+,-./0123456789:;<=>?ABCFGHIJKMNMNOPOPQRSTUVWXYZ[\]^_Q ^]\[ZYXWVUTSRRSTUVWXYZ[\]^_`abcdefghijklmnopqr`abcdhijlnopqr&stuvwxyz{|}~"s tuvwxyz{|}tuvwxyz{|}~   !!       !"#$%&' !"#%&'(()) non-portable experimentaleb@dcs.st-and.ac.uk-Haskell types which can be used as constants source file, line number additional annotations Staging annotation Staging annotation Staging annotation Staging annotation 0ECategories for names; typechecked terms will know what each variable  is for. 1 Use for sending to typechecker. 73Abstract type representing a TT term and its type. ;)Construct a term representing a variable <7Make an application of a function to several arguments =2Get a pattern matchable representation of a term. >0Get a pattern matchable representation of a term's type. ?1Return whether the name occurs free in the term. @*Return the names occurring free in a term A9Return whether a subterm occurs in a (first order) term. BEGet the function from an application. If no application, returns the  entire term. C/Get the arguments from a function application. D6Get the argument names and types from a function type E)Get the return type from a function type *AMatch the second argument against the first, returning a list of I the names in the first paired with their matches in the second. Returns K Nothing if there is a match failure. There is no searching under binders. F0Substitute a name n with a value v in a term f H  !"#$%&'()*+,-./0123456789:;<=>?@ABCDE+FQ9:0654321;78 -*'&$  ./+,/()/()/(%)!"#!"/ <=> ?@AFBCDEF  --*'&$  ./+,/()/()/(%)!"#!"/  !"#$%&'()*+,-./06543211234567889:;<=>?@ABCDEF non-portable experimentaleb@dcs.st-and.ac.ukG+Basic parsec combinator for parsing terms. H+Parse a term which is not an application; ! use for parsing lists of terms. ,1Parse an expression with infix expressions (doesn' t work!) I9Basic parsec combinator for parsing inductive data types JBParse a string into a ViewTerm, without mucking about with parsec  or any extra parse rules. KDParse a string into an Inductive, without mucking about with parsec  or any extra parse rules. GHIJKGHIJKGHIJK non-portable experimentaleb@dcs.st-and.ac.ukrL.Environment and goal type for a given subgoal MGet the premises of the goal NGet the name of the goal OGet the type of the goal PTypes of elimination rule T[Allow metavariables in the definition, which will become theorems which need to be proved. UNo termination checking VNo need to cover all cases lTypecheck a term mDA tactic is any function which manipulates a term at the given goal - binding. Tactics may fail, hence the monad. n2Abstract type representing goal or subgoal names. o0Abstract type representing state of the system. r9Initialise a context, with no data or definitions and an  empty proof state. uQuickly convert a   into a real 87. B This is dangerous; you must know that typechecking will succeed,  and the resulting term won'%t have a valid type, but you will be H able to run it. This is useful if you simply want to do a substitution  into a  . -FConvert a term to matchable pattern form; i.e. the only names allowed G are variables and constructors. Any arbitrary function application is  removed. w*Add a new definition to the global state. I By default, these definitions must cover all cases and be well-founded, 5 but can be optionally partial or general recursive. G Returns the new context, and a list of names which need to be defined  to complete the definition. x9Add a new definition, with its type to the global state. 7 These definitions can be recursive, so use with care. y*Add a new definition to the global state. z3Forget a definition and all following definitions. {DAdd the general recursion elimination rule, thus making all further  definitions untrustworthy :). |Add the heterogenous (" John Major"") equality rule and its reduction },Declare a name which is to be defined later ~8Declare a type constructor which is to be defined later %Add a new axiom to the global state. AAdd a new primitive type. This should be done in assocation with  creating an instance of ( for the type, and creating appropriate  primitive functions. CAdd a new binary operator on constants. Warning: The type you give  is not checked! CAdd a new binary function on constants. Warning: The type you give  is not checked! GAdd a new primitive function on constants, usually used for converting ? to some form which can be examined in the type theory itself. , Warning: The type you give is not checked! 'Add a new externally defined function. , Warning: The type you give is not checked! AAdd implicit binders for names used in a type, but not declared. ? |Returns the new type and the number of implicit names bound. Begin a new proof. $Begin a new interactive definition.  Actually, just the same as  but this version allows you to A make recursive calls, which should of course be done with care. ?Suspend the current proof. Clears the current proof state; use   to continue the proof. EResume an unfinished proof, suspending the current one if necessary. = Fails if there is no such name. Can also be used to begin a 8 proof of an identifier previously claimed as an axiom.  Remember that you will need to ! the goal if you are resuming an  axiom. 8Freeze a name (i.e., set it so that it does not reduce) # Fails if the name does not exist. ,Unfreeze a name (i.e., allow it to reduce). # Fails if the name does not exist. Save the state (e.g. for Undo) FClears the saved state (e.g. if undo no longer makes sense, like when  a proof has been completed) 6Restore a saved state; fails if none have been saved. 4Normalise a term and its type (using old evaluator_ 4Reduce a term and its type to Weak Head Normal Form @Reduce a term and its type to Normal Form (using new evaluator) .Check a term in the context of the given goal 1Evaluate a term in the context of the given goal FCheck whether the conversion relation holds between two terms, in the  context of the given goal $Lookup a definition in the context. -Get the type of a definition in the context.  Check whether a name is defined GReturn the data type with the given name. Note that this knows nothing G about the difference between parameters and indices; that information 9 is discarded after the elimination rule is constructed. @Lookup a pattern matching definition in the context. Return the " type and the pattern definition. +Get all the names and types in the context 9Get all the pattern matching definitions in the context. / Also returns CAFs (i.e. 0 argument functions) 7Get all the inductive type definitions in the context. @Get the names of all of the constructors of an inductive family 1Find out what type of variable the given name is AGet an integer tag for a constructor. Each constructor has a tag A unique within the data type, which could be used by a compiler. (Get the arity of the given constructor. 5Get the pattern matching elimination rule for a type "Get the goals still to be solved. +Return whether all goals have been solved. !Get the number of unsolved goals :Return whether we are in the middle of proving something. @Get the current proof term, if we are in the middle of a proof. 9Get the type and context of the given goal, if it exists !Get information about a subgoal. %Get the names and types of all goals (Create a name unique in the proof state 'Lift a finished proof into the context 6Focus on a different hole, i.e. set the default goal. Hide a premise #The Identity tactic, does nothing. +The Tracing tactic; does nothing, but uses .  to dump the  current proof state HSequence two tactics; applies two tactics sequentially to the same goal >Apply a tactic, then apply another to each subgoal generated. ?Apply a sequence of tactics to the default goal. Read the type  as [m] -> m HApply a tactic, then apply the next tactic to the next default subgoal. Try a tactic. FTries the left tactic, if that fails try the right one. Shorthand for   x  y. !Prepare a goal for introduction. !Prepare a goal for introduction. Make a local claim %Solve a goal by applying a function. F If the term given has arguments, attempts to fill in these arguments & by unification and solves them (with ).  See  and  for slight variations. %Solve a goal by applying a function. G If the term given has arguments, this will create a subgoal for each. F Some arguments may be solved by unification, in which case they will H already have a guess attached after refinement, but the guess will not  be solved (via ). CSolve a goal by applying a function with some arguments filled in.  See  for details. Finalise a goal' s solution. ?If the goal has a solution, finalise it, otherwise prepare the  goal (with attack). I Typically, could be used on the subgoals generated by refinement, where F some may have solutions attached already, and others will need to be  prepared. 9Finalise as many solutions of as many goals as possible. Attach a solution to a goal. Remove a solution from a goal. /CRemove all claims with no guesses attached and which are unused in  their scope. 0-Substitute a let bound value into its scope. .Rename the outermost binder in the given goal 0Introduce an assumption (i.e. a lambda binding) 0Introduce an assumption (i.e. a lambda binding) #Keep introducing things until there's nothing left to introduce. #Keep introducing things until there's nothing left to introduce, $ Must introduce at least one thing. As ", but with names, and stop when we've run out of names. $ Fails if too many names are given. ?Check that the goal is definitionally equal to the given term, # and rewrite the goal accordingly. *Abstract over the given term in the goal. AAbstract over the given term in the goal, and also all variables 1 appearing in the goal whose types depend on it. EAdd a new top level argument after the arguments its type depends on I (changing the type of the theorem). This can be useful if, for example, 5 you find you need an extra premise to prove a goal. AReplace a term in the goal according to an equality premise. Any B equality type with three arguments is acceptable (i.e. the type,  and the two values), > provided there are suitable replacement and symmetry lemmas. ' Heterogeneous equality as provided by | is acceptable  (if you provide the lemmas!). ?Add an axiom to the global context which would solve the goal,  and apply it.  FIXME: This tactic doesn',t pick up all dependencies on types, but is 7 okay for simply typed axioms, e.g. equations on Nats. Normalise the goal Beta reduce in the goal 3Beta reduce the goal, unfolding the given function +Prepare to return a value in a computation !Prepare to return a quoted value Apply an eliminator. 2Apply the appropriate induction rule to the term. 6Apply the appropriate case analysis rule to the term.  Like ), but no induction hypotheses generated. EFind a trivial solution to the goal by searching through the context 9 for a premise which solves it immediately by refinement <Make a recursive call of a computation. The term must be an ? allowed recursive call, identified in the context by having a  labelled type. DCreate a .hs file containing (unreadable) Haskell code implementing  all of the definitions. 4 (TODO: Generate a more readable, usable interface)   !"#$%&'()*+,-./0123456789:;<=>?@ABCDE+FLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ؑrouklhijagfedcbst`yx}~|z{Y]Z^_^[\WXSVUTwvPRQnpqmLMNOMNOLMNOMNOPRQQRSVUTTUVWXXY]Z^_^[\Z[\]^_`agfedcbbcdefghijijkllmnopqrstuvwxyz{|}~ non-portable experimentaleb@dcs.st-and.ac.uk8Add primitive types for Int, Float and String, and some ' primitive operations [add,sub,mult,div] [int,float] and concat. Parse a primitive constant "Parse a term including primitives ! non-portable experimentaleb@dcs.st-and.ac.uk non-portable experimentaleb@dcs.st-and.ac.ukDTries to solve a simple goal automatically by trying each of these  in turn:  * Looking for an assumption ()  *  everything then solve by  5 * Splitting the goal, then solving each subgoal by  A * If the goal is of a type with more than one constructor, try  ! on each constructor in turn. * FIXME: not that this actually works yet. CSplit a goal into subgoals. Type of goal must be a one constructor  family, with constructor c, then proceeds by  c. CSplit a goal into subgoals. Type of goal must be a two constructor  family, with constructors l and r, then proceeds by  l. CSplit a goal into subgoals. Type of goal must be a two constructor  family, with constructors l and r, then proceeds by  r. 2Solve the goal by applying a numbered constructor -Solve an existential by providing a witness. 5 More generally; apply the first constructor of the  goal'Es type and provide the witness as its first non-inferrable argument. Try to solve a goal A by evaluating a term of type Maybe A . If the  answer is Just a', fill in the goal with the proof term a. "I123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyI132234"VUTSRQPONMLKJIHGFEDCBA@?>=<;:9876556789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW!xwvutsrqponmlkjihgfedcba`_^]\[ZYXXYZ[\]^_`abcdefghijklmnopqrstuvwxy# non-portable experimentaleb@dcs.st-and.ac.uk"Get reply from last shell command z{|}~ z{|}~z{|}~portable experimentaleb@dcs.st-and.ac.ukCLoad the given plugin file (which should be a full path to a .o or C .hs file) and update the Context. If it is a .hs file, it will be  compiled if necessary. ! Plugins must contain the symbol  1plugin_context :: Monad m => Context -> m Context > which updates the context. It may optionally contain symbols   plugin_parser :: Parser ViewTerm  which adds new parsing rules,  +plugin_shell :: ShellState -> IO ShellState  which updates the shell  Jplugin_commands :: IO [(String, String -> COntext -> IO (String, Context))] f which adds new user defined commands (which may need to do some setting up themselves, hence the IO) K Returns the new context and the extra parsing rules and commands, if any.  non-portable experimentaleb@dcs.st-and.ac.ukCreate a new shell state. Update the context in a shell (Add a user defined tactic to the shell. )Add a user defined command to the shell. ,Add another parsing rule for parsing terms. Parse a term using the shell's current parser extensions +Get the system state from a finished shell 7Get a string representation of the current proof state )Set up the equality type, for use by the  tactic Run a command shell. #Send a command directly to a shell BSend a command directly to a shell, allowing commands which might  do IO actions. &Get the install prefix of the library DImport a file of shell commands; fails if the module does not exist J in the current directory or search path, does nothing if already loaded. *Add a directory to the module search path 8Add the standard library path to the module search path  $%%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO$PQRSTUVWXYYZ[\]^_`abcdefghijklmnopqrstuvwxxyz{|y}~##                  ! " # $ % & ' ( ) ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B 5 C D G E J F G H I > J K 5 7 9 ; L M N K = O ? A C P A M r Q R S T U V W X Y Z [ \ ] V ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z g { | } ~        f                           ;                                                            *         w                      ]                    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwwxyz*{|}~sS      ;1"""""""""" "!"""#"$"%"&"'"(")"*"+","-"."/"0"1"2"3"4"5"6"7"8"9":";"<""=">"?"@"v"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O"P"Q"R""S"T"U"V"W"d""X"Y"Z#[#\#]#^#_#`#a#b#c#de ivor-0.1.9 Ivor.ViewTermIvor.TermParserIvor.TTIvor.PrimitivesIvor.Construction Ivor.Shell Ivor.Plugin Ivor.Prefix Ivor.Constant Ivor.Gadgets Ivor.TTCore Ivor.Errors Ivor.Nobby Ivor.UnifyIvor.Typecheck Ivor.TacticsIvor.Evaluator Ivor.Display Ivor.GrouperIvor.PatternDefs Ivor.Datatype Ivor.ICompileIvor.SC Ivor.Bytecode Ivor.CodegenC Ivor.RunTT Ivor.MakeData Ivor.State Ivor.CompilerIvor.Scopecheckbase Debug.Trace Ivor.EqualityIvor.ShellParserIvor.ShellStateName Inductivetypecon parametersindicescontype constructors ViewConsttypeofAnnotFileLocViewTermMetavar Annotation annotationterm PlaceholderEscape escapedtermEvalevaltermCodecodetypeQuote quotedtermStarConstantReturn returntermCallcalltermLabelfnamefargs labeltypeLetvarvalForallLambdavartypescopeAppfunargnametypevarNameTypeUnknownElimOpTypeConDataConFreeBoundTermname displayNamemkVarapplyviewviewTypefreeInnamesInoccursIngetApp getFnArgs getArgTypes getReturnTypesubstpTermpNoApp pInductiveparseTermStringparseDataStringGoalDatabindingsgoalNamegoalTypeRuleElimCasePattOptHoleyGenRecPartialPatternsPClause PWithClause scrutineepatterns arguments returnvalTTMTTError ErrContext NoSuchVarUnboundMessageNotConvertible CantUnifyIsDataaddData addDataNoElimIsTermcheckTacticGoalContextgoal defaultGoal emptyContextttfailgetError fastCheck toPattern addPatternDef addTypedDefaddDef forgetDef addGenRec addEqualitydeclare declareDataaddAxiom addPrimitiveaddBinOpaddBinFn addPrimFn addExternalFn addImplicittheorem interactivesuspendresumefreezethawsave clearSavedrestoreevalwhnfevalnew checkCtxtevalCtxtconvertsgetDefgetTypedefined getInductive getPatternDef getAllTypesgetAllPatternDefsgetAllInductives getAllDefsgetConstructorsnameTypegetConstructorTaggetConstructorArity getElimRulegetGoals allSolved numUnsolvedproving prooftermgetGoalgoalDatasubGoals uniqueNameqedfocushideidTactraceTac>->>=>tacs>+>try>|> attackWithattackclaimrefine basicRefine refineWithsolvetrySolve keepSolvingfillabandonrenameintro introNameintrosintros1 introsNamesequiv generalisedependentGeneraliseaddArgreplace axiomatisecomputebetaunfoldreturnComputationquoteValby inductioncasestrivialcallcompile addPrimitivesparsePrimitives parsePrimTermautosplitleftrightuseConexistsisItJust ShellStateresponseloadnewShell updateShell addTactic addCommand extendParsershellParseTerm getContextshowProofState configureEqrunShell sendCommand sendCommandIOprefix importFile addModulePath addStdlibPathSpineSnocEmptyResultFailureSuccessForgetforget traceIndex safeIndex??endstartsizeloselistify revlistifylookupMfindFileunJustPMFunPMDefPMRawSchemeSch RawSchemeRSchRawWithRWRetRWithMNUNPatternPMarkPTermPMarkConPConstPConPVarIndexedIndLevelledLevEnvBindMatchAnyGuessHolePiBinderBScopeSc constTypeStage ComputationCompTTConstProjMetaTyConConVPRStageREscapeREvalRCodeRQuote RComputationRCompRawRFileLocRAnnotRReturnRCallRLabelRMetaRInferRStarRConstRBindRAppVarsLiftsLiftfsLiftMvappindexiselevelisepappmakePs makePsUniq makePsEnvuniqifyAllStateuniqifyAllStateBuniqifyAllStateCfinalisepurepurebind binderMap updateMetasgetNames getBoundNames substName substTermgetSc mapSubTermgetArgs getRawArgsgetFun getExpecteduniqify mangleNamebindappArgstestidtesttermmkapp getargnames getappargs getappfun getrettype nameOccursoccCompoccBindoccStagefileLinedebugTTIvorMIErrorIContext INoSuchVarIUnboundIMessageINotConvertible ICantUnifyifailquotequote'WeakweakenweakenpPatValsCtxtVGNormalValueKripkeKr WeakeningWkMCompBlockedBEscapeBEvalBVBPBRecBPrimOpBPatDefBElimBTyConBConReadyRdInferRdQuoteRdCodeRdReturnRdCallRdLabelRdStarRdConstRTyConRConRdBindModelMBMREvPrimPrimOpElimRuleGammaGamGvalGPlicity FunOptionsTotal RecursiveFrozenElimsNoConstructorsYet elimRuleName caseRuleNameGlobal Undefined UnreducibleTConDCon PatternDefFun defplicitgetglobgettype getplicityextendemptyGamgetAList lookupval lookuptypeglookup getTyNamerecCon insertGam concatGam setFrozensetRecremovegInsertnfdocallkrApplypatmatchpm checkdupspmatchsplicekrquotemakeApp normalise etaNormalise convNormalise normaliseEnvconvNormaliseEnvaritySubstUnifiedunifyunifyenvunifyenvCollect unifyenvErr envToGamHACKunifynf unifyCollectsentinel unifynferrueq substNamesunifySubstTermconvert checkConv checkConvEnv typechecktcClaim checkAndBindcheckAndBindWithcheckAndBindPairpToVpToV2verifyHoleFn TacticActionHideGoalAddAxiomSolvedNextGoalAddGoalfindholeallholes holecheck runtactic runtacticEnvtacretthenTattempt makeholey claimholey claimsolved getClaims uniqifyClaimsdoClaimsregretcutevalGoal betaReduce reduceWithcasetac runCaseTacuniqifyBinders rename_usersensibleintrostytidyptovenv eval_whnfeval_nfdisplayHoleContext displayHoleGroupTTGCantGStarGConstGProjGPiGLetGLamGAppGElimGTyConGConGVGPgroupcheckDefcheckWellFounded matchClausesmkScheme checkCoveragematches getMatchesmatches' expandClause validClausesmostSpecClausemoreSpecClausemoreSpecClause' showClauses expandConcombinemostSpecmoreSpec isConPattDatatypeDatatycondatacons num_paramserulecrule e_ischemes c_ischemes e_rawschemes c_rawschemes RawDatatypeRDatartycon rdatacons rnum_paramsrerulercrule re_ischemes rc_ischemesDatadecl datatyconparams tycontypegetPatgetRedgetArity checkTypecheckTypeNoElim checkCons checkSchememkPat getPatVarsproject substVars dummyRule SimpleCase ImpossibleIReducecompileSchemesmangleArgOrder allDisjoint numDisjointdoCase1mkElimSCBody SSomeType SCantHappenSCaseSStarSConstSProjSPiSLetSAppSTyConSConSVSPSCSLamSCsSCNameSNNliftcollectelimSCshowSCsshowSCshowBodyshowBsByteDefFunInfoFIbytecodecnamectagfarityctagidByteOpCASEALETTAILCALLTYPEEVALTMPEVAL CLOSUREADDGETARGVARCLOSURECONCALLRETURNTMPDECLARESTARTFNBytecodeTmpVarTagAritymapInc compileAllscompileadddeclsgetTaggetCNamemkEval mkHeadersmkCode writeCodeRunTTsRGamTypeInfoTIRTBinderRTLetRTPiRTLamRunTT RTCantHappenRTypeValRTConstRTProjRTCaseRTBindRTAppRTElimRTConRTFunRTVarRunValuemkRTFunmkRTElim ConstructorsParams mkRawData mkSchemesmkIArgsmkIRetmkCon mkDatacons mkCaseType bindParams bindIndices bindTarget bindMotive bindMethods applyMethodisrec placeholderIStateIStdefsdatadefs eliminators holequeuehidden proofstateactions namesupply undoState initstaterespondgensym jumpqueuestailprf saveStatedoDatadoMkData suspendProof suspendFrom resumeProof dumpState scopeCheckmatchdbgshowpExp mkRawClausetraceInputCommand RunTactic UserTacticDecideCases InductionByExists AutoSolveRightConLeftConSplitTrivialUnfold Normalise AxiomatiseReplace GeneraliseEquivAddArg IntrosNamesIntros IntroNameIntroRenameAbandonCallTacQuoteTac ReturnTacFillSolveRefineLocalClaim AttackWithAttack UserCommandDrop PrimitivesJMEqQedPrfStatePrfUndoDumpFocusCompilePluginLoadResumeSuspendThawFreezeReplDataCheckPrintWHNFEvalTerm InteractiveTheorem DeclareDataDeclareAxiomTypedDefDef parseInputShellrepldatapromptfinishedcontext usertactics usercommandsimported extensions modulePath