fact stringlengths 7 3.87k | type stringclasses 24
values | library stringclasses 13
values | imports listlengths 0 72 | filename stringclasses 416
values | symbolic_name stringlengths 1 67 | docstring stringclasses 596
values |
|---|---|---|---|---|---|---|
tAnd (A B : term) :=
tApp Mand [ A ; B ]. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tAnd | null |
tOr (A B : term) :=
tApp Mor [ A ; B ]. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tOr | null |
well_prop Σ Γ : term -> Type :=
| well_prop_Rel :
forall n,
Σ ;;; Γ |- tRel n : MProp ->
well_prop Σ Γ (tRel n)
| well_prop_Impl :
forall A B,
well_prop Σ Γ A ->
well_prop Σ Γ B ->
well_prop Σ Γ (tImpl A B)
| well_prop_And :
forall A B,
well_prop Σ Γ A ->
well_prop ... | Inductive | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | well_prop | null |
decompose_app_eq :
forall t f args,
decompose_app t = (f, args) ->
t = mkApps f args \/ t = tApp f args. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | decompose_app_eq | null |
decompose_app_wf Σ :
forall t f args,
WfAst.wf Σ t ->
decompose_app t = (f, args) ->
WfAst.wf Σ f * All (WfAst.wf Σ) args. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | decompose_app_wf | null |
def_size (size : term -> nat) (x : def term) := size (dtype x) + size (dbody x). | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | def_size | null |
mfixpoint_size (size : term -> nat) (l : mfixpoint term) :=
list_size (def_size size) l. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | mfixpoint_size | null |
decl_size (size : term -> nat) (x : context_decl) :=
size (decl_type x) + option_default size (decl_body x) 0. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | decl_size | null |
context_size (size : term -> nat) (l : context) :=
list_size (decl_size size) l. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | context_size | null |
branch_size (size : term -> nat) (br : branch term) :=
size br.(bbody). | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | branch_size | null |
predicate_size (size : term -> nat) (p : predicate term) :=
list_size size p.(pparams) +
size p.(preturn). | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | predicate_size | null |
tsize t : nat :=
match t with
| tRel i => 1
| tEvar ev args => S (list_size tsize args)
| tLambda na T M => S (tsize T + tsize M)
| tApp u v => S (tsize u + list_size tsize v)
| tProd na A B => S (tsize A + tsize B)
| tLetIn na b t b' => S (tsize b + tsize t + tsize b')
| tCase ind p c brs => S (predica... | Fixpoint | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tsize | null |
tsize_nonzero :
forall t, tsize t <> 0. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tsize_nonzero | null |
mkApp_tsize :
forall u v,
tsize (mkApp u v) <= S (S (tsize u + tsize v)). | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | mkApp_tsize | null |
mkApps_tsize :
forall t l,
tsize (mkApps t l) <= S (tsize t + list_size tsize l). | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | mkApps_tsize | null |
tsize_decompose_app :
forall t f args,
decompose_app t = (f, args) ->
tsize f + list_size tsize args <= tsize t. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tsize_decompose_app | null |
tsize_lift :
forall n k t,
tsize (lift n k t) = tsize t. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tsize_lift | null |
list_size_length :
forall l,
list_size tsize l >= #|l|. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | list_size_length | null |
nth_error_list_size :
forall n l t,
nth_error l n = Some t ->
tsize t <= list_size tsize l + 1 - #|l|. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | nth_error_list_size | null |
tsize_downlift :
forall Σ t k,
WfAst.wf Σ t ->
tsize (subst [tRel 0] k t) = tsize t. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tsize_downlift | null |
inst :=
lazymatch goal with
| h : forall k, _ <= tsize ?x |- context [ (subst _ ?k ?x) ] =>
specialize (h k)
end. | Ltac | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | inst | null |
tsize_downlift_le :
forall t k,
tsize (subst [tRel 0] k t) <= tsize t. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tsize_downlift_le | null |
inspect {A} (x : A) : { y : A | y = x } := exist _ x eq_refl. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | inspect | null |
tmLocateInd (q : qualid) : TemplateMonad kername :=
l <- tmLocate q ;;
match l with
| [] => tmFail ("Inductive [" ^ q ^ "] not found")
| (IndRef ind) :: _ => tmReturn ind.(inductive_mind)
| _ :: _ => tmFail ("[" ^ q ^ "] not an inductive")
end. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tmLocateInd | null |
reify (Σ : global_env_ext) (Γ : context) (P : term) : option form
by wf (tsize P) lt :=
reify Σ Γ P with inspect (decompose_app P) := {
| @exist (hd, args) e1 with hd := {
| tRel n with nth_error Γ n := {
| Some decl => Some (Var n) ;
| None => None
} ;
| tInd ind []
with eqb ind.(... | Equations | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | reify | null |
Propositional_Logic_MetaRocq : Propositional_Logic term :=
{| Pfalse := MFalse; Ptrue := MTrue; Pand := fun P Q => mkApps Mand [P;Q];
Por := fun P Q => mkApps Mor [P;Q]; Pimpl := fun P Q => tImpl P Q |}. | Instance | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | Propositional_Logic_MetaRocq | null |
Msem := semGen term. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | Msem | null |
can_val (v : var) : term := tRel v. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | can_val | null |
can_val_Prop (Γ : list Prop) (v : var) : Prop :=
match nth_error Γ v with
| Some P => P
| None => False
end. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | can_val_Prop | null |
inversion_Rel :
forall {Σ Γ n T},
Σ ;;; Γ |- tRel n : T ->
∑ decl,
(wf_local Σ Γ) *
(nth_error Γ n = Some decl) *
(Σ ;;; Γ |- lift0 (S n) (decl_type decl) <= T). | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | inversion_Rel | null |
well_prop_wf :
forall Σ Γ P,
well_prop Σ Γ P ->
WfAst.wf Σ P. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | well_prop_wf | null |
reify_correct :
forall Σ Γ P,
well_prop Σ Γ P ->
exists φ, reify Σ Γ P = Some φ /\ Msem φ can_val = P. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | reify_correct | null |
cdecl_Type (P:term) :=
{| decl_name := banon; decl_body := None; decl_type := P |}. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | cdecl_Type | null |
trivial_hyp (h:list form) v : forall h : form, In h [] -> sem h v. | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | trivial_hyp | null |
NotSolvable (s: string) : Prop := notSolvable: NotSolvable s. | Inductive | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | NotSolvable | null |
inhabit_formula gamma Mphi Gamma :
match reify (empty_ext empty_global_env) gamma Mphi with
Some phi =>
match tauto_proc (size phi) {| hyps := []; concl := phi |} with
Valid => sem (concl {| hyps := []; concl := phi |}) (can_val_Prop Gamma)
| _ => NotSolvable "not a valid formula" end
... | Definition | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | inhabit_formula | null |
extract_form (P:term) (n : nat) : term * nat :=
match P with
| tProd _ (tSort _) P' =>
extract_form P' (S n)
| _ => (P,n)
end. | Fixpoint | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | extract_form | null |
Prop_ctx (n:nat) :=
match n with O => []
| S n => cdecl_Type MProp :: Prop_ctx n
end. | Fixpoint | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | Prop_ctx | null |
extract_form_tac k l :=
match goal with | |- forall X:Prop, _ =>
let H := fresh "H" in
intros H;
extract_form_tac k ltac:(constr:(H::l))
| |- _ => k l end. | Ltac | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | extract_form_tac | null |
Mtauto l T H :=
let k x :=
pose proof (let Mphi := extract_form x 0 in inhabit_formula (Prop_ctx (snd Mphi)) (fst Mphi) l) as H; compute in H
in
quote_term T k. | Ltac | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | Mtauto | null |
tauto :=
let L := fresh "L" in
let P := fresh "P" in
match goal with | |- ?T => extract_form_tac
ltac:(fun l => pose (L:=l); pose (P:=T))
(@nil Prop) end;
let H := fresh "H" in
Mtauto L ltac:(eval compute in P) H;
first [ma... | Ltac | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | tauto | null |
test : forall (A B C:Prop), (A->C)->(B->C)->A\/B->C. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | test | null |
test2 : forall (A B C:Prop), (A->C)->(B->C)->A\/B->B. | Lemma | examples | [
"MetaRocq.Utils",
"Equations",
"MetaRocq.Template",
"All",
"utils"
] | examples/tauto.v | test2 | null |
empty_sig_full := trans_template_program empty_sig_full_template. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | empty_sig_full | null |
empty_full := trans_template_program empty_full_template. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | empty_full | null |
unit_full := trans_template_program unit_full_template. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | unit_full | null |
list_full := trans_template_program list_full_template. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | list_full | null |
rtree_full := trans_template_program rtree_full_template. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | rtree_full | null |
extract_gctx : PCUICProgram.pcuic_program -> global_env_ext :=
fun p => (p.1.1.(PCUICProgram.trans_env_env), p.1.2). | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | extract_gctx | null |
gctx := Eval cbv in extract_gctx empty_full. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | gctx | null |
Instance PCUICSN.default_normalizing. | Existing | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | Instance | null |
make_wf_env_ext (Σ : global_env_ext) : EnvCheck wf_env_ext wf_env_ext :=
'(exist Σ' pf) <- check_wf_ext optimized_abstract_env_impl Σ ;;
ret Σ'. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | make_wf_env_ext | null |
Instance default_checker_flags. | Existing | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | Instance | null |
gctx_wf_env : wf_env_ext. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | gctx_wf_env | null |
Instance default_checker_flags. | Existing | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | Instance | null |
Instance PCUICSN.default_normalizing. | Existing | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | Instance | null |
Instance PCUICSN.normalization. | Existing | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | Instance | null |
bAnon := {| binder_name := nAnon; binder_relevance := Relevant |}. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | bAnon | null |
bNamed s := {| binder_name := nNamed s; binder_relevance := Relevant |}. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | bNamed | null |
tImpl X Y := tProd bAnon X (lift0 1 Y). | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | tImpl | null |
univ := Level.level "s". | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | univ | null |
gctx : global_env_ext :=
({| universes := (LS.union (LevelSet.singleton Level.lzero) (LevelSet.singleton univ), ConstraintSet.empty); declarations := []
; retroknowledge := Retroknowledge.empty |}, Monomorphic_ctx). | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | gctx | null |
kername_of_string (s : string) : kername :=
(MPfile [], s). | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | kername_of_string | We use the environment checker to produce the proof that gctx, which is a singleton with only
universe "s" declared is well-formed. |
assume_normalization : PCUICSN.Normalization. | Instance | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | assume_normalization | null |
make_wf_env_ext (Σ : global_env_ext) : EnvCheck wf_env_ext wf_env_ext :=
'(exist Σ' pf) <- check_wf_ext optimized_abstract_env_impl Σ ;;
ret Σ'. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | make_wf_env_ext | null |
gctx_wf_env : wf_env_ext. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | gctx_wf_env | null |
inh {cf:checker_flags} (Σ : wf_env_ext) Γ T := ∑ t, forall Σ0 : global_env_ext, abstract_env_ext_rel Σ Σ0 -> ∥ typing Σ0 Γ t T ∥. | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | inh | There is always a proof of `forall x : Sort s, x -> x` |
check_inh (Σ : wf_env_ext) Γ (wfΓ : forall Σ0 : global_env_ext, abstract_env_ext_rel Σ Σ0 -> ∥ wf_local Σ0 Γ ∥) t {T} : typing_result (inh Σ Γ T) :=
prf <- check_type_wf_env_fast optimized_abstract_env_impl Σ Γ wfΓ t (T := T) ;;
ret (t; prf). | Definition | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | check_inh | null |
fill_inh t :=
lazymatch goal with
[ wfΓ : forall _ _, ∥ wf_local _ ?Γ ∥ |- inh ?Σ ?Γ ?T ] =>
let t := uconstr:(check_inh Σ Γ wfΓ t (T:=T)) in
let proof := eval cbn in t in
match proof with
| Checked ?d => exact_no_check d
| TypeError ?e =>
let str := eval cbn in (string_of_type_error Σ e... | Ltac | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | fill_inh | null |
identity_typing (s := sType (Universe.make' univ)):
(∑ t : term,
forall Σ0 : global_env_ext,
Σ0 =
({|
universes :=
(LS.union (LevelSet.singleton Level.lzero)
(LevelSet.singleton univ), ConstraintSet.empty);
declarations := [];
re... | Lemma | examples | [
"PCUICLiftSubst",
"Equations",
"MetaRocq.Template",
"PCUICSafeChecker",
"All",
"utils",
"PCUICTyping",
"MetaRocq.SafeChecker",
"Loader",
"PCUICTypeChecker",
"Universes",
"PCUICAst",
"PCUICAstUtils",
"config",
"PCUICErrors",
"MetaRocq.PCUIC",
"MetaRocq.Common",
"MetaRocq.Utils",
"... | examples/typing_correctness.v | identity_typing | There is always a proof of `forall x : Sort s, x -> x` |
fibrec (n:nat) (fs:list nat) {struct n} : nat :=
match n with
| 0 => hd 0 fs
| (S n) => fibrec n (cons ((hd 0 fs) + (hd 0 (tl fs))) fs)
end. | Fixpoint | test-suite | [
"Template",
"List",
"Stdlib",
"MetaRocq"
] | test-suite/bug1.v | fibrec | null |
fib n := fibrec n (cons 0 (cons 1 nil)). | Definition | test-suite | [
"Template",
"List",
"Stdlib",
"MetaRocq"
] | test-suite/bug1.v | fib | null |
I (t:Type) (x:t) : t := x. | Definition | test-suite | [
"Template",
"MetaRocq"
] | test-suite/bug2.v | I | null |
II := I (forall t:Type, t -> t) I. | Definition | test-suite | [
"Template",
"MetaRocq"
] | test-suite/bug2.v | II | null |
anonb := {| binder_name := nAnon; binder_relevance := Relevant |}. | Definition | test-suite | [
"MetaRocq.Utils",
"All",
"utils",
"MetaRocq.Template"
] | test-suite/bug369.v | anonb | null |
bnamed n := {| binder_name := nNamed n; binder_relevance := Relevant |}. | Definition | test-suite | [
"MetaRocq.Utils",
"All",
"utils",
"MetaRocq.Template"
] | test-suite/bug369.v | bnamed | null |
mkImpl (A B : term) : term :=
tProd anonb A B. | Definition | test-suite | [
"MetaRocq.Utils",
"All",
"utils",
"MetaRocq.Template"
] | test-suite/bug369.v | mkImpl | null |
mkImplN name (A B : term) : term :=
tProd (bnamed name) A B. | Definition | test-suite | [
"MetaRocq.Utils",
"All",
"utils",
"MetaRocq.Template"
] | test-suite/bug369.v | mkImplN | null |
one_pt_i : one_inductive_entry :=
{|
mind_entry_typename := "Point";
mind_entry_arity := tSort Sort.type0;
mind_entry_consnames := ["mkPoint"];
mind_entry_lc := [
mkImplN "coordx"%bs (tRel 0) (mkImplN "coordy"%bs (tRel 1) (tApp (tRel 3) [tRel 2]))];
|}. | Definition | test-suite | [
"MetaRocq.Utils",
"All",
"utils",
"MetaRocq.Template"
] | test-suite/bug369.v | one_pt_i | null |
mut_pt_i : mutual_inductive_entry :=
{|
mind_entry_record := Some (Some "mkPoint" (* Irrelevant *));
mind_entry_finite := BiFinite;
mind_entry_params := [{| decl_name := bnamed "A"; decl_body := None;
decl_type := (tSort Sort.type0) |}];
mind_entry_inds := [one_pt_i];
mind_entry_unive... | Definition | test-suite | [
"MetaRocq.Utils",
"All",
"utils",
"MetaRocq.Template"
] | test-suite/bug369.v | mut_pt_i | null |
#[local] Existing Instance TemplateMonad_OptimizedMonad. | Existing | test-suite | [
"All",
"MetaRocq.Template"
] | test-suite/bug441.v | Instance | null |
tm_double n : TemplateMonad nat :=
match n with
| 0 => ret 0
| S n =>
n' <- tm_double n;;
ret (S (S n'))
end. | Fixpoint | test-suite | [
"All",
"MetaRocq.Template"
] | test-suite/bug441.v | tm_double | null |
I (t:Type) (x:t) : t := x. | Definition | test-suite | [
"Template",
"MetaRocq"
] | test-suite/bug6.v | I | null |
II := I (forall t:Type, t -> t) I. | Definition | test-suite | [
"Template",
"MetaRocq"
] | test-suite/bug6.v | II | null |
a_nat : nat. | Axiom | test-suite | [
"Template",
"MetaRocq"
] | test-suite/bug7.v | a_nat | null |
f := fun (n : nat) =>
match n with
| 0 => 0
| S n => n
end. | Definition | test-suite | [
"Template",
"MetaRocq"
] | test-suite/case.v | f | null |
foo (x : nat) (p : True) := p. | Definition | test-suite | [
"Stdlib",
"String",
"Loader",
"MetaRocq.Utils",
"MetaRocq.Template",
"utils"
] | test-suite/castprop.v | foo | null |
fooapp := foo 0 I. | Definition | test-suite | [
"Stdlib",
"String",
"Loader",
"MetaRocq.Utils",
"MetaRocq.Template",
"utils"
] | test-suite/castprop.v | fooapp | null |
f (x : nat) (p : True) (y : nat) := y. | Definition | test-suite | [
"Stdlib",
"String",
"Loader",
"MetaRocq.Utils",
"MetaRocq.Template",
"utils"
] | test-suite/castprop.v | f | null |
fapp (x : nat) := f 0 I x. | Definition | test-suite | [
"Stdlib",
"String",
"Loader",
"MetaRocq.Utils",
"MetaRocq.Template",
"utils"
] | test-suite/castprop.v | fapp | null |
setprop : { x : nat | x = 0 } := exist _ 0 eq_refl. | Definition | test-suite | [
"Stdlib",
"String",
"Loader",
"MetaRocq.Utils",
"MetaRocq.Template",
"utils"
] | test-suite/castprop.v | setprop | null |
proof t :=
(Ast.tCast t BasicAst.Cast (Ast.tCast _ BasicAst.Cast (Ast.tSort ((Universes.sProp :: nil)%list; _)))). | Notation | test-suite | [
"Stdlib",
"String",
"Loader",
"MetaRocq.Utils",
"MetaRocq.Template",
"utils"
] | test-suite/castprop.v | proof | null |
foo := 2 * 2. | Definition | test-suite | [
"MetaRocq",
"Checker"
] | test-suite/CheckerTest.v | foo | null |
ones := Cons 1 ones. | CoFixpoint | test-suite | [
"Template",
"Streams",
"Stdlib",
"MetaRocq"
] | test-suite/cofix.v | ones | null |
Instance extraction_checker_flags. | Existing | test-suite | [
"PCUICTyping",
"MetaRocq.TypedExtraction",
"MetaRocq.SafeChecker",
"Loader",
"Erasure",
"TypeAnnotations",
"config",
"MetaRocq.Template",
"SafeTemplateChecker",
"MetaRocq.PCUIC",
"ExAst",
"PCUICAst",
"TemplateToPCUIC",
"PCUICWfEnvImpl"
] | test-suite/ErasureTests.v | Instance | null |
Instance fake_guard_impl_instance. | Existing | test-suite | [
"PCUICTyping",
"MetaRocq.TypedExtraction",
"MetaRocq.SafeChecker",
"Loader",
"Erasure",
"TypeAnnotations",
"config",
"MetaRocq.Template",
"SafeTemplateChecker",
"MetaRocq.PCUIC",
"ExAst",
"PCUICAst",
"TemplateToPCUIC",
"PCUICWfEnvImpl"
] | test-suite/ErasureTests.v | Instance | null |
Instance extraction_checker_flags. | Existing | test-suite | [
"PCUICTyping",
"MetaRocq.TypedExtraction",
"MetaRocq.SafeChecker",
"Loader",
"Erasure",
"TypeAnnotations",
"config",
"MetaRocq.Template",
"SafeTemplateChecker",
"MetaRocq.PCUIC",
"ExAst",
"PCUICAst",
"TemplateToPCUIC",
"PCUICWfEnvImpl"
] | test-suite/ErasureTests.v | Instance | null |
type_flag_squashed :=
{ is_logical : bool;
is_sort : bool;
is_arity : bool }. | Record | test-suite | [
"PCUICTyping",
"MetaRocq.TypedExtraction",
"MetaRocq.SafeChecker",
"Loader",
"Erasure",
"TypeAnnotations",
"config",
"MetaRocq.Template",
"SafeTemplateChecker",
"MetaRocq.PCUIC",
"ExAst",
"PCUICAst",
"TemplateToPCUIC",
"PCUICWfEnvImpl"
] | test-suite/ErasureTests.v | type_flag_squashed | null |
ex1_test :
flag_of_type_program ex1 =
{| is_logical := false; is_sort := true; is_arity := true |}. | Example | test-suite | [
"PCUICTyping",
"MetaRocq.TypedExtraction",
"MetaRocq.SafeChecker",
"Loader",
"Erasure",
"TypeAnnotations",
"config",
"MetaRocq.Template",
"SafeTemplateChecker",
"MetaRocq.PCUIC",
"ExAst",
"PCUICAst",
"TemplateToPCUIC",
"PCUICWfEnvImpl"
] | test-suite/ErasureTests.v | ex1_test | null |
ex2_test :
flag_of_type_program ex2 =
{| is_logical := false; is_sort := false; is_arity := false |}. | Example | test-suite | [
"PCUICTyping",
"MetaRocq.TypedExtraction",
"MetaRocq.SafeChecker",
"Loader",
"Erasure",
"TypeAnnotations",
"config",
"MetaRocq.Template",
"SafeTemplateChecker",
"MetaRocq.PCUIC",
"ExAst",
"PCUICAst",
"TemplateToPCUIC",
"PCUICWfEnvImpl"
] | test-suite/ErasureTests.v | ex2_test | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.