前順序
Require Import relation. Set Implicit Arguments. Record is_preorder (A : Type) (R : bin_rel A) : Prop := make_is_preorder { refl {x} : R x x; trans {x y z} : R x y -> R y z -> R x z; }. Arguments is_preorder : clear implicits.Record preorder (A : Type) : Type := make_preorder { R :> bin_rel A; R_is_preorder :> is_preorder A R; }. Record preordered_type : Type := make_preordered_type { A :> Type; preorder_on_A : preorder A; }. Section Preorder. Context {A : Type}. Context {R : bin_rel A}. Context {H : is_preorder A R}. Definition restriction_to_subset (P : A -> Prop) : bin_rel { a : A | P a } := fun x y => R (proj1_sig x) (proj1_sig y).A: Type
R: bin_rel A
H: is_preorder A R
P: A -> Propis_preorder {x : A | P x} (restriction_to_subset P)A: Type
R: bin_rel A
H: is_preorder A R
P: A -> Propis_preorder {x : A | P x} (restriction_to_subset P)A: Type
R: bin_rel A
H: is_preorder A R
P: A -> Propforall x : {x : A | P x}, restriction_to_subset P x xA: Type
R: bin_rel A
H: is_preorder A R
P: A -> Propforall (x : {x : A | P x}) (y z : {x : A | P x}), restriction_to_subset P x y -> restriction_to_subset P y z -> restriction_to_subset P x zA: Type
R: bin_rel A
H: is_preorder A R
P: A -> Propforall x : {x : A | P x}, restriction_to_subset P x xA: Type
R: bin_rel A
H: is_preorder A R
P: A -> Prop
x: {x : A | P x}restriction_to_subset P x xapply H.A: Type
R: bin_rel A
H: is_preorder A R
P: A -> Prop
x: {x : A | P x}R (proj1_sig x) (proj1_sig x)A: Type
R: bin_rel A
H: is_preorder A R
P: A -> Propforall (x : {x : A | P x}) (y z : {x : A | P x}), restriction_to_subset P x y -> restriction_to_subset P y z -> restriction_to_subset P x zA: Type
R: bin_rel A
H: is_preorder A R
P: A -> Prop
x, y, z: {x : A | P x}
H0: restriction_to_subset P x y
H1: restriction_to_subset P y zrestriction_to_subset P x zapply (H.(trans) H0 H1). Qed. End Preorder.A: Type
R: bin_rel A
H: is_preorder A R
P: A -> Prop
x, y, z: {x : A | P x}
H0: R (proj1_sig x) (proj1_sig y)
H1: R (proj1_sig y) (proj1_sig z)R (proj1_sig x) (proj1_sig z)