fact
stringlengths
2
32.6k
type
stringclasses
10 values
library
stringclasses
5 values
imports
stringclasses
205 values
filename
stringclasses
216 values
symbolic_name
stringlengths
1
67
index_level
int64
0
10.5k
Set := | nAnon | nNamed (_ : ident).
Inductive
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
name
0
Set := Relevant | Irrelevant.
Inductive
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
relevance
1
(A : Type) := mkBindAnn { binder_name : A; binder_relevance : relevance }.
Record
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
binder_annot
2
(A : Type) (e : Classes.EqDec A) : Classes.EqDec (binder_annot A). Proof. ltac:(Equations.Prop.Tactics.eqdec_proof). Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
eqdec_binder_annot
3
{A B} (f : A -> B) (b : binder_annot A) : binder_annot B := {| binder_name := f b.(binder_name); binder_relevance := b.(binder_relevance) |}.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_binder_annot
4
{A B} (b : binder_annot A) (b' : binder_annot B) : Prop := b.(binder_relevance) = b'.(binder_relevance).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
eq_binder_annot
5
binder_annot name.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
aname
6
Classes.EqDec aname := _.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
anqme_eqdec
7
{A} (b b' : binder_annot A) : bool := match Classes.eq_dec b.(binder_relevance) b'.(binder_relevance) with | left _ => true | right _ => false end.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
eqb_binder_annot
8
(na : name) := match na with | nAnon => "_" | nNamed n => n end.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
string_of_name
9
(r : relevance) := match r with | Relevant => "Relevant" | Irrelevant => "Irrelevant" end.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
string_of_relevance
10
Set := | VmCast | NativeCast | Cast.
Inductive
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
cast_kind
11
mk_case_info { ci_ind : inductive; ci_npar : nat; ci_cstr_ndecls : list nat; *) ci_relevance : relevance }.
Record
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
case_info
12
ci := "(" ^ string_of_inductive ci.(ci_ind) ^ "," ^ string_of_nat ci.(ci_npar) ^ "," ^ string_of_relevance ci.(ci_relevance) ^ ")".
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
string_of_case_info
13
| Finite | CoFinite | BiFinite .
Inductive
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
recursivity_kind
14
| Conv | Cumul.
Inductive
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
conv_pb
15
(pb1 pb2 : conv_pb) : bool := match pb1, pb2 with | Cumul, Conv => false | _, _ => true end.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
conv_pb_leqb
16
nat. exact 0. Qed.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fresh_evar_id
17
term := mkdef { dname : aname; dtype : term; dbody : term; rarg : nat }.
Record
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
def
18
{A} : Classes.EqDec A -> Classes.EqDec (def A). Proof. ltac:(Equations.Prop.Tactics.eqdec_proof). Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
def_eq_dec
19
{A} (f : A -> string) (def : def A) := "(" ^ string_of_name (binder_name (dname def)) ^ "," ^ string_of_relevance (binder_relevance (dname def)) ^ "," ^ f (dtype def) ^ "," ^ f (dbody def) ^ "," ^ string_of_nat (rarg def) ^ ")".
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
string_of_def
20
{A} (f : A -> string) (g : A -> string) (def : def A) := string_of_name (binder_name (dname def)) ^ " { struct " ^ string_of_nat (rarg def) ^ " }" ^ " : " ^ f (dtype def) ^ " := " ^ nl ^ g (dbody def).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
print_def
21
{A B} (tyf bodyf : A -> B) (d : def A) := {| dname := d.(dname); dtype := tyf d.(dtype); dbody := bodyf d.(dbody); rarg := d.(rarg) |}.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_def
22
{A B} (f : A -> B) (g : A -> B) (d : def A) : f (dtype d) = dtype (map_def f g d). Proof. destruct d; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_dtype
23
{A B} (f : A -> B) (g : A -> B) (d : def A) : g (dbody d) = dbody (map_def f g d). Proof. destruct d; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_dbody
24
term := list (def term).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mfixpoint
25
{A} (tyf bodyf : A -> bool) (d : def A) := tyf d.(dtype) && bodyf d.(dbody).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_def
26
{A} (P P' : A -> Type) (m : mfixpoint A) := All (fun x : def A => P x.(dtype) * P' x.(dbody))%type m.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
tFixProp
27
{A B C} (f f' : B -> C) (g g' : A -> B) (d : def A) : map_def f f' (map_def g g' d) = map_def (f ∘ g) (f' ∘ g') d. Proof. destruct d; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_def_map_def
28
{A B C} (f f' : B -> C) (g g' : A -> B) : (map_def f f') ∘ (map_def g g') = map_def (f ∘ g) (f' ∘ g'). Proof. reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
compose_map_def
29
{t} x : map_def (@id t) (@id t) x = id x. Proof. now destruct x. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_def_id
30
{A B} (P P' : A -> Type) (f f' g g' : A -> B) (x : def A) : P' x.(dbody) -> P x.(dtype) -> (forall x, P x -> f x = g x) -> (forall x, P' x -> f' x = g' x) -> map_def f f' x = map_def g g' x. Proof. intros. destruct x. unfold map_def. simpl. now rewrite !H // !H0. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_def_spec
31
{A B} (f : B -> B) (x : A * B) : f (snd x) = snd x <-> on_snd f x = x. Proof. destruct x; simpl; unfold on_snd; simpl. split; congruence. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
on_snd_eq_id_spec
32
{A B} (f f' g g' : A -> B) (x : def A) : f (dtype x) = g (dtype x) -> f' (dbody x) = g' (dbody x) -> map_def f f' x = map_def g g' x. Proof. intros. unfold map_def; f_equal; auto. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_def_eq_spec
33
{A} (f f' : A -> A) (x : def A) : f (dtype x) = (dtype x) -> f' (dbody x) = (dbody x) -> map_def f f' x = x. Proof. intros. rewrite (map_def_eq_spec _ _ id id); auto. destruct x; auto. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_def_id_spec
34
{A B} {P P' : A -> Type} {l} {f f' g g' : A -> B} : tFixProp P P' l -> (forall x, P x -> f x = g x) -> (forall x, P' x -> f' x = g' x) -> map (map_def f f') l = map (map_def g g') l. Proof. intros. eapply All_map_eq. red in X. eapply All_impl; eauto. simpl. intros. destruct X0; eapply map_def_spec; eauto. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
tfix_map_spec
35
{universe Term} := Judge { j_term : option Term; j_typ : Term; j_univ : option universe; }.
Record
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
judgment_
36
{univ T A} (f: T -> A) (j : judgment_ univ T) := Judge (option_map f (j_term j)) (f (j_typ j)) (j_univ j) .
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
judgment_map
37
mkdecl { decl_name : aname ; decl_body : option term ; decl_type : term }.
Record
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
context_decl
38
{term term'} (f : term -> term') (d : context_decl term) : context_decl term' := {| decl_name := d.(decl_name); decl_body := option_map f d.(decl_body); decl_type := f d.(decl_type) |}.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl
39
{term term' term''} (g : term -> term') (f : term' -> term'') x : map_decl f (map_decl g x) = map_decl (f ∘ g) x. Proof. destruct x as [? [?|] ?]; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
compose_map_decl
40
{term term'} (f g : term -> term') x : (forall x, f x = g x) -> map_decl f x = map_decl g x. Proof. intros H; destruct x as [? [?|] ?]; rewrite /map_decl /=; f_equal; auto. now rewrite (H t). Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl_ext
41
{term term'} : Proper (`=1` ==> Logic.eq ==> Logic.eq) (@map_decl term term'). Proof. intros f g Hfg x y ->. now apply map_decl_ext. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl_proper
42
{term term'} : Proper (`=1` ==> `=1`) (@map_decl term term'). Proof. intros f g Hfg x. rewrite /map_decl. destruct x => /=. f_equal. - now rewrite Hfg. - apply Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl_pointwise
43
{A B} : subrelation (`=1`) (@Logic.eq A ==> @Logic.eq B)%signature. Proof. intros f g Hfg x y ->. now rewrite Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
pointwise_subrelation
44
{A B} : subrelation (@Logic.eq A ==> @Logic.eq B)%signature (`=1`). Proof. intros f g Hfg x. now specialize (Hfg x x eq_refl). Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
pointwise_subrelation_inv
45
{term term'} (f : term -> term') (c : list (context_decl term)) := List.map (map_decl f) c.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_context
46
{term term'} : Proper (`=1` ==> Logic.eq ==> Logic.eq) (@map_context term term'). Proof. intros f g Hfg x y ->. now rewrite /map_context Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_context_proper
47
{term term'} (f : term -> term') l : #|map_context f l| = #|l|. Proof. now unfold map_context; rewrite length_map. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_context_length
48
{term} (f : term -> bool) (d : context_decl term) : bool := option_default f d.(decl_body) true && f d.(decl_type).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_decl
49
{term} : Proper (`=1` ==> Logic.eq ==> Logic.eq) (@test_decl term). Proof. intros f g Hfg [na [b|] ty] ? <- => /=; rewrite /test_decl /=; now rewrite Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_decl_proper
50
{A} (Γ : list A) (d : A) := d :: Γ.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
snoc
51
{A} (Γ Γ': list A) := Γ' ++ Γ.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
app_context
52
{T} Γ : [] ,,, Γ = Γ :> list T. Proof. unfold app_context. rewrite app_nil_r. reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
app_context_nil_l
53
{T} Γ Γ' Γ'' : Γ ,,, (Γ' ,,, Γ'') = Γ ,,, Γ' ,,, Γ'' :> list T. Proof. unfold app_context; now rewrite app_assoc. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
app_context_assoc
54
{T} Γ Γ' A : Γ ,,, (Γ' ,, A) = (Γ ,,, Γ') ,, A :> list T. Proof. exact (app_context_assoc _ _ [A]). Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
app_context_cons
55
{T} Γ Δ Δ' d : (Γ ,,, Δ ,,, Δ') ,, d = (Γ ,,, Δ ,,, (Δ' ,, d)) :> list T. Proof using Type. reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
app_context_push
56
{T Γ Δ d} : (Γ ,,, (d :: Δ)) = (Γ ,,, Δ) ,,, [d] :> list T. Proof using Type. reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
snoc_app_context
57
{T} (Γ Γ' : list T) : #|Γ ,,, Γ'| = #|Γ'| + #|Γ|. Proof. unfold app_context. now rewrite length_app. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
app_context_length
58
{T} v Γ Γ' : #|Γ'| <= v -> nth_error (Γ ,,, Γ') v = nth_error Γ (v - #|Γ'|) :> option T. Proof. apply nth_error_app_ge. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
nth_error_app_context_ge
59
{T} v Γ Γ' : v < #|Γ'| -> nth_error (Γ ,,, Γ') v = nth_error Γ' v :> option T. Proof. apply nth_error_app_lt. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
nth_error_app_context_lt
60
{A} (P : A -> Type) (d : context_decl A) := option_default P d.(decl_body) unit × P d.(decl_type).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
ondecl
61
(c : list (context_decl term)) : list (context_decl term') := match c with | d :: Γ => map_decl (f #|Γ|) d :: mapi_context Γ | [] => [] end.
Fixpoint
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mapi_context
62
{term term'} : Proper (`=2` ==> Logic.eq ==> Logic.eq) (@mapi_context term term'). Proof. intros f g Hfg Γ ? <-. induction Γ as [|[na [b|] ty] Γ]; simpl; auto; f_equal; auto; now rewrite Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mapi_context_proper
63
{term} (f : nat -> term -> term) l : #|mapi_context f l| = #|l|. Proof. induction l; simpl; auto. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mapi_context_length
64
(c : list (context_decl term)) : bool := match c with | d :: Γ => test_context Γ && test_decl f d | [] => true end.
Fixpoint
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_context
65
{term} : Proper (`=1` ==> Logic.eq ==> Logic.eq) (@test_context term). Proof. intros f g Hfg Γ ? <-. induction Γ as [|[na [b|] ty] Γ]; simpl; auto; f_equal; auto; now rewrite Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_context_proper
66
(c : list (context_decl term)) : bool := match c with | d :: Γ => test_context_k Γ && test_decl (f (#|Γ| + k)) d | [] => true end.
Fixpoint
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_context_k
67
{term} : Proper (`=1` ==> Logic.eq ==> Logic.eq ==> Logic.eq) (@test_context_k term). Proof. intros f g Hfg k ? <- Γ ? <-. induction Γ as [|[na [b|] ty] Γ]; simpl; auto; f_equal; auto; now rewrite Hfg. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_context_k_proper
68
(f g : term -> bool) x : (forall x, f x -> g x) -> test_decl f x -> test_decl g x. Proof using Type. intros Hf; rewrite /test_decl. move/andb_and=> [Hd Hb]. apply/andb_and; split; eauto. destruct (decl_body x); simpl in *; eauto. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_decl_impl
69
(P : nat -> term -> Type) k (ctx : context term) := Alli (fun i d => ondecl (P (Nat.pred #|ctx| - i + k)) d) 0 ctx.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
onctx_k
70
{P : term -> Type} {p : term -> bool} {d : context_decl term} : (forall x, reflectT (P x) (p x)) -> reflectT (ondecl P d) (test_decl p d). Proof using Type. intros hr. rewrite /ondecl /test_decl; destruct d as [decl_name decl_body decl_type]; cbn. destruct (hr decl_type) => //; destruct (reflect_option_default hr decl_body) => /= //; now constructor. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
ondeclP
71
{p : term -> bool} {ctx : context term} : reflectT (onctx p ctx) (test_context p ctx). Proof using Type. eapply equiv_reflectT. - induction 1; simpl; auto. rewrite IHX /= //. now move/(ondeclP reflectT_pred): p0. - induction ctx. * constructor. * move => /= /andb_and [Hctx Hd]; constructor; eauto. now move/(ondeclP reflectT_pred): Hd. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
onctxP
72
(f : term -> term') decl : f (decl_type decl) = decl_type (map_decl f decl). Proof using Type. destruct decl; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl_type
73
(f : term -> term') decl : option_map f (decl_body decl) = decl_body (map_decl f decl). Proof using Type. destruct decl; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl_body
74
@map_decl term term id =1 id. Proof using Type. intros d; now destruct d as [? [] ?]. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_decl_id
75
(f : term -> term') x : option_map decl_body (option_map (map_decl f) x) = option_map (option_map f) (option_map decl_body x). Proof using Type. destruct x; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
option_map_decl_body_map_decl
76
(f : term -> term') x : option_map decl_type (option_map (map_decl f) x) = option_map f (option_map decl_type x). Proof using Type. destruct x; reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
option_map_decl_type_map_decl
77
(f : nat -> term -> term') Γ := List.rev (mapi (fun k' decl => map_decl (f k') decl) (List.rev Γ)).
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k
78
f Γ : fold_context_k f Γ = mapi (fun k' d => map_decl (f (Nat.pred (length Γ) - k')) d) Γ. Proof using Type. unfold fold_context_k. rewrite rev_mapi. rewrite List.rev_involutive. apply mapi_ext. intros. f_equal. now rewrite List.length_rev. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_alt
79
f Γ : mapi_context f Γ = fold_context_k f Γ. Proof using Type. setoid_replace f with (fun k => f (k - 0)) using relation (pointwise_relation nat (pointwise_relation term (@Logic.eq term')))%signature at 1. rewrite fold_context_k_alt. unfold mapi. generalize 0. induction Γ as [|d Γ]; intros n; simpl; auto. f_equal. rewrite IHΓ. rewrite mapi_rec_Sk. apply mapi_rec_ext => k x. intros. apply map_decl_ext => t. lia_f_equal. intros k. now rewrite Nat.sub_0_r. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mapi_context_fold
80
f d : fold_context_k f [d] = [map_decl (f 0) d]. Proof using Type. reflexivity. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_tip
81
f Γ : length (fold_context_k f Γ) = length Γ. Proof using Type. unfold fold_context_k. now rewrite !List.length_rev mapi_length List.length_rev. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_length
82
f Γ d : fold_context_k f (d :: Γ) = fold_context_k f Γ ,, map_decl (f (length Γ)) d. Proof using Type. unfold fold_context_k. rewrite !rev_mapi !rev_involutive. unfold mapi; rewrite mapi_rec_eqn. unfold snoc. f_equal. now rewrite Nat.sub_0_r List.length_rev. rewrite mapi_rec_Sk. simpl. apply mapi_rec_ext. intros. rewrite length_app !List.length_rev. simpl. f_equal. f_equal. lia. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_snoc0
83
f Γ Δ : fold_context_k f (Δ ++ Γ) = fold_context_k (fun k => f (length Γ + k)) Δ ++ fold_context_k f Γ. Proof using Type. unfold fold_context_k. rewrite List.rev_app_distr. rewrite mapi_app. rewrite <- List.rev_app_distr. f_equal. f_equal. apply mapi_ext. intros. f_equal. rewrite List.length_rev. f_equal. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_app
84
(f : nat -> term -> term) (ctx : context term) : mapi_context_In ctx (fun n (x : context_decl term) (_ : In x ctx) => map_decl (f n) x) = mapi_context f ctx. Proof using Type. remember (fun n (x : context_decl term) (_ : In x ctx) => map_decl (f n) x) as g. funelim (mapi_context_In ctx g) => //=; rewrite (H f0) ; trivial. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mapi_context_In_spec
85
f Γ : #|fold_context f Γ| = #|Γ|. Proof using Type. now apply_funelim (fold_context f Γ); intros; simpl; auto; f_equal. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_length
86
(f : context term -> context_decl term -> context_decl term) (ctx : context term) : fold_context_In ctx (fun n (x : context_decl term) (_ : In x ctx) => f n x) = fold_context f ctx. Proof using Type. remember (fun n (x : context_decl term) (_ : In x ctx) => f n x) as g. funelim (fold_context_In ctx g) => //=; rewrite (H f0); trivial. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_In_spec
87
Proper (`=2` ==> `=1`) fold_context. Proof using Type. intros f f' Hff' x. funelim (fold_context f x); simpl; auto. simp fold_context. now rewrite (H f' Hff'). Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_Proper
88
(c : list (BasicAst.context_decl term)) : list aname := map decl_name c.
Definition
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
forget_types
89
(x : context term) : fold_context_k (fun i x => x) x = x. Proof using Type. rewrite fold_context_k_alt. rewrite /mapi. generalize 0. induction x; simpl; auto. intros n. f_equal; auto. now rewrite map_decl_id. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_id
90
(f : nat -> term' -> term) (g : nat -> term'' -> term') Γ : fold_context_k f (fold_context_k g Γ) = fold_context_k (fun i => f i ∘ g i) Γ. Proof using Type. rewrite !fold_context_k_alt mapi_mapi. apply mapi_ext => i d. rewrite compose_map_decl. apply map_decl_ext => t. now len. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_compose
91
(f g : nat -> term' -> term) Γ : f =2 g -> fold_context_k f Γ = fold_context_k g Γ. Proof using Type. intros hfg. induction Γ; simpl; auto; rewrite !fold_context_k_snoc0. simpl. rewrite IHΓ. f_equal. apply map_decl_ext. intros. now apply hfg. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_ext
92
Proper (pointwise_relation nat (pointwise_relation _ Logic.eq) ==> Logic.eq ==> Logic.eq) (@fold_context_k term' term). Proof using Type. intros f g Hfg x y <-. now apply fold_context_k_ext. Qed.
Instance
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
fold_context_k_proper
93
(f : nat -> context_decl term -> bool) (g : nat -> term' -> term) ctx : alli f 0 (fold_context_k g ctx) = alli (fun i x => f i (map_decl (g (Nat.pred #|ctx| - i)) x)) 0 ctx. Proof using Type. now rewrite fold_context_k_alt /mapi alli_mapi. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
alli_fold_context_k_prop
94
f g x : (@test_decl term) f (map_decl g x) = @test_decl term (f ∘ g) x. Proof using Type. rewrite /test_decl /map_decl /=. f_equal. rewrite /option_default. destruct (decl_body x) => //. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
test_decl_map_decl
95
(f : term' -> term) (g : nat -> term'' -> term') ctx : map (map_decl f) (fold_context_k g ctx) = fold_context_k (fun i => f ∘ g i) ctx. Proof using Type. rewrite !fold_context_k_alt map_mapi. apply mapi_ext => i d. now rewrite compose_map_decl. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_fold_context_k
96
(f : term' -> term) (g : nat -> term'' -> term') (ctx : list (BasicAst.context_decl term'')) : map_context f (mapi_context g ctx) = mapi_context (fun i => f ∘ g i) ctx. Proof using Type. rewrite !mapi_context_fold. now unfold map_context; rewrite map_fold_context_k. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_context_mapi_context
97
(f : nat -> term' -> term) (g : context_decl term'' -> context_decl term') ctx : mapi_context f (map g ctx) = mapi (fun i => map_decl (f (Nat.pred #|ctx| - i)) ∘ g) ctx. Proof using Type. rewrite mapi_context_fold fold_context_k_alt mapi_map. now len. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
mapi_context_map
98
(f : term' -> term) (g : context_decl term'' -> context_decl term') ctx : map_context f (map g ctx) = map (map_decl f ∘ g) ctx. Proof using Type. induction ctx; simpl; f_equal; auto. Qed.
Lemma
common
From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations.
common\theories\BasicAst.v
map_context_map
99

MetaCoq Dataset

Dataset Description

The MetaCoq Dataset is derived from the MetaCoq repository, focusing on the formalization of Coq's meta-theory in the Coq proof assistant. This dataset processes .v files from the core theory directories to extract mathematical content in a structured format. This work builds upon the format established by Andreas Florath (@florath) in his Coq Facts, Propositions and Proofs dataset, providing a specialized view of the MetaCoq library with particular focus on meta-programming constructs.

Dataset Structure

The dataset includes the following fields:

  • fact: The mathematical statement body without type prefixes
  • type: The statement type (Definition/Lemma/Theorem/etc., including MetaCoq-specific types like Quote Definition)
  • library: The originating library (common/template-coq/pcuic/etc.)
  • imports: The Require Import statements from the source file
  • filename: The source file path within MetaCoq
  • symbolic_name: The identifier of the mathematical object
  • index_level: Sequential index for the dataset

Example Row

fact: "forall {elt elt' : term}, red1 elt elt' -> red elt elt'" type: "Lemma" library: "pcuic" imports: "From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction PCUICLiftSubst PCUICUnivSubst PCUICTyping PCUICReduction." filename: "pcuic/theories/PCUICRedTypeIrrelevance.v" symbolic_name: "red1_red" index_level: 42

Source Code

The dataset was generated using a custom Python script that processes core MetaCoq libraries. The extraction focuses on mathematical content while preserving the structure and relationships between definitions, lemmas, and their source files. Special handling is implemented for MetaCoq-specific constructs like Quote Definition and MetaCoq Run, as well as proper preservation of full proofs and statements.

Coverage

The dataset includes content from the following MetaCoq directories:

  • common/theories (Common utilities and definitions)
  • template-coq/theories (Template-Coq implementation)
  • pcuic/theories (Predicative Calculus of Inductive Constructions)
  • safechecker/theories (Safe type-checker implementation)
  • erasure/theories (Erasure translation)

Usage

This dataset is designed for:

  • Meta-theoretical Research: Analyzing formal proofs and definitions in Coq's meta-theory
  • Machine Learning Applications: Training models for proof automation and tactic prediction
  • Meta-programming Studies: Understanding patterns in quote/unquote operations and template programming
  • Certified Programming: Studying certified meta-programming and proof checking
  • Educational Purposes: Providing structured examples of meta-theoretical formalizations

License

This dataset is distributed under the MIT license, aligning with the license of the original MetaCoq repository.

Acknowledgments

  • Original repository: MetaCoq (https://github.com/MetaCoq/metacoq)
  • Inspiration: Hugging Face user Andreas Florath (@florath) and his comprehensive Coq dataset
  • Related datasets: UniMath Dataset and Coq-HoTT Dataset
Downloads last month
33

Collection including phanerozoic/Coq-MetaCoq