fact: Definition encode_arguments (B : term) (a i : nat) A_j := if eq_term uGraph.init_graph B A_j then ret (tApp (tRel (S a)) [tRel (a - i -1)]) else A <- tmUnquoteTyped Type A_j ;; name <- (tmEval cbv (name_of A_j ++ "_term") >>= tmFreshName) ;; E <- tmTryInfer name None (encodable A);; l <- tmQuote (@enc A E);; ret (tApp l [tRel (a - i - 1) ]).
imports: Ascii String Undecidability.L(Util.L_facts) MetaCoq(Template.All Template.Checker) Undecidability.Shared.Libs.PSL.Base MetaCoq.Utils.bytestring