Module Term
Derived constructors
val mkArrow : Constr.types -> Sorts.relevance -> Constr.types -> Constr.constrnon-dependent product
t1 -> t2, an alias forforall (_:t1), t2. Bewaret_2is NOT lifted. Eg: in contextA:Prop,A->Ais built by(mkArrow (mkRel 1) (mkRel 2))
val mkArrowR : Constr.types -> Constr.types -> Constr.constrFor an always-relevant domain
val mkNamedLambda : Names.Id.t Context.binder_annot -> Constr.types -> Constr.constr -> Constr.constrNamed version of the functions from
Term.
val mkNamedLetIn : Names.Id.t Context.binder_annot -> Constr.constr -> Constr.types -> Constr.constr -> Constr.constrval mkNamedProd : Names.Id.t Context.binder_annot -> Constr.types -> Constr.types -> Constr.typesval mkProd_or_LetIn : Constr.rel_declaration -> Constr.types -> Constr.typesConstructs either
(x:t)cor[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]cor[x=b:t]c
val mkNamedLambda_or_LetIn : Constr.named_declaration -> Constr.constr -> Constr.constr
Other term constructors.
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 Context.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrprodn n l b=forall (x_1:T_1)...(x_n:T_n), bwherelis(x_n,T_n)...(x_1,T_1)....
val compose_prod : (Names.Name.t Context.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrcompose_prod l b- returns
forall (x_1:T_1)...(x_n:T_n), bwherelis(x_n,T_n)...(x_1,T_1). Inverse ofdecompose_prod.
val lamn : int -> (Names.Name.t Context.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrlamn n l b- returns
fun (x_1:T_1)...(x_n:T_n) => bwherelis(x_n,T_n)...(x_1,T_1)....
val compose_lam : (Names.Name.t Context.binder_annot * Constr.constr) list -> Constr.constr -> Constr.constrcompose_lam l b- returns
fun (x_1:T_1)...(x_n:T_n) => bwherelis(x_n,T_n)...(x_1,T_1). Inverse ofit_destLam
val to_lambda : int -> Constr.constr -> Constr.constrto_lambda n l- returns
fun (x_1:T_1)...(x_n:T_n) => Twherelisforall (x_1:T_1)...(x_n:T_n), T
val to_prod : int -> Constr.constr -> Constr.constrto_prod n l- returns
forall (x_1:T_1)...(x_n:T_n), Twherelisfun (x_1:T_1)...(x_n:T_n) => T
val it_mkLambda_or_LetIn : Constr.constr -> Constr.rel_context -> Constr.constrval it_mkProd_or_LetIn : Constr.types -> Constr.rel_context -> Constr.typesval lambda_applist : Constr.constr -> Constr.constr list -> Constr.constrIn
lambda_applist c args,cis supposed to have the formλΓ.cwithΓwithout let-in; it returnscwith the variables ofΓinstantiated byargs.
val lambda_appvect : Constr.constr -> Constr.constr array -> Constr.constrval lambda_applist_assum : int -> Constr.constr -> Constr.constr list -> Constr.constrIn
lambda_applist_assum n c args,cis supposed to have the formλΓ.cwithΓof lengthnand possibly with let-ins; it returnscwith the assumptions ofΓinstantiated byargsand the local definitions ofΓexpanded.
val lambda_appvect_assum : int -> Constr.constr -> Constr.constr array -> Constr.constr
val prod_appvect : Constr.types -> Constr.constr array -> Constr.typesprod_appvectforall (x1:B1;...;xn:Bn), Ba1...an- returns
B[a1...an]
val prod_applist : Constr.types -> Constr.constr list -> Constr.typesval prod_appvect_assum : int -> Constr.types -> Constr.constr array -> Constr.typesIn
prod_appvect_assum n c args,cis supposed to have the form∀Γ.cwithΓof lengthnand possibly with let-ins; it returnscwith the assumptions ofΓinstantiated byargsand the local definitions ofΓexpanded.
val prod_applist_assum : int -> Constr.types -> Constr.constr list -> Constr.types
Other term destructors.
val decompose_prod : Constr.constr -> (Names.Name.t Context.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_lam : Constr.constr -> (Names.Name.t Context.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 Context.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_lam_n : int -> Constr.constr -> (Names.Name.t Context.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_assum : 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_lam_assum : Constr.constr -> Constr.rel_context * Constr.constrIdem with lambda's and let's
val decompose_prod_n_assum : int -> Constr.types -> Constr.rel_context * Constr.typesIdem but extract the first
npremisses, counting let-ins.
val decompose_lam_n_assum : int -> Constr.constr -> Constr.rel_context * Constr.constrIdem for lambdas, _not_ counting let-ins
val decompose_lam_n_decls : int -> Constr.constr -> Constr.rel_context * Constr.constrIdem, counting let-ins
val prod_assum : Constr.types -> Constr.rel_contextReturn the premisses/parameters of a type/term (let-in included)
val lam_assum : Constr.constr -> Constr.rel_contextval prod_n_assum : 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_assum : Constr.types -> Constr.typesRemove the premisses/parameters of a type/term (including let-in)
val strip_lam_assum : Constr.constr -> Constr.constr
...
type arity= Constr.rel_context * Sorts.t
val 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_family= Sorts.family=|InSProp|InProp|InSet|InTypetype sorts= private Sorts.t=|SProp|Prop|Set|Type of Univ.Universe.tType