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
sorted_filter_gex s : sorted <=%O s -> [seq y <- s | x <= y] = drop (count (< x) s) s. Proof. move=> s_sorted; rewrite count_lt_ge -[LHS]revK -filter_rev. rewrite (@sorted_filter_le _ T^d); first by rewrite take_rev revK count_rev. by rewrite rev_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
sorted_filter_ge
nth_count_gex x0 s i : sorted <=%O s -> (count (< x) s <= i < size s)%N -> x <= nth x0 s i. Proof. move=> ss /andP[ige ilt]; rewrite -(subnKC ige) -nth_drop -sorted_filter_ge //. apply/(all_nthP _ (filter_all _ _)). by rewrite size_filter ltn_subLR // count_lt_ge subnK // count_size. 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
nth_count_ge
nth_count_gtx x0 s i : sorted <=%O s -> (count (<= x) s <= i < size s)%N -> x < nth x0 s i. Proof. move=> ss /andP[ige ilt]; rewrite -(subnKC ige) -nth_drop -sorted_filter_gt //. apply/(all_nthP _ (filter_all _ _)). by rewrite size_filter ltn_subLR // count_le_gt subnK // count_size. 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
nth_count_gt
nth_count_eqx x0 s i : sorted <=%O s -> (count (< x) s <= i < count (<= x) s)%N -> nth x0 s i = x. Proof. move=> ss /andP[ige ilt]; apply/le_anti. by rewrite nth_count_le// nth_count_ge// ige (leq_trans ilt (count_size _ _)). 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
nth_count_eq
contraTleb z t : (t < z -> ~~ b) -> (b -> z <= t). Proof. exact: comparable_contraTle. 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
contraTle
contraTltb z t : (t <= z -> ~~ b) -> (b -> z < t). Proof. exact: comparable_contraTlt. 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
contraTlt
contraPleP z t : (t < z -> ~ P) -> (P -> z <= t). Proof. exact: comparable_contraPle. 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
contraPle
contraPltP z t : (t <= z -> ~ P) -> (P -> z < t). Proof. exact: comparable_contraPlt. 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
contraPlt
contraNleb z t : (t < z -> b) -> (~~ b -> z <= t). Proof. exact: comparable_contraNle. 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
contraNle
contraNltb z t : (t <= z -> b) -> (~~ b -> z < t). Proof. exact: comparable_contraNlt. 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
contraNlt
contra_not_leP z t : (t < z -> P) -> (~ P -> z <= t). Proof. exact: comparable_contra_not_le. 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
contra_not_le
contra_not_ltP z t : (t <= z -> P) -> (~ P -> z < t). Proof. exact: comparable_contra_not_lt. 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
contra_not_lt
contraFleb z t : (t < z -> b) -> (b = false -> z <= t). Proof. exact: comparable_contraFle. 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
contraFle
contraFltb z t : (t <= z -> b) -> (b = false -> z < t). Proof. exact: comparable_contraFlt. 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
contraFlt
contra_leq_lem n z t : (t < z -> (n < m)%N) -> ((m <= n)%N -> z <= t). Proof. exact: comparable_contra_leq_le. 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
contra_leq_le
contra_leq_ltm n z t : (t <= z -> (n < m)%N) -> ((m <= n)%N -> z < t). Proof. exact: comparable_contra_leq_lt. 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
contra_leq_lt
contra_ltn_lem n z t : (t < z -> (n <= m)%N) -> ((m < n)%N -> z <= t). Proof. exact: comparable_contra_ltn_le. 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
contra_ltn_le
contra_ltn_ltm n z t : (t <= z -> (n <= m)%N) -> ((m < n)%N -> z < t). Proof. exact: comparable_contra_ltn_lt. 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
contra_ltn_lt
contra_lex y z t : (t < z -> y < x) -> (x <= y -> z <= t). Proof. exact: comparable_contra_le. 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
contra_le
contra_le_ltx y z t : (t <= z -> y < x) -> (x <= y -> z < t). Proof. exact: comparable_contra_le_lt. 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
contra_le_lt
contra_lt_lex y z t : (t < z -> y <= x) -> (x < y -> z <= t). Proof. exact: comparable_contra_lt_le. 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
contra_lt_le
contra_ltx y z t : (t <= z -> y <= x) -> (x < y -> z < t). Proof. exact: comparable_contra_lt. 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
contra_lt
le_mono: {homo f : x y / x < y} -> {mono f : x y / x <= y}. Proof. exact: total_homo_mono. 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_mono
le_nmono: {homo f : x y /~ x < y} -> {mono f : x y /~ x <= y}. Proof. by apply: total_homo_mono => // x y; rewrite eq_sym. 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_nmono
le_mono_in: {in D &, {homo f : x y / x < y}} -> {in D &, {mono f : x y / x <= y}}. Proof. exact: total_homo_mono_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_mono_in
le_nmono_in: {in D &, {homo f : x y /~ x < y}} -> {in D &, {mono f : x y /~ x <= y}}. Proof. by apply: total_homo_mono_in => // x y; rewrite eq_sym. 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_nmono_in
rcomplPmeetx y z : ((x `&` y) `|` z) `&` rcompl x y z = x `&` y. Proof. exact: rcomplPmeet. 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
rcomplPmeet
rcomplPjoinx y z : ((y `|` x) `&` z) `|` rcompl x y z = y `|` x. Proof. exact: rcomplPjoin. 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
rcomplPjoin
rcomplKIx y z : x <= y -> (x `|` z) `&` rcompl x y z = x. Proof. by move=> lexy; have := rcomplPmeet x y z; rewrite (meet_l lexy). 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
rcomplKI
rcomplKUx y z : x <= y -> (y `&` z) `|` rcompl x y z = y. Proof. by move=> lexy; have := rcomplPjoin x y z; rewrite (join_l lexy). 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
rcomplKU
diffErcomplx y : x `\` y = rcompl \bot x y. Proof. exact: diffErcompl. 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
diffErcompl
diffKIx y : y `&` (x `\` y) = \bot. Proof. by have := rcomplKI y (le0x x); rewrite join0x diffErcompl. 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
diffKI
diffIKx y : (x `\` y) `&` y = \bot. Proof. by rewrite meetC diffKI. 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
diffIK
meetIBz x y : (z `&` y) `&` (x `\` y) = \bot. Proof. by rewrite -meetA diffKI meetx0. 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
meetIB
meetBIz x y : (x `\` y) `&` (z `&` y) = \bot. Proof. by rewrite meetC meetIB. 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
meetBI
joinIBy x : (x `&` y) `|` (x `\` y) = x. Proof. by rewrite diffErcompl rcomplKU. 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
joinIB
joinBIy x : (x `\` y) `|` (x `&` y) = x. Proof. by rewrite joinC joinIB. 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
joinBI
joinIBCy x : (y `&` x) `|` (x `\` y) = x. Proof. by rewrite meetC joinIB. 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
joinIBC
joinBICy x : (x `\` y) `|` (y `&` x) = x. Proof. by rewrite meetC joinBI. 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
joinBIC
leBxx y : x `\` y <= x. Proof. by rewrite -[leRHS](joinIB y) leUr. Qed. Hint Resolve leBx : 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
leBx
diffxxx : x `\` x = \bot. Proof. by have := diffKI x x; rewrite meet_r. 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
diffxx
leBlz x y : x <= y -> x `\` z <= y `\` z. Proof. rewrite -[leLHS](joinIB z) -[leRHS](joinIB z). by rewrite leU2E ?meetIB ?meetBI // => /andP []. 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
leBl
diffKUy x : y `|` (x `\` y) = y `|` x. Proof. apply/eqP; rewrite eq_le leU2 //= leUx leUl. by apply/meet_idPl; have := joinIB y x; rewrite joinIl join_l. 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
diffKU
diffUKy x : (x `\` y) `|` y = x `|` y. Proof. by rewrite joinC diffKU joinC. 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
diffUK
leBKUy x : y <= x -> y `|` (x `\` y) = x. Proof. by move=> /join_r {2}<-; rewrite diffKU. 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
leBKU
leBUKy x : y <= x -> (x `\` y) `|` y = x. Proof. by move=> leyx; rewrite joinC leBKU. 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
leBUK
leBLRx y z : (x `\` y <= z) = (x <= y `|` z). Proof. apply/idP/idP; first by move=> /join_r <-; rewrite joinA diffKU joinAC leUr. by rewrite -{1}[x](joinIB y) => /(leU2r_le (diffIK _ _)). 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
leBLR
diffUxx y z : (x `|` y) `\` z = (x `\` z) `|` (y `\` z). Proof. apply/eqP; rewrite eq_le leUx !leBl ?leUr ?leUl ?andbT //. by rewrite leBLR joinA diffKU joinAC diffKU joinAC -joinA leUr. 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
diffUx
diff_eq0x y : (x `\` y == \bot) = (x <= y). Proof. by rewrite -lex0 leBLR joinx0. 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
diff_eq0
joinxBx y z : x `|` (y `\` z) = ((x `|` y) `\` z) `|` (x `&` z). Proof. by rewrite diffUx joinAC joinBI. 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
joinxB
joinBxx y z : (y `\` z) `|` x = ((y `|` x) `\` z) `|` (z `&` x). Proof. by rewrite ![_ `|` x]joinC ![_ `&` x]meetC joinxB. 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
joinBx
leBrz x y : x <= y -> z `\` y <= z `\` x. Proof. by move=> lexy; rewrite leBLR joinxB meet_r ?leBUK ?leUr ?lexUl. 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
leBr
leB2x y z t : x <= z -> t <= y -> x `\` y <= z `\` t. Proof. by move=> /(@leBl t) ? /(@leBr x) /le_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
leB2
meet_eq0E_diffz x y : x <= z -> (x `&` y == \bot) = (x <= z `\` y). Proof. move=> xz; apply/idP/idP; last by move=> /meet_r <-; rewrite -meetA meetBI. by move=> /eqP xIy_eq0; rewrite -[x](joinIB y) xIy_eq0 join0x leBl. 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
meet_eq0E_diff
leBRLx y z : (x <= z `\` y) = (x <= z) && (x `&` y == \bot). Proof. apply/idP/idP => [xyz|]; first by rewrite (@meet_eq0E_diff z) // (le_trans xyz). by move=> /andP [?]; rewrite -meet_eq0E_diff. 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
leBRL
eq_diffx y z : (x `\` y == z) = (z <= x <= y `|` z) && (z `&` y == \bot). Proof. by rewrite eq_le leBLR leBRL andbCA andbA. 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_diff
diffxUx y z : z `\` (x `|` y) = (z `\` x) `&` (z `\` y). Proof. apply/eqP; rewrite eq_le lexI !leBr ?leUl ?leUr //=. rewrite leBRL leIx2 ?leBx //= meetUr meetAC diffIK -meetA diffIK. by rewrite meet0x meetx0 joinx0. 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
diffxU
diffx0x : x `\` \bot = x. Proof. by apply/eqP; rewrite eq_diff join0x meetx0 lexx eqxx. 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
diffx0
diff0xx : \bot `\` x = \bot. Proof. by apply/eqP; rewrite eq_diff joinx0 meet0x lexx eqxx le0x. 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
diff0x
diffIxx y z : (x `&` y) `\` z = (x `\` z) `&` (y `\` z). Proof. apply/eqP; rewrite eq_diff joinIr ?leI2 ?diffKU ?leUr ?leBx //=. by rewrite -meetA diffIK meetx0. 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
diffIx
meetxBx y z : x `&` (y `\` z) = (x `&` y) `\` z. Proof. by rewrite diffIx -{1}[x](joinBI z) meetUl meetIB joinx0. 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
meetxB
meetBxx y z : (x `\` y) `&` z = (x `&` z) `\` y. Proof. by rewrite ![_ `&` z]meetC meetxB. 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
meetBx
diffxIx y z : x `\` (y `&` z) = (x `\` y) `|` (x `\` z). Proof. apply/eqP; rewrite eq_diff leUx !leBx //= joinIl joinA joinCA !diffKU. rewrite joinCA -joinA [_ `|` x]joinC ![x `|` _]join_l //. by rewrite -joinIl leUr /= meetUl {1}[_ `&` z]meetC ?meetBI joinx0. 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
diffxI
diffBxx y z : (x `\` y) `\` z = x `\` (y `|` z). Proof. apply/eqP; rewrite eq_diff leBr ?leUl //=. by rewrite diffxU joinIr diffKU -joinIr meet_l ?leUr //= -meetA diffIK meetx0. 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
diffBx
diffxBx y z : x `\` (y `\` z) = (x `\` y) `|` (x `&` z). Proof. rewrite -[y in RHS](joinIB z) diffxU joinIl diffxI -joinA joinBI join_r //. by rewrite joinBx meetKU meetA meetAC diffIK meet0x joinx0 meet_r. 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
diffxB
joinBKx y : (y `|` x) `\` x = (y `\` x). Proof. by rewrite diffUx diffxx joinx0. 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
joinBK
joinBKCx y : (x `|` y) `\` x = (y `\` x). Proof. by rewrite diffUx diffxx join0x. 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
joinBKC
disj_lex y : x `&` y == \bot -> x <= y = (x == \bot). Proof. by rewrite [x == \bot]eq_sym -eq_meetl => /eqP ->. 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
disj_le
disj_leCx y : y `&` x == \bot -> x <= y = (x == \bot). Proof. by rewrite meetC => /disj_le. 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
disj_leC
disj_difflx y : x `&` y == \bot -> x `\` y = x. Proof. by move=> dxy; apply/eqP; rewrite eq_diff dxy lexx leUr. 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
disj_diffl
disj_diffrx y : x `&` y == \bot -> y `\` x = y. Proof. by rewrite meetC => /disj_diffl. 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
disj_diffr
lt0Bx y : x < y -> \bot < y `\` x. Proof. by move=> ?; rewrite lt_leAnge le0x leBLR joinx0 /= lt_geF. 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
lt0B
codiffErcomplx y : codiff x y = rcompl x \top y. Proof. exact: codiffErcompl. 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
codiffErcompl
complEdiffx : ~` x = \top `\` x. Proof. exact: complEdiff. Qed. #[deprecated(since="mathcomp 2.3.0", note="Use complEdiff instead.")]
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
complEdiff
complE:= complEdiff.
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
complE
complEcodiffx : ~` x = codiff \bot x. Proof. exact: complEcodiff. 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
complEcodiff
complErcomplx : ~` x = rcompl \bot \top x. Proof. by rewrite complEdiff diffErcompl. 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
complErcompl
diff1xx : \top `\` x = ~` x. Proof. exact/esym/complEdiff. 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
diff1x
diffEx y : x `\` y = x `&` ~` y. Proof. by rewrite complEdiff meetxB meetx1. 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
diffE
complK: involutive (@compl _ L). Proof. by move=> x; rewrite !complEdiff diffxB diffxx meet1x join0x. 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
complK
compl_inj: injective (@compl _ L). Proof. exact/inv_inj/complK. 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
compl_inj
disj_leCx y : (x `&` y == \bot) = (x <= ~` y). Proof. by rewrite -diff_eq0 diffE complK. 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
disj_leC
leCxx y : (~` x <= y) = (~` y <= x). Proof. by rewrite !complEdiff !leBLR joinC. 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
leCx
lexCx y : (x <= ~` y) = (y <= ~` x). Proof. by rewrite -[x in LHS]complK leCx complK. 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
lexC
leCx y : (~` x <= ~` y) = (y <= x). Proof. by rewrite leCx complK. 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
leC
complUx y : ~` (x `|` y) = ~` x `&` ~` y. Proof. by rewrite !complEdiff diffxU. 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
complU
complIx y : ~` (x `&` y) = ~` x `|` ~` y. Proof. by rewrite !complEdiff diffxI. 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
complI
joinxCx : x `|` ~` x = \top. Proof. by rewrite complEdiff diffKU joinx1. 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
joinxC
joinCxx : ~` x `|` x = \top. Proof. by rewrite joinC joinxC. 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
joinCx
meetxCx : x `&` ~` x = \bot. Proof. by rewrite complEdiff diffKI. 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
meetxC
meetCxx : ~` x `&` x = \bot. Proof. by rewrite meetC meetxC. 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
meetCx
compl1: ~` \top = \bot :> L. Proof. by rewrite complEdiff diffxx. 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
compl1
compl0: ~` \bot = \top :> L. Proof. by rewrite -compl1 complK. 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
compl0
complBx y : ~` (x `\` y) = ~` x `|` y. Proof. by rewrite diffE complI complK. 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
complB
leBCx y : x `\` y <= ~` y. Proof. by rewrite leBLR joinxC lex1. 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
leBC
compl_joins(J : Type) (r : seq J) (P : {pred J}) (F : J -> L) : ~` (\join_(j <- r | P j) F j) = \meet_(j <- r | P j) ~` F j. Proof. by elim/big_rec2: _=> [|i x y ? <-]; rewrite ?compl0 ?complU. 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
compl_joins
compl_meets(J : Type) (r : seq J) (P : {pred J}) (F : J -> L) : ~` (\meet_(j <- r | P j) F j) = \join_(j <- r | P j) ~` F j. Proof. by elim/big_rec2: _=> [|i x y ? <-]; rewrite ?compl1 ?complI. 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
compl_meets
RecordPreorder_isPOrder (d : disp_t) T of Preorder d T := { le_anti : antisymmetric (@le d T); }. HB.builders Context (d : disp_t) T of Preorder_isPOrder d T. Let ge_anti : antisymmetric (fun x y => @le d T y x). Proof. by move=> x y; rewrite andbC; apply: le_anti. Qed. HB.instance Definition _ := Preorder_isDuallyPOrder.Build d T le_anti ge_anti. HB.end. HB.factory Record isPOrder (d : disp_t) T of Choice T := { le : rel T; lt : rel T; lt_def : forall x y, lt x y = (y != x) && (le x y); le_refl : reflexive le; le_anti : antisymmetric le; le_trans : transitive le; }. HB.builders Context (d : disp_t) T of isPOrder d T. Let lt_le_def x y : lt x y = le x y && ~~ le y x. Proof. rewrite lt_def andbC; case /boolP: (le x y) => //= xy. have [->|/negP xyE /=] := eqVneq y x; first by rewrite le_refl. by apply/esym/negP => yx; apply/xyE/eqP/le_anti; rewrite yx. Qed. HB.instance Definition _ := isPreorder.Build d T lt_le_def le_refl le_trans. HB.instance Definition _ := Preorder_isPOrder.Build d T le_anti. HB.end. HB.factory Record Le_isPOrder (d : disp_t) T of Choice T := { le : rel T; le_refl : reflexive le; le_anti : antisymmetric le;
HB.factory
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
Record
Definition_ := @Le_isPreorder.Build d T le le_refl le_trans. HB.instance Definition _ := @Preorder_isPOrder.Build d T le_anti. HB.end. HB.factory Record LtLe_isPOrder (d : disp_t) T of Choice T := { le : rel T; lt : rel T; le_def : forall x y, le x y = (x == y) || lt x y; lt_irr : irreflexive lt; lt_trans : transitive lt; }. HB.builders Context (d : disp_t) T of LtLe_isPOrder d T. HB.instance Definition _ := @LtLe_isPreorder.Build d T le lt le_def lt_irr lt_trans. Let le_anti : antisymmetric le. Proof. move=> x y; rewrite !le_def [y == _]eq_sym. have [//|neq_xy/=] := eqVneq x y => /andP[xy yx]. by have := lt_trans xy yx; rewrite lt_irr. Qed. HB.instance Definition _ := @Preorder_isPOrder.Build d T le_anti. HB.end. HB.factory Record Lt_isPOrder (d : disp_t) T of Choice T := { lt : rel T; lt_irr : irreflexive lt; lt_trans : transitive lt; }. HB.builders Context d T of Lt_isPOrder d T. #[warning="-HB.no-new-instance"] HB.instance Definition _ := @LtLe_isPOrder.Build d T _ lt (fun _ _ => erefl) lt_irr lt_trans. HB.end.
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
RecordPOrder_Meet_isSemilattice d T of POrder d T := { meet : T -> T -> T; meetC : commutative meet; meetA : associative meet; leEmeet : forall x y, (x <= y) = (meet x y == x); }. HB.builders Context d T of POrder_Meet_isSemilattice d T. Fact meetxx : idempotent_op meet. Proof. by move=> x; apply/eqP; rewrite -leEmeet. Qed. Fact lexI x y z : (x <= meet y z) = (x <= y) && (x <= z). Proof. rewrite !leEmeet; apply/eqP/andP => [<-|[/eqP<- /eqP<-]]. split; apply/eqP; last by rewrite meetA -meetA meetxx. by rewrite -!meetA (meetC z) (meetA y) meetxx. by rewrite -!meetA (meetC z) -meetA (meetA y) !meetxx. Qed. HB.instance Definition _ := @POrder_isMeetSemilattice.Build d T meet lexI. HB.end. HB.factory Record POrder_Join_isSemilattice d T of POrder d T := { join : T -> T -> T; joinC : commutative join; joinA : associative join; leEjoin : forall x y, (y <= x) = (join x y == x); }. HB.builders Context d T of POrder_Join_isSemilattice d T. Fact joinxx : idempotent_op join. Proof. by move=> x; apply/eqP; rewrite -leEjoin. Qed. Fact leUx x y z : (join x y <= z) = (x <= z) && (y <= z). rewrite !leEjoin; apply/eqP/andP => [<-|[/eqP<- /eqP<-]]. split; apply/eqP; last by rewrite joinA -joinA joinxx. by rewrite -joinA (joinC _ x) (joinA x) joinxx.
HB.factory
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
Record