- New
primitive (uint63 <i>)
term constructor - New
primitive (foal64 <f>)
term constructor
- New
coq.reduction.lazy.whd_all
- New
coq.reduction.cbv.whd_all
- New
coq.reduction.vm.whd_all
- New
coq.env.const-primitive?
Major reorganization of sources:
- src/ is for .ml files
- elpi/ for .elpi files
- theories/ for .v files meant to be installed
- tests/ for the test suite, not to be installed
- examples/ for tests (not to be installed)
Moreover the apps/ directory is for applications written in Coq-Elpi, their structure follows the same convention
Requires Elpi 1.11 and Coq 8.12.
- Display failures generated by
std.assert!
as errors
- Use the new
coq.elaborate-skeleton
API to insert coercions
- Embedding for sorts was incorrectly mapping
Prop
tosprop
coq.env.add-const
made 8.12 friendly with a workaround for coq/coq#12759
- New
coq.elaborate-skeleton
andcoq.elaborate-ty-skeleton
that run Coq's elaborator on a term obtained by disregarding evars and universes in the given input. Unfortunately Coq's elaborator does not take terms as input, but glob terms, and the conversion function is not lossless. See alsolib:elpi.hole
. - New
coq.elaborate-indt-decl-skeleton
to elaborate an inductive type declaration. - New
coq.elaborate-arity-skeleton
to elaborate an arity. - New
coq.env.current-path
to get the current module path. - New
coq.modpath->path
andcoq.modpath->path
to get access to the components of a module path. - Change
coq.elpi.accumulate
understands the@local!
attribute, which makes the clausesLocal
to the module into which they live.
- New
lib:elpi.hole
constant that can be used in place of a unification variable to denote an implicit argument when callingcoq.*-skeleton
APIs
Requires Elpi 1.11 and Coq 8.12.
Locality is now supported by coq.CS.declare-instance
Requires Elpi 1.11 and Coq 8.11.
- New option
@holes!
to be assumed (as in@holes! => ...
) before calling any Coq API. When this option is given unknown unification variables are interpreted as "implicit arguments" (linear holes that see all the variables in scope). If the unification variable is outside the pattern fragment the following heuristic is applied: arguments that are not variables are heuristically dropped; arguments which are variables but occur multiple times are kept only once (the first occurrence is kept, the others are dropped).
- New
coq.arguments.set-default-implicit
that behaves likeArguments foo : default implicits
- Change of arguments of type
@global?
attributes@local!
or@global!
. In order to pass a locality directive one has to do something like@global! => coq.add-something
Locality is understood by:coq.TC.declare-instance
coq.coercion.declare
coq.arguments.set-implicit
coq.arguments.set-default-implicit
coq.arguments.set-name
coq.arguments.set-scope
coq.arguments.set-simplification
coq.notation.add-abbreviation
coq.env.add-const
- Change of argument for deprecation to attribute
@deprecated! Since Message
. In order to pass a deprecation directive one has to do something like@deprecated! "8.11.0" "use this instead" => coq.add-something
Deprecation is understood by:coq.notation.add-abbreviation
- New macro
@transparent!
with valueff
to be used withcoq.env.add-const
engine/elaborator.elpi
is now installed (but not used by default). One canElpi Accumulate "engine/elaborator.elpi".
in order to load it. It is too experimental to use it in production, but it is also hard to experiment with it without having it installed.
- Switch to Github Actions and Coq Community's Docker workflow
- anonymous record fields are not given a generated name anymore
coq.typecheck
andcoq.typecheck-ty
API now ensure that all unification problems required by type checking are actually solved by Coq's unifier- some debug printings used to raise errors in corner cases, now fixed
Minor fixes
- Missing opaque data type declaration for
abbreviation
(could lead to confusing type errors) - Parse also "keywords" where
qualified_name
is expected.Elpi Export x.
turnsx
into a keyword, and that used to break commandsElpi Something x ...
. Parsing of all commands is now resilient to this.
Requires Elpi 1.11 and Coq 8.11 or 8.12.
The main visible change is the indt-decl
data type that now faithfully
represents an inductive type declaration (including the implicit status of
parameters). Also all the predicates implemented in coq-lib
are now in
the coq.
namespace.
- New
coq.notation.abbreviation-body
to retrieve the number of arguments and body of a syntactic definition. - New
coq.id->name
to convert a relevant id into an irrelevant pretty printing hint. - New
coq.mk-n-holes
to produce a list of flexible terms. - New
coq.env.indt-decl
to read for the environment an inductive type represented in HOAS form coq.env.indt->decl
renamedcoq.build-indt-decl
- New
coq.env.rename-indt-decl
- Change
coq.env.add-indt
now sets the imlicit status of the inductive type and its constructors (since theparameter
constructor can carry it) - New
coq.arity->nparams
to count the number of parameters - Change
parse-attributes
made deterministic - Change
coq.unify-leq
andcoq.unify-eq
now return a diagnostic - Change
subst-prod
->coq.subst-prod
- Change
subst-fun
->coq.subst-fun
- Change
prod->fun
->coq.prod->fun
- Change
count-prods
->coq.count-prods
- Change
prod-R-fun
->coq.prod-R-fun
- Change
safe-dest-app
->coq.safe-dest-app
- Change
arity->sort
->coq.arity->sort
- Change
term->gref
->coq.term->gref
- Change
fresh-type
->coq.fresh-type
- Change
build-match
->coq.build-match
- Change
map-under-fun
->coq.map-under-fun
- Change
iter-under-fun
->coq.iter-under-fun
- Change
bind-ind-arity
->coq.bind-ind-arity
- Change
with-TC
->coq.with-TC
- Change
valid-attribute
->coq.valid-attribute
- Change
is-one-of
->coq.is-one-of
- Change
parse-attributes
->coq.parse-attributes
- Change
mk-app
->coq.mk-app
- Change
mk-app-uvar
->coq.mk-app-uvar
- Change
mk-eta
->coq.mk-eta
- New support for
Type@{name}
in Coq{{ quotations }}
. - Fix more precise promotion of universe variables to universe global names
in builtins changing the Coq environment (eg
coq.env.add-const
). - New user error when
coq.elpi.accumulate
is given a clause that mentions universe variables: only global universes can be stored in a DB.
- Change
indt-decl
:- the
parameter
constructor carries anid
,imlpicit_kind
and a type - the
coinductive
constructor was removed, theinductive
one carries abool
,tt
for inductive,ff
for coinductive - the
inductive
constructor no more carries the number of non uniform parameters, and the inductive type arity (see below) is no more a simple term but rather anarity
(all its parameters are non uniform) - the
constructor
constructor now carries anarity
so that non uniform parameters can be represented faitfully
- the
- New
arity
data type, constructors areparameter
(shared withindt-decl
) andarity
. - New
indt-decl
argument type introduced in version 1.3 now supports the syntax of inductive types (not just records). EgElpi command Inductive P {A} t : I := | K1 .. | K2 ..
. - Change
context-item
now carries anid
and animplicit-kind
- Change
const-decl
now carries an arity to describe the parameters of the definition in a faithful way - New
@pi-parameter ID Ty p\ ...
to postulate a nominalp
with typeTy
and a name built out of the idID
- New derivations
derive.invert
andderive.idx2inv
now called byderive
- New global command
derive
taking in input the name of an inductive or an inductive declaration. In the latter case all derivations are placed in a module named after the inductive
Port to Coq 8.11, two API changes:
field
constructor ofindt-decl
takes an argument of typefield-attributes
rather than a simplebool
. The macro@coercion!
works in both versions, as well as omitting the attribute using_
. In 8.11 it is possible to disable canonical inference for a field using the(canonical false)
attribute.coq.env.add-abbreviation
takes an extra argument (deprecation info). Code working on both versions can be obtained as follows:if (coq.version _ 8 10 _) (std.unsafe-cast coq.notation.add-abbreviation F, F ... Abbrev) (std.unsafe-cast coq.notation.add-abbreviation G, G ... Deprecation Abbrev).
Requires Elpi 1.10 and Coq 8.10 or 8.11.
The main visible change is that opaque data types such as @constructor
,
@inductive
and @constant
are now written without the @
, since Elpi now
supports the typeabbrev
directive.
The main invisible change is that code accumulated into commands and tactics is
"compiled" by Elpi once and forall in the context in which it is accumulated. As
a consequence Coq code inside {{quotations}}
is processed in that, and only
that, context of notations, scopes, etc. Data bases are compiled every time it
is needed in the current Coq context, hence quotations should be used with care.
The file coq-HOAS.elpi
is now distributed as part of coq-builtin.elpi
.
- New
Elpi Export command
to makecommand
available without theElpi
prefix. Elpi command
(exported or not) can now access Coq's attributes (the#[option]
thing). See the HOAS section below.- Coq keywords or symbols passed to command and tactics are interpreted as
strings even if not quoted. Eg
Elpi command =>
is the same ofElpi command "=>"
. - The identifiers
Record
,Definition
,Axioms
andContext
are now reserved (see the HOAS section below). In order to pass them (as strings) one has to quote them.
- New
coq.typecheck-ty
to typecheck a type (outputs a universe) - New
coq.env.import/export-module
. - New
coq.env.begin/end-section
. - New
coq.notation.abbreviation
to unfold an abbreviation. - New
coq.locate-abbreviation
to locate abbreviations. - New
coq.locate-any
that never fails and gives a list of possible interpretations (term, abbreviation, module, module type). - Rename
coq.env.typeof-gr
tocoq.env.typeof
. - Rename
term->gr
togerm->gref
. - Rename
coq.gr->*
tocoq.gref->*string*
- Change
coq.typecheck
andcoq.typecheck-indt-decl
so that they never fail and have a 3rd argument of typediagnostic
(from Elpi 1.9) to signal success or errors (that can be printed). - Change
coq.elpi.accumulate
so that one can put the clause either in current module from which the program is started, or in the current module while the program runs (which can be different if one uses thecoq.env.begin-module
API). - Remove
coq.elaborate
andcoq.elaborate-indt-decl
. - Fix
coq.typecheck T TY
to uses Coq's unification to equate the type inferred forT
andTY
(when it is provided by the user). - Fix
coq.CS.*
w.r.t. default instances of canonical structures. - Fix all APIs changing the Coq global state to abort if they are used from a tactic.
- Fix
coq.gr->string
to not duplicate the label part of the name
- Change context entry
def
to not carry a cache for the normal form of the defined term (now cached by a specificcache
context entry).def
now carries the exact same information of alet
, asdecl
carries the same information of afun
. - New
indt-decl
argument type with a concrete syntax that mimics the standard one for records. EgElpi command Record x := K { f : T }
. - New
const-decl
argument type with a concrete syntax that mimics the standard one for definitions or axioms. EgElpi command Definition x := t.
. - New
ctx-decl
argument type with a concrete syntax that mimics the standard one for contexts. EgElpi command Context T (x : T).
. - Add to the context under which
main
is run the list of attributes passed to the command invocation (Coq syntax is for example#[myflag]
). See theattribute-value
data type incoq-builtin.elpi
andparse-attributes
helper incoq-lib.elpi
.
- New
coq.gr->path
to get the path components as a list of strings - Failure of
coq.ltac1.call
is now turned into logical failure, as any other Elpi tactic - Fix
coq.end.add-indt
in the case of record (was not flagging the inductive as such) - Fix
coq.version
, wrong parsing of beta versions - Expose
set
andmap
from Elpi 1.8 (generic data structure for ground terms)
- Improve reflexive tactic demo
- Fix documentation of
coq.gr->*
APIs coq-HOAS.elpi
,coq-lib.elpi
andcoq-builtin.elpi
are now installed since they provide useful doc (but are not needed by the runtime, since they are embedded inelpi.vo
)
-
interface made consistent with other derivations:
derive.param2
takes in input optional suffix, instead of the full name of the derived concept -
storage of previous derivations based on Elpi Db
-
the derivation generates nicer types for relators over fixpoints (the new types are convertible to the old ones, but the fixpoint is not expanded). PR #84 by Cyril Cohen
- Improved documentation of
coq.typecheck
- First public release