statement stringlengths 1 1.02k | proof stringlengths 0 5.19k | type stringclasses 13
values | symbolic_name stringlengths 1 30 | library stringclasses 15
values | filename stringclasses 117
values | imports listlengths 0 16 | deps listlengths 0 16 | docstring stringclasses 50
values | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
nth_error (ls : plist) (n : nat) : poption T | :=
match n , ls with
| 0 , pcons l _ => pSome l
| S n , pcons _ ls => nth_error ls n
| _ , _ => pNone
end. | Fixpoint | nth_error | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"plist",
"poption"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
fold_left (acc : U) (ls : plist) : U | :=
match ls with
| pnil => acc
| pcons l ls => fold_left (f l acc) ls
end. | Fixpoint | fold_left | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
fold_right (ls : plist) (rr : U) : U | :=
match ls with
| pnil => rr
| pcons l ls => f l (fold_right ls rr)
end. | Fixpoint | fold_right | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
split {A B : Type} (lst : plist (pprod A B)) | :=
match lst with
| pnil => (pnil, pnil)
| pcons (ppair x y) tl => let (left, right) := split tl in (pcons x left, pcons y right)
end. | Fixpoint | split | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"plist",
"pprod",
"tl"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
pIn_split_l {A B : Type} (lst : plist (pprod A B)) (p : pprod A B) (H : pIn p lst) :
(pIn (pfst p) (fst (split lst))). | Proof.
destruct p; simpl.
induction lst; simpl in *.
+ destruct H.
+ destruct t; simpl.
destruct (split lst); simpl.
destruct H as [H | H].
{ inv_all. tauto. }
{ tauto. }
Qed. | Lemma | pIn_split_l | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"inv_all",
"pIn",
"plist",
"pprod",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
pIn_split_r {A B : Type} (lst : plist (pprod A B)) (p : pprod A B) (H : pIn p lst) :
(pIn (psnd p) (snd (split lst))). | Proof.
destruct p; simpl.
induction lst; simpl in *.
+ destruct H.
+ destruct t; simpl.
destruct (split lst); simpl.
destruct H.
{ inv_all; tauto. }
{ tauto. }
Qed. | Lemma | pIn_split_r | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"inv_all",
"pIn",
"plist",
"pprod",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
pIn_app_iff (A : Type) (l l' : plist A) (a : A) :
pIn a (app l l') <-> pIn a l \/ pIn a l'. | Proof.
induction l; simpl; intuition congruence.
Qed. | Lemma | pIn_app_iff | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"app",
"pIn",
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
inb_sound (x : A) (lst : plist A) (H : inb x lst = true) : pIn x lst. | Proof.
induction lst; simpl in *; try congruence.
consider (x ?[ eq ] t); intros; subst.
+ left; reflexivity.
+ right; apply IHlst; assumption.
Qed. | Lemma | inb_sound | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"apply",
"consider",
"inb",
"pIn",
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
inb_complete (x : A) (lst : plist A) (H : pIn x lst) : inb x lst = true. | Proof.
induction lst; simpl in *; try intuition congruence.
consider (x ?[ eq ] t); intros; destruct H as [H | H]; try congruence.
apply IHlst; assumption.
Qed. | Lemma | inb_complete | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"apply",
"consider",
"inb",
"pIn",
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nodup_sound (lst : plist A) (H : nodup lst = true) : pNoDup lst. | Proof.
induction lst.
+ constructor.
+ simpl in *. rewrite andb_true_iff in H; destruct H as [H1 H2].
rewrite negb_true_iff in H1. constructor.
* intro H. apply inb_complete in H. intuition congruence.
* apply IHlst; assumption.
Qed. | Lemma | nodup_sound | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"apply",
"inb_complete",
"nodup",
"pNoDup",
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nodup_complete (lst : plist A) (H : pNoDup lst) : nodup lst = true. | Proof.
induction lst.
+ constructor.
+ simpl in *. rewrite andb_true_iff. inversion H; subst; split; clear H.
* apply eq_true_not_negb. intros H; apply H2. apply inb_sound; assumption.
* apply IHlst; assumption.
Qed. | Lemma | nodup_complete | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"apply",
"inb_sound",
"nodup",
"pNoDup",
"plist",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
fmap_plist (ls : plist@{i} T) : plist@{j} U | :=
match ls with
| pnil => pnil
| pcons l ls => pcons (f l) (fmap_plist ls)
end. | Fixpoint | fmap_plist | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Functor_plist@{i} : Functor@{i i} plist@{i} | :=
{| fmap := @fmap_plist@{i i} |}. | Definition | Functor_plist | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"Functor",
"fmap_plist",
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
ap_plist
(fs : plist@{i} (T -> U)) (xs : plist@{i} T)
: plist@{j} U | :=
match fs with
| pnil => pnil
| pcons f fs => app@{j} (fmap_plist@{i j} f xs) (ap_plist fs xs)
end. | Fixpoint | ap_plist | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"app",
"fmap_plist",
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Applicative_plist@{i} : Applicative@{i i} plist@{i} | :=
{| pure := fun _ val => pcons val pnil
; ap := @ap_plist
|}. | Definition | Applicative_plist | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"Applicative",
"ap_plist",
"plist",
"pure"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
plist_eqb (ls rs : plist T) : bool | :=
match ls , rs with
| pnil , pnil => true
| pcons l ls , pcons r rs =>
if l ?[ eq ] r then plist_eqb ls rs else false
| _ , _ => false
end. | Fixpoint | plist_eqb | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"plist"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_eq_plist : RelDec (@eq (plist T)) | :=
{ rel_dec := plist_eqb }. | Instance | RelDec_eq_plist | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"RelDec",
"plist",
"plist_eqb"
] | Specialization for equality * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
RelDec_Correct_eq_plist : RelDec_Correct RelDec_eq_plist. | Proof.
constructor; induction x; destruct y; split; simpl in *; intros;
repeat match goal with
| [ H : context [ rel_dec ?X ?Y ] |- _ ] =>
consider (rel_dec X Y); intros; subst
| [ |- context [ rel_dec ?X ?Y ] ] =>
consider (rel_dec X Y); intros;... | Instance | RelDec_Correct_eq_plist | Data | theories/Data/PList.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Data.POption",
"ExtLib.Data.PPair",
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection",
"Coq.Bool.Bool"
] | [
"RelDec_Correct",
"RelDec_eq_plist",
"consider",
"context",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
poption : Type@{i} | :=
| pSome : T -> poption
| pNone. | Inductive | poption | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_pSome@{} a b
: Injective (pSome a = pSome b) | :=
{ result := a = b
; injection := fun pf =>
match pf in _ = X
return a = match X with
| pSome y => y
| _ => a
end
with
| eq_... | Instance | Injective_pSome | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_pSome_pNone a
: Injective (pSome a = pNone) | :=
{ result := False
; injection := fun pf =>
match pf in _ = X
return match X return Prop with
| pSome y => True
| _ => False
end
with
| ... | Instance | Injective_pSome_pNone | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_pNone_pSome@{} a
: Injective (pNone = pSome a) | :=
{ result := False
; injection := fun pf =>
match pf in _ = X
return match X return Prop with
| pNone => True
| _ => False
end
with
| eq... | Instance | Injective_pNone_pSome | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
fmap_poption@{} (x : poption@{i} T) : poption@{j} U | :=
match x with
| pNone => pNone@{j}
| pSome x => pSome@{j} (f x)
end. | Definition | fmap_poption | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"poption"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
ap_poption@{}
(f : poption@{i} (T -> U)) (x : poption@{i} T)
: poption@{j} U | :=
match f , x with
| pSome f , pSome x => pSome (f x)
| _ , _ => pNone
end. | Definition | ap_poption | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"poption"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Functor_poption@{i} : Functor@{i i} poption@{i} | :=
{| fmap := @fmap_poption@{i i} |}. | Definition | Functor_poption | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"Functor",
"fmap_poption",
"poption"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Applicative_poption@{i} : Applicative@{i i} poption@{i} | :=
{| pure := @pSome@{i}
; ap := @ap_poption |}. | Definition | Applicative_poption | Data | theories/Data/POption.v | [
"ExtLib.Structures.Functor",
"ExtLib.Structures.Applicative",
"ExtLib.Tactics.Injection"
] | [
"Applicative",
"ap_poption",
"poption",
"pure"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_peq : RelDec (@eq positive) | :=
{ rel_dec := Pos.eqb }. | Instance | RelDec_peq | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec"
] | Decidable Instances | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
RelDec_plt : RelDec (Pos.lt) | :=
{ rel_dec := Pos.ltb }. | Instance | RelDec_plt | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec",
"lt"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_ple : RelDec (Pos.le) | :=
{ rel_dec := Pos.leb }. | Instance | RelDec_ple | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_pgt : RelDec (Pos.gt) | :=
{ rel_dec := fun x y => negb (Pos.leb x y) }. | Instance | RelDec_pgt | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_pge : RelDec (Pos.ge) | :=
{ rel_dec := fun x y => negb (Pos.ltb x y) }. | Instance | RelDec_pge | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_peq : RelDec_Correct RelDec_peq. | Proof.
constructor; simpl. intros.
apply Pos.eqb_eq.
Qed. | Instance | RelDec_Correct_peq | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec_Correct",
"RelDec_peq",
"apply"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_plt : RelDec_Correct RelDec_plt. | Proof.
constructor; simpl; intros.
apply Pos.ltb_lt.
Qed. | Instance | RelDec_Correct_plt | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec_Correct",
"RelDec_plt",
"apply"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_ple : RelDec_Correct RelDec_ple. | Proof.
constructor; simpl; intros.
apply Pos.leb_le.
Qed. | Instance | RelDec_Correct_ple | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec_Correct",
"RelDec_ple",
"apply"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_pgt : RelDec_Correct RelDec_pgt. | Proof.
constructor; simpl; intros.
unfold rel_dec; simpl.
rewrite <- Pos.ltb_antisym. rewrite Pos.ltb_lt.
intuition; [ apply Pos.lt_gt | apply Pos.gt_lt ]; auto.
Qed. | Instance | RelDec_Correct_pgt | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec_Correct",
"RelDec_pgt",
"apply"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_pge : RelDec_Correct RelDec_pge. | Proof.
constructor; simpl. intros.
unfold rel_dec; simpl.
rewrite <- Pos.leb_antisym. rewrite Pos.leb_le.
intuition; [ apply Pos.le_ge | apply Pos.ge_le ]; auto.
Qed. | Instance | RelDec_Correct_pge | Data | theories/Data/Positive.v | [
"Coq.PArith.BinPos",
"ExtLib.Core.RelDec"
] | [
"RelDec_Correct",
"RelDec_pge",
"apply"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
pprod : Type@{max (i, j)} | := ppair
{ pfst : T
; psnd : U }. | Record | pprod | Data | theories/Data/PPair.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Injection"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
eq_pair_rw
: forall T U (a b : T) (c d : U) (pf : (ppair a c) = (ppair b d)),
exists (pf' : a = b) (pf'' : c = d),
pf = match pf' , pf'' with
| eq_refl , eq_refl => eq_refl
end. | Proof.
clear.
intros.
exists (f_equal pfst pf).
exists (f_equal psnd pf).
change (pf =
match
@f_equal (pprod T U) T (@pfst T U) (ppair a c) (ppair b d) pf in (_ = t)
return ((ppair a c) = (ppair t d))
with
| eq_refl =>
mat... | Lemma | eq_pair_rw | Data | theories/Data/PPair.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Injection"
] | [
"pprod"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_pprod (a : T) (b : U) c d
: Injective (ppair a b = ppair c d). | Proof.
refine {| result := a = c /\ b = d |}.
intros.
change a with (pfst@{i j} {| pfst := a ; psnd := b |}).
change b with (psnd@{i j} {| pfst := a ; psnd := b |}) at 2.
rewrite H. split; reflexivity.
Defined. | Instance | Injective_pprod | Data | theories/Data/PPair.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Injection"
] | [
"Injective",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
ppair_eqb (p1 p2 : pprod T U) : bool | :=
pfst p1 ?[ eq ] pfst p2 && psnd p1 ?[ eq ] psnd p2. | Definition | ppair_eqb | Data | theories/Data/PPair.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Injection"
] | [
"pprod"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_eq_ppair : RelDec (@eq (@pprod T U)) | :=
{ rel_dec := ppair_eqb }. | Instance | RelDec_eq_ppair | Data | theories/Data/PPair.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Injection"
] | [
"RelDec",
"ppair_eqb",
"pprod"
] | Specialization for equality * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
RelDec_Correct_eq_ppair
: RelDec_Correct RelDec_eq_ppair. | Proof.
constructor. intros p1 p2. destruct p1, p2. simpl.
unfold ppair_eqb. simpl.
rewrite Bool.andb_true_iff.
repeat rewrite rel_dec_correct.
split.
{ destruct 1. f_equal; assumption. }
{ intros. inv_all. tauto. }
Qed. | Instance | RelDec_Correct_eq_ppair | Data | theories/Data/PPair.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Injection"
] | [
"RelDec_Correct",
"RelDec_eq_ppair",
"inv_all",
"ppair_eqb",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Fun@{d c} (A : Type@{d}) (B : Type@{c}) | := A -> B. | Definition | Fun | Data | theories/Data/PreFun.v | [
"Coq.Classes",
"Morphisms",
"Coq.Relations",
"Relations"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
compose@{uA uB uC} {A:Type@{uA}} {B:Type@{uB}} {C : Type@{uC}}
(g : B -> C) (f : A -> B) : A -> C | :=
fun x => g (f x). | Definition | compose | Data | theories/Data/PreFun.v | [
"Coq.Classes",
"Morphisms",
"Coq.Relations",
"Relations"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
and_True_iff : forall P, (P /\ True) <-> P. | Proof. intuition. Qed. | Lemma | and_True_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | And/Conjunction * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
and_and_iff : forall P, (P /\ P) <-> P. | Proof. intuition. Qed. | Lemma | and_and_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
and_assoc : forall P Q R, (P /\ Q /\ R) <-> ((P /\ Q) /\ R). | Proof. intuition. Qed. | Lemma | and_assoc | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
and_comm : forall P Q, (P /\ Q) <-> (Q /\ P). | Proof. intuition. Qed. | Lemma | and_comm | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
and_False_iff : forall P, (P /\ False) <-> False. | Proof. intuition. Qed. | Lemma | and_False_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
and_cancel
: forall P Q R : Prop, (P -> (Q <-> R)) -> ((P /\ Q) <-> (P /\ R)). | Proof. intuition. Qed. | Lemma | and_cancel | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
and_iff
: forall P Q R S : Prop,
(P <-> R) ->
(P -> (Q <-> S)) ->
((P /\ Q) <-> (R /\ S)). | Proof. clear; intuition. Qed. | Lemma | and_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
or_False_iff : forall P, (P \/ False) <-> P. | Proof. intuition. Qed. | Lemma | or_False_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | Or/Disjunction * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
or_or_iff : forall P, (P \/ P) <-> P. | Proof. intuition. Qed. | Lemma | or_or_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
or_assoc : forall P Q R, (P \/ Q \/ R) <-> ((P \/ Q) \/ R). | Proof. intuition. Qed. | Lemma | or_assoc | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
or_comm : forall P Q, (P \/ Q) <-> (Q \/ P). | Proof. intuition. Qed. | Lemma | or_comm | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
or_True_iff : forall P, (P \/ True) <-> True. | Proof. intuition. Qed. | Lemma | or_True_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
impl_True_iff : forall (P : Prop), (True -> P) <-> P. | Proof.
clear; intros; tauto.
Qed. | Lemma | impl_True_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | Implication * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
impl_iff
: forall P Q R S : Prop,
(P <-> R) ->
(P -> (Q <-> S)) ->
((P -> Q) <-> (R -> S)). | Proof. clear. intuition. Qed. | Lemma | impl_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
impl_eq : forall (P Q : Prop), P = Q -> (P -> Q). | Proof. clear. intros; subst; auto. Qed. | Lemma | impl_eq | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
uncurry : forall (P Q R : Prop),
(P /\ Q -> R) <-> (P -> Q -> R). | Proof. clear. tauto. Qed. | Lemma | uncurry | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
forall_iff : forall T P Q,
(forall x,
P x <-> Q x) ->
((forall x : T, P x) <-> (forall x : T, Q x)). | Proof.
intros. setoid_rewrite H. reflexivity.
Qed. | Lemma | forall_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | Forall * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
forall_impl : forall {T} (P Q : T -> Prop),
(forall x, P x -> Q x) ->
(forall x, P x) -> (forall x, Q x). | Proof.
clear. intuition.
Qed. | Lemma | forall_impl | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
exists_iff : forall T P Q,
(forall x,
P x <-> Q x) ->
((exists x : T, P x) <-> (exists x : T, Q x)). | Proof.
intros. setoid_rewrite H. reflexivity.
Qed. | Lemma | exists_iff | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | Exists * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
exists_impl : forall {T} (P Q : T -> Prop),
(forall x, P x -> Q x) ->
(exists x, P x) -> (exists x, Q x). | Proof.
clear. intuition.
destruct H0; eauto.
Qed. | Lemma | exists_impl | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
iff_eq : forall (P Q : Prop), P = Q -> (P <-> Q). | Proof. clear. intros; subst; reflexivity. Qed. | Lemma | iff_eq | Data | theories/Data/Prop.v | [
"Coq",
"Setoid"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_existT a b d
: Injective (existT F a b = existT F a d) | 1. | refine {| result := b = d |}.
abstract (eauto using inj_pair2).
Defined. | Instance | Injective_existT | Data | theories/Data/SigT.v | [
"Coq.Classes",
"EquivDec",
"ExtLib.Structures.EqDep",
"ExtLib.Tactics.Injection",
"ExtLib.Tactics.EqDep"
] | [
"Injective",
"inj_pair2"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_existT_dif a b c d
: Injective (existT F a b = existT F c d) | 2. | refine {| result := exists pf : c = a,
b = match pf in _ = t return F t with
| eq_refl => d
end |}.
abstract (inversion 1; subst; exists eq_refl; auto).
Defined. | Instance | Injective_existT_dif | Data | theories/Data/SigT.v | [
"Coq.Classes",
"EquivDec",
"ExtLib.Structures.EqDep",
"ExtLib.Tactics.Injection",
"ExtLib.Tactics.EqDep"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
eq_sigT_rw
: forall T U F (a b : T) (pf : a = b) s,
match pf in _ = x return @sigT U (F x) with
| eq_refl => s
end =
@existT U (F b) (projT1 s)
match pf in _ = x return F x (projT1 s) with
| eq_refl => (projT2 s)
end. | Proof. destruct pf. destruct s; reflexivity. Qed. | Lemma | eq_sigT_rw | Data | theories/Data/SigT.v | [
"Coq.Classes",
"EquivDec",
"ExtLib.Structures.EqDep",
"ExtLib.Tactics.Injection",
"ExtLib.Tactics.EqDep"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
stream : Type | :=
| snil : stream
| scons : T -> stream -> stream. | CoInductive | stream | Data | theories/Data/Stream.v | [] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
"x >> y" | := (match x with
| Eq => y
| z => z
end) (only parsing, at level 30). | Notation | x >> y | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
deprecated_bool_cmp (l r : bool) : comparison | :=
match l , r with
| true , false => Gt
| false , true => Lt
| true , true
| false , false => Eq
end. | Definition | deprecated_bool_cmp | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
bool_cmp | := deprecated_bool_cmp. | Notation | bool_cmp | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"deprecated_bool_cmp"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
deprecated_ascii_cmp (l r : Ascii.ascii) : comparison | :=
match l , r with
| Ascii.Ascii l1 l2 l3 l4 l5 l6 l7 l8 ,
Ascii.Ascii r1 r2 r3 r4 r5 r6 r7 r8 =>
bool_cmp l8 r8 >> bool_cmp l7 r7 >> bool_cmp l6 r6 >> bool_cmp l5 r5 >>
bool_cmp l4 r4 >> bool_cmp l3 r3 >> bool_cmp l2 r2 >> bool_cmp l1 r1
end. | Definition | deprecated_ascii_cmp | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"bool_cmp"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
ascii_cmp | := deprecated_ascii_cmp. | Notation | ascii_cmp | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"deprecated_ascii_cmp"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_string : RelDec (@eq string) | :=
{| rel_dec := String.eqb |}. | Instance | RelDec_string | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"RelDec"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_string : RelDec_Correct RelDec_string. | Proof.
constructor; auto using String.eqb_eq.
Qed. | Instance | RelDec_Correct_string | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"RelDec_Correct",
"RelDec_string"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Reflect_string_dec a b : Reflect (String.eqb a b) (a = b) (a <> b). | Proof.
apply iff_to_reflect; auto using String.eqb_eq.
Qed. | Instance | Reflect_string_dec | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"Reflect",
"apply",
"iff_to_reflect"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
deprecated_string_cmp (l r : string) : comparison | :=
match l , r with
| EmptyString , EmptyString => Eq
| EmptyString , _ => Lt
| _ , EmptyString => Gt
| String l ls , String r rs =>
ascii_cmp l r >> deprecated_string_cmp ls rs
end. | Fixpoint | deprecated_string_cmp | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"ascii_cmp"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
string_cmp | := deprecated_string_cmp. | Notation | string_cmp | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"deprecated_string_cmp"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
one_lt_mod : 1 < modulus. | Hypothesis | one_lt_mod | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | ||
_xxx : forall m n,
1 < m -> ~ n < m -> 0 < n. | Proof.
destruct n; destruct m; intros.
inversion H. exfalso. apply H0. etransitivity. 2: eassumption. repeat constructor.
inversion H.
now apply Nat.lt_0_succ.
Qed. | Lemma | _xxx | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"apply"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nat2string (n:nat) {measure n}: string :=
match Nat.ltb n modulus as x return Nat.ltb n modulus = x -> string with
| true => fun _ => String (digit2ascii n) EmptyString
| false => fun pf =>
let m := Nat.div n modulus in
append (nat2string m) (String (digit2ascii (n - modulus * m)) EmptyS... | Next Obligation.
eapply Nat.div_lt; auto.
consider (Nat.ltb n modulus); try congruence. intros.
eapply _xxx; eassumption.
Defined. | Fixpoint | nat2string | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"_xxx",
"consider",
"digit2ascii"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nat2string10 : nat -> string. | refine (@nat2string 10 _).
repeat constructor.
Defined. | Definition | nat2string10 | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"nat2string"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nat2string2 : nat -> string. | refine (@nat2string 2 _).
repeat constructor.
Defined. | Definition | nat2string2 | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"nat2string"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nat2string8 : nat -> string. | refine (@nat2string 8 _).
repeat constructor.
Defined. | Definition | nat2string8 | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"nat2string"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
nat2string16 : nat -> string. | refine (@nat2string 16 _).
repeat constructor.
Defined. | Definition | nat2string16 | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"nat2string"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Foldable_string : Foldable string ascii | :=
fun _ f base =>
fix go ls :=
match ls with
| EmptyString => base
| String l ls =>
f l (go ls)
end. | Instance | Foldable_string | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"Foldable"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
R_string_len : string -> string -> Prop | :=
| R_s_len : forall n m, length n < length m -> R_string_len n m. | Inductive | R_string_len | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"length"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
wf_R_string_len : well_founded R_string_len. | Proof.
constructor. intros.
refine (@Fix _ _ wf_R_lt (fun n : nat => forall ls : string, n = length ls -> Acc R_string_len ls)
(fun x rec ls pfls => Acc_intro _ _)
_ _ refl_equal).
refine (
match ls as ls return x = length ls -> forall z : string, R_string_len z ls -> Acc R_string_len z wi... | Theorem | wf_R_string_len | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"R_nat_lt",
"R_string_len",
"length",
"wf_R_lt"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Monoid_string_append : Monoid string | :=
{| monoid_plus := append
; monoid_unit := EmptyString
|}. | Definition | Monoid_string_append | Data | theories/Data/String.v | [
"Coq",
"String",
"Program",
"PeanoNat",
"ExtLib.Tactics.Consider",
"ExtLib.Core.RelDec",
"ExtLib.Structures.Reducible",
"ExtLib.Structures.Monoid",
"ExtLib.Data.Char",
"ExtLib.Data.Nat"
] | [
"Monoid"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
sum_eq : T + U -> T + U -> Prop | :=
| Inl_eq : forall a b, eqT a b -> sum_eq (inl a) (inl b)
| Inr_eq : forall a b, eqU a b -> sum_eq (inr a) (inr b). | Inductive | sum_eq | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_equ_sum
: RelDec (sum_eq) | :=
{ rel_dec := fun x y =>
match x , y with
| inl x , inl y => rel_dec x y
| inr x , inr y => rel_dec x y
| inl _ , inr _ => false
| inr _ , inl _ => false
end }. | Instance | RelDec_equ_sum | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"RelDec",
"sum_eq"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_Correct_equ_sum : RelDec_Correct RelDec_equ_sum. | Proof.
constructor; destruct x; destruct y; split; simpl in *; intros;
repeat match goal with
| [ H : context [ rel_dec ?X ?Y ] |- _ ] =>
consider (rel_dec X Y); intros; subst
| [ |- context [ rel_dec ?X ?Y ] ] =>
consider (rel_dec X Y); intros; ... | Instance | RelDec_Correct_equ_sum | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"RelDec_Correct",
"RelDec_equ_sum",
"consider",
"context",
"split"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
RelDec_eq_pair : RelDec (@eq (T + U)) | :=
{ rel_dec := fun x y =>
match x , y with
| inl x , inl y => rel_dec x y
| inr x , inr y => rel_dec x y
| inl _ , inr _ => false
| inr _ , inl _ => false
end }. | Instance | RelDec_eq_pair | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"RelDec"
] | Specialization for equality * | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
Injective_inl T U a c : Injective (@inl T U a = inl c). | Proof.
refine {| result := a = c |}.
abstract (inversion 1; intuition).
Defined. | Instance | Injective_inl | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_inr T U a c : Injective (@inr T U a = inr c). | Proof.
refine {| result := a = c |}.
abstract (inversion 1; intuition).
Defined. | Instance | Injective_inr | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_inl_False T U a c : Injective (@inl T U a = inr c). | Proof.
refine {| result := False |}.
abstract (inversion 1; intuition).
Defined. | Instance | Injective_inl_False | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
Injective_inr_False T U a c : Injective (@inr T U a = inl c). | Proof.
refine {| result := False |}.
abstract (inversion 1; intuition).
Defined. | Instance | Injective_inr_False | Data | theories/Data/Sum.v | [
"ExtLib.Core.RelDec",
"ExtLib.Tactics.Consider",
"ExtLib.Tactics.Injection"
] | [
"Injective"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
pmap_lookup' (ts : pmap Type) (p : positive) : option Type | :=
match p with
| xH => pmap_here ts
| xI p => pmap_lookup' (pmap_right ts) p
| xO p => pmap_lookup' (pmap_left ts) p
end. | Fixpoint | pmap_lookup' | Data | theories/Data/SumN.v | [
"Coq",
"PArith",
"ExtLib.Data.Map.FMapPositive",
"ExtLib.Data.Eq",
"ExtLib.Tactics.Injection"
] | [
"pmap",
"pmap_here",
"pmap_left",
"pmap_right"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 | |
OneOf (ts : pmap Type) : Type | := mkOneOf
{ index : positive
; value : match pmap_lookup' ts index with
| None => Empty_set
| Some T => T
end
}. | Record | OneOf | Data | theories/Data/SumN.v | [
"Coq",
"PArith",
"ExtLib.Data.Map.FMapPositive",
"ExtLib.Data.Eq",
"ExtLib.Tactics.Injection"
] | [
"pmap",
"pmap_lookup'",
"value"
] | https://github.com/coq-community/coq-ext-lib | ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.