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
RecordPOrder_MeetJoin_isLattice d T of POrder d T := { meet : T -> T -> T; join : T -> T -> T; meetP : forall x y z, (x <= meet y z) = (x <= y) && (x <= z); joinP : forall x y z, (join x y <= z) = (x <= z) && (y <= z); }. HB.builders Context d T of POrder_MeetJoin_isLattice d T. HB.instance Definition _ := @POrder_isMeetSemilattice.Build d T meet meetP. HB.instance Definition _ := @POrder_isJoinSemilattice.Build d T join joinP. HB.end. HB.factory Record POrder_isLattice d T of POrder d T := { meet : T -> T -> T; join : T -> T -> T; meetC : commutative meet; joinC : commutative join; meetA : associative meet; joinA : associative join; joinKI : forall y x, meet x (join x y) = x; meetKU : forall y x, join x (meet x y) = x; leEmeet : forall x y, (x <= y) = (meet x y == x); }. HB.builders Context d T of POrder_isLattice d T. Fact leEjoin x y : (y <= x) = (join x y == x). Proof. rewrite leEmeet; apply/eqP/eqP => <-. by rewrite meetC meetKU. by rewrite joinC joinKI. Qed. 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.
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
RecordLattice_Meet_isDistrLattice d T of Lattice d T := { meetUl : @left_distributive T T meet join; }. HB.builders Context d T of Lattice_Meet_isDistrLattice d T. Let meetUr : right_distributive (@meet _ T) (@join _ T). Proof. by move=> x y z; rewrite ![x `&` _]meetC meetUl. Qed. Let joinIl : left_distributive (@join _ T) (@meet _ T). Proof. by move=> x y z; rewrite meetUr joinIK meetUl -joinA meetUKC. Qed. HB.instance Definition _ := Lattice_isDistributive.Build d T meetUl joinIl. HB.end. HB.factory Record POrder_Meet_isDistrLattice d T of POrder d T := { meet : T -> T -> T; join : T -> T -> T; meetC : commutative meet; joinC : commutative join; meetA : associative meet; joinA : associative join; joinKI : forall y x, meet x (join x y) = x; meetKU : forall y x, join x (meet x y) = x; leEmeet : forall x y, (x <= y) = (meet x y == x); meetUl : left_distributive meet join; }. HB.builders Context d T of POrder_Meet_isDistrLattice d T. HB.instance Definition _ := @POrder_isLattice.Build d T meet join meetC joinC meetA joinA joinKI meetKU leEmeet. HB.instance Definition _ := Lattice_Meet_isDistrLattice.Build d T meetUl. HB.end. HB.factory Record isMeetJoinDistrLattice (d : disp_t) T of Choice T := { le : rel T;
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
RecordBDistrLattice_hasSectionalComplement d T of BDistrLattice d T := { diff : T -> T -> T; diffKI : forall x y, y `&` diff x y = \bot; joinIB : forall x y, (x `&` y) `|` diff x y = x; }.
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
Buildd T := (BDistrLattice_hasSectionalComplement.Build d T) (only parsing).
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
Build
hasRelativeComplementd T := (BDistrLattice_hasSectionalComplement d T) (only parsing). HB.builders Context d T of BDistrLattice_hasSectionalComplement d T.
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
hasRelativeComplement
rcomplx y z := (x `&` y) `|` diff (y `|` x) z. Fact rcomplPmeet x y z : ((x `&` y) `|` z) `&` rcompl x y z = x `&` y. Proof. by rewrite meetUr joinIKC meetUl diffKI joinx0 meetKU. Qed. Fact rcomplPjoin x y z : ((y `|` x) `&` z) `|` rcompl x y z = y `|` x. Proof. by rewrite joinCA joinIB joinA meetUK joinC. Qed. HB.instance Definition _ := @DistrLattice_hasRelativeComplement.Build d T rcompl rcomplPmeet rcomplPjoin. Fact diffErcompl x y : diff x y = rcompl \bot x y. Proof. by rewrite /rcompl meet0x join0x joinx0. Qed. HB.instance Definition _ := @CDistrLattice_hasSectionalComplement.Build d T diff diffErcompl. HB.end. HB.factory Record TDistrLattice_hasDualSectionalComplement d T of TDistrLattice d T := { codiff : T -> T -> T; codiffKU : forall x y, y `|` codiff x y = \top; meetUB : forall x y, (x `|` y) `&` codiff x y = x; }. HB.builders Context d T of TDistrLattice_hasDualSectionalComplement d 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", "From mathcomp Require Export preorder" ]
order/order.v
rcompl
rcomplx y z := (y `|` x) `&` codiff (x `&` y) z. Fact rcomplPmeet x y z : ((x `&` y) `|` z) `&` rcompl x y z = x `&` y. Proof. by rewrite meetCA meetUB meetA joinIK. Qed. Fact rcomplPjoin x y z : ((y `|` x) `&` z) `|` rcompl x y z = y `|` x. Proof. by rewrite joinIr meetUKC joinIl codiffKU meetx1 joinKI. Qed. HB.instance Definition _ := @DistrLattice_hasRelativeComplement.Build d T rcompl rcomplPmeet rcomplPjoin. Fact codiffErcompl x y : codiff x y = rcompl x \top y. Proof. by rewrite /rcompl join1x meet1x meetx1. Qed. HB.instance Definition _ := @CDistrLattice_hasDualSectionalComplement.Build d T codiff codiffErcompl. HB.end. HB.factory Record CBDistrLattice_hasComplement d T of CBDistrLattice d T & hasTop d T := { compl : T -> T; complEdiff : forall x, compl x = (\top : T) `\` 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", "From mathcomp Require Export preorder" ]
order/order.v
rcompl
Buildd T := (CBDistrLattice_hasComplement.Build d T) (only parsing).
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
Build
hasComplementd T := (CBDistrLattice_hasComplement d T) (only parsing). HB.builders Context d T of CBDistrLattice_hasComplement d T. HB.instance Definition _ := @CDistrLattice_hasDualSectionalComplement.Build d T (fun x y => rcompl x \top y) (fun _ _ => erefl). Fact complEcodiff (x : T) : compl x = codiff (\bot : T) x. Proof. by rewrite complEdiff diffErcompl. Qed. HB.instance Definition _ := @CDistrLattice_hasComplement.Build d T compl complEdiff complEcodiff. HB.end. HB.factory Record CTDistrLattice_hasComplement d T of CTDistrLattice d T & hasBottom d T := { compl : T -> T; complEcodiff : forall x, compl x = codiff (\bot : T) x; }. HB.builders Context d T of CTDistrLattice_hasComplement d T. HB.instance Definition _ := @CDistrLattice_hasSectionalComplement.Build d T (fun x y => rcompl (\bot : T) x y) (fun _ _ => erefl). Fact complEdiff (x : T) : compl x = (\top : T) `\` x. Proof. by rewrite complEcodiff codiffErcompl. Qed. HB.instance Definition _ := @CDistrLattice_hasComplement.Build d T compl complEdiff complEcodiff. HB.end. HB.factory Record TBDistrLattice_hasComplement d T of TBDistrLattice d T := { compl : T -> T; joinxC : forall x, x `|` compl x = \top; meetxC : forall x, x `&` compl x = \bot; }.
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
hasComplement
diffx y := x `&` compl 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", "From mathcomp Require Export preorder" ]
order/order.v
diff
codiffx y := x `|` compl 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", "From mathcomp Require Export preorder" ]
order/order.v
codiff
rcomplx y z := (x `&` y) `|` diff (y `|` x) z. Fact diffKI x y : y `&` diff x y = \bot. Proof. by rewrite meetCA meetxC meetx0. Qed. Fact joinIB x y : (x `&` y) `|` diff x y = x. Proof. by rewrite -meetUr joinxC meetx1. Qed. HB.instance Definition _ := @BDistrLattice_hasSectionalComplement.Build d T diff diffKI joinIB. Fact codiffErcompl x y : codiff x y = rcompl x \top y. Proof. by rewrite /rcompl /diff join1x meetx1 meet1x. Qed. HB.instance Definition _ := @CDistrLattice_hasDualSectionalComplement.Build d T codiff codiffErcompl. Fact complEdiff x : compl x = diff \top x. Proof. exact/esym/meet1x. Qed. Fact complEcodiff x : compl x = codiff \bot x. Proof. exact/esym/join0x. Qed. HB.instance Definition _ := @CDistrLattice_hasComplement.Build d T compl complEdiff complEcodiff. HB.end.
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
rcompl
RecordLattice_isTotal d T of Lattice d T := { le_total : total (<=%O : rel T) }. HB.builders Context d T of Lattice_isTotal d T. Fact meetUl : @left_distributive T T meet join. Proof. pose leP x y := lcomparable_leP (le_total x y); move=> x y z; apply/esym. by case: (leP x y) (leP x z) (leP y z) => [|/ltW] xy [|/ltW] xz [|/ltW] yz; (apply/join_idPl || apply/join_idPr) => //; apply: le_trans xy. Qed. HB.instance Definition _ := Lattice_Meet_isDistrLattice.Build d T meetUl. HB.instance Definition _ := DistrLattice_isTotal.Build d T le_total. HB.end. HB.factory Record POrder_isTotal d T of POrder d T := { le_total : total (<=%O : rel T) }. HB.builders Context d T of POrder_isTotal d T. Implicit Types (x y z : T). Let comparableT x y : x >=< y := le_total x y. Fact ltgtP x y : compare x y (min y x) (min x y) (max y x) (max x y) (y == x) (x == y) (x >= y) (x <= y) (x > y) (x < y). Proof. exact: comparable_ltgtP. Qed. Fact leP x y : le_xor_gt x y (min y x) (min x y) (max y x) (max x y) (x <= y) (y < x). Proof. exact: comparable_leP. Qed.
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
meet:= @min _ 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", "From mathcomp Require Export preorder" ]
order/order.v
meet
join:= @max _ T. Fact meetC : commutative meet. Proof. by move=> x y; rewrite /meet; have [] := ltgtP. Qed. Fact joinC : commutative join. Proof. by move=> x y; rewrite /join; have [] := ltgtP. Qed. Fact meetA : associative meet. Proof. move=> x y z; rewrite /meet /min !(fun_if, if_arg). case: (leP z y) (leP y x) (leP z x) => [] zy [] yx [] zx//=. by have := le_lt_trans (le_trans zy yx) zx; rewrite ltxx. by apply/eqP; rewrite eq_le zx ltW// (lt_trans yx). Qed. Fact joinA : associative join. Proof. move=> x y z; rewrite /meet /min !(fun_if, if_arg). case: (leP z y) (leP y x) (leP z x) => [] zy [] yx [] zx//=. by have := le_lt_trans (le_trans zy yx) zx; rewrite ltxx. by apply/eqP; rewrite eq_le zx ltW// (lt_trans yx). Qed. Fact joinKI y x : meet x (join x y) = x. Proof. rewrite /meet /join /min /max !(fun_if, if_arg). by have []// := ltgtP x y; rewrite ltxx. Qed. Fact meetKU y x : join x (meet x y) = x. Proof. rewrite /meet /join /min /max !(fun_if, if_arg). by have []// := ltgtP x y; rewrite ltxx. Qed. Fact leEmeet x y : (x <= y) = (meet x y == x). Proof. by rewrite /meet; case: leP => ?; rewrite ?eqxx ?lt_eqF. Qed. HB.instance Definition _ := @POrder_isLattice.Build d 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", "From mathcomp Require Export preorder" ]
order/order.v
join
Definition_ := POrder.on T'. HB.instance Definition _ := POrder_isTotal.Build d T' le_total. Implicit Types (x y z : T'). Fact meetE x y : meet x y = x `&` y. Proof. by rewrite meet_def. Qed. Fact joinE x y : join x y = x `|` y. Proof. by rewrite join_def. Qed. Fact meetC : commutative meet. Proof. by move=> *; rewrite !meetE meetC. Qed. Fact joinC : commutative join. Proof. by move=> *; rewrite !joinE joinC. Qed. Fact meetA : associative meet. Proof. by move=> *; rewrite !meetE meetA. Qed. Fact joinA : associative join. Proof. by move=> *; rewrite !joinE joinA. Qed. Fact joinKI y x : meet x (join x y) = x. Proof. by rewrite meetE joinE joinKI. Qed. Fact meetKU y x : join x (meet x y) = x. Proof. by rewrite meetE joinE meetKU. Qed. Fact meetUl : left_distributive meet join. Proof. by move=> *; rewrite !meetE !joinE meetUl. Qed. Fact meetxx : idempotent_op meet. Proof. by move=> *; rewrite meetE meetxx. Qed. Fact le_def x y : x <= y = (meet x y == x). Proof. by rewrite meetE (eq_meetl x y). Qed.
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
Definition_ := @POrder_Meet_isDistrLattice.Build d T meet join meetC joinC meetA joinA joinKI meetKU le_def meetUl. HB.instance Definition _ := DistrLattice_isTotal.Build d T le_total. HB.end. HB.factory Record LtOrder (d : disp_t) T of Choice T := { le : rel T; lt : rel T; meet : T -> T -> T; join : T -> T -> T; le_def : forall x y, le x y = (x == y) || lt x y; meet_def : forall x y, meet x y = if lt x y then x else y; join_def : forall x y, join x y = if lt x y then y else x; lt_irr : irreflexive lt; lt_trans : transitive lt; lt_total : forall x y, x != y -> lt x y || lt y x; }. HB.builders Context d T of LtOrder d T. Fact lt_def x y : lt x y = (y != x) && le x y. Proof. by rewrite le_def; case: eqVneq => //= ->; rewrite lt_irr. Qed. Fact meet_def_le x y : meet x y = if lt x y then x else y. Proof. by rewrite meet_def lt_def; case: eqP. Qed. Fact join_def_le x y : join x y = if lt x y then y else x. Proof. by rewrite join_def lt_def; case: eqP. Qed. Fact le_anti : antisymmetric le. Proof. move=> x y; rewrite !le_def; case: eqVneq => //= _ /andP [] hxy. by move/(lt_trans hxy); rewrite lt_irr. Qed. Fact le_trans : transitive le. Proof. move=> y x z; rewrite !le_def; case: eqVneq => [->|_] //=. by case: eqVneq => [-> ->|_ hxy /(lt_trans hxy) ->]; rewrite orbT.
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
Pcan:= isPOrder.Build disp (Choice.Pack (Choice.class T)) lt_def (@refl T disp' T' f) anti (@trans T disp' T' f).
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
Pcan
Canf' (f_can : cancel f f') := Pcan (can_pcan f_can).
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
Can
PCanIsPartial:= CancelPartial.Pcan.
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
PCanIsPartial
CanIsPartial:= CancelPartial.Can. #[export] HB.instance Definition _ (disp : disp_t) (T : choiceType) (disp' : disp_t) (T' : porderType disp') (f : T -> T') (f' : T' -> option T) (f_can : pcancel f f') := Preorder_isPOrder.Build disp (pcan_type f_can) (CancelPartial.anti f_can). #[export] HB.instance Definition _ (disp : disp_t) (T : choiceType) (disp' : disp_t) (T' : porderType disp') (f : T -> T') (f' : T' -> T) (f_can : cancel f f') := Preorder_isPOrder.Build disp (can_type f_can) (CancelPartial.anti (can_pcan f_can)).
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
CanIsPartial
Definition_ := MonoTotal.Build disp (pcan_type f_can) (fun _ _ => erefl).
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
PCanIsTotal: DistrLattice_isTotal _ (pcan_type f_can) := Total.on (pcan_type f_can).
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
PCanIsTotal
Definition_ := MonoTotal.Build disp (can_type f_can) (fun _ _ => erefl).
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
CanIsTotal: DistrLattice_isTotal _ (can_type f_can) := Total.on (can_type f_can).
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
CanIsTotal
RecordIsoLattice disp T of POrder disp T := { disp' : disp_t; T' : latticeType disp'; f : T -> T'; f' : T' -> T; f_can : cancel f f'; f'_can : cancel f' f; f_mono : {mono f : x y / x <= y}; }. HB.builders Context disp T of IsoLattice disp T.
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
meet(x y : T) := f' (meet (f x) (f 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", "From mathcomp Require Export preorder" ]
order/order.v
meet
join(x y : T) := f' (join (f x) (f y)). Fact meetC : commutative meet. Proof. by move=> x y; rewrite /meet meetC. Qed. Fact joinC : commutative join. Proof. by move=> x y; rewrite /join joinC. Qed. Fact meetA : associative meet. Proof. by move=> y x z; rewrite /meet !f'_can meetA. Qed. Fact joinA : associative join. Proof. by move=> y x z; rewrite /join !f'_can joinA. Qed. Fact joinKI y x : meet x (join x y) = x. Proof. by rewrite /meet /join f'_can joinKI f_can. Qed. Fact meetKI y x : join x (meet x y) = x. Proof. by rewrite /join /meet f'_can meetKU f_can. Qed. Fact meet_eql x y : (x <= y) = (meet x y == x). Proof. by rewrite /meet -(can_eq f_can) f'_can eq_meetl f_mono. Qed. HB.instance Definition _ := POrder_isLattice.Build _ T meetC joinC meetA joinA joinKI meetKI meet_eql. HB.end. HB.factory Record IsoDistrLattice disp T of POrder disp T := { disp' : disp_t; T' : distrLatticeType disp'; f : T -> T'; f' : T' -> T; f_can : cancel f f'; f'_can : cancel f' f; f_mono : {mono f : x y / x <= y}; }. HB.builders Context disp T of IsoDistrLattice disp T. HB.instance Definition _ := IsoLattice.Build _ T f_can f'_can f_mono. Fact meetUl : left_distributive (meet : T -> T -> T) join. Proof. by move=> x y z; rewrite /meet /join /= !f'_can meetUl. Qed. HB.instance Definition _ := Lattice_Meet_isDistrLattice.Build _ T meetUl. HB.end.
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
join
omorph_lt(d : disp_t) (T : porderType d) (d' : disp_t) (T' : porderType d') (f : {omorphism T -> T'}) : injective f -> {homo f : x y / x < y}. Proof. by move/inj_homo_lt; apply; apply: omorph_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
omorph_lt
meet_morphismd (T : latticeType d) d' (T' : latticeType d') (f : T -> T') : Prop := {morph 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", "From mathcomp Require Export preorder" ]
order/order.v
meet_morphism
join_morphismd (T : latticeType d) d' (T' : latticeType d') (f : T -> T') : Prop := {morph f : x y / x `|` y}. HB.mixin Record isMeetLatticeMorphism d (T : latticeType d) d' (T' : latticeType d') (apply : T -> T') := { omorphI_subproof : meet_morphism apply; }. HB.mixin Record isJoinLatticeMorphism d (T : latticeType d) d' (T' : latticeType d') (apply : T -> T') := { omorphU_subproof : join_morphism apply; }. HB.structure Definition MeetLatticeMorphism d (T : latticeType d) d' (T' : latticeType d') := {f of isMeetLatticeMorphism d T d' T' f & @OrderMorphism d T d' T' f}. HB.structure Definition JoinLatticeMorphism d (T : latticeType d) d' (T' : latticeType d') := {f of isJoinLatticeMorphism d T d' T' f & @OrderMorphism d T d' T' f}. HB.structure Definition LatticeMorphism d (T : latticeType d) d' (T' : latticeType d') := {f of @MeetLatticeMorphism d T d' T' f & @JoinLatticeMorphism d T d' T' f}. HB.factory Record isLatticeMorphism d (T : latticeType d) d' (T' : latticeType d') (f : T -> T') of @OrderMorphism d T d' T' f := { omorphI_subproof : meet_morphism f; omorphU_subproof : join_morphism f; }. HB.builders Context d T d' T' f of isLatticeMorphism d T d' T' f. HB.instance Definition _ := isMeetLatticeMorphism.Build d T d' T' f omorphI_subproof. HB.instance Definition _ := isJoinLatticeMorphism.Build d T d' T' f omorphU_subproof. HB.end.
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
join_morphism
omorphI(f : {mlmorphism T -> T'}) : {morph f : x y / x `&` y}. Proof. exact: omorphI_subproof. 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
omorphI
omorphU(f : {jlmorphism T -> T'}) : {morph f : x y / x `|` y}. Proof. exact: omorphU_subproof. 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
omorphU
Definition_ := isMeetLatticeMorphism.Build d T d T idfun idfun_is_meet_morphism. Fact comp_is_meet_morphism : meet_morphism (f \o g). Proof. by move=> x y; rewrite /= !omorphI. Qed. #[export] HB.instance Definition _ := isMeetLatticeMorphism.Build d T d'' T'' (f \o g) comp_is_meet_morphism.
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
Definition_ := isJoinLatticeMorphism.Build d T d T idfun idfun_is_join_morphism. Fact comp_is_join_morphism : join_morphism (f \o g). Proof. by move=> x y; rewrite /= !omorphU. Qed. #[export] HB.instance Definition _ := isJoinLatticeMorphism.Build d T d'' T'' (f \o g) comp_is_join_morphism.
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
RecordisBLatticeMorphism d (T : bLatticeType d) d' (T' : bLatticeType d') (apply : T -> T') := { omorph0_subproof : apply \bot = \bot; }. HB.mixin Record isTLatticeMorphism d (T : tLatticeType d) d' (T' : tLatticeType d') (apply : T -> T') := { omorph1_subproof : apply \top = \top; }. HB.structure Definition BLatticeMorphism d (T : bLatticeType d) d' (T' : bLatticeType d') := {f of isBLatticeMorphism d T d' T' f}. HB.structure Definition TLatticeMorphism d (T : tLatticeType d) d' (T' : tLatticeType d') := {f of isTLatticeMorphism d T d' T' f}. HB.structure Definition TBLatticeMorphism d (T : tbLatticeType d) d' (T' : tbLatticeType d') := {f of @BLatticeMorphism d T d' T' f & @TLatticeMorphism d T d' T' f}.
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", "From mathcomp Require Export preorder" ]
order/order.v
Record
omorph0: f \bot = \bot. Proof. exact: omorph0_subproof. 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
omorph0
Definition_ := isBLatticeMorphism.Build d T d T idfun idfun_is_bottom_morphism. Fact comp_is_bottom_morphism : (f \o g) \bot = \bot. Proof. by rewrite /= !omorph0. Qed. #[export] HB.instance Definition _ := isBLatticeMorphism.Build d T d'' T'' (f \o g) comp_is_bottom_morphism.
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
omorph1: f \top = \top. Proof. exact: omorph1_subproof. 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
omorph1
Definition_ := isTLatticeMorphism.Build d T d T idfun idfun_is_top_morphism. Fact comp_is_top_morphism : (f \o g) \top = \top. Proof. by rewrite /= !omorph1. Qed. #[export] HB.instance Definition _ := isTLatticeMorphism.Build d T d'' T'' (f \o g) comp_is_top_morphism.
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
meet_closed:= {in S &, forall u v, u `&` v \in 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
meet_closed
join_closed:= {in S &, forall u v, u `|` v \in 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
join_closed
RecordisMeetLatticeClosed d (T : latticeType d) (S : {pred T}) := { opredI : meet_closed S; }. HB.mixin Record isJoinLatticeClosed d (T : latticeType d) (S : {pred T}) := { opredU : join_closed S; }. HB.mixin Record isBLatticeClosed d (T : bLatticeType d) (S : {pred T}) := { opred0 : \bot \in S; }. HB.mixin Record isTLatticeClosed d (T : tLatticeType d) (S : {pred T}) := { opred1 : \top \in S; }.
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", "From mathcomp Require Export preorder" ]
order/order.v
Record
DefinitionMeetLatticeClosed d T := {S of isMeetLatticeClosed d T S}. #[short(type="joinLatticeClosed")] HB.structure Definition JoinLatticeClosed d T := {S of isJoinLatticeClosed d T S}. #[short(type="latticeClosed")] HB.structure Definition LatticeClosed d T := {S of @MeetLatticeClosed d T S & @JoinLatticeClosed d T S}. #[short(type="bLatticeClosed")] HB.structure Definition BLatticeClosed d T := {S of isBLatticeClosed d T S}. #[short(type="bJoinLatticeClosed")] HB.structure Definition BJoinLatticeClosed d T := {S of isBLatticeClosed d T S & @JoinLatticeClosed d T S}. #[short(type="tLatticeClosed")] HB.structure Definition TLatticeClosed d T := {S of isTLatticeClosed d T S}. #[short(type="tMeetLatticeClosed")] HB.structure Definition TMeetLatticeClosed d T := {S of isTLatticeClosed d T S & @MeetLatticeClosed d T S}. #[short(type="tbLatticeClosed")] HB.structure Definition TBLatticeClosed d (T : tbLatticeType d) := {S of @BLatticeClosed d T S & @TLatticeClosed d T S}. HB.factory Record isLatticeClosed d (T : latticeType d) (S : {pred T}) := { opredI : meet_closed S; opredU : join_closed S; }. HB.builders Context d T S of isLatticeClosed d T S. HB.instance Definition _ := isMeetLatticeClosed.Build d T S opredI. HB.instance Definition _ := isJoinLatticeClosed.Build d T S opredU. HB.end. HB.factory Record isTBLatticeClosed d (T : tbLatticeType d) (S : {pred 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", "From mathcomp Require Export preorder" ]
order/order.v
Definition
opredI(S : meetLatticeClosed T) : {in S &, forall u v, u `&` v \in S}. Proof. exact: opredI. 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
opredI
opredU(S : joinLatticeClosed T) : {in S &, forall u v, u `|` v \in S}. Proof. exact: opredU. 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
opredU
opred0(S : bLatticeClosed T) : \bot \in S. Proof. exact: opred0. 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
opred0
opred_joins(S : bJoinLatticeClosed T) I r (P : pred I) F : (forall i, P i -> F i \in S) -> \join_(i <- r | P i) F i \in S. Proof. by move=> FS; elim/big_ind: _; [exact: opred0 | exact: opredU |]. 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
opred_joins
opred1(S : tLatticeClosed T) : \top \in S. Proof. exact: opred1. 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
opred1
opred_meets(S : tMeetLatticeClosed T) I r (P : pred I) F : (forall i, P i -> F i \in S) -> \meet_(i <- r | P i) F i \in S. Proof. by move=> FS; elim/big_ind: _; [exact: opred1 | exact: opredI |]. 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
opred_meets
DefinitionSubPOrder d (T : porderType d) S d' := { U of SubEquality T S U & POrder d' U & isSubPreorder d T S d' U }. HB.factory Record SubChoice_isSubPOrder d (T : porderType d) S (d' : disp_t) U of SubChoice T S U := {}. HB.builders Context d T S d' U of SubChoice_isSubPOrder d T S d' U. HB.instance Definition _ := SubChoice_isSubPreorder.Build d T S d' U. HB.instance Definition _ := Preorder_isPOrder.Build d' U (@CancelPartial.anti U d T _ _ (@valK _ _ U)). HB.end. #[export] HB.instance Definition _ d (T : porderType d) (S : pred T) (d' : disp_t) (U : subType S) := SubChoice_isSubPOrder.Build d T S d' (sub_type U). HB.mixin Record isMeetSubLattice d (T : latticeType d) (S : pred T) d' U of SubType T S U & Lattice d' U := { valI_subproof : {morph (val : U -> T) : x y / x `&` y}; }. HB.mixin Record isJoinSubLattice d (T : latticeType d) (S : pred T) d' U of SubType T S U & Lattice d' U := { valU_subproof : {morph (val : U -> T) : x y / x `|` y}; }. #[short(type="subPOrderLattice")] HB.structure Definition SubPOrderLattice d (T : latticeType d) S d' := { U of @SubPOrder d T S d' U & Lattice d' U }. #[short(type="subPOrderBLattice")] HB.structure Definition SubPOrderBLattice d (T : latticeType d) S d' := { U of @SubPOrderLattice d T S d' U & BLattice d' U }. #[short(type="subPOrderTLattice")] HB.structure Definition SubPOrderTLattice d (T : latticeType d) S d' := { U of @SubPOrderLattice d T S d' U & TLattice d' U }. #[short(type="subPOrderTBLattice")] HB.st ...
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", "From mathcomp Require Export preorder" ]
order/order.v
Definition
joinUKIy x : meetU x (joinU x y) = x. Proof. by apply: val_inj; rewrite !SubK joinKI. Qed. Let meetUKU y x : joinU x (meetU x y) = x. Proof. by apply: val_inj; rewrite !SubK meetKU. Qed. Let le_meetU x y : (x <= y) = (meetU x y == x). Proof. by rewrite -le_val -(inj_eq val_inj) SubK leEmeet. Qed. HB.instance Definition _ := POrder_isLattice.Build d' U meetUC joinUC meetUA joinUA joinUKI meetUKU le_meetU. Fact valI : meet_morphism (val : U -> T). Proof. by move=> x y; rewrite !SubK. Qed. Fact valU : join_morphism (val : U -> T). Proof. by move=> x y; rewrite !SubK. Qed. HB.instance Definition _ := isMeetSubLattice.Build d T S d' U valI. HB.instance Definition _ := isJoinSubLattice.Build d T S d' U valU. HB.end. HB.factory Record SubChoice_isSubLattice d (T : latticeType d) S (d' : disp_t) U of SubChoice T S U := { opredI_subproof : meet_closed S; opredU_subproof : join_closed S; }. HB.builders Context d T S d' U of SubChoice_isSubLattice d T S d' U. HB.instance Definition _ := SubChoice_isSubPOrder.Build d T S d' U. HB.instance Definition _ := SubPOrder_isSubLattice.Build d T S d' U opredI_subproof opredU_subproof. HB.end. HB.mixin Record isBSubLattice d (T : bLatticeType d) (S : pred T) d' U of SubType T S U & BLattice d' U := { val0_subproof : (val : U -> T) \bot = \bot; }. #[short(type="bJoinSubLattice")] HB.structure Definition BJoinSubLattice d (T : bLatticeType d) S d' := { U of @JoinSubLattice d T S d' U & BLattice d' U & isBSubLattice d T S d' U }. #[short ...
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
joinUKI
totalU: total (<=%O : rel U). Proof. by move=> x y; rewrite -!le_val le_total. Qed. HB.instance Definition _ := Lattice_isTotal.Build d' U totalU. HB.end. HB.factory Record SubPOrder_isSubOrder d (T : orderType d) S d' U of @SubPOrder d T S d' U := {}. HB.builders Context d T S d' U of SubPOrder_isSubOrder d T S d' U. Fact opredI : meet_closed S. Proof. by move=> x y Sx Sy; rewrite meetEtotal; case: leP. Qed. Fact opredU : join_closed S. Proof. by move=> x y Sx Sy; rewrite joinEtotal; case: leP. Qed. HB.instance Definition _ := SubPOrder_isSubLattice.Build d T S d' U opredI opredU. HB.instance Definition _ := SubLattice_isSubOrder.Build d T S d' U. HB.end. HB.factory Record SubChoice_isSubOrder d (T : orderType d) S (d' : disp_t) U of @SubChoice T S U := {}. HB.builders Context d T S d' U of SubChoice_isSubOrder d T S d' U. HB.instance Definition _ := SubChoice_isSubPOrder.Build d T S d' U. HB.instance Definition _ := SubPOrder_isSubOrder.Build d T S d' U. HB.end.
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
totalU
Definition_ := SubPOrder_isSubOrder.Build disp T P disp (sub_type sT).
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
Definition_ := Preorder_isPOrder.Build nat_display nat anti_leq. #[export] HB.instance Definition _ := POrder_isTotal.Build nat_display nat leq_total.
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
incn_inP: {in D, forall i, i.+1 \in D -> f i < f i.+1} -> {in D &, {mono f : i j / i <= j}}. Proof. by move=> f_inc; apply/le_mono_in/homo_ltn_lt_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
incn_inP
decn_inP: {in D, forall i, i.+1 \in D -> f i > f i.+1} -> {in D &, {mono f : i j /~ i <= j}}. Proof. by move=> f_dec; apply/le_nmono_in/nhomo_ltn_lt_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
decn_inP
incnP: (forall i, f i < f i.+1) -> {mono f : i j / i <= j}. Proof. by move=> f_inc; apply/le_mono/homo_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
incnP
decnP: (forall i, f i > f i.+1) -> {mono f : i j /~ i <= j}. Proof. by move=> f_dec; apply/le_nmono/nhomo_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
decnP
gcd:= (@meet dvd_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", "From mathcomp Require Export preorder" ]
order/order.v
gcd
lcm:= (@join dvd_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", "From mathcomp Require Export preorder" ]
order/order.v
lcm
lcmnnn : lcmn n n = n. Proof. by case: n => // n; rewrite /lcmn gcdnn mulnK. 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
lcmnn
le_defm n : m %| n = (gcdn m n == m)%N. Proof. by apply/gcdn_idPl/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
le_def
joinKIn m : gcdn m (lcmn m n) = m. Proof. by rewrite (gcdn_idPl _)// dvdn_lcml. 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
joinKI
meetKUn m : lcmn m (gcdn m n) = m. Proof. by rewrite (lcmn_idPl _)// dvdn_gcdl. 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
meetKU
meetUl: left_distributive gcdn lcmn. Proof. move=> [|m'] [|n'] [|p'] //=; rewrite ?lcmnn ?lcm0n ?lcmn0 ?gcd0n ?gcdn0//. - by rewrite gcdnC meetKU. - by rewrite lcmnC gcdnC meetKU. apply: eqn_from_log; rewrite ?(gcdn_gt0, lcmn_gt0)//= => p. by rewrite !(logn_gcd, logn_lcm) ?(gcdn_gt0, lcmn_gt0)// minn_maxl. Qed. Fact dvdn_anti : antisymmetric dvdn. Proof. by move=> a b => /andP[] /gcdn_idPl + /gcdn_idPr => ->. Qed. #[export] HB.instance Definition _ := Preorder_isPOrder.Build dvd_display t dvdn_anti. #[export] HB.instance Definition _ := @POrder_Meet_isDistrLattice.Build dvd_display t gcdn lcmn gcdnC lcmnC gcdnA lcmnA joinKI meetKU le_def meetUl. Import DvdSyntax.
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
meetUl
sdvdE(m n : t) : m %<| n = (n != m) && (m %| n). Proof. exact/lt_def. 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
sdvdE
gcdE: gcd = gcdn :> (t -> t -> 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
gcdE
lcmE: lcm = lcmn :> (t -> t -> 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
lcmE
sdvdEnat:= sdvdE.
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
sdvdEnat
gcdEnat:= gcdE.
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
gcdEnat
lcmEnat:= lcmE.
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
lcmEnat
Definition_ (n : nat) := [SubChoice_isSubOrder of 'I_n by <: with ord_display].
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
andEbool: meet = andb. 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
andEbool
orEbool: meet = andb. 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
orEbool
subEboolx y : x `\` y = x && ~~ y. 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
subEbool
complEbool: compl = negb. 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
complEbool
leEbool:= leEbool.
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
leEbool
ltEbool:= ltEbool.
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
ltEbool
andEbool:= andEbool.
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
andEbool
orEbool:= orEbool.
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
orEbool
subEbool:= subEbool.
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
subEbool
complEbool:= complEbool.
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
complEbool
meetlexi:= (@meet (lexi_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", "From mathcomp Require Export preorder" ]
order/order.v
meetlexi
joinlexi:= (@join (lexi_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", "From mathcomp Require Export preorder" ]
order/order.v
joinlexi
meetlexi:= (@meet (seqlexi_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", "From mathcomp Require Export preorder" ]
order/order.v
meetlexi
joinlexi:= (@join (seqlexi_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", "From mathcomp Require Export preorder" ]
order/order.v
joinlexi
Definition_ := POrder.on T1'. Let T2' : Type := T2. HB.instance Definition _ := POrder.on T2'. #[export] HB.instance Definition _ := Preorder_isDuallyPOrder.Build disp3 (T1 * T2) (@anti _ _ T1' T2') (@anti _ _ T1^d T2^d).
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
ltEprodx y : (x < y) = [&& x != y, x.1 <= y.1 & x.2 <= y.2]. Proof. by rewrite lt_neqAle. 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
ltEprod
lt_pair(x1 y1 : T1) (x2 y2 : T2) : (x1, x2) < (y1, y2) :> T1 * T2 = [&& (x1 != y1) || (x2 != y2), x1 <= y1 & x2 <= y2]. Proof. by rewrite ltEprod negb_and. 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_pair
Definition_ := MeetSemilattice.on T1'. Let T2' : Type := T2. HB.instance Definition _ := MeetSemilattice.on T2'.
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
meetx y := (x.1 `&` y.1, x.2 `&` y.2). #[export] HB.instance Definition _ := @POrder_isMeetSemilattice.Build disp3 (T1 * T2) meet (@lexI _ _ 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
meet
meetEprodx y : x `&` y = (x.1 `&` y.1, x.2 `&` y.2). 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
meetEprod
joinx y := (x.1 `|` y.1, x.2 `|` y.2). #[export] HB.instance Definition _ := @POrder_isJoinSemilattice.Build disp3 (T1 * T2) join (fun x y z => @lexI _ _ T1^d T2^d z 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", "From mathcomp Require Export preorder" ]
order/order.v
join
joinEprodx y : x `|` y = (x.1 `|` y.1, x.2 `|` y.2). 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
joinEprod
Definition_ (disp1 disp2 disp3 : disp_t) (T1 : bPOrderType disp1) (T2 : bPOrderType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tPOrderType disp1) (T2 : tPOrderType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tbPOrderType disp1) (T2 : tbPOrderType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : bMeetSemilatticeType disp1) (T2 : bMeetSemilatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tMeetSemilatticeType disp1) (T2 : tMeetSemilatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tbMeetSemilatticeType disp1) (T2 : tbMeetSemilatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : bJoinSemilatticeType disp1) (T2 : bJoinSemilatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tJoinSemilatticeType disp1) (T2 : tJoinSemilatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tbJoinSemilatticeType disp1) (T2 : tbJoinSemilatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp ...
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
Definition_ := DistrLattice.on T1'. Let T2' : Type := T2. HB.instance Definition _ := DistrLattice.on T2'. #[export] HB.instance Definition _ := Lattice_isDistributive.Build disp3 (T1 * T2) (@meetUl _ _ T1' T2') (@meetUl _ _ T1^d T2^d).
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
Definition_ (disp1 disp2 disp3 : disp_t) (T1 : bDistrLatticeType disp1) (T2 : bDistrLatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tDistrLatticeType disp1) (T2 : tDistrLatticeType disp2) := POrder.on (type disp3 T1 T2). #[export] HB.instance Definition _ (disp1 disp2 disp3 : disp_t) (T1 : tbDistrLatticeType disp1) (T2 : tbDistrLatticeType disp2) := POrder.on (type disp3 T1 T2).
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
Definition_ := CDistrLattice.on T1'. Let T2' : Type := T2. HB.instance Definition _ := CDistrLattice.on T2'.
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
rcomplx y z := (rcompl x.1 y.1 z.1, rcompl x.2 y.2 z.2). #[export] HB.instance Definition _ := @DistrLattice_hasRelativeComplement.Build disp3 (T1 * T2) rcompl (@rcomplPmeet _ _ T1' T2') (fun x y => @rcomplPmeet _ _ T1^d T2^d 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", "From mathcomp Require Export preorder" ]
order/order.v
rcompl