proposition: Lemma encoding_closed e : bounded_indi 0 (encode_problem e).
proof: Proof. destruct e as [p q]; cbn. destruct (find_largest_variable p) as [n H1]. destruct (find_largest_variable q) as [m H2]. apply exists_n_bounded. cbn. destruct (Arith.Compare_dec.le_lt_dec n m). - assert (max n m = m) as -> by lia. repeat split. 2: easy. now apply (bounded_indi_term_up n m). - assert (max n m = n) as -> by lia. repeat split. easy. apply (bounded_indi_term_up m n). lia. easy. Qed.
imports: PeanoNat Lia Vector List Undecidability.SOL(SOL PA2) Undecidability.Shared.Libs.PSL(Vectors) Undecidability.SOL.Util(Syntax Subst Tarski PA2_facts PA2_categoricity) Undecidability.Synthetic(Definitions DecidabilityFacts EnumerabilityFacts ListEnumerabilityFacts ReducibilityFacts) Undecidability.H10(H10p) Undecidability.Shared.Dec