File: Proj.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (42 lines) | stat: -rw-r--r-- 2,139 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(************************************************************************)
(*         *   The Coq Proof Assistant / The Coq 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)         *)
(************************************************************************)

Require Import Ltac2.Init.

Ltac2 Type t := projection.
(** Type of primitive projections. This includes the unfolding boolean. *)

Ltac2 @ external equal : t -> t -> bool := "coq-core.plugins.ltac2" "projection_equal".
(** Projections obtained through module aliases or Include are not
    considered equal by this function. The unfolding boolean is not ignored. *)

Ltac2 @ external ind : t -> inductive := "coq-core.plugins.ltac2" "projection_ind".
(** Get the inductive to which the projectin belongs. *)

Ltac2 @ external index : t -> int := "coq-core.plugins.ltac2" "projection_index".
(** The index of the projection indicates which field it projects. *)

Ltac2 @ external unfolded : t -> bool := "coq-core.plugins.ltac2" "projection_unfolded".
(** Get the unfolding boolean. *)

Ltac2 @ external set_unfolded : t -> bool -> t
  := "coq-core.plugins.ltac2" "projection_set_unfolded".
(** Set the unfolding boolean. *)

Ltac2 @ external of_constant : constant -> t option
  := "coq-core.plugins.ltac2" "projection_of_constant".
(** Get the primitive projection associated to the constant.
    The returned projection is folded.
    Returns [None] when the constant is not associated to a primitive projection. *)

Ltac2 @ external to_constant : t -> constant option
  := "coq-core.plugins.ltac2" "projection_to_constant".
(** Get the constant associated to the primitive projection.
    Currently always returns [Some] but this may change in the future. *)