Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. • 103 items • Updated • 3
statement stringlengths 1 794 | proof stringlengths 0 4.58k | type stringclasses 15
values | symbolic_name stringlengths 1 154 | library stringclasses 3
values | filename stringclasses 55
values | imports listlengths 3 26 | deps listlengths 0 29 | docstring stringclasses 537
values | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
length | := Datatypes.length. | Notation | length | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | This notation is necessary to prevent [length] from being printed
as [strings.length] if strings.v is imported and later base.v. See
also strings.v and
https://gitlab.mpi-sws.org/iris/stdpp/-/merge_requests/144 and
https://gitlab.mpi-sws.org/iris/stdpp/-/merge_requests/129. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
seal {A} (f : A) | := { unseal : A; seal_eq : unseal = f }. | Record | seal | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | * Sealing off definitions | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
tc_solve | :=
solve [once (typeclasses eauto)]. | Ltac | tc_solve | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The tactic [tc_solve] is used to solve type class goals by invoking type
class search. It is similar to [apply _], but it is more robust since it does
not affect unrelated goals/evars due to https://github.com/coq/coq/issues/6583.
The tactic [tc_solve] is particularly useful when building custom tactics that
need tigh... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCNoBackTrack (P : Prop) | := TCNoBackTrack_intro { tc_no_backtrack : P }. | Class | TCNoBackTrack | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The type class [TCNoBackTrack P] can be used to establish [P] without ever
backtracking on the instance of [P] that has been found. Backtracking may
normally happen when [P] contains evars that could be instanciated in different
ways depending on which instance is picked, and type class search somewhere else
depends on... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCIf (P Q R : Prop) : Prop | :=
| TCIf_true : P → Q → TCIf P Q R
| TCIf_false : R → TCIf P Q R. | Inductive | TCIf | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | A conditional at the type class level. Note that [TCIf P Q R] is not the same
as [TCOr (TCAnd P Q) R]: the latter will backtrack to [R] if it fails to
establish [Q], i.e. does not have the behavior of a conditional. Furthermore,
note that [TCOr (TCAnd P Q) (TCAnd (TCNot P) R)] would not work; we generally
would not be ... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
tc_opaque {A} (x : A) : A | := x. | Definition | tc_opaque | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The constant [tc_opaque] is used to make definitions opaque for just type
class search. Note that [simpl] is set up to always unfold [tc_opaque]. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCOr (P1 P2 : Prop) : Prop | :=
| TCOr_l : P1 → TCOr P1 P2
| TCOr_r : P2 → TCOr P1 P2. | Inductive | TCOr | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | Below we define type class versions of the common logical operators. It is
important to note that we duplicate the definitions, and do not declare the
existing logical operators as type classes. That is, we do not say:
Existing Class or.
Existing Class and.
If we could define the existing logical operators as cla... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCAnd (P1 P2 : Prop) : Prop | := TCAnd_intro : P1 → P2 → TCAnd P1 P2. | Inductive | TCAnd | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCTrue : Prop | := TCTrue_intro : TCTrue. | Inductive | TCTrue | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCFalse : Prop | :=. | Inductive | TCFalse | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The class [TCFalse] is not stricly necessary as one could also use
[False]. However, users might expect that TCFalse exists and if it
does not, it can cause hard to diagnose bugs due to automatic
generalization. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCUnless P | := (TCIf P TCFalse TCTrue). | Notation | TCUnless | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"TCFalse",
"TCIf",
"TCTrue"
] | The class [TCUnless] can be used to check that search for [P]
fails. This is useful as a guard for certain instances together with
classes like [TCFastDone] (see [tactics.v]) to prevent infinite loops
(e.g. when saturating the context). | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCForall {A} (P : A → Prop) : list A → Prop | :=
| TCForall_nil : TCForall P []
| TCForall_cons x xs : P x → TCForall P xs → TCForall P (x :: xs). | Inductive | TCForall | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCForall2 {A B} (P : A → B → Prop) : list A → list B → Prop | :=
| TCForall2_nil : TCForall2 P [] []
| TCForall2_cons x y xs ys :
P x y → TCForall2 P xs ys → TCForall2 P (x :: xs) (y :: ys). | Inductive | TCForall2 | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The class [TCForall2 P l k] is commonly used to transform an input list [l]
into an output list [k], or the converse. Therefore there are two modes, either
[l] input and [k] output, or [k] input and [l] input. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCExists {A} (P : A → Prop) : list A → Prop | :=
| TCExists_cons_hd x l : P x → TCExists P (x :: l)
| TCExists_cons_tl x l: TCExists P l → TCExists P (x :: l). | Inductive | TCExists | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCElemOf {A} (x : A) : list A → Prop | :=
| TCElemOf_here xs : TCElemOf x (x :: xs)
| TCElemOf_further y xs : TCElemOf x xs → TCElemOf x (y :: xs). | Inductive | TCElemOf | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCEq {A} (x : A) : A → Prop | := TCEq_refl : TCEq x x. | Inductive | TCEq | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The intended use of [TCEq x y] is to use [x] as input and [y] as output, but
this is not enforced. We use output mode [-] (instead of [!]) for [x] to ensure
that type class search succeed on goals like [TCEq (if ? then e1 else e2) ?y],
see https://gitlab.mpi-sws.org/iris/iris/merge_requests/391 for a use case.
Mode [-]... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCEq_eq {A} (x1 x2 : A) : TCEq x1 x2 ↔ x1 = x2. | Proof. split; destruct 1; reflexivity. Qed. | Lemma | TCEq_eq | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"TCEq"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCSimpl {A} (x x' : A) | := TCSimpl_TCEq : TCEq x x'. | Class | TCSimpl | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"TCEq"
] | The [TCSimpl x y] type class is similar to [TCEq] but performs [simpl]
before proving the goal by reflexivity. Similar to [TCEq], the argument [x]
is the input and [y] the output. When solving [TCEq x y], the argument [x]
should be a concrete term and [y] an evar for the [simpl]ed result. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
TCSimpl_eq {A} (x1 x2 : A) : TCSimpl x1 x2 ↔ x1 = x2. | Proof. apply TCEq_eq. Qed. | Lemma | TCSimpl_eq | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"TCEq_eq",
"TCSimpl"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TCDiag {A} (C : A → Prop) : A → A → Prop | :=
| TCDiag_diag x : C x → TCDiag C x x. | Inductive | TCDiag | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
tc_to_bool (P : Prop)
{p : bool} `{TCIf P (TCEq p true) (TCEq p false)} : bool | := p. | Definition | tc_to_bool | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"TCEq",
"TCIf"
] | Given a proposition [P] that is a type class, [tc_to_bool P] will return
[true] iff there is an instance of [P]. It is often useful in Ltac programming,
where one can do [lazymatch tc_to_bool P with true => .. | false => .. end]. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
"'True'" | := True (format "True") : type_scope. | Notation | 'True' | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | Change [True] and [False] into notations in order to enable overloading.
We will use this to give [True] and [False] a different interpretation for
embedded logics. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
"'False'" | := False (format "False") : type_scope. | Notation | 'False' | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"'forall' x .. y , P" | := (forall x, .. (forall y, P) ..)
(at level 200, x binder, y binder, right associativity,
only parsing) : type_scope. | Notation | 'forall' x .. y , P | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"binder"
] | Change [forall] into a notation in order to enable overloading. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
"(=)" | := eq (only parsing) : stdpp_scope. | Notation | (=) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | Introduce some Haskell style like notations. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
"( x =.)" | := (eq x) (only parsing) : stdpp_scope. | Notation | ( x =.) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(.= x )" | := (λ y, eq y x) (only parsing) : stdpp_scope. | Notation | (.= x ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(≠)" | := (λ x y, x ≠ y) (only parsing) : stdpp_scope. | Notation | (≠) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"( x ≠.)" | := (λ y, x ≠ y) (only parsing) : stdpp_scope. | Notation | ( x ≠.) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(.≠ x )" | := (λ y, y ≠ x) (only parsing) : stdpp_scope. | Notation | (.≠ x ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(=@{ A } )" | := (@eq A) (only parsing) : stdpp_scope. | Notation | (=@{ A } ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(≠@{ A } )" | := (λ X Y, ¬X =@{A} Y) (only parsing) : stdpp_scope. | Notation | (≠@{ A } ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"X ≠@{ A } Y" | := (¬X =@{ A } Y)
(at level 70, only parsing, no associativity) : stdpp_scope. | Notation | X ≠@{ A } Y | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
: ∀ A, PreOrder (=@{A}). | Proof. split; repeat intro; congruence. Qed. | Instance | ∀_A | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Equiv A | := equiv: relation A. | Class | Equiv | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | We define an operational type class for setoid equality, i.e., the
"canonical" equivalence for a type. The typeclass is tied to the \equiv
symbol. This is based on (Spitters/van der Weegen, 2011). | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
equiv_rewrite_relation `{Equiv A} :
RewriteRelation (@equiv A _) | 150 | := {}. | Instance | equiv_rewrite_relation | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Equiv"
] | We instruct setoid rewriting to infer [equiv] as a relation on
type [A] when needed. This allows setoid_rewrite to solve constraints
of shape [Proper (eq ==> ?R) f] using [Proper (eq ==> (equiv (A:=A))) f]
when an equivalence relation is available on type [A]. We put this instance
at level 150 so it does not take prece... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
"(≡)" | := equiv (only parsing) : stdpp_scope. | Notation | (≡) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"( X ≡.)" | := (equiv X) (only parsing) : stdpp_scope. | Notation | ( X ≡.) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(.≡ X )" | := (λ Y, Y ≡ X) (only parsing) : stdpp_scope. | Notation | (.≡ X ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(≢)" | := (λ X Y, ¬X ≡ Y) (only parsing) : stdpp_scope. | Notation | (≢) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"X ≢ Y" | := (¬X ≡ Y) (at level 70, no associativity) : stdpp_scope. | Notation | X ≢ Y | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"( X ≢.)" | := (λ Y, X ≢ Y) (only parsing) : stdpp_scope. | Notation | ( X ≢.) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(.≢ X )" | := (λ Y, Y ≢ X) (only parsing) : stdpp_scope. | Notation | (.≢ X ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(≡@{ A } )" | := (@equiv A _) (only parsing) : stdpp_scope. | Notation | (≡@{ A } ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(≢@{ A } )" | := (λ X Y, ¬X ≡@{A} Y) (only parsing) : stdpp_scope. | Notation | (≢@{ A } ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"X ≢@{ A } Y" | := (¬X ≡@{ A } Y)
(at level 70, only parsing, no associativity) : stdpp_scope. | Notation | X ≢@{ A } Y | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
LeibnizEquiv A `{Equiv A} | :=
leibniz_equiv (x y : A) : x ≡ y → x = y. | Class | LeibnizEquiv | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Equiv"
] | The type class [LeibnizEquiv] collects setoid equalities that coincide
with Leibniz equality. We provide the tactic [fold_leibniz] to transform such
setoid equalities into Leibniz equalities, and [unfold_leibniz] for the
reverse.
Various std++ tactics assume that this class is only instantiated if [≡]
is an equivalenc... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
leibniz_equiv_iff `{LeibnizEquiv A, !Reflexive (≡@{A})} (x y : A) :
x ≡ y ↔ x = y. | Proof. split; [apply leibniz_equiv|]. intros ->; reflexivity. Qed. | Lemma | leibniz_equiv_iff | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"LeibnizEquiv"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
fold_leibniz | := repeat
match goal with
| H : context [ _ ≡@{?A} _ ] |- _ =>
setoid_rewrite (leibniz_equiv_iff (A:=A)) in H
| |- context [ _ ≡@{?A} _ ] =>
setoid_rewrite (leibniz_equiv_iff (A:=A))
end. | Ltac | fold_leibniz | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"leibniz_equiv_iff"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
unfold_leibniz | := repeat
match goal with
| H : context [ _ =@{?A} _ ] |- _ =>
setoid_rewrite <-(leibniz_equiv_iff (A:=A)) in H
| |- context [ _ =@{?A} _ ] =>
setoid_rewrite <-(leibniz_equiv_iff (A:=A))
end. | Ltac | unfold_leibniz | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"leibniz_equiv_iff"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
equivL {A} : Equiv A | := (=). | Definition | equivL | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Equiv"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
: Params (@equiv) 2 | := {}. | Instance | Params_equiv | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | A [Params f n] instance forces the setoid rewriting mechanism not to
rewrite in the first [n] arguments of the function [f]. We will declare such
instances for all operational type classes in this development. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
equiv_default_relation `{Equiv A} :
DefaultRelation (≡@{A}) | 3 | := {}. | Instance | equiv_default_relation | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Equiv"
] | The following instance forces [setoid_replace] to use setoid equality
(for types that have an [Equiv] instance) rather than the standard Leibniz
equality. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
Decision (P : Prop) | := decide : {P} + {¬P}. | Class | Decision | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | This type class by (Spitters/van der Weegen, 2011) collects decidable
propositions. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
RelDecision {A B} (R : A → B → Prop) | :=
decide_rel x y :: Decision (R x y). | Class | RelDecision | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Decision"
] | Although [RelDecision R] is just [∀ x y, Decision (R x y)], we make this
an explicit class instead of a notation for two reasons:
- It allows us to control [Hint Mode] more precisely. In particular, if it were
defined as a notation, the above [Hint Mode] for [Decision] would not prevent
diverging instance search w... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
EqDecision A | := (RelDecision (=@{A})). | Notation | EqDecision | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"RelDecision"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Inhabited (A : Type) : Type | := populate { inhabitant : A }. | Class | Inhabited | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | This type class collects types that are inhabited. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
ProofIrrel (A : Type) : Prop | := proof_irrel (x y : A) : x = y. | Class | ProofIrrel | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | This type class collects types that are proof irrelevant. That means, all
elements of the type are equal. We use this notion only used for propositions,
but by universe polymorphism we can generalize it. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
Inj {A B} (R : relation A) (S : relation B) (f : A → B) : Prop | :=
inj x y : S (f x) (f y) → R x y. | Class | Inj | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | These operational type classes allow us to refer to common mathematical
properties in a generic way. For example, for injectivity of [(k ++.)] it
allows us to write [inj (k ++.)] instead of [app_inv_head k]. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
Inj2 {A B C} (R1 : relation A) (R2 : relation B)
(S : relation C) (f : A → B → C) : Prop | :=
inj2 x1 x2 y1 y2 : S (f x1 x2) (f y1 y2) → R1 x1 y1 ∧ R2 x2 y2. | Class | Inj2 | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Cancel {A B} (S : relation B) (f : A → B) (g : B → A) : Prop | :=
cancel x : S (f (g x)) x. | Class | Cancel | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Surj {A B} (R : relation B) (f : A → B) | :=
surj y : ∃ x, R (f x) y. | Class | Surj | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
IdemP {A} (R : relation A) (f : A → A → A) : Prop | :=
idemp x : R (f x x) x. | Class | IdemP | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Comm {A B} (R : relation A) (f : B → B → A) : Prop | :=
comm x y : R (f x y) (f y x). | Class | Comm | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
LeftId {A} (R : relation A) (i : A) (f : A → A → A) : Prop | :=
left_id x : R (f i x) x. | Class | LeftId | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
RightId {A} (R : relation A) (i : A) (f : A → A → A) : Prop | :=
right_id x : R (f x i) x. | Class | RightId | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Assoc {A} (R : relation A) (f : A → A → A) : Prop | :=
assoc x y z : R (f x (f y z)) (f (f x y) z). | Class | Assoc | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
LeftAbsorb {A} (R : relation A) (i : A) (f : A → A → A) : Prop | :=
left_absorb x : R (f i x) i. | Class | LeftAbsorb | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
RightAbsorb {A} (R : relation A) (i : A) (f : A → A → A) : Prop | :=
right_absorb x : R (f x i) i. | Class | RightAbsorb | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
AntiSymm {A} (R S : relation A) : Prop | :=
anti_symm x y : S x y → S y x → R x y. | Class | AntiSymm | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Total {A} (R : relation A) | := total x y : R x y ∨ R y x. | Class | Total | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Trichotomy {A} (R : relation A) | :=
trichotomy x y : R x y ∨ x = y ∨ R y x. | Class | Trichotomy | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TrichotomyT {A} (R : relation A) | :=
trichotomyT x y : {R x y} + {x = y} + {R y x}. | Class | TrichotomyT | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
Involutive R f | := (Cancel R f f). | Notation | Involutive | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Cancel"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
involutive {A} {R : relation A} (f : A → A) `{Involutive R f} x :
R (f (f x)) x. | Proof. auto. Qed. | Lemma | involutive | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Involutive"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
not_symmetry `{R : relation A, !Symmetric R} x y : ¬R x y → ¬R y x. | Proof. intuition. Qed. | Lemma | not_symmetry | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
symmetry_iff `(R : relation A) `{!Symmetric R} x y : R x y ↔ R y x. | Proof. intuition. Qed. | Lemma | symmetry_iff | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
not_inj `{Inj A B R R' f} x y : ¬R x y → ¬R' (f x) (f y). | Proof. intuition. Qed. | Lemma | not_inj | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inj"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
not_inj2_1 `{Inj2 A B C R R' R'' f} x1 x2 y1 y2 :
¬R x1 x2 → ¬R'' (f x1 y1) (f x2 y2). | Proof. intros HR HR''. destruct (inj2 f x1 y1 x2 y2); auto. Qed. | Lemma | not_inj2_1 | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inj2"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
not_inj2_2 `{Inj2 A B C R R' R'' f} x1 x2 y1 y2 :
¬R' y1 y2 → ¬R'' (f x1 y1) (f x2 y2). | Proof. intros HR' HR''. destruct (inj2 f x1 y1 x2 y2); auto. Qed. | Lemma | not_inj2_2 | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inj2"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
inj_iff {A B} {R : relation A} {S : relation B} (f : A → B)
`{!Inj R S f} `{!Proper (R ==> S) f} x y : S (f x) (f y) ↔ R x y. | Proof. firstorder. Qed. | Lemma | inj_iff | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inj"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
inj2_inj_1 `{Inj2 A B C R1 R2 R3 f} y : Inj R1 R3 (λ x, f x y). | Proof. repeat intro; edestruct (inj2 f); eauto. Qed. | Instance | inj2_inj_1 | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inj",
"Inj2"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
inj2_inj_2 `{Inj2 A B C R1 R2 R3 f} x : Inj R2 R3 (f x). | Proof. repeat intro; edestruct (inj2 f); eauto. Qed. | Instance | inj2_inj_2 | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inj",
"Inj2"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
cancel_inj `{Cancel A B R1 f g, !Equivalence R1, !Proper (R2 ==> R1) f} :
Inj R1 R2 g. | Proof.
intros x y E. rewrite <-(cancel f g x), <-(cancel f g y), E. reflexivity.
Qed. | Lemma | cancel_inj | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Cancel",
"Inj"
] | Smart constructors for [Inj] and [Surj] based on [Cancel]. These are not
instances because they will blow-up the search space due to diamonds: in every
node of the search tree for [Inj] or [Surj] of composed functions these
instances could be applied. Note that [f] and [g] do not need to be given,
these are infered usi... | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
cancel_surj `{Cancel A B R1 f g} : Surj R1 f. | Proof. intros y. exists (g y). auto. Qed. | Lemma | cancel_surj | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Cancel",
"Surj"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
idemp_L {A} f `{!@IdemP A (=) f} x : f x x = x. | Proof. auto. Qed. | Lemma | idemp_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"IdemP"
] | The following lemmas are specific versions of the projections of the above
type classes for Leibniz equality. These lemmas allow us to enforce Coq not to
use the setoid rewriting mechanism. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
comm_L {A B} f `{!@Comm A B (=) f} x y : f x y = f y x. | Proof. auto. Qed. | Lemma | comm_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Comm"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
left_id_L {A} i f `{!@LeftId A (=) i f} x : f i x = x. | Proof. auto. Qed. | Lemma | left_id_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"LeftId"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
right_id_L {A} i f `{!@RightId A (=) i f} x : f x i = x. | Proof. auto. Qed. | Lemma | right_id_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"RightId"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
assoc_L {A} f `{!@Assoc A (=) f} x y z : f x (f y z) = f (f x y) z. | Proof. auto. Qed. | Lemma | assoc_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Assoc"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
left_absorb_L {A} i f `{!@LeftAbsorb A (=) i f} x : f i x = i. | Proof. auto. Qed. | Lemma | left_absorb_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"LeftAbsorb"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
right_absorb_L {A} i f `{!@RightAbsorb A (=) i f} x : f x i = i. | Proof. auto. Qed. | Lemma | right_absorb_L | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"RightAbsorb"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
strict {A} (R : relation A) : relation A | := λ X Y, R X Y ∧ ¬R Y X. | Definition | strict | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | The classes [PreOrder], [PartialOrder], and [TotalOrder] use an arbitrary
relation [R] instead of [⊆] to support multiple orders on the same type. | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
: Params (@strict) 2 | := {}. | Instance | Params_strict | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"strict"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
PartialOrder {A} (R : relation A) : Prop | := {
partial_order_pre :: PreOrder R;
partial_order_anti_symm :: AntiSymm (=) R
}. | Class | PartialOrder | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"AntiSymm"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
TotalOrder {A} (R : relation A) : Prop | := {
total_order_partial :: PartialOrder R;
total_order_trichotomy :: Trichotomy (strict R)
}. | Class | TotalOrder | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"PartialOrder",
"Trichotomy",
"strict"
] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
prop_inhabited : Inhabited Prop | := populate True. | Instance | prop_inhabited | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [
"Inhabited"
] | * Logic | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
"(∧)" | := and (only parsing) : stdpp_scope. | Notation | (∧) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"( A ∧.)" | := (and A) (only parsing) : stdpp_scope. | Notation | ( A ∧.) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b | |
"(.∧ B )" | := (λ A, A ∧ B) (only parsing) : stdpp_scope. | Notation | (.∧ B ) | stdpp | stdpp/base.v | [
"Stdlib",
"Morphisms",
"RelationClasses",
"List",
"Bool",
"Setoid",
"Peano",
"Utf8",
"Permutation",
"ListNotations",
"Stdlib.Program",
"Basics",
"Syntax",
"ssreflect",
"stdpp",
"options"
] | [] | https://gitlab.mpi-sws.org/iris/stdpp | dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b |
Structured dataset of formalizations from the std++ library (used by Iris).
dafbf9e8d890b6a602552bcdd229d17c7b6d8b5b| Column | Type | Description |
|---|---|---|
| statement | string | Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof |
| proof | string | Verbatim proof/body, empty if the declaration has none |
| type | string | Declaration keyword |
| symbolic_name | string | Declaration identifier |
| library | string | Sub-library |
| filename | string | Repository-relative source path |
| imports | list[string] | File-level Require/Import modules |
| deps | list[string] | Intra-corpus identifiers referenced |
| docstring | string | Preceding documentation comment, empty if absent |
| source_url | string | Upstream repository |
| commit | string | Upstream commit extracted |
| Type | Count |
|---|---|
| Lemma | 3,419 |
| Instance | 1,206 |
| Definition | 334 |
| Notation | 330 |
| Class | 103 |
| Fixpoint | 93 |
| Ltac | 87 |
| Inductive | 43 |
| Record | 18 |
| Coercion | 7 |
| CoInductive | 4 |
| Let | 3 |
| Variant | 2 |
| CoFixpoint | 1 |
| Scheme | 1 |
TCForall {A} (P : A → Prop) : list A → Prop
:=
| TCForall_nil : TCForall P []
| TCForall_cons x xs : P x → TCForall P xs → TCForall P (x :: xs).
TCForall | stdpp/base.vEach declaration is split into a statement (signature/claim) and a proof (body) that are disjoint
and together form the complete declaration, for proof modeling, autoformalization, retrieval, and
dependency analysis via deps.
@misc{coq_stdpp_dataset,
title = {Coq-Stdpp},
author = {Norton, Charles},
year = {2026},
note = {Extracted from https://gitlab.mpi-sws.org/iris/stdpp, commit dafbf9e8d890},
url = {https://huggingface.co/datasets/phanerozoic/Coq-Stdpp}
}