(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
From Ltac2 RequireImport Init.
Ltac2 Type t := inductive. (** An [inductive] is a name of a mutually inductive type and the index of an
inductive block within that type. *)
Ltac2 @ external equal : t -> t -> bool := "rocq-runtime.plugins.ltac2""ind_equal". (** Equality test. *)
Ltac2 Type data. (** The actual data specified by a concrete declaration of an inductive type, containing,e.g.,itsconstructorsanditsparameters.Avalueoftype [data]correspondstooneinductivetypewithinalargermutuallyinductive
block. *)
Ltac2 @ external data : t -> data := "rocq-runtime.plugins.ltac2""ind_data". (** Get the value named by [t] in the current environment. Panics if [t] is not
in the current environment. *)
Ltac2 @ external repr : data -> t := "rocq-runtime.plugins.ltac2""ind_repr". (** Returns the name of the inductive type corresponding to the block. Inverse
of [data]. *)
Ltac2 @ external index : t -> int := "rocq-runtime.plugins.ltac2""ind_index". (** Returns the index of the inductive type inside its mutual block. Guaranteed torangebetween[0]and[nblocksdata-1]where[data]wasretrievedusing
the above function. *)
Ltac2 @ external nblocks : data -> int := "rocq-runtime.plugins.ltac2""ind_nblocks". (** Returns the number of inductive types appearing in a mutual block. *)
Ltac2 @ external nconstructors : data -> int := "rocq-runtime.plugins.ltac2""ind_nconstructors". (** Returns the number of constructors appearing in the current block. *)
Ltac2 @ external get_block : data -> int -> data := "rocq-runtime.plugins.ltac2""ind_get_block". (** [get_block data n] is the block corresponding to the nth inductive type in [data]'sparentmutuallyinductivetype.Indexmustrangebetween[0]and
[nblocks data - 1], otherwise the function panics. *)
Ltac2 @ external get_constructor : data -> int -> constructor := "rocq-runtime.plugins.ltac2""ind_get_constructor". (** Returns the nth constructor of the inductive type. Index must range between
[0] and [nconstructors data - 1], otherwise the function panics. *)
Ltac2 @ external nparams : data -> int := "rocq-runtime.plugins.ltac2""ind_get_nparams". (** The number of parameters of the inductive type, including both uniform and
non-uniform parameters. Does not count local let-ins. *)
Ltac2 @ external nparams_uniform : data -> int := "rocq-runtime.plugins.ltac2""ind_get_nparams_rec". (** The number of recursively uniform (i.e., ordinary) parameters of the
inductive type. *)
Ltac2 @ external get_projections : data -> projection array option
:= "rocq-runtime.plugins.ltac2""ind_get_projections". (** Returns the list of projections for a primitive record,
or [None] if the inductive is not a primitive record. *)
Ltac2 @ external constructor_nargs : data -> int array := "rocq-runtime.plugins.ltac2""constructor_nargs". (** [Array.get (constructor_nargs data) n] is the number of non-parameter argumentsacceptedbythe[n]thconstructorofthisinductivetype.Add [Array.get(constructor_nargsdata)n]to[Ind.nparams_data]togetthetotal
number of arguments of the constructor. *)
Ltac2 @ external constructor_ndecls : data -> int array := "rocq-runtime.plugins.ltac2""constructor_ndecls". (** [Array.get (constructor_ndecls data) n] is the number of variables bound in apatternmatchexpressionbythe[n]thconstructorofthisinductivetype. Canbegreaterthan[constructor_nargs]iftheconstructorshavelocal let-bindings,e.g.,appliedto[InductiveInd(A:Type)(f:A->A):Set :=Constr(x:A)(y:=fx)]itwouldreturn[[|2|]],becausein[matcht
with Constr _ _ x y => e end], [x] and [y] are bound in [e]. *)
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.