fact stringlengths 8 1.54k | type stringclasses 19 values | library stringclasses 8 values | imports listlengths 1 10 | filename stringclasses 98 values | symbolic_name stringlengths 1 42 | docstring stringclasses 1 value |
|---|---|---|---|---|---|---|
rpredBrx y : x \in S -> (y - x \in S) = (y \in S).
Proof. exact: (@gpredFr _ T). Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | rpredBr | |
rpredBlx y : x \in S -> (x - y \in S) = (y \in S).
Proof. exact: (@gpredFl _ T). Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | rpredBl | |
zmodClosedP: zmod_closed S.
Proof. split; [ exact: rpred0 | exact: rpredB ]. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | zmodClosedP | |
RecordisSubBaseAddUMagma (V : baseAddUMagmaType) (S : pred V) U
of SubType V S U & BaseAddUMagma U := {
valD0_subproof : nmod_morphism (val : U -> V)
}.
#[short(type="subBaseAddUMagma")]
HB.structure Definition SubBaseAddUMagma (V : baseAddUMagmaType) S :=
{ U of SubChoice V S U & BaseAddUMagma U & isSubBaseAddUMagma V S U }.
#[short(type="subAddUMagma")]
HB.structure Definition SubAddUMagma (V : addUMagmaType) S :=
{ U of SubChoice V S U & AddUMagma U & isSubBaseAddUMagma V S U }.
#[short(type="subNmodType")]
HB.structure Definition SubNmodule (V : nmodType) S :=
{ U of SubChoice V S U & Nmodule U & isSubBaseAddUMagma V S U}. | HB.mixin | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Record | |
val:= (val : U -> V).
#[export]
HB.instance Definition _ := isNmodMorphism.Build U V val valD0_subproof. | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | val | |
valD: {morph val : x y / x + y}. Proof. exact: raddfD. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | valD | |
val0: val 0 = 0. Proof. exact: raddf0. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | val0 | |
RecordSubChoice_isSubAddUMagma (V : addUMagmaType) S U
of SubChoice V S U := {
addumagma_closed_subproof : addumagma_closed S
}.
HB.builders Context V S U of SubChoice_isSubAddUMagma V S U.
HB.instance Definition _ := isAddClosed.Build V S addumagma_closed_subproof.
Let inU v Sv : U := Sub v Sv.
Let addU (u1 u2 : U) := inU (rpredD (valP u1) (valP u2)).
Let oneU := inU (fst addumagma_closed_subproof). | HB.factory | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Record | |
addrC: commutative addU.
Proof. by move=> x y; apply/val_inj; rewrite !SubK addrC. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | addrC | |
add0r: left_id oneU addU.
Proof. by move=> x; apply/val_inj; rewrite !SubK add0r. Qed.
HB.instance Definition _ := isAddUMagma.Build U addrC add0r. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | add0r | |
valD0: nmod_morphism (val : U -> V).
Proof. by split=> [|x y]; rewrite !SubK. Qed.
HB.instance Definition _ := isSubBaseAddUMagma.Build V S U valD0.
HB.end.
HB.factory Record SubChoice_isSubNmodule (V : nmodType) S U
of SubChoice V S U := {
nmod_closed_subproof : nmod_closed S
}.
HB.builders Context V S U of SubChoice_isSubNmodule V S U.
HB.instance Definition _ :=
SubChoice_isSubAddUMagma.Build V S U nmod_closed_subproof. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | valD0 | |
addrA: associative (@add U).
Proof. by move=> x y z; apply/val_inj; rewrite !SubK addrA. Qed.
HB.instance Definition _ := AddMagma_isAddSemigroup.Build U addrA.
HB.end.
#[short(type="subZmodType")]
HB.structure Definition SubZmodule (V : zmodType) S :=
{ U of SubChoice V S U & Zmodule U & isSubBaseAddUMagma V S U}. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | addrA | |
val:= (val : U -> V). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | val | |
valB: {morph val : x y / x - y}. Proof. exact: raddfB. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | valB | |
valN: {morph val : x / - x}. Proof. exact: raddfN. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | valN | |
RecordisSubZmodule (V : zmodType) S U
of SubChoice V S U & Zmodule U := {
valB_subproof : zmod_morphism (val : U -> V)
}.
HB.builders Context V S U of isSubZmodule V S U.
Fact valD0 : nmod_morphism (val : U -> V).
Proof.
have val0: (val : U -> V) 0 = 0.
by rewrite -[X in val X](subr0 0) valB_subproof subrr.
split=> // x y; apply/(@subIr _ (val y)).
by rewrite -valB_subproof -!addrA !subrr !addr0.
Qed.
HB.instance Definition _ := isSubBaseAddUMagma.Build V S U valD0.
HB.end.
HB.factory Record SubNmodule_isSubZmodule (V : zmodType) S U
of SubNmodule V S U := {
oppr_closed_subproof : oppr_closed S
}.
HB.builders Context V S U of SubNmodule_isSubZmodule V S U.
HB.instance Definition _ := isOppClosed.Build V S oppr_closed_subproof.
Let inU v Sv : U := Sub v Sv.
Let oppU (u : U) := inU (rpredNr (valP u)).
HB.instance Definition _ := hasOpp.Build U oppU. | HB.factory | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Record | |
addNr: left_inverse 0 oppU (@add U).
Proof. by move=> x; apply/val_inj; rewrite raddf0 raddfD/= SubK addNr. Qed.
HB.instance Definition _ := Nmodule_isZmodule.Build U addNr.
HB.end.
HB.factory Record SubChoice_isSubZmodule (V : zmodType) S U
of SubChoice V S U := {
zmod_closed_subproof : zmod_closed S
}.
HB.builders Context V S U of SubChoice_isSubZmodule V S U.
HB.instance Definition _ := isZmodClosed.Build V S zmod_closed_subproof.
HB.instance Definition _ :=
SubChoice_isSubNmodule.Build V S U nmod_closed_subproof.
HB.instance Definition _ :=
SubNmodule_isSubZmodule.Build V S U (@rpredNr _ _).
HB.end. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | addNr | |
support:= 0.-support. | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | support | |
ffun_addf g := [ffun a => f a + g a].
HB.instance Definition _ := hasAdd.Build {ffun aT -> rT} ffun_add. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | ffun_add | |
Definition_ :=
BaseAddMagma_isAddMagma.Build {ffun aT -> rT} ffun_addrC. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
Definition_ :=
AddMagma_isAddSemigroup.Build {ffun aT -> rT} ffun_addrA. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
ffun_zero:= [ffun a : aT => (0 : rT)].
HB.instance Definition _ := hasZero.Build {ffun aT -> rT} ffun_zero. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | ffun_zero | |
Definition_ :=
BaseAddUMagma_isAddUMagma.Build {ffun aT -> rT} ffun_add0r. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
Definition_ (aT : finType) (rT : ChoiceBaseAddMagma.type) :=
BaseAddMagma.on {ffun aT -> rT}.
HB.instance Definition _ (aT : finType) (rT : ChoiceBaseAddUMagma.type) :=
BaseAddMagma.on {ffun aT -> rT}. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
Definition_ := AddSemigroup.on {ffun aT -> rT}. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
ffunMnEf n x : (f *+ n) x = f x *+ n.
Proof.
elim: n => [|n IHn]; first by rewrite ffunE.
by rewrite !mulrS ffunE IHn.
Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | ffunMnE | |
sum_ffunEx : (\sum_(i <- r | P i) F i) x = \sum_(i <- r | P i) F i x.
Proof. by elim/big_rec2: _ => // [|i _ y _ <-]; rewrite !ffunE. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | sum_ffunE | |
sum_ffun:
\sum_(i <- r | P i) F i = [ffun x => \sum_(i <- r | P i) F i x].
Proof. by apply/ffunP=> i; rewrite sum_ffunE ffunE. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | sum_ffun | |
ffun_oppf := [ffun a => - f a].
HB.instance Definition _ := hasOpp.Build {ffun aT -> rT} ffun_opp.
Fact ffun_addNr : left_inverse 0 ffun_opp +%R.
Proof. by move=> f; apply/ffunP => a; rewrite !ffunE addNr. Qed.
HB.instance Definition _ := Nmodule_isZmodule.Build {ffun aT -> rT} ffun_addNr. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | ffun_opp | |
add_pair(a b : U * V) := (a.1 + b.1, a.2 + b.2).
HB.instance Definition _ := hasAdd.Build (U * V)%type add_pair. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | add_pair | |
Definition_ :=
BaseAddMagma_isAddMagma.Build (U * V)%type pair_addrC. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
Definition_ :=
AddMagma_isAddSemigroup.Build (U * V)%type pair_addrA. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
pair_zero: U * V := (0, 0).
HB.instance Definition _ := hasZero.Build (U * V)%type pair_zero.
Fact fst_is_zmod_morphism : nmod_morphism (@fst U V). Proof. by []. Qed.
Fact snd_is_zmod_morphism : nmod_morphism (@snd U V). Proof. by []. Qed.
HB.instance Definition _ :=
isNmodMorphism.Build _ _ (@fst U V) fst_is_zmod_morphism.
HB.instance Definition _ :=
isNmodMorphism.Build _ _ (@snd U V) snd_is_zmod_morphism. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | pair_zero | |
Definition_ :=
BaseAddUMagma_isAddUMagma.Build (U * V)%type pair_add0r. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
Definition_ (U V : ChoiceBaseAddMagma.type) :=
BaseAddMagma.on (U * V)%type.
HB.instance Definition _ (U V : ChoiceBaseAddUMagma.type) :=
BaseAddMagma.on (U * V)%type.
HB.instance Definition _ (U V : nmodType) := AddSemigroup.on (U * V)%type. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
pair_opp(a : U * V) := (- a.1, - a.2).
HB.instance Definition _ := hasOpp.Build (U * V)%type pair_opp.
Fact pair_addNr : left_inverse 0 pair_opp +%R.
Proof. by move=> [] al ar; rewrite /pair_opp; congr pair; apply/addNr. Qed.
HB.instance Definition _ := Nmodule_isZmodule.Build (U * V)%type pair_addNr. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | pair_opp | |
Definition_ := isZmodule.Build bool addbA addbC addFb addbb. | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
Definition_ := isNmodule.Build nat addnA addnC add0n.
HB.instance Definition _ (V : nmodType) (x : V) :=
isNmodMorphism.Build nat V (natmul x) (mulr0n x, mulrnDr x). | HB.instance | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | Definition | |
natr0E: 0 = 0%N. Proof. by []. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | natr0E | |
natrDEn m : n + m = (n + m)%N. Proof. by []. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | natrDE | |
natrE:= (natr0E, natrDE). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq",
"From mathcomp Require Import bigop fintype finfun monoid"
] | boot/nmodule.v | natrE | |
pathx (p : seq T) :=
if p is y :: p' then e x y && path y p' else true. | Fixpoint | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path | |
cat_pathx p1 p2 : path x (p1 ++ p2) = path x p1 && path (last x p1) p2.
Proof. by elim: p1 x => [|y p1 Hrec] x //=; rewrite Hrec -!andbA. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | cat_path | |
rcons_pathx p y : path x (rcons p y) = path x p && e (last x p) y.
Proof. by rewrite -cats1 cat_path /= andbT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | rcons_path | |
take_pathx p i : path x p -> path x (take i p).
Proof. elim: p x i => [//| x p] IHp x' [//| i] /= /andP[-> ?]; exact: IHp. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | take_path | |
pathPx p x0 :
reflect (forall i, i < size p -> e (nth x0 (x :: p) i) (nth x0 p i))
(path x p).
Proof.
elim: p x => [|y p IHp] x /=; first by left.
apply: (iffP andP) => [[e_xy /IHp e_p [] //] | e_p].
by split; [apply: (e_p 0) | apply/(IHp y) => i; apply: e_p i.+1].
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | pathP | |
cyclep := if p is x :: p' then path x (rcons p' x) else true. | Definition | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | cycle | |
cycle_pathp : cycle p = path (last x0_cycle p) p.
Proof. by case: p => //= x p; rewrite rcons_path andbC. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | cycle_path | |
cycle_catCp q : cycle (p ++ q) = cycle (q ++ p).
Proof.
case: p q => [|x p] [|y q]; rewrite /= ?cats0 //=.
by rewrite !rcons_path !cat_path !last_cat /= -!andbA; do !bool_congr.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | cycle_catC | |
rot_cyclep : cycle (rot n0 p) = cycle p.
Proof. by rewrite cycle_catC cat_take_drop. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | rot_cycle | |
rotr_cyclep : cycle (rotr n0 p) = cycle p.
Proof. by rewrite -rot_cycle rotrK. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | rotr_cycle | |
sorteds := if s is x :: s' then path x s' else true. | Definition | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted | |
sortedPs x :
reflect (forall i, i.+1 < size s -> e (nth x s i) (nth x s i.+1)) (sorted s).
Proof. by case: s => *; [constructor|apply: (iffP (pathP _ _ _)); apply]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sortedP | |
path_sortedx s : path x s -> sorted s.
Proof. by case: s => //= y s /andP[]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_sorted | |
path_min_sortedx s : all (e x) s -> path x s = sorted s.
Proof. by case: s => //= y s /andP [->]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_min_sorted | |
pairwise_sorteds : pairwise e s -> sorted s.
Proof. by elim: s => //= x s IHs /andP[/path_min_sorted -> /IHs]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | pairwise_sorted | |
sorted_cat_conss1 x s2 :
sorted (s1 ++ x :: s2) = sorted (rcons s1 x) && path x s2.
Proof.
by case: s1 => [ | e1 s1] //=; rewrite -cat_rcons cat_path last_rcons.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_cat_cons | |
rev_pathx p :
path e (last x p) (rev (belast x p)) = path (fun z => e^~ z) x p.
Proof.
elim: p x => //= y p IHp x; rewrite rev_cons rcons_path -{}IHp andbC.
by rewrite -(last_cons x) -rev_rcons -lastI rev_cons last_rcons.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | rev_path | |
rev_cyclep : cycle e (rev p) = cycle (fun z => e^~ z) p.
Proof.
case: p => //= x p; rewrite -rev_path last_rcons belast_rcons rev_cons.
by rewrite -[in LHS]cats1 cycle_catC.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | rev_cycle | |
rev_sortedp : sorted e (rev p) = sorted (fun z => e^~ z) p.
Proof. by case: p => //= x p; rewrite -rev_path lastI rev_rcons. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | rev_sorted | |
path_relIx s :
path [rel x y | e x y && e' x y] x s = path e x s && path e' x s.
Proof. by elim: s x => //= y s IHs x; rewrite andbACA IHs. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_relI | |
cycle_relIs :
cycle [rel x y | e x y && e' x y] s = cycle e s && cycle e' s.
Proof. by case: s => [|? ?]; last apply: path_relI. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | cycle_relI | |
sorted_relIs :
sorted [rel x y | e x y && e' x y] s = sorted e s && sorted e' s.
Proof. by case: s; last apply: path_relI. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_relI | |
sub_in_pathx s : all P (x :: s) -> path e x s -> path e' x s.
Proof.
by elim: s x => //= y s ihs x /and3P [? ? ?] /andP [/ee' -> //]; apply/ihs/andP.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sub_in_path | |
sub_in_cycles : all P s -> cycle e s -> cycle e' s.
Proof.
case: s => //= x s /andP [Px Ps].
by apply: sub_in_path; rewrite /= all_rcons Px.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sub_in_cycle | |
sub_in_sorteds : all P s -> sorted e s -> sorted e' s.
Proof. by case: s => //; apply: sub_in_path. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sub_in_sorted | |
eq_in_pathx s : all P (x :: s) -> path e x s = path e' x s.
Proof. by move=> Pxs; apply/idP/idP; apply: sub_in_path Pxs. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | eq_in_path | |
eq_in_cycles : all P s -> cycle e s = cycle e' s.
Proof. by move=> Ps; apply/idP/idP; apply: sub_in_cycle Ps. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | eq_in_cycle | |
eq_in_sorteds : all P s -> sorted e s = sorted e' s.
Proof. by move=> Ps; apply/idP/idP; apply: sub_in_sorted Ps. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | eq_in_sorted | |
sub_path: subrel e e' -> forall x p, path e x p -> path e' x p.
Proof. by move=> ? ? ?; apply/sub_in_path/all_predT; apply: in2W. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sub_path | |
sub_cycle: subrel e e' -> subpred (cycle e) (cycle e').
Proof. by move=> ee' [] // ? ?; apply: sub_path. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sub_cycle | |
sub_sorted: subrel e e' -> subpred (sorted e) (sorted e').
Proof. by move=> ee' [] //=; apply: sub_path. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sub_sorted | |
eq_path: e =2 e' -> path e =2 path e'.
Proof. by move=> ? ? ?; apply/eq_in_path/all_predT; apply: in2W. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | eq_path | |
eq_cycle: e =2 e' -> cycle e =1 cycle e'.
Proof. by move=> ee' [] // ? ?; apply: eq_path. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | eq_cycle | |
eq_sorted: e =2 e' -> sorted e =1 sorted e'.
Proof. by move=> ee' [] // ? ?; apply: eq_path. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | eq_sorted | |
order_path_min_inx s :
{in P & &, transitive leT} -> all P (x :: s) -> path leT x s -> all (leT x) s.
Proof.
move=> leT_tr; elim: s => //= y s ihs /and3P [Px Py Ps] /andP [xy ys].
rewrite xy {}ihs ?Px //=; case: s Ps ys => //= z s /andP [Pz Ps] /andP [yz ->].
by rewrite (leT_tr _ _ _ Py Px Pz).
Qed.
Hypothesis leT_tr : {in P & &, transitive leT}. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | order_path_min_in | |
path_sorted_inEx s :
all P (x :: s) -> path leT x s = all (leT x) s && sorted leT s.
Proof.
move=> Pxs; apply/idP/idP => [xs|/andP[/path_min_sorted<-//]].
by rewrite (order_path_min_in leT_tr) //; apply: path_sorted xs.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_sorted_inE | |
sorted_pairwise_ins : all P s -> sorted leT s = pairwise leT s.
Proof.
by elim: s => //= x s IHs /andP [Px Ps]; rewrite path_sorted_inE ?IHs //= Px.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_pairwise_in | |
path_pairwise_inx s :
all P (x :: s) -> path leT x s = pairwise leT (x :: s).
Proof. by move=> Pxs; rewrite -sorted_pairwise_in. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_pairwise_in | |
cat_sorted2s s' : sorted leT (s ++ s') -> sorted leT s * sorted leT s'.
Proof. by case: s => //= x s; rewrite cat_path => /andP[-> /path_sorted]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | cat_sorted2 | |
sorted_mask_inm s : all P s -> sorted leT s -> sorted leT (mask m s).
Proof.
by move=> Ps; rewrite !sorted_pairwise_in ?all_mask //; exact: pairwise_mask.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_mask_in | |
sorted_filter_ina s : all P s -> sorted leT s -> sorted leT (filter a s).
Proof. rewrite filter_mask; exact: sorted_mask_in. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_filter_in | |
path_mask_inx m s :
all P (x :: s) -> path leT x s -> path leT x (mask m s).
Proof. exact/(sorted_mask_in (true :: m)). Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_mask_in | |
path_filter_inx a s :
all P (x :: s) -> path leT x s -> path leT x (filter a s).
Proof. by move=> Pxs; rewrite filter_mask; exact: path_mask_in. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_filter_in | |
sorted_ltn_nth_inx0 s : all P s -> sorted leT s ->
{in [pred n | n < size s] &, {homo nth x0 s : i j / i < j >-> leT i j}}.
Proof. by move=> Ps; rewrite sorted_pairwise_in //; apply/pairwiseP. Qed.
Hypothesis leT_refl : {in P, reflexive leT}. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_ltn_nth_in | |
sorted_leq_nth_inx0 s : all P s -> sorted leT s ->
{in [pred n | n < size s] &, {homo nth x0 s : i j / i <= j >-> leT i j}}.
Proof.
move=> Ps s_sorted x y xs ys; rewrite leq_eqVlt=> /predU1P[->|].
exact/leT_refl/all_nthP.
exact: sorted_ltn_nth_in.
Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_leq_nth_in | |
order_path_minx s : transitive leT -> path leT x s -> all (leT x) s.
Proof.
by move=> leT_tr; apply/order_path_min_in/all_predT => //; apply: in3W.
Qed.
Hypothesis leT_tr : transitive leT. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | order_path_min | |
path_lex x' s : leT x x' -> path leT x' s -> path leT x s.
Proof.
by case: s => [//| x'' s xlex' /= /andP[x'lex'' ->]]; rewrite (leT_tr xlex').
Qed.
Let leT_tr' : {in predT & &, transitive leT}. Proof. exact: in3W. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_le | |
path_sortedEx s : path leT x s = all (leT x) s && sorted leT s.
Proof. exact/path_sorted_inE/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_sortedE | |
sorted_pairwises : sorted leT s = pairwise leT s.
Proof. exact/sorted_pairwise_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_pairwise | |
path_pairwisex s : path leT x s = pairwise leT (x :: s).
Proof. exact/path_pairwise_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_pairwise | |
sorted_maskm s : sorted leT s -> sorted leT (mask m s).
Proof. exact/sorted_mask_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_mask | |
sorted_filtera s : sorted leT s -> sorted leT (filter a s).
Proof. exact/sorted_filter_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_filter | |
path_maskx m s : path leT x s -> path leT x (mask m s).
Proof. exact/path_mask_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_mask | |
path_filterx a s : path leT x s -> path leT x (filter a s).
Proof. exact/path_filter_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_filter | |
sorted_ltn_nthx0 s : sorted leT s ->
{in [pred n | n < size s] &, {homo nth x0 s : i j / i < j >-> leT i j}}.
Proof. exact/sorted_ltn_nth_in/all_predT. Qed.
Hypothesis leT_refl : reflexive leT. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_ltn_nth | |
sorted_leq_nthx0 s : sorted leT s ->
{in [pred n | n < size s] &, {homo nth x0 s : i j / i <= j >-> leT i j}}.
Proof. exact/sorted_leq_nth_in/all_predT. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | sorted_leq_nth | |
take_sortedn s : sorted leT s -> sorted leT (take n s).
Proof. by rewrite -[s in sorted _ s](cat_take_drop n) => /cat_sorted2[]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | take_sorted | |
drop_sortedn s : sorted leT s -> sorted leT (drop n s).
Proof. by rewrite -[s in sorted _ s](cat_take_drop n) => /cat_sorted2[]. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | drop_sorted | |
path_mapx s : path e' (f x) (map f s) = path (relpre f e') x s.
Proof. by elim: s x => //= y s <-. Qed. | Lemma | boot | [
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq"
] | boot/path.v | path_map |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.