{'fraction_non_alphanumeric': 0.036619718309859155, 'fraction_numerical': 0.0, 'mean_word_length': 4.825136612021858, '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}}
Strong Normalization as Safe Interaction

When enriching the lambda-calculus with rewriting, union types may be needed to type all strongly normalizing terms. However, with rewriting, the elimination rule (orE) of union types may also allow to type non normalizing terms (in which case we say that (orE) is unsafe). This occurs in particular with non-determinism, but also with some confluent systems. It appears that studying the safety of (orE) amounts to the characterization, in a term, of safe interactions between some of its subterms. In this paper, we study the safety of (orE) for an extension of the lambda-calculus with simple rewrite rules. We prove that the union and intersection type discipline without (orE) is complete w.r.t. strong normalization. This allows to show that (orE) is safe if and only if an interpretation of types based on biorthogonals is sound for it. We also discuss two sufficient conditions for the safety of (orE), and study an alternative biorthogonality relation, based on the observation of the least reducibility candidate.