{'fraction_non_alphanumeric': 0.020399305555555556, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 4.971502590673575, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Termination and Reduction Checking in the Logical Framework

The logical framework LF [HHP93] offers concise encodings of deductive systems and their meta-theory. Twelf [SP98] is a realization of LF. It provides a higher-order logic programming language for the implementation of deductive systems as well as a higher-order inductive theorem prover to automatically prove properties about these systems. The inductive theorem prover has been used successfully to prove several challenging theorems like cut-admissibility of intuitionistic logic and the Church-Rosser theorem. Under the proofs-asprograms paradigm the application of the induction hypothesis (IH) in a proof corresponds to the recursive call in a program. To check that the IH application is valid, we need to show that the induction hypothesis is smaller than the induction conclusion according to a well-founded order. This corresponds to proving that the arguments in the recursive call decrease according to a well-founded order, i.e., a program terminates. Twelf uses a termination checker based on structural ordering [RP96] to check termination of programs and to generate valid induction hypotheses according to a given order. We are interested in extending the power of the induction component to enable complete induction or so called course-of-value ind. Complete induction plays an important role in proofs about sequences of computation. These proofs follow by induction on the structure of the computation sequence. Often we do not only want to apply the induction hypothesis to immediate subsequences, but to all smaller subsequences. In general, we also want to be able to apply the induction hypothesis to the outcome of a previous IH application. This can be done by first showing that the computation sequence resulting from the IH application is smaller than the sequence we applied the IH to. Then we verify that each IH application itself is valid, i.e. the sequence we apply the IH to is smaller than the original sequence. To show that a subcomputation is smaller than the original sequence of computation we need to reason about orders relating subsequences. In this paper, we present a reduction and termination checker which reasons about orders. The reduction checker verifies properties relating input and out-