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
tnth_compl:= @tnth_compl.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
tnth_compl
complEtprod:= @complEtprod.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
complEtprod
Definition_ n (T : porderType disp) := POrder.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : bPOrderType disp) := BPOrder.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : tPOrderType disp) := TPOrder.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : tbPOrderType disp) := TBPOrder.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : meetSemilatticeType disp) := MeetSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : bMeetSemilatticeType disp) := BMeetSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : tMeetSemilatticeType disp) := TMeetSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : tbMeetSemilatticeType disp) := TBMeetSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : joinSemilatticeType disp) := JoinSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : bJoinSemilatticeType disp) := BJoinSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : tJoinSemilatticeType disp) := TJoinSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : tbJoinSemilatticeType disp) := TBJoinSemilattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : latticeType disp) := Lattice.copy (n.-tuple T) (n.-tupleprod T). HB.instance Definition _ n (T : bLatticeType disp) := BLattice.copy (n.-tuple T) (n.-tuple ...
HB.instance
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Definition
lexi_tuplePn T (t1 t2 : n.-tuple T) : reflect (exists k : 'I_n.+1, forall i : 'I_n, (i <= k)%N -> tnth t1 i <= tnth t2 i ?= iff (i != k :> nat)) (t1 <= t2). Proof. elim: n => [|n IHn] in t1 t2 *. by rewrite tuple0 [t2]tuple0/= lexx; constructor; exists ord0 => -[]. case: (tupleP t1) (tupleP t2) => [x1 {}t1] [x2 {}t2]. rewrite [_ <= _]lexi_cons; apply: (iffP idP) => [|[k leif_xt12]]. case: comparableP => //= [ltx12 _|-> /IHn[k kP]]. exists ord0 => i; rewrite leqn0 => /eqP/(@ord_inj n.+1 i ord0)->. by apply/leifP; rewrite !tnth0. exists (lift ord0 k) => i; case: (unliftP ord0 i) => [j ->|-> _]. by rewrite !ltnS => /kP; rewrite !tnthS. by apply/leifP; rewrite !tnth0 eqxx. have /= := leif_xt12 ord0 isT; rewrite !tnth0 => leif_x12. rewrite leif_x12/=; move: leif_x12 leif_xt12 => /leifP. case: (unliftP ord0 k) => {k} [k-> /eqP<-{x2}|-> /lt_geF->//] leif_xt12. rewrite lexx implyTb; apply/IHn; exists k => i le_ik. by have := leif_xt12 (lift ord0 i) le_ik; rewrite !tnthS. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
lexi_tupleP
ltxi_tuplePn T (t1 t2 : n.-tuple T) : reflect (exists k : 'I_n, forall i : 'I_n, (i <= k)%N -> tnth t1 i <= tnth t2 i ?= iff (i != k :> nat)) (t1 < t2). Proof. elim: n => [|n IHn] in t1 t2 *. by rewrite tuple0 [t2]tuple0/= ltxx; constructor => - [] []. case: (tupleP t1) (tupleP t2) => [x1 {}t1] [x2 {}t2]. rewrite [_ < _]ltxi_cons; apply: (iffP idP) => [|[k leif_xt12]]. case: (comparableP x1 x2) => //= [ltx12 _|-> /IHn[k kP]]. exists ord0 => i; rewrite leqn0 => /eqP/(@ord_inj n.+1 i ord0)->. by apply/leifP; rewrite !tnth0. exists (lift ord0 k) => i; case: (unliftP ord0 i) => {i} [i ->|-> _]. by rewrite !ltnS => /kP; rewrite !tnthS. by apply/leifP; rewrite !tnth0 eqxx. have /= := leif_xt12 ord0 isT; rewrite !tnth0 => leif_x12. rewrite leif_x12/=; move: leif_x12 leif_xt12 => /leifP. case: (unliftP ord0 k) => {k} [k-> /eqP<-{x2}|-> /lt_geF->//] leif_xt12. rewrite lexx implyTb; apply/IHn; exists k => i le_ik. by have := leif_xt12 (lift ord0 i) le_ik; rewrite !tnthS. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
ltxi_tupleP
ltxi_tuplePltn T (t1 t2 : n.-tuple T) : reflect (exists2 k : 'I_n, forall i : 'I_n, (i < k)%N -> tnth t1 i = tnth t2 i & tnth t1 k < tnth t2 k) (t1 < t2). Proof. apply: (iffP (ltxi_tupleP _ _)) => [[k kP]|[k kP ltk12]]. exists k => [i i_lt|]; last by rewrite (lt_leif (kP _ _)) ?eqxx ?leqnn. by have /eqTleif->// := kP i (ltnW i_lt); rewrite ltn_eqF. by exists k => i; case: ltngtP => //= [/kP-> _|/ord_inj-> _]; apply/leifP. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
ltxi_tuplePlt
Definition_ (n : nat) (T : bPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : tPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : tbPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : bOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : tOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : tbOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : finPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : finBPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : finTPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : finTBPOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : finOrderType disp) := POrder.on (n.-tuple T). #[export] HB.instance Definition _ (n : nat) (T : finTBOrderType disp) := POrder.on (n.-tuple T).
HB.instance
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Definition
lexi_tupleP:= @lexi_tupleP. Arguments lexi_tupleP {disp disp' n T t1 t2}.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
lexi_tupleP
ltxi_tupleP:= @ltxi_tupleP. Arguments ltxi_tupleP {disp disp' n T t1 t2}.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
ltxi_tupleP
ltxi_tuplePlt:= @ltxi_tuplePlt. Arguments ltxi_tuplePlt {disp disp' n T t1 t2}.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
ltxi_tuplePlt
Definition_ n (T : porderType disp) := POrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : bPOrderType disp) := BPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : tPOrderType disp) := TPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : tbPOrderType disp) := TBPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : orderType disp) := Lattice.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : orderType disp) := DistrLattice.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : orderType disp) := Total.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : bOrderType disp) := BTotal.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : tOrderType disp) := TTotal.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : tbOrderType disp) := TBTotal.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : finPOrderType disp) := FinPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : finBPOrderType disp) := FinBPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : finTPOrderType disp) := FinTPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : finTBPOrderType disp) := FinTBPOrder.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definition _ n (T : finOrderType disp) := FinTotal.copy (n.-tuple T) (n.-tuplelexi T). HB.instance Definit ...
HB.instance
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Definition
setKUCB A : A :&: (A :|: B) = A. Proof. by rewrite setUC setKU. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
setKUC
setKICB A : A :|: (A :&: B) = A. Proof. by rewrite setIC setKI. Qed. Fact le_anti : antisymmetric (fun A B => A \subset B). Proof. by move=> A B ABA; apply/eqP; rewrite eqEsubset. Qed. #[export] HB.instance Definition _ := Preorder_isPOrder.Build disp {subset T} le_anti. #[export] HB.instance Definition _ := POrder_Meet_isDistrLattice.Build disp {subset T} (@setIC _) (@setUC _) (@setIA _) (@setUA _) setKUC setKIC le_def (@setIUl _).
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
setKIC
setIDvA B : B :&: (A :\: B) = set0. Proof. apply/eqP; rewrite -subset0; apply/subsetP => x. by rewrite !inE => /and3P[->]. Qed. #[export] HB.instance Definition _ := @BDistrLattice_hasSectionalComplement.Build disp {subset T} (@setD _) setIDv (@setID _).
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
setIDv
setTDsymA : ~: A = setT :\: A. Proof. by rewrite setTD. Qed. #[export] HB.instance Definition _ := CBDistrLattice_hasComplement.Build disp {subset T} setTDsym.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
setTDsym
meetEsubsetA B : A `&` B = A :&: B. Proof. by []. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
meetEsubset
joinEsubsetA B : A `|` B = A :|: B. Proof. by []. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
joinEsubset
botEsubset: \bot = set0 :> {subset T}. Proof. by []. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
botEsubset
topEsubset: \top = setT :> {subset T}. Proof. by []. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
topEsubset
subEsubsetA B : A `\` B = A :\: B. Proof. by []. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
subEsubset
complEsubsetA : ~` A = ~: A. Proof. by []. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
complEsubset
meetEsubset:= @meetEsubset.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
meetEsubset
joinEsubset:= @joinEsubset.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
joinEsubset
botEsubset:= @botEsubset.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
botEsubset
topEsubset:= @topEsubset.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
topEsubset
subEsubset:= @subEsubset.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
subEsubset
complEsubset:= @complEsubset.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
complEsubset
Definition_ (T : finType) := CTBDistrLattice.copy {set T} {subset T}.
HB.instance
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Definition
mono_uniqued (T T' : finPOrderType d) (f g : T -> T') : total (<=%O : rel T) -> (#|T'| <= #|T|)%N -> {mono f : x y / x <= y} -> {mono g : x y / x <= y} -> f =1 g. Proof. move=> le_total leT'T lef leg x0; move: {+}x0. suff: finfun f = finfun g by move=> /ffunP + x => /(_ x); rewrite !ffunE. apply: (can_inj fgraphK); apply/val_inj => /=; rewrite !codomE. under eq_map do rewrite ffunE; under [RHS]eq_map do rewrite ffunE. have [finj ginj] := (inc_inj lef, inc_inj leg). have [f' fK f'K] := inj_card_bij finj leT'T. have [g' gK g'K] := inj_card_bij ginj leT'T. apply/eqP; have : [seq f i | i <- enum T] = [seq g i | i <- enum T]. apply: (@sorted_eq _ <=%O le_trans le_anti); rewrite ?mono_sorted_enum//. apply: uniq_perm; rewrite ?map_inj_uniq ?sort_uniq ?fintype.enum_uniq//. move=> x; apply/mapP/mapP => -[y _ ->]. by exists (g' (f y)); rewrite ?mem_enum. by exists (f' (g y)); rewrite ?mem_enum. move=> /eqP; rewrite !eq_map_all all_map [in X in _ -> X]all_map. by have /permPl/perm_all-> := perm_sort <=%O (fintype.enum T). Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
mono_unique
le_enum_valA : {mono @enum_val _ _ A : i j / i <= j}. Proof. apply: le_mono => i j le_ij. rewrite /enum_val (set_nth_default (enum_default j)) -?cardE//. apply: (sorted_ltn_nth lt_trans); rewrite -?topredE/= -?cardE//. by rewrite lt_sorted_uniq_le enum_uniq/= sort_sorted. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_enum_val
le_enum_rank_inx0 A (Ax0 : x0 \in A) : {in A &, {mono enum_rank_in Ax0 : x y / x <= y}}. Proof. apply: can_mono_in (@in2W _ _ predT predT _ (@le_enum_val A)) => //. exact/onW_can_in/enum_rankK_in. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_enum_rank_in
le_enum_rank: {mono @enum_rank d T : i j / i <= j}. Proof. exact: (can_mono (@enum_rankK _ _) (@le_enum_val predT)). Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_enum_rank
le_enum_val:= le_enum_val.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_enum_val
le_enum_rank_in:= le_enum_rank_in.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_enum_rank_in
le_enum_rank:= le_enum_rank.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_enum_rank
card: #|{: T}| = \sum_i p_ i. Proof. rewrite card_tagged sumnE/= big_map big_enum. by apply: eq_bigr => i _; rewrite card_ord. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
card
sig: ordsum -> T := enum_val \o cast_ord (esym card).
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig
rank: T -> ordsum := cast_ord card \o enum_rank.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rank
sigK: cancel sig rank. Proof. by move=> s; rewrite /sig/rank/= enum_valK cast_ord_comp cast_ord_id. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sigK
sig_inj: injective sig. Proof. exact: can_inj sigK. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig_inj
rankK: cancel rank sig. Proof. by move=> p; rewrite /sig/rank/= cast_ord_comp cast_ord_id enum_rankK. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rankK
rank_inj: injective rank. Proof. exact: can_inj rankK. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rank_inj
sig1s : 'I_n := tag (sig s).
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig1
sig2s : 'I_(p_ (sig1 s)) := tagged (sig s).
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig2
Ranki (j : 'I_(p_ i)) := rank (Tagged _ j).
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Rank
sigE12s : sig s = @Tagged _ (sig1 s) _ (sig2 s). Proof. by rewrite /sig1 /sig2; case: sig. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sigE12
rankEp : rank p = @Rank (tag p) (tagged p). Proof. by case: p. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rankE
sig2Ks : Rank (sig2 s) = s. Proof. by rewrite -rankE sigK. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig2K
Rank1Ki0 (k : 'I_(p_ i0)) : sig1 (Rank k) = i0. Proof. by rewrite /sig1 /Rank/= rankK/=. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Rank1K
Rank2Ki0 (k : 'I_(p_ i0)) : sig2 (Rank k) = cast_ord (congr1 p_ (esym (Rank1K k))) k. Proof. by apply: val_inj; rewrite /sig2/sig1/Rank/= rankK. Qed. #[local] Hint Resolve sigK rankK : core.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
Rank2K
rank_bij: bijective rank. Proof. by exists sig. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rank_bij
sig_bij: bijective sig. Proof. by exists rank. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig_bij
rank_bij_on: {on [pred _ | true], bijective rank}. Proof. exact/onW_bij/rank_bij. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rank_bij_on
sig_bij_on: {on [pred _ | true], bijective sig}. Proof. exact/onW_bij/sig_bij. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
sig_bij_on
le_sig: {mono sig : i j / i <= j}. Proof. by move=> i j; rewrite /sig/= le_enum_val//; apply: le_total. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_sig
le_sig1: {homo sig1 : i j / i <= j}. Proof. by move=> i j; rewrite /sig1/= -le_sig leEsig/=; case: leP. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_sig1
le_rank: {mono rank : p q / p <= q}. Proof. exact: can_mono le_sig. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_rank
le_Ranki : {mono @Rank i : j k / j <= k}. Proof. by move=> j k; rewrite /Rank le_rank/= leEsig/= tagged_asE lexx. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
le_Rank
lt_sig: {mono sig : i j / i < j}. Proof. by move=> i j; rewrite !ltNge le_sig. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
lt_sig
lt_rank: {mono rank : p q / p < q}. Proof. by move=> p q; rewrite !ltNge le_rank. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
lt_rank
lt_Ranki : {mono @Rank i : j k / j < k}. Proof. by move=> j k; rewrite !ltNge le_Rank. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
lt_Rank
eq_Ranki i' (j : 'I_(p_ i)) (j': 'I_(p_ i')) : (Rank j == Rank j' :> nat) = (i == i') && (j == j' :> nat). Proof. rewrite val_eqE /Rank -(can_eq sigK) !rankK. case: (i =P i') => ii' /=; last by case: eqVneq => // -[]. by case: _ / ii' in j' *; rewrite eq_Tagged. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
eq_Rank
rankEsump : rank p = \sum_(i < n | (i < tag p)%N) p_ i + tagged p :> nat. Proof. pose sum p := \sum_(i < n | (i < tag p)%N) p_ i + tagged p. rewrite -/(sum _); have sumlt : forall p, (sum p < \sum_i p_ i)%N. rewrite /sum => -[/= i j]. rewrite [ltnRHS](bigID [pred i' : 'I__ | (i' < i)%N])/= ltn_add2l. by rewrite (bigD1 i) ?ltnn//= ltn_addr. suff: rank =1 (fun p => Ordinal (sumlt p)) by move=> /(_ p)/(congr1 val). apply: (Order.mono_unique _ _ le_rank) => //=. - exact: le_total. - by rewrite card card_ord. apply: le_mono => /= -[i j] -[i' j']; rewrite ltEsig/= !ltEord/= /sum leEord/=. case: (ltngtP i i') => //= [ltii' _|/val_inj ii']; last first. by rewrite -ii' in j' *; rewrite tagged_asE => ltjj'; rewrite ltn_add2l. rewrite ltn_addr// (@leq_trans (\sum_(i0 < n | (i0 < i)%N) p_ i0 + p_ i))%N//. by rewrite ltn_add2l. rewrite [leqRHS](bigID [pred i' : 'I__ | (i' < i)%N])/=. rewrite leq_add//; last first. by rewrite (bigD1 i) ?ltnn ?ltii'//= leq_addr. rewrite [leqRHS](eq_bigl [pred k : 'I_n | (k < i)%N])// => k/=. by case: (ltnP k i); rewrite ?andbF// => /ltn_trans->. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rankEsum
RankEsumi j : @Rank i j = \sum_(k < n | (k < i)%N) p_ k + j :> nat. Proof. by rewrite /Rank rankEsum/=. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
RankEsum
rects : s = \sum_(i < n | (i < sig1 s)%N) p_ i + sig2 s :> nat. Proof. by rewrite -[s]sigK rankEsum /= sigK. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
rect
eqRank(i0 j : nat) (li0 : (i0 < n)%N) (lj : (j < p_ (Ordinal li0))%N) : (\sum_(i < n | (i < i0)%N) p_ i) + j = Rank (Ordinal lj) :> nat. Proof. by rewrite RankEsum. Qed.
Lemma
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset", "From mathcomp Require Export preorder" ]
order/order.v
eqRank
RecordisDuallyPreorder (d : disp_t) T of Equality T := { le : rel T; lt : rel T; lt_def : forall x y, lt x y = (le x y) && ~~ (le y x); gt_def : forall x y, lt y x = (le y x) && ~~ (le x y); le_refl : reflexive le; ge_refl : reflexive (fun x y => le y x); le_trans : transitive le; ge_trans : transitive (fun x y => le y x); }. #[short(type="preorderType")] HB.structure Definition Preorder (d : disp_t) := { T of Choice T & isDuallyPreorder d T }. #[key="T", primitive] HB.mixin Record hasBottom d T of Preorder d T := { bottom : T; le0x : forall x, le bottom x; }. #[key="T", primitive] HB.mixin Record hasTop d T of Preorder d T := { top : T; lex1 : forall x, le x top; }. #[short(type="bPreorderType")] HB.structure Definition BPreorder d := { T of hasBottom d T & Preorder d T }. #[short(type="tPreorderType")] HB.structure Definition TPreorder d := { T of hasTop d T & Preorder d T }. #[short(type="tbPreorderType")] HB.structure Definition TBPreorder d := { T of hasTop d T & BPreorder d T }.
HB.mixin
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
Record
comparable: rel T := fun (x y : T) => (x <= y) || (y <= x). Local Notation "x >=< y" := (comparable x y) : order_scope. Local Notation "x >< y" := (~~ (x >=< y)) : order_scope.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
comparable
ge: simpl_rel T := [rel x y | y <= x].
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
ge
gt: simpl_rel T := [rel x y | y < x].
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
gt
leif(x y : T) C : Prop := ((x <= y) * ((x == y) = C))%type.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
leif
le_of_leifx y C (le_xy : @leif x y C) := le_xy.1 : le x y.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
le_of_leif
lteif(x y : T) C := if C then x <= y else x < y.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
lteif
le_xor_gt(x y : T) : T -> T -> T -> T -> bool -> bool -> Set := | LeNotGt of x <= y : le_xor_gt x y x x y y true false | GtNotLe of y < x : le_xor_gt x y y y x x false true.
Variant
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
le_xor_gt
lt_xor_ge(x y : T) : T -> T -> T -> T -> bool -> bool -> Set := | LtNotGe of x < y : lt_xor_ge x y x x y y false true | GeNotLt of y <= x : lt_xor_ge x y y y x x true false.
Variant
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
lt_xor_ge
min(x y : T) := if x < y then x else y.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
min
max(x y : T) := if x < y then y else x.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
max
compare(x y : T) : T -> T -> T -> T -> bool -> bool -> bool -> bool -> bool -> bool -> Set := | CompareLt of x < y : compare x y x x y y false false false true false true | CompareGt of y < x : compare x y y y x x false false true false true false | CompareEq of x = y : compare x y x x x x true true true true false false.
Variant
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
compare
incompare(x y : T) : T -> T -> T -> T -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> Set := | InCompareLt of x < y : incompare x y x x y y false false false true false true true true | InCompareGt of y < x : incompare x y y y x x false false true false true false true true | InCompare of x >< y : incompare x y x y y x false false false false false false false false | InCompareEq of x = y : incompare x y x x x x true true true true false false true true.
Variant
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
incompare
arg_min{I : finType} := @extremum T I le.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
arg_min
arg_max{I : finType} := @extremum T I ge.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
arg_max
min_funf g x := min (f x) (g x).
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
min_fun
max_funf g x := max (f x) (g x).
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
max_fun
nondecreasingdisp' (T' : preorderType disp') (f : T -> T') : Prop := {homo f : x y / x <= y}.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
nondecreasing
nondecreasing:= nondecreasing.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
nondecreasing
min:= min.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
min
max:= max.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
max
leLHS:= (X in (X <= _)%O)%pattern.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
leLHS
leRHS:= (X in (_ <= X)%O)%pattern.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
leRHS
ltLHS:= (X in (X < _)%O)%pattern.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
ltLHS
ltRHS:= (X in (_ < X)%O)%pattern.
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
ltRHS
le_of_leif: leif >-> is_true.
Coercion
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
le_of_leif
DefinitionFinPreorder d := { T of Finite T & Preorder d T }. #[short(type="finBPreorderType")] HB.structure Definition FinBPreorder d := { T of FinPreorder d T & hasBottom d T }. #[short(type="finTPreorderType")] HB.structure Definition FinTPreorder d := { T of FinPreorder d T & hasTop d T }. #[short(type="finTBPreorderType")] HB.structure Definition FinTBPreorder d := { T of FinBPreorder d T & hasTop d T }.
HB.structure
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
Definition
dualT : Type := T.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual
dual_display(d : disp_t) := {| d1 := d2 d; d2 := d1 d |}.
Definition
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual_display
dual_le:= (@le (dual_display _) _).
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual_le
dual_lt:= (@lt (dual_display _) _).
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual_lt
dual_comparable:= (@comparable (dual_display _) _).
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual_comparable
dual_ge:= (@ge (dual_display _) _).
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual_ge
dual_gt:= (@gt (dual_display _) _).
Notation
order
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq", "From mathcomp Require Import path fintype tuple bigop finset div prime finfun", "From mathcomp Require Import finset" ]
order/preorder.v
dual_gt