Termval mkArrow : Constr.types -> Sorts.relevance -> Constr.types -> Constr.constrnon-dependent product t1 -> t2, an alias for forall (_:t1), t2. Beware t_2 is NOT lifted. Eg: in context A:Prop, A->A is built by (mkArrow (mkRel 1) (mkRel 2))
val mkArrowR : Constr.types -> Constr.types -> Constr.constrFor an always-relevant domain
val mkNamedLambda : Names.Id.t Constr.binder_annot -> Constr.types -> Constr.constr -> Constr.constrNamed version of the functions from Term.
val mkNamedLetIn : Names.Id.t Constr.binder_annot -> Constr.constr -> Constr.types -> Constr.constr -> Constr.constrval mkNamedProd : Names.Id.t Constr.binder_annot -> Constr.types -> Constr.types -> Constr.typesval mkProd_or_LetIn : Constr.rel_declaration -> Constr.types -> Constr.typesConstructs either (x:t)c or [x=b:t]c
val mkProd_wo_LetIn : Constr.rel_declaration -> Constr.types -> Constr.typesval mkNamedProd_or_LetIn : Constr.named_declaration -> Constr.types -> Constr.typesval mkNamedProd_wo_LetIn : Constr.named_declaration -> Constr.types -> Constr.typesval mkLambda_or_LetIn : Constr.rel_declaration -> Constr.constr -> Constr.constrConstructs either [x:t]c or [x=b:t]c
val mkNamedLambda_or_LetIn : Constr.named_declaration -> Constr.constr -> Constr.constrapplist (f,args) and its variants work as mkApp
val applist : (Constr.constr * Constr.constr list) -> Constr.constrval applistc : Constr.constr -> Constr.constr list -> Constr.constrval appvect : (Constr.constr * Constr.constr array) -> Constr.constrval appvectc : Constr.constr -> Constr.constr array -> Constr.constrval prodn : int -> (Names.Name.t Constr.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrprodn n l b = forall (x_1:T_1)...(x_n:T_n), b where l is (x_n,T_n)...(x_1,T_1)....
val compose_prod : (Names.Name.t Constr.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrcompose_prod l b
val lamn : int -> (Names.Name.t Constr.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrlamn n l b
val compose_lam : (Names.Name.t Constr.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrcompose_lam l b
val to_lambda : int -> Constr.constr -> Constr.constrto_lambda n l
val to_prod : int -> Constr.constr -> Constr.constrto_prod n l
val it_mkLambda_or_LetIn : Constr.constr -> Constr.rel_context -> Constr.constrval it_mkProd_wo_LetIn : Constr.types -> Constr.rel_context -> Constr.typesval it_mkProd_or_LetIn : Constr.types -> Constr.rel_context -> Constr.typesval lambda_applist : Constr.constr -> Constr.constr list -> Constr.constrIn lambda_applist c args, c is supposed to have the form λΓ.c with Γ without let-in; it returns c with the variables of Γ instantiated by args.
val lambda_appvect : Constr.constr -> Constr.constr array -> Constr.constrval lambda_applist_decls : int -> Constr.constr -> Constr.constr list -> Constr.constrIn lambda_applist_decls n c args, c is supposed to have the form λΓ.c with Γ of length n and possibly with let-ins; it returns c with the assumptions of Γ instantiated by args and the local definitions of Γ expanded.
val lambda_appvect_decls : int -> Constr.constr -> Constr.constr array -> Constr.constrpseudo-reduction rule
val prod_appvect : Constr.types -> Constr.constr array -> Constr.typesprod_appvect forall (x1:B1;...;xn:Bn), B a1...an
val prod_applist : Constr.types -> Constr.constr list -> Constr.typesval prod_appvect_decls : int -> Constr.types -> Constr.constr array -> Constr.typesIn prod_appvect_decls n c args, c is supposed to have the form ∀Γ.c with Γ of length n and possibly with let-ins; it returns c with the assumptions of Γ instantiated by args and the local definitions of Γ expanded.
val prod_applist_decls : int -> Constr.types -> Constr.constr list -> Constr.typesval decompose_prod : Constr.constr -> (Names.Name.t Constr.binder_annot * Constr.constr) list * Constr.constrTransforms a product term $ (x_1:T_1)..(x_n:T_n)T $ into the pair $ ((x_n,T_n);...;(x_1,T_1),T) $ , where $ T $ is not a product.
val decompose_lambda : Constr.constr -> (Names.Name.t Constr.binder_annot * Constr.constr) list * Constr.constrTransforms a lambda term $ x_1:T_1..x_n:T_nT $ into the pair $ ((x_n,T_n);...;(x_1,T_1),T) $ , where $ T $ is not a lambda.
val decompose_prod_n : int -> Constr.constr -> (Names.Name.t Constr.binder_annot * Constr.constr) list * Constr.constrGiven a positive integer n, decompose a product term $ (x_1:T_1)..(x_n:T_n)T $ into the pair $ ((xn,Tn);...;(x1,T1),T) $ . Raise a user error if not enough products.
val decompose_lambda_n : int -> Constr.constr -> (Names.Name.t Constr.binder_annot * Constr.constr) list * Constr.constrGiven a positive integer $ n $ , decompose a lambda term $ x_1:T_1..x_n:T_nT $ into the pair $ ((x_n,T_n);...;(x_1,T_1),T) $ . Raise a user error if not enough lambdas.
val decompose_prod_decls : Constr.types -> Constr.rel_context * Constr.typesExtract the premisses and the conclusion of a term of the form "(xi:Ti) ... (xj:=cj:Tj) ..., T" where T is not a product nor a let
val decompose_lambda_decls : Constr.constr -> Constr.rel_context * Constr.constrIdem with lambda's and let's
val decompose_prod_n_decls : int -> Constr.types -> Constr.rel_context * Constr.typesIdem but extract the first n premisses, counting let-ins.
val decompose_lambda_prod_n_decls : int -> Constr.constr -> Constr.types -> Constr.rel_context * Constr.constr * Constr.typesIdem but extracting simultaneously the first n premisses, counting let-ins, in a term and its type.
val decompose_lambda_n_assum : int -> Constr.constr -> Constr.rel_context * Constr.constrIdem for lambdas, including let-ins but _not_ counting them; This is typically the function to use to extract the context of a Fix up to and including the decreasing argument, counting as many lambda's as given by the decreasing index + 1
val decompose_lambda_n_decls : int -> Constr.constr -> Constr.rel_context * Constr.constrIdem, counting let-ins
val prod_decls : Constr.types -> Constr.rel_contextReturn the premisses/parameters of a type/term (let-in included)
val lambda_decls : Constr.constr -> Constr.rel_contextval prod_n_decls : int -> Constr.types -> Constr.rel_contextReturn the first n-th premisses/parameters of a type (let included and counted)
val lam_n_assum : int -> Constr.constr -> Constr.rel_contextReturn the first n-th premisses/parameters of a term (let included but not counted)
val strip_prod : Constr.types -> Constr.typesRemove the premisses/parameters of a type/term
val strip_lam : Constr.constr -> Constr.constrval strip_prod_n : int -> Constr.types -> Constr.typesRemove the first n-th premisses/parameters of a type/term
val strip_lam_n : int -> Constr.constr -> Constr.constrval strip_prod_decls : Constr.types -> Constr.typesRemove the premisses/parameters of a type/term (including let-in)
val strip_lambda_decls : Constr.constr -> Constr.constrAn "arity" is a term of the form [x1:T1]...[xn:Tn]s with s a sort. Such a term can canonically be seen as the pair of a context of types and of a sort
type arity = Constr.rel_context * Sorts.tval mkArity : arity -> Constr.typesBuild an "arity" from its canonical form
val destArity : Constr.types -> arityDestruct an "arity" into its canonical form
val isArity : Constr.types -> boolTell if a term has the form of an arity
type sorts = private Sorts.t = | SProp | |
| Prop | |
| Set | |
| Type of Univ.Universe.t | (* Type *) |
| QSort of Sorts.QVar.t * Univ.Universe.t |
val decompose_prod_assum : Constr.types -> Constr.rel_context * Constr.typesval decompose_lam_assum : Constr.constr -> Constr.rel_context * Constr.constrval decompose_prod_n_assum : int -> Constr.types -> Constr.rel_context * Constr.typesval prod_assum : Constr.types -> Constr.rel_contextval lam_assum : Constr.constr -> Constr.rel_contextval prod_n_assum : int -> Constr.types -> Constr.rel_contextval strip_prod_assum : Constr.types -> Constr.typesval strip_lam_assum : Constr.constr -> Constr.constrval decompose_lam : Constr.t -> (Names.Name.t Constr.binder_annot * Constr.t) list * Constr.tval decompose_lam_n : int -> Constr.t -> (Names.Name.t Constr.binder_annot * Constr.t) list * Constr.tval decompose_lam_n_assum : int -> Constr.t -> Constr.rel_context * Constr.tval decompose_lam_n_decls : int -> Constr.t -> Constr.rel_context * Constr.t