package coq-core
The Coq Proof Assistant -- Core Binaries and Tools
Install
Dune Dependency
Authors
Maintainers
Sources
coq-8.20.1.tar.gz
md5=0cfaa70f569be9494d24c829e6555d46
sha512=8ee967c636b67b22a4f34115871d8f9b9114df309afc9ddf5f61275251088c6e21f6cf745811df75554d30f4cebb6682f23eeb2e88b771330c4b60ce3f6bf5e2
doc/coq-core.pretyping/Combinators/index.html
Module Combinators
Source
telescope env sigma ctx
turns a context x1:A1;...;xn:An
into a right-associated nested sigma-type of the right sort. It returns:
- the nested sigma-type
T := {x1:A1 & ... {xn-1:An-1 & ... An} ... }
- the canonical tuple
(existsT _ x1 ... (existsT _ xn-1 xn) ...)
inhabiting the sigma-type in the given context - an instantiation of the assumptions of
ctx
with values they have in the contextx:T
, that isx1:=projT1 x;...;xn-1:=projT1 ... (projT2 x);xn:=projT2 ... (projT2 x)
; note that let-ins in the original context are preserved Depending on the sorts of types, it uses eitherex
,sig
orsigT
, even if we always usedsigT
above as an example.
Source
val telescope :
Environ.env ->
Evd.evar_map ->
EConstr.rel_context ->
Evd.evar_map * EConstr.rel_context * telescope
make_iterated_tuple env sigma ~default c
encapsulates c
(of inferred type C
) and its free variables x1,...,xn
into a right-associated nested tuple in a sigT
-type. It returns:
- the nested type
{x1:A1 & ... {xn:An & ... C} ... }
- the tuple
(existsT _ x1 ... (existsT _ xn c) ...)
- an alternative tuple
(existsT _ x1 ... (existsT _ xn default) ...)
; ifdefault
has not the right type, it fails.
Source
val make_iterated_tuple :
Environ.env ->
Evd.evar_map ->
default:EConstr.constr ->
EConstr.constr ->
EConstr.types ->
Evd.evar_map * telescope * EConstr.constr
make_selector env sigma ~pos ~special ~default c
constructs a case-split on c
(assumed of inductive type), with the pos
-th branch returning special
, and all the other branch returning default
.
Source
val make_selector :
Environ.env ->
Evd.evar_map ->
pos:int ->
special:EConstr.constr ->
default:EConstr.constr ->
EConstr.constr ->
EConstr.types ->
EConstr.constr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>