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
pi_spec(x : T) : T -> Type := PiSpec y of x = y %[mod qT] : pi_spec x y.
Variant
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_spec
piP(x : T) : pi_spec x (repr (\pi_qT x)). Proof. by constructor; rewrite reprK. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
piP
mpiE: \mpi =1 \pi_qT. Proof. by move=> x; rewrite !unlock. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
mpiE
quotWP : (forall y : T, P (\pi_qT y)) -> forall x : qT, P x. Proof. by move=> Py x; rewrite -[x]reprK; apply: Py. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
quotW
quotPP : (forall y : T, repr (\pi_qT y) = y -> P (\pi_qT y)) -> forall x : qT, P x. Proof. by move=> Py x; rewrite -[x]reprK; apply: Py; rewrite reprK. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
quotP
equal_toT (x : T) := EqualTo { equal_val : T; _ : x = equal_val }.
Structure
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equal_to
equal_toE(T : Type) (x : T) (m : equal_to x) : equal_val m = x. Proof. by case: m. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equal_toE
piE:= (@equal_toE _ _).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
piE
equal_to_piT (qT : quotType T) (x : T) := @EqualTo _ (\pi_qT x) (\pi x) (erefl _). Arguments EqualTo {T x equal_val}.
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equal_to_pi
pi_morph1: \pi (f a) = fq (equal_val x). Proof. by rewrite !piE. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_morph1
pi_morph2: \pi (g a b) = gq (equal_val x) (equal_val y). Proof. by rewrite !piE. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_morph2
pi_mono1: p a = pq (equal_val x). Proof. by rewrite !piE. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_mono1
pi_mono2: r a b = rq (equal_val x) (equal_val y). Proof. by rewrite !piE. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_mono2
pi_morph11: \pi (h a) = hq (equal_val x). Proof. by rewrite !piE. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_morph11
PiMorphpi_x := (EqualTo pi_x).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiMorph
PiMorph1pi_f := (fun a (x : {pi a}) => EqualTo (pi_morph1 pi_f a x)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiMorph1
PiMorph2pi_g := (fun a b (x : {pi a}) (y : {pi b}) => EqualTo (pi_morph2 pi_g a b x y)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiMorph2
PiMono1pi_p := (fun a (x : {pi a}) => EqualTo (pi_mono1 pi_p a x)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiMono1
PiMono2pi_r := (fun a b (x : {pi a}) (y : {pi b}) => EqualTo (pi_mono2 pi_r a b x y)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiMono2
PiMorph11pi_f := (fun a (x : {pi a}) => EqualTo (pi_morph11 pi_f a x)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiMorph11
lift_op1Q f := (locked (fun x : Q => \pi_Q (f (repr x)) : Q)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_op1
lift_op2Q g := (locked (fun x y : Q => \pi_Q (g (repr x) (repr y)) : Q)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_op2
lift_fun1Q f := (locked (fun x : Q => f (repr x))).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_fun1
lift_fun2Q g := (locked (fun x y : Q => g (repr x) (repr y))).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_fun2
lift_op11Q Q' f := (locked (fun x : Q => \pi_Q' (f (repr x)) : Q')).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_op11
lift_cstQ x := (locked (\pi_Q x : Q)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_cst
PiConsta := (@EqualTo _ _ a (lock _)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiConst
lift_embedqT e := (locked (fun x => \pi_qT (e x) : qT)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
lift_embed
eq_lockT T' e : e =1 (@locked (T -> T') (fun x : T => e x)). Proof. by rewrite -lock. Qed. Prenex Implicits eq_lock.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eq_lock
PiEmbede := (fun x => @EqualTo _ _ (e x) (eq_lock (fun _ => \pi _) _)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
PiEmbed
RecordisEqQuotient T (eq_quot_op : rel T) (Q : Type) of isQuotient T Q & hasDecEq Q := { pi_eq_quot : {mono \pi_Q : x y / eq_quot_op x y >-> x == y} }. #[short(type="eqQuotType")] HB.structure Definition EqQuotient T eq_quot_op := {Q of isEqQuotient T eq_quot_op Q & Quotient T Q & hasDecEq Q}.
HB.mixin
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
Record
pi_eq_quot_monoT eq_quot_op eqT := PiMono2 (@pi_eq_quot T eq_quot_op eqT).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_eq_quot_mono
quot_type_ofT (qT : quotType T) : Type := qT. Arguments quot_type_of T%_type qT%_type : clear implicits.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
quot_type_of
quot_typeQ := (quot_type_of _ Q). HB.instance Definition _ T (qT : quotType T) := Quotient.on (quot_type qT).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
quot_type
Subx (px : repr (\pi_qT x) == x) := \pi_qT x.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
Sub
qreprKx Px : repr (@Sub x Px) = x. Proof. by rewrite /Sub (eqP Px). Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
qreprK
sortPx(x : qT) : repr (\pi_qT (repr x)) == repr x. Proof. by rewrite !reprK eqxx. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
sortPx
sort_Sub(x : qT) : x = Sub (sortPx x). Proof. by rewrite /Sub reprK. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
sort_Sub
reprPK (PK : forall x Px, K (@Sub x Px)) u : K u. Proof. by rewrite (sort_Sub u); apply: PK. Qed. #[export] HB.instance Definition _ := isSub.Build _ _ (quot_type qT) reprP qreprK. #[export] HB.instance Definition _ := [Equality of quot_type qT by <:].
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
reprP
Definition_ (T : choiceType) (qT : quotType T) := [Choice of quot_type qT by <:]. HB.instance Definition _ (T : countType) (qT : quotType T) := [Countable of quot_type qT by <:]. HB.instance Definition _ (T : finType) (qT : quotType T) := [Finite of quot_type qT by <:].
HB.instance
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
Definition
left_trans(e : rel T) : symmetric e -> transitive e -> left_transitive e. Proof. by move=> s t ? * ?; apply/idP/idP; apply: t; rewrite // s. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
left_trans
right_trans(e : rel T) : symmetric e -> transitive e -> right_transitive e. Proof. by move=> s t ? * x; rewrite ![e x _]s; apply: left_trans. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
right_trans
equiv_class_of(equiv : rel T) := EquivClass of reflexive equiv & symmetric equiv & transitive equiv.
Variant
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_class_of
equiv_rel:= EquivRelPack { equiv :> rel T; _ : equiv_class_of equiv }. Variable e : equiv_rel.
Record
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_rel
equiv_class:= let: EquivRelPack _ ce as e' := e return equiv_class_of e' in ce.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_class
equiv_pack(r : rel T) ce of phant_id ce equiv_class := @EquivRelPack r ce.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_pack
equiv_reflx : e x x. Proof. by case: e => [] ? []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_refl
equiv_sym: symmetric e. Proof. by case: e => [] ? []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_sym
equiv_trans: transitive e. Proof. by case: e => [] ? []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_trans
eq_op_trans(T' : eqType) : transitive (@eq_op T'). Proof. by move=> x y z /eqP -> /eqP ->. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eq_op_trans
equiv_ltrans: left_transitive e. Proof. by apply: left_trans; [apply: equiv_sym|apply: equiv_trans]. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_ltrans
equiv_rtrans: right_transitive e. Proof. by apply: right_trans; [apply: equiv_sym|apply: equiv_trans]. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equiv_rtrans
EquivRelr er es et := (@EquivRelPack _ r (EquivClass er es et)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
EquivRel
encModRel_class_of(r : rel D) := EncModRelClassPack of (forall x, r x x -> r (ED (DE x)) x) & (r =2 e).
Variant
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encModRel_class_of
encModRel:= EncModRelPack { enc_mod_rel :> rel D; _ : encModRel_class_of enc_mod_rel }. Variable r : encModRel.
Record
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encModRel
encModRelClass:= let: EncModRelPack _ c as r' := r return encModRel_class_of r' in c.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encModRelClass
encModRelP(x : D) : r x x -> r (ED (DE x)) x. Proof. by case: r => [] ? [] /= he _ /he. Qed.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encModRelP
encModRelE: r =2 e. Proof. by case: r => [] ? []. Qed.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encModRelE
encoded_equiv: rel E := [rel x y | r (ED x) (ED y)].
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encoded_equiv
EncModRelClassm := (EncModRelClassPack (fun x _ => m x) (fun _ _ => erefl _)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
EncModRelClass
EncModRelr m := (@EncModRelPack _ _ _ _ _ r (EncModRelClass m)).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
EncModRel
enc_mod_rel_is_equiv: equiv_class_of (enc_mod_rel r). Proof. split => [x|x y|y x z]; rewrite !encModRelE //; first by rewrite equiv_sym. by move=> exy /(equiv_trans exy). Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
enc_mod_rel_is_equiv
enc_mod_rel_equiv_rel:= EquivRelPack enc_mod_rel_is_equiv.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
enc_mod_rel_equiv_rel
encModEquivP(x : D) : r (ED (DE x)) x. Proof. by rewrite encModRelP ?encModRelE. Qed. Local Notation e' := (encoded_equiv r).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encModEquivP
encoded_equivE: e' =2 [rel x y | e (ED x) (ED y)]. Proof. by move=> x y; rewrite /encoded_equiv /= encModRelE. Qed. Local Notation e'E := encoded_equivE.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encoded_equivE
encoded_equiv_is_equiv: equiv_class_of e'. Proof. split => [x|x y|y x z]; rewrite !e'E //=; first by rewrite equiv_sym. by move=> exy /(equiv_trans exy). Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encoded_equiv_is_equiv
encoded_equiv_equiv_rel:= EquivRelPack encoded_equiv_is_equiv.
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encoded_equiv_equiv_rel
encoded_equivPx : e' (DE (ED x)) x. Proof. by rewrite /encoded_equiv /= encModEquivP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encoded_equivP
eC:= (encoded_equiv encD).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eC
canonx := choose (eC x) (x).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
canon
equivQuotient:= EquivQuotient { erepr : C; _ : (frel canon) erepr erepr }.
Record
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equivQuotient
type_ofof (phantom (rel _) encD) := equivQuotient.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
type_of
canon_id: forall x, (invariant canon canon) x. Proof. move=> x /=; rewrite /canon (@eq_choose _ _ (eC x)). by rewrite (@choose_id _ (eC x) _ x) ?chooseP ?equiv_refl. by move=> y; apply: equiv_ltrans; rewrite equiv_sym /= chooseP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
canon_id
pi:= locked (fun x => EquivQuotient (canon_id x)).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi
ereprK: cancel erepr pi. Proof. pose T : subType _ := HB.pack equivQuotient [isSub for erepr]. by unlock pi; case=> x hx; apply/(@val_inj _ _ T)/eqP. Qed. Local Notation encDE := (encModRelE encD). Local Notation encDP := (encModEquivP encD).
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
ereprK
encD_equiv_rel:= EquivRelPack (enc_mod_rel_is_equiv encD).
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
encD_equiv_rel
pi_CD(x y : C) : reflect (pi x = pi y) (eC x y). Proof. apply: (iffP idP) => hxy. apply: (can_inj ereprK); unlock pi canon => /=. rewrite -(@eq_choose _ (eC x) (eC y)); last first. by move=> z; rewrite /eC /=; apply: equiv_ltrans. by apply: choose_id; rewrite ?equiv_refl //. rewrite (equiv_trans (chooseP (equiv_refl _ _))) //=. move: hxy => /(f_equal erepr) /=; unlock pi canon => /= ->. by rewrite equiv_sym /= chooseP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_CD
pi_DC(x y : D) : reflect (pi (DC x) = pi (DC y)) (eD x y). Proof. apply: (iffP idP)=> hxy. apply/pi_CD; rewrite /eC /=. by rewrite (equiv_ltrans (encDP _)) (equiv_rtrans (encDP _)) /= encDE. rewrite -encDE -(equiv_ltrans (encDP _)) -(equiv_rtrans (encDP _)) /=. exact/pi_CD. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
pi_DC
equivQTP: cancel (CD \o erepr) (pi \o DC). Proof. by move=> x; rewrite /= (pi_CD _ (erepr x) _) ?ereprK /eC /= ?encDP. Qed. Local Notation qT := (type_of (Phantom (rel D) encD)). #[export] HB.instance Definition _ := isQuotient.Build D qT equivQTP.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
equivQTP
eqmodPx y : reflect (x = y %[mod qT]) (eD x y). Proof. by apply: (iffP (pi_DC _ _)); rewrite !unlock. Qed. #[export] HB.instance Definition _ := Choice.copy qT (can_type ereprK).
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eqmodP
eqmodEx y : x == y %[mod qT] = eD x y. Proof. exact: sameP eqP (@eqmodP _ _). Qed. #[export] HB.instance Definition _ := isEqQuotient.Build _ eD qT eqmodE.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eqmodE
defaultEncModRelClass:= @EncModRelClassPack D D id id r r (fun _ rxx => rxx) (fun _ _ => erefl _).
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
defaultEncModRelClass
defaultEncModRel:= EncModRelPack defaultEncModRelClass.
Canonical
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
defaultEncModRel
eC:= (encoded_equiv encD). HB.instance Definition _ := Countable.copy {eq_quot encD} (can_type EquivQuot.ereprK).
Notation
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eC
eqmodEx y : x == y %[mod_eq e] = e x y. Proof. by rewrite pi_eq_quot. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eqmodE
eqmodPx y : reflect (x = y %[mod_eq e]) (e x y). Proof. by rewrite -eqmodE; apply/eqP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eqmodP
eqquotEx y : x == y %[mod Q] = e x y. Proof. by rewrite pi_eq_quot. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eqquotE
eqquotPx y : reflect (x = y %[mod Q]) (e x y). Proof. by rewrite -eqquotE; apply/eqP. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice", "From mathcomp Require Import seq fintype" ]
boot/generic_quotient.v
eqquotP
RecordhasMul G := { mul : G -> G -> G }. #[short(type="magmaType")] HB.structure Definition Magma := {G of hasMul G}. Bind Scope group_scope with Magma.sort. HB.structure Definition ChoiceMagma := {G of Magma G & Choice G}. Bind Scope group_scope with ChoiceMagma.sort. Local Notation "*%g" := (@mul _) : function_scope. Local Notation "x * y" := (mul x y) : group_scope.
HB.mixin
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
Record
commutex y := x * y = y * x.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
commute
commute_reflx : commute x x. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
commute_refl
commute_symx y : commute x y -> commute y x. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
commute_sym
mulg_closed:= {in S &, forall u v, u * v \in S}.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
mulg_closed
RecordMagma_isSemigroup G of Magma G := { mulgA : associative (@mul G) }. #[short(type="semigroupType")] HB.structure Definition Semigroup := {G of Magma_isSemigroup G & ChoiceMagma G}. HB.factory Record isSemigroup G of Choice G := { mul : G -> G -> G; mulgA : associative mul }. HB.builders Context G of isSemigroup G. HB.instance Definition _ := hasMul.Build G mul. HB.instance Definition _ := Magma_isSemigroup.Build G mulgA. HB.end. Bind Scope group_scope with Semigroup.sort.
HB.mixin
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
Record
commuteMx y z : commute x y -> commute x z -> commute x (y * z). Proof. by move=> cxy cxz; rewrite /commute -mulgA -cxz !mulgA cxy. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
commuteM
RecordhasOne G := { one : G }. #[short(type="baseUMagmaType")] HB.structure Definition BaseUMagma := {G of hasOne G & Magma G}. Bind Scope group_scope with BaseUMagma.sort. HB.structure Definition ChoiceBaseUMagma := {G of BaseUMagma G & Choice G}. Bind Scope group_scope with ChoiceBaseUMagma.sort. Local Notation "1" := (@one _) : group_scope. Local Notation "s `_ i" := (nth 1 s i) : group_scope. Local Notation "\prod_ ( i <- r | P ) F" := (\big[*%g/1]_(i <- r | P) F). Local Notation "\prod_ ( i | P ) F" := (\big[*%g/1]_(i | P) F). Local Notation "\prod_ ( i 'in' A ) F" := (\big[*%g/1]_(i in A) F). Local Notation "\prod_ ( m <= i < n ) F" := (\big[*%g/1%g]_(m <= i < n) F%g).
HB.mixin
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
Record
natexp(G : baseUMagmaType) (x : G) n : G := iterop n *%g x 1. Arguments natexp : simpl never. Local Notation "x ^+ n" := (natexp x n) : group_scope.
Definition
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
natexp
expgnEx n : x ^+ n = iterop n mul x 1. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
expgnE
expg0x : x ^+ 0 = 1. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
expg0
expg1x : x ^+ 1 = x. Proof. by []. Qed.
Lemma
boot
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq", "From mathcomp Require Import bigop fintype finfun" ]
boot/monoid.v
expg1