fact stringlengths 6 2.88k | type stringclasses 17
values | library stringclasses 2
values | imports listlengths 0 16 | filename stringclasses 89
values | symbolic_name stringlengths 1 36 | docstring stringclasses 1
value |
|---|---|---|---|---|---|---|
eq_trans_map_distrA B x y z (f:A->B) (e:x=y) (e':y=z) : f_equal f (eq_trans e e') = eq_trans (f_equal f e) (f_equal f e').
Proof.
destruct e'.
reflexivity.
Defined. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_trans_map_distr | |
eq_sym_map_distrA B (x y:A) (f:A->B) (e:x=y) : eq_sym (f_equal f e) = f_equal f (eq_sym e).
Proof.
destruct e.
reflexivity.
Defined. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_sym_map_distr | |
eq_trans_sym_distrA (x y z:A) (e:x=y) (e':y=z) : eq_sym (eq_trans e e') = eq_trans (eq_sym e') (eq_sym e).
Proof.
destruct e, e'.
reflexivity.
Defined. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_trans_sym_distr | |
eq_trans_rew_distrA (P:A -> Type) (x y z:A) (e:x=y) (e':y=z) (k:P x) :
rew (eq_trans e e') in k = rew e' in rew e in k.
Proof.
destruct e, e'; reflexivity.
Qed. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_trans_rew_distr | |
rew_constA P (x y:A) (e:x=y) (k:P) :
rew [fun _ => P] e in k = k.
Proof.
destruct e; reflexivity.
Qed. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | rew_const | |
subrelation(A B : Type) (R R' : A->B->Prop) :=
forall x y, R x y -> R' x y. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | subrelation | |
unique(A : Type) (P : A->Prop) (x:A) :=
P x /\ forall (x':A), P x' -> x=x'. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | unique | |
uniqueness(A:Type) (P:A->Prop) := forall x y, P x -> P y -> x = y. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | uniqueness | |
unique_existence: forall (A:Type) (P:A->Prop),
((exists x, P x) /\ uniqueness P) <-> (exists! x, P x).
Proof.
intros A P; split.
- intros ((x,Hx),Huni); exists x; red; auto.
- intros (x,(Hx,Huni)); split.
+ exists x; assumption.
+ intros x' x'' Hx' Hx''; transitivity x.
* symmetry; auto.
* a... | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | unique_existence | |
forall_exists_unique_domain_coincide:
forall A (P:A->Prop), (exists! x, P x) ->
forall Q:A->Prop, (forall x, P x -> Q x) <-> (exists x, P x /\ Q x).
Proof.
intros A P (x & Hp & Huniq); split.
- intro; exists x; auto.
- intros (x0 & HPx0 & HQx0) x1 HPx1.
assert (H : x0 = x1) by (transitivity x; [symmetry|]... | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | forall_exists_unique_domain_coincide | |
forall_exists_coincide_unique_domain:
forall A (P:A->Prop),
(forall Q:A->Prop, (forall x, P x -> Q x) <-> (exists x, P x /\ Q x))
-> (exists! x, P x).
Proof.
intros A P H.
destruct (H P) as ((x & Hx & _),_); [trivial|].
exists x. split; [trivial|].
destruct (H (fun x'=>x=x')) as (_,Huniq).
apply Huniq. ... | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | forall_exists_coincide_unique_domain | |
inhabited(A:Type) : Prop := inhabits : A -> inhabited A.
#[global]
Hint Resolve inhabits: core. | Inductive | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | inhabited | |
exists_inhabited: forall (A:Type) (P:A->Prop),
(exists x, P x) -> inhabited A.
Proof.
destruct 1; auto.
Qed. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | exists_inhabited | |
inhabited_covariant(A B : Type) : (A -> B) -> inhabited A -> inhabited B.
Proof.
intros f [x];exact (inhabits (f x)).
Qed. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | inhabited_covariant | |
eq_stepl: forall (A : Type) (x y z : A), x = y -> x = z -> z = y.
Proof.
intros A x y z H1 H2. rewrite <- H2; exact H1.
Qed.
Declare Left Step eq_stepl.
Declare Right Step eq_trans. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_stepl | |
iff_stepl: forall A B C : Prop, (A <-> B) -> (A <-> C) -> (C <-> B).
Proof.
intros ? ? ? [? ?] [? ?]; split; intros; auto.
Qed.
Declare Left Step iff_stepl.
Declare Right Step iff_trans. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | iff_stepl | |
ex_eta{A : Prop} {P} (p : exists a : A, P a)
: p = ex_intro _ (ex_proj1 p) (ex_proj2 p).
Proof. destruct p; reflexivity. Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_eta | |
ex2_eta{A : Prop} {P Q} (p : exists2 a : A, P a & Q a)
: p = ex_intro2 _ _ (ex_proj1 (ex_of_ex2 p)) (ex_proj2 (ex_of_ex2 p)) (ex_proj3 p).
Proof. destruct p; reflexivity. Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex2_eta | |
ex_rect(P0 : ex P -> Type) (f : forall x p, P0 (ex_intro P x p))
: forall e, P0 e
:= fun e => rew <- ex_eta e in f _ _. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_rect | |
ex_rec: forall (P0 : ex P -> Set) (f : forall x p, P0 (ex_intro P x p)),
forall e, P0 e
:= ex_rect. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_rec | |
ex_proj1_eq{A : Prop} {P : A -> Prop} {u v : exists a : A, P a} (p : u = v)
: ex_proj1 u = ex_proj1 v
:= f_equal (@ex_proj1 _ _) p. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_proj1_eq | |
ex_proj2_eq{A : Prop} {P : A -> Prop} {u v : exists a : A, P a} (p : u = v)
: rew ex_proj1_eq p in ex_proj2 u = ex_proj2 v
:= rew dependent p in eq_refl. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_proj2_eq | |
eq_ex_intro_uncurried{A : Type} {P : A -> Prop} {u1 v1 : A} {u2 : P u1} {v2 : P v1}
(pq : exists p : u1 = v1, rew p in u2 = v2)
: ex_intro _ u1 u2 = ex_intro _ v1 v2.
Proof.
destruct pq as [p q].
destruct q; simpl in *.
destruct p; reflexivity.
Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro_uncurried | |
eq_ex_uncurried{A : Prop} {P : A -> Prop} (u v : exists a : A, P a)
(pq : exists p : ex_proj1 u = ex_proj1 v, rew p in ex_proj2 u = ex_proj2 v)
: u = v.
Proof.
destruct u as [u1 u2], v as [v1 v2]; simpl in *.
apply eq_ex_intro_uncurried; exact pq.
Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_uncurried | |
eq_ex_intro{A : Type} {P : A -> Prop} {u1 v1 : A} {u2 : P u1} {v2 : P v1}
(p : u1 = v1) (q : rew p in u2 = v2)
: ex_intro _ u1 u2 = ex_intro _ v1 v2
:= eq_ex_intro_uncurried (ex_intro _ p q). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro | |
eq_ex{A : Prop} {P : A -> Prop} (u v : exists a : A, P a)
(p : ex_proj1 u = ex_proj1 v) (q : rew p in ex_proj2 u = ex_proj2 v)
: u = v
:= eq_ex_uncurried u v (ex_intro _ p q). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex | |
eq_ex_intro_l{A : Prop} {P : A -> Prop} u1 u2 (v : exists a : A, P a)
(p : u1 = ex_proj1 v) (q : rew p in u2 = ex_proj2 v)
: ex_intro P u1 u2 = v
:= eq_ex (ex_intro P u1 u2) v p q. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro_l | |
eq_ex_intro_r{A : Prop} {P : A -> Prop} (u : exists a : A, P a) v1 v2
(p : ex_proj1 u = v1) (q : rew p in ex_proj2 u = v2)
: u = ex_intro P v1 v2
:= eq_ex u (ex_intro P v1 v2) p q. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro_r | |
eq_ex_eta{A : Prop} {P : A -> Prop} {u v : exists a : A, P a} (p : u = v) : p = eq_ex u v (ex_proj1_eq p) (ex_proj2_eq p).
Proof. destruct p, u; reflexivity. Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_eta | |
eq_ex_rect{A : Prop} {P : A -> Prop} {u v : exists a : A, P a} (Q : u = v -> Type)
(f : forall p q, Q (eq_ex u v p q))
: forall p, Q p
:= fun p => rew <- eq_ex_eta p in f _ _. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rect | |
eq_ex_rec{A : Prop} {P : A -> Prop} {u v} (Q : u = v :> (exists a : A, P a) -> Set) := eq_ex_rect Q. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rec | |
eq_ex_ind{A : Prop} {P : A -> Prop} {u v} (Q : u = v :> (exists a : A, P a) -> Prop) := eq_ex_rec Q. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_ind | |
eq_ex_rect_ex_intro_l{A : Prop} {P : A -> Prop} {u1 u2 v} (Q : _ -> Type)
(f : forall p q, Q (eq_ex_intro_l (P:=P) u1 u2 v p q))
: forall p, Q p
:= eq_ex_rect Q f. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rect_ex_intro_l | |
eq_ex_rect_ex_intro_r{A : Prop} {P : A -> Prop} {u v1 v2} (Q : _ -> Type)
(f : forall p q, Q (eq_ex_intro_r (P:=P) u v1 v2 p q))
: forall p, Q p
:= eq_ex_rect Q f. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rect_ex_intro_r | |
eq_ex_rect_ex_intro{A : Prop} {P : A -> Prop} {u1 u2 v1 v2} (Q : _ -> Type)
(f : forall p q, Q (@eq_ex_intro A P u1 v1 u2 v2 p q))
: forall p, Q p
:= eq_ex_rect Q f. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rect_ex_intro | |
eq_ex_rect_uncurried{A : Prop} {P : A -> Prop} {u v : exists a : A, P a} (Q : u = v -> Type)
(f : forall pq, Q (eq_ex u v (ex_proj1 pq) (ex_proj2 pq)))
: forall p, Q p
:= eq_ex_rect Q (fun p q => f (ex_intro _ p q)). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rect_uncurried | |
eq_ex_rec_uncurried{A : Prop} {P : A -> Prop} {u v} (Q : u = v :> (exists a : A, P a) -> Set) := eq_ex_rect_uncurried Q. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_rec_uncurried | |
eq_ex_ind_uncurried{A : Prop} {P : A -> Prop} {u v} (Q : u = v :> (exists a : A, P a) -> Prop) := eq_ex_rec_uncurried Q. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_ind_uncurried | |
eq_ex_hprop{A : Prop} {P : A -> Prop} (P_hprop : forall (x : A) (p q : P x), p = q)
(u v : exists a : A, P a)
(p : ex_proj1 u = ex_proj1 v)
: u = v
:= eq_ex u v p (P_hprop _ _ _). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_hprop | |
eq_ex_intro_hprop{A : Type} {P : A -> Prop} (P_hprop : forall (x : A) (p q : P x), p = q)
{u1 v1 : A} {u2 : P u1} {v2 : P v1}
(p : u1 = v1)
: ex_intro P u1 u2 = ex_intro P v1 v2
:= eq_ex_intro p (P_hprop _ _ _). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro_hprop | |
eq_ex_uncurried_iff{A : Prop} {P : A -> Prop} (u v : exists a : A, P a)
: u = v <-> exists p : ex_proj1 u = ex_proj1 v, rew p in ex_proj2 u = ex_proj2 v.
Proof.
split; [ intro; subst; exists eq_refl; reflexivity | apply eq_ex_uncurried ].
Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_uncurried_iff | |
eq_ex_hprop_iff{A : Prop} {P : A -> Prop} (P_hprop : forall (x : A) (p q : P x), p = q)
(u v : exists a : A, P a)
: u = v <-> (ex_proj1 u = ex_proj1 v)
:= conj (fun p => f_equal (@ex_proj1 _ _) p) (eq_ex_hprop P_hprop u v). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_hprop_iff | |
rew_ex{A' : Type} {x} {P : A' -> Prop} (Q : forall a, P a -> Prop) (u : exists p : P x, Q x p) {y} (H : x = y)
: rew [fun a => exists p : P a, Q a p] H in u
= ex_intro
(Q y)
(rew H in ex_proj1 u)
(rew dependent H in ex_proj2 u).
Proof.
destruct H, u; reflexivity.
Defined. | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | rew_ex | |
ex2_rect(P0 : ex2 P Q -> Type) (f : forall x p q, P0 (ex_intro2 P Q x p q))
: forall e, P0 e
:= fun e => rew <- ex2_eta e in f _ _ _. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex2_rect | |
ex2_rec: forall (P0 : ex2 P Q -> Set) (f : forall x p q, P0 (ex_intro2 P Q x p q)),
forall e, P0 e
:= ex2_rect. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex2_rec | |
ex_of_ex2_eq{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (p : u = v)
: u = v :> exists a : A, P a
:= f_equal _ p. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_of_ex2_eq | |
ex_proj1_of_ex2_eq{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (p : u = v)
: ex_proj1 u = ex_proj1 v
:= ex_proj1_eq (ex_of_ex2_eq p). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_proj1_of_ex2_eq | |
ex_proj2_of_ex2_eq{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (p : u = v)
: rew ex_proj1_of_ex2_eq p in ex_proj2 u = ex_proj2 v
:= rew dependent p in eq_refl. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_proj2_of_ex2_eq | |
ex_proj3_eq{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (p : u = v)
: rew ex_proj1_of_ex2_eq p in ex_proj3 u = ex_proj3 v
:= rew dependent p in eq_refl. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | ex_proj3_eq | |
eq_ex_intro2_uncurried{A : Type} {P Q : A -> Prop} {u1 v1 : A} {u2 : P u1} {v2 : P v1} {u3 : Q u1} {v3 : Q v1}
(pqr : exists2 p : u1 = v1, rew p in u2 = v2 & rew p in u3 = v3)
: ex_intro2 _ _ u1 u2 u3 = ex_intro2 _ _ v1 v2 v3.
Proof.
destruct pqr as [p q r].
destruct r, q, p; simpl.
refle... | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro2_uncurried | |
eq_ex2_uncurried{A : Prop} {P Q : A -> Prop} (u v : exists2 a : A, P a & Q a)
(pqr : exists2 p : ex_proj1 u = ex_proj1 v,
rew p in ex_proj2 u = ex_proj2 v & rew p in ex_proj3 u = ex_proj3 v)
: u = v.
Proof.
destruct u as [u1 u2 u3], v as [v1 v2 v3]; simpl in *.
... | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_uncurried | |
eq_ex2{A : Prop} {P Q : A -> Prop} (u v : exists2 a : A, P a & Q a)
(p : ex_proj1 u = ex_proj1 v)
(q : rew p in ex_proj2 u = ex_proj2 v)
(r : rew p in ex_proj3 u = ex_proj3 v)
: u = v
:= eq_ex2_uncurried u v (ex_intro2 _ _ p q r). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2 | |
eq_ex_intro2{A : Type} {P Q : A -> Prop} {u1 v1 : A} {u2 : P u1} {v2 : P v1} {u3 : Q u1} {v3 : Q v1}
(p : u1 = v1)
(q : rew p in u2 = v2)
(r : rew p in u3 = v3)
: ex_intro2 P Q u1 u2 u3 = ex_intro2 P Q v1 v2 v3
:= eq_ex_intro2_uncurried (ex_intro2 _ _ p q r). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro2 | |
eq_ex_intro2_l{A : Prop} {P Q : A -> Prop} u1 u2 u3 (v : exists2 a : A, P a & Q a)
(p : u1 = ex_proj1 v) (q : rew p in u2 = ex_proj2 v) (r : rew p in u3 = ex_proj3 v)
: ex_intro2 P Q u1 u2 u3 = v
:= eq_ex2 (ex_intro2 P Q u1 u2 u3) v p q r. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro2_l | |
eq_ex_intro2_r{A : Prop} {P Q : A -> Prop} (u : exists2 a : A, P a & Q a) v1 v2 v3
(p : ex_proj1 u = v1) (q : rew p in ex_proj2 u = v2) (r : rew p in ex_proj3 u = v3)
: u = ex_intro2 P Q v1 v2 v3
:= eq_ex2 u (ex_intro2 P Q v1 v2 v3) p q r. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro2_r | |
eq_ex2_hprop{A : Prop} {P Q : A -> Prop} (Q_hprop : forall (x : A) (p q : Q x), p = q)
(u v : exists2 a : A, P a & Q a)
(p : u = v :> exists a : A, P a)
: u = v
:= eq_ex2 u v (ex_proj1_eq p) (ex_proj2_eq p) (Q_hprop _ _ _). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_hprop | |
eq_ex_intro2_hprop_nondep{A : Type} {P : A -> Prop} {Q : Prop} (Q_hprop : forall (p q : Q), p = q)
{u1 v1 : A} {u2 : P u1} {v2 : P v1} {u3 v3 : Q}
(p : ex_intro _ u1 u2 = ex_intro _ v1 v2)
: ex_intro2 _ _ u1 u2 u3 = ex_intro2 _ _ v1 v2 v3
:= rew [fun v3 => _ = ex_intro2 _ _ _ _ v3] (Q_... | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro2_hprop_nondep | |
eq_ex_intro2_hprop{A : Type} {P Q : A -> Prop}
(P_hprop : forall x (p q : P x), p = q)
(Q_hprop : forall x (p q : Q x), p = q)
{u1 v1 : A} {u2 : P u1} {v2 : P v1} {u3 : Q u1} {v3 : Q v1}
(p : u1 = v1)
: ex_intro2 P Q u1 u2 u3 = ex_intro2 P Q v1 v2 v3
:= eq_ex_... | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex_intro2_hprop | |
eq_ex2_uncurried_iff{A : Prop} {P Q : A -> Prop} (u v : exists2 a : A, P a & Q a)
: u = v
<-> exists2 p : ex_proj1 u = ex_proj1 v,
rew p in ex_proj2 u = ex_proj2 v & rew p in ex_proj3 u = ex_proj3 v.
Proof.
split; [ intro; subst; exists eq_refl; reflexivity | apply eq_ex2_uncurried... | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_uncurried_iff | |
eq_ex2_eta{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (p : u = v)
: p = eq_ex2 u v (ex_proj1_of_ex2_eq p) (ex_proj2_of_ex2_eq p) (ex_proj3_eq p).
Proof. destruct p, u; reflexivity. Defined. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_eta | |
eq_ex2_rect{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (R : u = v -> Type)
(f : forall p q r, R (eq_ex2 u v p q r))
: forall p, R p
:= fun p => rew <- eq_ex2_eta p in f _ _ _. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rect | |
eq_ex2_rec{A : Prop} {P Q : A -> Prop} {u v} (R : u = v :> (exists2 a : A, P a & Q a) -> Set) := eq_ex2_rect R. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rec | |
eq_ex2_ind{A : Prop} {P Q : A -> Prop} {u v} (R : u = v :> (exists2 a : A, P a & Q a) -> Prop) := eq_ex2_rec R. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_ind | |
eq_ex2_rect_ex_intro2_l{A : Prop} {P Q : A -> Prop} {u1 u2 u3 v} (R : _ -> Type)
(f : forall p q r, R (eq_ex_intro2_l (P:=P) (Q:=Q) u1 u2 u3 v p q r))
: forall p, R p
:= eq_ex2_rect R f. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rect_ex_intro2_l | |
eq_ex2_rect_ex_intro2_r{A : Prop} {P Q : A -> Prop} {u v1 v2 v3} (R : _ -> Type)
(f : forall p q r, R (eq_ex_intro2_r (P:=P) (Q:=Q) u v1 v2 v3 p q r))
: forall p, R p
:= eq_ex2_rect R f. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rect_ex_intro2_r | |
eq_ex2_rect_ex_intro2{A : Prop} {P Q : A -> Prop} {u1 u2 u3 v1 v2 v3} (R : _ -> Type)
(f : forall p q r, R (@eq_ex_intro2 A P Q u1 v1 u2 v2 u3 v3 p q r))
: forall p, R p
:= eq_ex2_rect R f. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rect_ex_intro2 | |
eq_ex2_rect_uncurried{A : Prop} {P Q : A -> Prop} {u v : exists2 a : A, P a & Q a} (R : u = v -> Type)
(f : forall pqr : exists2 p : _ = _, _ & _, R (eq_ex2 u v (ex_proj1 pqr) (ex_proj2 pqr) (ex_proj3 pqr)))
: forall p, R p
:= eq_ex2_rect R (fun p q r => f (ex_intro2 _ _ p q r)). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rect_uncurried | |
eq_ex2_rec_uncurried{A : Prop} {P Q : A -> Prop} {u v} (R : u = v :> (exists2 a : A, P a & Q a) -> Set) := eq_ex2_rect_uncurried R. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_rec_uncurried | |
eq_ex2_ind_uncurried{A : Prop} {P Q : A -> Prop} {u v} (R : u = v :> (exists2 a : A, P a & Q a) -> Prop) := eq_ex2_rec_uncurried R. | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_ind_uncurried | |
eq_ex2_hprop_iff{A : Prop} {P Q : A -> Prop} (Q_hprop : forall (x : A) (p q : Q x), p = q)
(u v : exists2 a : A, P a & Q a)
: u = v <-> (u = v :> exists a : A, P a)
:= conj (fun p => f_equal (@ex_of_ex2 _ _ _) p) (eq_ex2_hprop Q_hprop u v). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_hprop_iff | |
eq_ex2_nondep{A : Prop} {B C : Prop} (u v : @ex2 A (fun _ => B) (fun _ => C))
(p : ex_proj1 u = ex_proj1 v) (q : ex_proj2 u = ex_proj2 v) (r : ex_proj3 u = ex_proj3 v)
: u = v
:= @eq_ex2 _ _ _ u v p (eq_trans (rew_const _ _) q) (eq_trans (rew_const _ _) r). | Definition | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | eq_ex2_nondep | |
rew_ex2{A' : Type} {x} {P : A' -> Prop} (Q R : forall a, P a -> Prop)
(u : exists2 p : P x, Q x p & R x p)
{y} (H : x = y)
: rew [fun a => exists2 p : P a, Q a p & R a p] H in u
= ex_intro2
(Q y)
(R y)
(rew H in ex_proj1 u)
(rew dependent H in ex_proj2 u... | Lemma | Corelib | [
"Require Export Notations",
"Require Import Ltac"
] | Corelib/Init/Logic.v | rew_ex2 | |
easy_forward_decl:= fail "Cannot use easy: Corelib.Init.Tactics not loaded". | Ltac | Corelib | [] | Corelib/Init/Ltac.v | easy_forward_decl | |
head_of_constrid c := Ltac.head_of_constr id c. | Ltac | Corelib | [] | Corelib/Init/Ltac.v | head_of_constr | |
t:= nat. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | t | |
zero:= 0. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | zero | |
one:= 1. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | one | |
two:= 2. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | two | |
succ:= S. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | succ | |
predn :=
match n with
| 0 => n
| S u => u
end.
Register pred as num.nat.pred. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | pred | |
addn m :=
match n with
| 0 => m
| S p => S (p + m)
end
where "n + m" := (add n m) : nat_scope.
Register add as num.nat.add. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | add | |
doublen := n + n. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | double | |
muln m :=
match n with
| 0 => 0
| S p => m + p * m
end
where "n * m" := (mul n m) : nat_scope.
Register mul as num.nat.mul. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | mul | |
subn m :=
match n, m with
| S k, S l => k - l
| _, _ => n
end
where "n - m" := (sub n m) : nat_scope.
Register sub as num.nat.sub. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | sub | |
eqbn m : bool :=
match n, m with
| 0, 0 => true
| 0, S _ => false
| S _, 0 => false
| S n', S m' => eqb n' m'
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | eqb | |
lebn m : bool :=
match n, m with
| 0, _ => true
| _, 0 => false
| S n', S m' => leb n' m'
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | leb | |
ltbn m := leb (S n) m.
Infix "=?" := eqb (at level 70) : nat_scope.
Infix "<=?" := leb (at level 70) : nat_scope.
Infix "<?" := ltb (at level 70) : nat_scope. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | ltb | |
comparen m : comparison :=
match n, m with
| 0, 0 => Eq
| 0, S _ => Lt
| S _, 0 => Gt
| S n', S m' => compare n' m'
end.
Infix "?=" := compare (at level 70) : nat_scope. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | compare | |
maxn m :=
match n, m with
| 0, _ => m
| S n', 0 => n
| S n', S m' => S (max n' m')
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | max | |
minn m :=
match n, m with
| 0, _ => 0
| S n', 0 => 0
| S n', S m' => S (min n' m')
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | min | |
evenn : bool :=
match n with
| 0 => true
| 1 => false
| S (S n') => even n'
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | even | |
oddn := negb (even n). | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | odd | |
pown m :=
match m with
| 0 => 1
| S m => n * (n^m)
end
where "n ^ m" := (pow n m) : nat_scope. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | pow | |
tail_addn m :=
match n with
| O => m
| S n => tail_add n (S m)
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | tail_add | |
tail_addmulr n m :=
match n with
| O => r
| S n => tail_addmul (tail_add m r) n m
end. | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | tail_addmul | |
tail_muln m := tail_addmul 0 n m. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | tail_mul | |
of_uint_acc(d:Decimal.uint)(acc:nat) :=
match d with
| Decimal.Nil => acc
| Decimal.D0 d => of_uint_acc d (tail_mul ten acc)
| Decimal.D1 d => of_uint_acc d (S (tail_mul ten acc))
| Decimal.D2 d => of_uint_acc d (S (S (tail_mul ten acc)))
| Decimal.D3 d => of_uint_acc d (S (S (S (tail_mul ten acc))))
| De... | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | of_uint_acc | |
of_uint(d:Decimal.uint) := of_uint_acc d O.
Local Abbreviation sixteen := (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S O)))))))))))))))). | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | of_uint | |
of_hex_uint_acc(d:Hexadecimal.uint)(acc:nat) :=
match d with
| Hexadecimal.Nil => acc
| Hexadecimal.D0 d => of_hex_uint_acc d (tail_mul sixteen acc)
| Hexadecimal.D1 d => of_hex_uint_acc d (S (tail_mul sixteen acc))
| Hexadecimal.D2 d => of_hex_uint_acc d (S (S (tail_mul sixteen acc)))
| Hexadecimal.D3 d =>... | Fixpoint | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | of_hex_uint_acc | |
of_hex_uint(d:Hexadecimal.uint) := of_hex_uint_acc d O. | Definition | Corelib | [
"Require Import Notations Logic Datatypes",
"Require Decimal Hexadecimal Number"
] | Corelib/Init/Nat.v | of_hex_uint |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.