From Undecidability.L Require Export Util.L_facts.
From Undecidability.L.Tactics Require Export LTactics GenEncode.
From Undecidability.L Require Import Datatypes.LBool Functions.EqBool Datatypes.LProd.
(* ** Encoding of natural numbers *)
MetaCoq Run (tmGenEncode "nat_enc" nat).
Hint Resolve nat_enc_correct : Lrewrite.
Instance termT_S : computableTime' S (fun _ _ => (1,tt)).
Instance eqbNat_inst : eqbClass Nat.eqb.
Instance eqbComp_nat : eqbCompT nat.
(*Defined.*)
Definition c__min1 := 5.
Definition c__min2 := 15.
Definition min_time x y := (min x y + 1) * c__min2.
Instance termT_nat_min : computableTime' Nat.min (fun x _ => (c__min1, fun y _ => (min_time x y, tt))).

Lemma unenc_correct2 t n : nat_unenc t = Some n -> nat_enc n = t.