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
_Has_J_Has_J_forward@{sa se sp;la le lp} eq Has_refl {has_J : Has_J@{sa se sp;la le lp} eq Has_refl} : Has_J_forward@{sa se sp;la le lp} eq Has_refl := Has_J_Has_J_forward _ _. Hint Resolve _Has_J_Has_J_forward : rewrite_instances.
Definition
Corelib
[ "Require Import Notations", "Require Import Ltac" ]
Corelib/Init/Equality.v
_Has_J_Has_J_forward
Has_J_r_Has_J_r_forward@{sa se sp;la le lp} eq Has_refl {has_J : Has_J_r@{sa se sp;la le lp} eq Has_refl} : forall (A : Type@{sa ; la}) (x : A) (P : forall y : A, eq A y x -> Type@{sp ; lp}) y e, P y e -> P x (refl A x) := fun A x P y e => J_r_eliminator _ _ (fun y e => P y e -> P _ _) (fun x => x) _ _.
Definition
Corelib
[ "Require Import Notations", "Require Import Ltac" ]
Corelib/Init/Equality.v
Has_J_r_Has_J_r_forward
_Has_J_r_Has_J_r_forward@{sa se sp;la le lp} eq Has_refl {has_J : Has_J_r@{sa se sp;la le lp} eq Has_refl} : Has_J_r_forward@{sa se sp;la le lp} eq Has_refl := Has_J_r_Has_J_r_forward _ _. Hint Resolve _Has_J_r_Has_J_r_forward : rewrite_instances.
Definition
Corelib
[ "Require Import Notations", "Require Import Ltac" ]
Corelib/Init/Equality.v
_Has_J_r_Has_J_r_forward
uint:= | Nil | D0 (_:uint) | D1 (_:uint) | D2 (_:uint) | D3 (_:uint) | D4 (_:uint) | D5 (_:uint) | D6 (_:uint) | D7 (_:uint) | D8 (_:uint) | D9 (_:uint) | Da (_:uint) | Db (_:uint) | Dc (_:uint) | Dd (_:uint) | De (_:uint) | Df (_:uint).
Inductive
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
uint
signed_int:= Pos (d:uint) | Neg (d:uint). Abbreviation int := signed_int.
Variant
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
signed_int
hexadecimal:= | Hexadecimal (i:int) (f:uint) | HexadecimalExp (i:int) (f:uint) (e:Decimal.int).
Variant
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
hexadecimal
Equalityfor uint.
Scheme
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
Equality
Equalityfor int.
Scheme
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
Equality
Equalityfor hexadecimal. Abbreviation int_eq_dec := signed_int_eq_dec. Abbreviation int_beq := signed_int_beq. Abbreviation internal_int_dec_lb := internal_signed_int_dec_lb. Abbreviation internal_int_dec_bl := internal_signed_int_dec_bl. Declare Scope hex_uint_scope. Delimit Scope hex_uint_scope with huint. Bind Scop...
Scheme
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
Equality
nb_digitsd := match d with | Nil => O | D0 d | D1 d | D2 d | D3 d | D4 d | D5 d | D6 d | D7 d | D8 d | D9 d | Da d | Db d | Dc d | Dd d | De d | Df d => S (nb_digits d) end.
Fixpoint
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
nb_digits
nzheadd := match d with | D0 d => nzhead d | _ => d end.
Fixpoint
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
nzhead
unormd := match nzhead d with | Nil => zero | d => d end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
unorm
normd := match d with | Pos d => Pos (unorm d) | Neg d => match nzhead d with | Nil => Pos zero | d => Neg d end end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
norm
opp(d:int) := match d with | Pos d => Neg d | Neg d => Pos d end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
opp
abs(d:int) : uint := match d with | Pos d => d | Neg d => d end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
abs
revapp(d d' : uint) := match d with | Nil => d' | D0 d => revapp d (D0 d') | D1 d => revapp d (D1 d') | D2 d => revapp d (D2 d') | D3 d => revapp d (D3 d') | D4 d => revapp d (D4 d') | D5 d => revapp d (D5 d') | D6 d => revapp d (D6 d') | D7 d => revapp d (D7 d') | D8 d => revapp d (D8 d') | D9 ...
Fixpoint
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
revapp
revd := revapp d Nil.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
rev
appd d' := revapp (rev d) d'.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
app
app_intd1 d2 := match d1 with Pos d1 => Pos (app d1 d2) | Neg d1 => Neg (app d1 d2) end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
app_int
nztaild := let fix aux d_rev := match d_rev with | D0 d_rev => let (r, n) := aux d_rev in pair r (S n) | _ => pair d_rev O end in let (r, n) := aux (rev d) in pair (rev r) n.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
nztail
nztail_intd := match d with | Pos d => let (r, n) := nztail d in pair (Pos r) n | Neg d => let (r, n) := nztail d in pair (Neg r) n end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
nztail_int
del_headn d := match n with | O => d | S n => match d with | Nil => zero | D0 d | D1 d | D2 d | D3 d | D4 d | D5 d | D6 d | D7 d | D8 d | D9 d | Da d | Db d | Dc d | Dd d | De d | Df d => del_head n d end end.
Fixpoint
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
del_head
del_head_intn d := match d with | Pos d => del_head n d | Neg d => del_head n d end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
del_head_int
del_tailn d := rev (del_head n (rev d)).
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
del_tail
del_tail_intn d := match d with | Pos d => Pos (del_tail n d) | Neg d => Neg (del_tail n d) end.
Definition
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
del_tail_int
succd := match d with | Nil => D1 Nil | D0 d => D1 d | D1 d => D2 d | D2 d => D3 d | D3 d => D4 d | D4 d => D5 d | D5 d => D6 d | D6 d => D7 d | D7 d => D8 d | D8 d => D9 d | D9 d => Da d | Da d => Db d | Db d => Dc d | Dc d => Dd d | Dd d => De d | De d => Df d | Df d => D0 (succ d)...
Fixpoint
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
succ
doubled := match d with | Nil => Nil | D0 d => D0 (double d) | D1 d => D2 (double d) | D2 d => D4 (double d) | D3 d => D6 (double d) | D4 d => D8 (double d) | D5 d => Da (double d) | D6 d => Dc (double d) | D7 d => De (double d) | D8 d => D0 (succ_double d) | D9 d => D2 (succ_double d) | Da d ...
Fixpoint
Corelib
[ "Require Import Datatypes Specif Decimal" ]
Corelib/Init/Hexadecimal.v
double
True: Prop := I : True. Register True as core.True.type. Register I as core.True.I.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
True
False: Prop :=. Register False as core.False.type.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
False
not(A:Prop) := A -> False.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
not
notT(A:Type) := A -> False.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
notT
and(A B:Prop) : Prop := conj : A -> B -> A /\ B where "A /\ B" := (and A B) : type_scope. Register and as core.and.type. Register conj as core.and.conj.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and
proj1: A /\ B -> A. Proof. destruct 1; trivial. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
proj1
proj2: A /\ B -> B. Proof. destruct 1; trivial. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
proj2
or(A B:Prop) : Prop := | or_introl : A -> A \/ B | or_intror : B -> A \/ B where "A \/ B" := (or A B) : type_scope. Arguments or_introl [A B] _, [A] B _. Arguments or_intror [A B] _, A [B] _. Register or as core.or.type.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or
iff(A B:Prop) := (A -> B) /\ (B -> A).
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
iff
iff_refl: forall A:Prop, A <-> A. Proof. split; auto. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
iff_refl
iff_trans: forall A B C:Prop, (A <-> B) -> (B <-> C) -> (A <-> C). Proof. intros A B C [H1 H2] [H3 H4]; split; auto. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
iff_trans
iff_sym: forall A B:Prop, (A <-> B) -> (B <-> A). Proof. intros A B [H1 H2]; split; auto. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
iff_sym
and_iff_compat_l: forall A B C : Prop, (B <-> C) -> (A /\ B <-> A /\ C). Proof. intros ? ? ? [Hl Hr]; split; intros [? ?]; (split; [ assumption | ]); [apply Hl | apply Hr]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and_iff_compat_l
and_iff_compat_r: forall A B C : Prop, (B <-> C) -> (B /\ A <-> C /\ A). Proof. intros ? ? ? [Hl Hr]; split; intros [? ?]; (split; [ | assumption ]); [apply Hl | apply Hr]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and_iff_compat_r
or_iff_compat_l: forall A B C : Prop, (B <-> C) -> (A \/ B <-> A \/ C). Proof. intros ? ? ? [Hl Hr]; split; (intros [?|?]; [left; assumption| right]); [apply Hl | apply Hr]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or_iff_compat_l
or_iff_compat_r: forall A B C : Prop, (B <-> C) -> (B \/ A <-> C \/ A). Proof. intros ? ? ? [Hl Hr]; split; (intros [?|?]; [left| right; assumption]); [apply Hl | apply Hr]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or_iff_compat_r
imp_iff_compat_l: forall A B C : Prop, (B <-> C) -> ((A -> B) <-> (A -> C)). Proof. intros ? ? ? [Hl Hr]; split; intros H ?; [apply Hl | apply Hr]; apply H; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
imp_iff_compat_l
imp_iff_compat_r: forall A B C : Prop, (B <-> C) -> ((B -> A) <-> (C -> A)). Proof. intros ? ? ? [Hl Hr]; split; intros H ?; [apply H, Hr | apply H, Hl]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
imp_iff_compat_r
not_iff_compat: forall A B : Prop, (A <-> B) -> (~ A <-> ~B). Proof. intros; apply imp_iff_compat_r; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
not_iff_compat
neg_false: forall A : Prop, ~ A <-> (A <-> False). Proof. intro A; unfold not; split. - intro H; split; [exact H | intro H1; elim H1]. - intros [H _]; exact H. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
neg_false
and_cancel_l: forall A B C : Prop, (B -> A) -> (C -> A) -> ((A /\ B <-> A /\ C) <-> (B <-> C)). Proof. intros A B C Hl Hr. split; [ | apply and_iff_compat_l]; intros [HypL HypR]; split; intros. + apply HypL; split; [apply Hl | ]; assumption. + apply HypR; split; [apply Hr | ]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and_cancel_l
and_cancel_r: forall A B C : Prop, (B -> A) -> (C -> A) -> ((B /\ A <-> C /\ A) <-> (B <-> C)). Proof. intros A B C Hl Hr. split; [ | apply and_iff_compat_r]; intros [HypL HypR]; split; intros. + apply HypL; split; [ | apply Hl ]; assumption. + apply HypR; split; [ | apply Hr ]; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and_cancel_r
and_comm: forall A B : Prop, A /\ B <-> B /\ A. Proof. intros; split; intros [? ?]; split; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and_comm
and_assoc: forall A B C : Prop, (A /\ B) /\ C <-> A /\ B /\ C. Proof. intros; split; [ intros [[? ?] ?]| intros [? [? ?]]]; repeat split; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
and_assoc
or_cancel_l: forall A B C : Prop, (B -> ~ A) -> (C -> ~ A) -> ((A \/ B <-> A \/ C) <-> (B <-> C)). Proof. intros ? ? ? Fl Fr; split; [ | apply or_iff_compat_l]; intros [Hl Hr]; split; intros. { destruct Hl; [ right | destruct Fl | ]; assumption. } { destruct Hr; [ right | destruct Fr | ]; assumption. } Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or_cancel_l
or_cancel_r: forall A B C : Prop, (B -> ~ A) -> (C -> ~ A) -> ((B \/ A <-> C \/ A) <-> (B <-> C)). Proof. intros ? ? ? Fl Fr; split; [ | apply or_iff_compat_r]; intros [Hl Hr]; split; intros. { destruct Hl; [ left | | destruct Fl ]; assumption. } { destruct Hr; [ left | | destruct Fr ]; assumption. } Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or_cancel_r
or_comm: forall A B : Prop, (A \/ B) <-> (B \/ A). Proof. intros; split; (intros [? | ?]; [ right | left ]; assumption). Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or_comm
or_assoc: forall A B C : Prop, (A \/ B) \/ C <-> A \/ B \/ C. Proof. intros; split; [ intros [[?|?]|?]| intros [?|[?|?]]]. + left; assumption. + right; left; assumption. + right; right; assumption. + left; left; assumption. + left; right; assumption. + right; assumption. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
or_assoc
iff_and: forall A B : Prop, (A <-> B) -> (A -> B) /\ (B -> A). Proof. intros A B []; split; trivial. Qed.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
iff_and
iff_to_and: forall A B : Prop, (A <-> B) <-> (A -> B) /\ (B -> A). Proof. intros; split; intros [Hl Hr]; (split; intros; [ apply Hl | apply Hr]); assumption. Qed.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
iff_to_and
ex(A:Type) (P:A -> Prop) : Prop := ex_intro : forall x:A, P x -> ex (A:=A) P. Register ex as core.ex.type. Register ex_intro as core.ex.intro.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
ex
ex_proj1(x:ex P) : A := match x with ex_intro _ a _ => a end.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
ex_proj1
ex_proj2(x:ex P) : P (ex_proj1 x) := match x with ex_intro _ _ b => b end. Register ex_proj1 as core.ex.proj1. Register ex_proj2 as core.ex.proj2.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
ex_proj2
ex2(A:Type) (P Q:A -> Prop) : Prop := ex_intro2 : forall x:A, P x -> Q x -> ex2 (A:=A) P Q.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
ex2
ex_of_ex2(A : Prop) (P Q : A -> Prop) (X : ex2 P Q) : ex P := ex_intro P (let (a, _, _) := X in a) (let (x, p, _) as s return (P (let (a, _, _) := s in a)) := X in p).
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
ex_of_ex2
ex_proj3(x:ex2 P Q) : Q (ex_proj1 (ex_of_ex2 x)) := match x with ex_intro2 _ _ _ _ b => b end.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
ex_proj3
all(A:Type) (P:A -> Prop) := forall x:A, P x. Register all as core.all.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
all
inst: forall x:A, all (fun x => P x) -> P x. Proof. unfold all; auto. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
inst
gen: forall (B:Prop) (f:forall y:A, B -> P y), B -> all P. Proof. red; auto. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
gen
eq(A:Type) (x:A) : A -> Prop := eq_refl : x = x :>A where "x = y :> A" := (@eq A x y) : type_scope. Arguments eq {A} x _. Arguments eq_refl {A x} , [A] x. Arguments eq_ind [A] x P _ y _ : rename. Arguments eq_rec [A] x P _ y _ : rename. Arguments eq_rect [A] x P _ y _ : rename.
Inductive
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq
Rewritingfor eq. Register eq_rew_dep as core.eq.rect_dep. Register eq_rew_dep as core.eq.ind_dep. Register eq_rew_r_dep as core.eq.rect_r_dep. Register eq_rew_r_dep as core.eq.ind_r_dep. Arguments eq_sym_involutive [A]%_type_scope [x y] e : rename.
Scheme
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
Rewriting
absurd: forall A C:Prop, A -> ~ A -> C. Proof. unfold not; intros A C h1 h2. destruct (h2 h1). Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
absurd
eq_trans: x = y -> y = z -> x = z. Proof. destruct 2; trivial. Defined. Register eq_trans as core.eq.trans.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans
eq_trans_r: x = y -> z = y -> x = z. Proof. destruct 2; trivial. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_r
f_equal: x = y -> f x = f y. Proof. destruct 1; trivial. Defined. Register f_equal as core.eq.congr.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal
not_eq_sym: x <> y -> y <> x. Proof. red; intros h1 h2; apply h1; destruct h2; trivial. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
not_eq_sym
eq_sind_r: forall (A:Type) (x:A) (P:A -> SProp), P x -> forall y:A, y = x -> P y. Proof. intros A x P H y H0. elim eq_sym with (1 := H0); assumption. Defined.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_sind_r
eq_ind_r: forall (A:Type) (x:A) (P:A -> Prop), P x -> forall y:A, y = x -> P y. intros A x P H y H0. elim eq_sym with (1 := H0); assumption. Defined. Register eq_ind_r as core.eq.ind_r. Register eq_sind_r as core.eq.sind_r.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_ind_r
eq_rec_r: forall (A:Type) (x:A) (P:A -> Set), P x -> forall y:A, y = x -> P y. intros A x P H y H0; elim eq_sym with (1 := H0); assumption. Defined.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_rec_r
eq_rect_r: forall (A:Type) (x:A) (P:A -> Type), P x -> forall y:A, y = x -> P y. intros A x P H y H0; elim eq_sym with (1 := H0); assumption. Defined. Register eq_rect_r as core.eq.rect_r. Register eq_rec_r as core.eq.rec_r.
Definition
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_rect_r
f_equal_dep(H: x = y) : rew H in f x = f y. Proof. destruct H; reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal_dep
f_equal_dep2{A A' B B'} (f : A -> A') (g : forall a:A, B a -> B' (f a)) {x1 x2 : A} {y1 : B x1} {y2 : B x2} (H : x1 = x2) : rew H in y1 = y2 -> rew f_equal f H in g x1 y1 = g x2 y2. Proof. destruct H, 1. reflexivity. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal_dep2
rew_opp_rA (P:A->Type) (x y:A) (H:x=y) (a:P y) : rew H in rew <- H in a = a. Proof. destruct H. reflexivity. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
rew_opp_r
rew_opp_lA (P:A->Type) (x y:A) (H:x=y) (a:P x) : rew <- H in rew H in a = a. Proof. destruct H. reflexivity. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
rew_opp_l
f_equal2: forall (A1 A2 B:Type) (f:A1 -> A2 -> B) (x1 y1:A1) (x2 y2:A2), x1 = y1 -> x2 = y2 -> f x1 x2 = f y1 y2. Proof. destruct 1; destruct 1; reflexivity. Qed. Register f_equal2 as core.eq.congr2.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal2
f_equal3: forall (A1 A2 A3 B:Type) (f:A1 -> A2 -> A3 -> B) (x1 y1:A1) (x2 y2:A2) (x3 y3:A3), x1 = y1 -> x2 = y2 -> x3 = y3 -> f x1 x2 x3 = f y1 y2 y3. Proof. destruct 1; destruct 1; destruct 1; reflexivity. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal3
f_equal4: forall (A1 A2 A3 A4 B:Type) (f:A1 -> A2 -> A3 -> A4 -> B) (x1 y1:A1) (x2 y2:A2) (x3 y3:A3) (x4 y4:A4), x1 = y1 -> x2 = y2 -> x3 = y3 -> x4 = y4 -> f x1 x2 x3 x4 = f y1 y2 y3 y4. Proof. destruct 1; destruct 1; destruct 1; destruct 1; reflexivity. Qed.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal4
f_equal5: forall (A1 A2 A3 A4 A5 B:Type) (f:A1 -> A2 -> A3 -> A4 -> A5 -> B) (x1 y1:A1) (x2 y2:A2) (x3 y3:A3) (x4 y4:A4) (x5 y5:A5), x1 = y1 -> x2 = y2 -> x3 = y3 -> x4 = y4 -> x5 = y5 -> f x1 x2 x3 x4 x5 = f y1 y2 y3 y4 y5. Proof. destruct 1; destruct 1; destruct 1; destruct 1; destruct 1; reflexiv...
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal5
f_equal_composeA B C (a b:A) (f:A->B) (g:B->C) (e:a=b) : f_equal g (f_equal f e) = f_equal (fun a => g (f a)) e. Proof. destruct e. reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
f_equal_compose
eq_trans_refl_lA (x y:A) (e:x=y) : eq_trans eq_refl e = e. Proof. destruct e. reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_refl_l
eq_trans_refl_rA (x y:A) (e:x=y) : eq_trans e eq_refl = e. Proof. destruct e. reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_refl_r
eq_trans_sym_inv_lA (x y:A) (e:x=y) : eq_trans (eq_sym e) e = eq_refl. Proof. destruct e; reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_sym_inv_l
eq_trans_sym_inv_rA (x y:A) (e:x=y) : eq_trans e (eq_sym e) = eq_refl. Proof. destruct e; reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_sym_inv_r
eq_trans_assocA (x y z t:A) (e:x=y) (e':y=z) (e'':z=t) : eq_trans e (eq_trans e' e'') = eq_trans (eq_trans e e') e''. Proof. destruct e''; reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_assoc
rew_mapA B (P:B->Type) (f:A->B) x1 x2 (H:x1=x2) (y:P (f x1)) : rew [fun x => P (f x)] H in y = rew f_equal f H in y. Proof. destruct H; reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
rew_map
eq_trans_map{A B} {x1 x2 x3:A} {y1:B x1} {y2:B x2} {y3:B x3} (H1:x1=x2) (H2:x2=x3) (H1': rew H1 in y1 = y2) (H2': rew H2 in y2 = y3) : rew eq_trans H1 H2 in y1 = y3. Proof. destruct H2. exact (eq_trans H1' H2'). Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_trans_map
map_subst{A} {P Q:A->Type} (f : forall x, P x -> Q x) {x y} (H:x=y) (z:P x) : rew H in f x z = f y (rew H in z). Proof. destruct H. reflexivity. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
map_subst
map_subst_map{A B} {P:A->Type} {Q:B->Type} (f:A->B) (g : forall x, P x -> Q (f x)) {x y} (H:x=y) (z:P x) : rew f_equal f H in g x z = g y (rew H in z). Proof. destruct H. reflexivity. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
map_subst_map
rew_swapA (P:A->Type) x1 x2 (H:x1=x2) (y1:P x1) (y2:P x2) : rew H in y1 = y2 -> y1 = rew <- H in y2. Proof. destruct H. trivial. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
rew_swap
rew_composeA (P:A->Type) x1 x2 x3 (H1:x1=x2) (H2:x2=x3) (y:P x1) : rew H2 in rew H1 in y = rew (eq_trans H1 H2) in y. Proof. destruct H2. reflexivity. Defined.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
rew_compose
eq_id_comm_lA (f:A->A) (Hf:forall a, a = f a) a : f_equal f (Hf a) = Hf (f a). Proof. unfold f_equal. rewrite <- (eq_trans_sym_inv_l (Hf a)). destruct (Hf a) at 1 2. destruct (Hf a). reflexivity. Defined.
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_id_comm_l
eq_id_comm_rA (f:A->A) (Hf:forall a, f a = a) a : f_equal f (Hf a) = Hf (f a). Proof. unfold f_equal. rewrite <- (eq_trans_sym_inv_l (Hf (f (f a)))). set (Hfsymf := fun a => eq_sym (Hf a)). change (eq_sym (Hf (f (f a)))) with (Hfsymf (f (f a))). pattern (Hfsymf (f (f a))). destruct (eq_id_comm_l f Hfsymf (f...
Theorem
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_id_comm_r
eq_refl_map_distrA B x (f:A->B) : f_equal f (eq_refl x) = eq_refl (f x). Proof. reflexivity. Qed.
Lemma
Corelib
[ "Require Export Notations", "Require Import Ltac" ]
Corelib/Init/Logic.v
eq_refl_map_distr