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 |
|---|---|---|---|---|---|---|
contra_not_neqP x y : (x = y -> P) -> ~ P -> x != y.
Proof. by move=> imp; apply: contra_notN => /eqP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_not_neq | |
contraTneqb x y : (x = y -> ~~ b) -> b -> x != y.
Proof. by move=> imp; apply: contraTN => /eqP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contraTneq | |
contraNneqb x y : (x = y -> b) -> ~~ b -> x != y.
Proof. by move=> imp; apply: contraNN => /eqP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contraNneq | |
contraFneqb x y : (x = y -> b) -> b = false -> x != y.
Proof. by move=> imp /negbT; apply: contraNneq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contraFneq | |
contraPneqP x y : (x = y -> ~ P) -> P -> x != y.
Proof. by move=> imp; apply: contraPN => /eqP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contraPneq | |
contra_eqNb x y : (b -> x != y) -> x = y -> ~~ b.
Proof. by move=> imp /eqP; apply: contraL. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_eqN | |
contra_eqFb x y : (b -> x != y) -> x = y -> b = false.
Proof. by move=> imp /eqP; apply: contraTF. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_eqF | |
contra_eqTb x y : (~~ b -> x != y) -> x = y -> b.
Proof. by move=> imp /eqP; apply: contraLR. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_eqT | |
contra_neqNb x y : (b -> x = y) -> x != y -> ~~ b.
Proof. by move=> imp; apply: contraNN => /imp->. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_neqN | |
contra_neqFb x y : (b -> x = y) -> x != y -> b = false.
Proof. by move=> imp; apply: contraNF => /imp->. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_neqF | |
contra_neqTb x y : (~~ b -> x = y) -> x != y -> b.
Proof. by move=> imp; apply: contraNT => /imp->. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_neqT | |
contra_eq_notP x y : (P -> x != y) -> x = y -> ~ P.
Proof. by move=> imp /eqP; apply: contraTnot. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_eq_not | |
contra_neq_notP x y : (P -> x = y) -> x != y -> ~ P.
Proof. by move=> imp;apply: contraNnot => /imp->. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_neq_not | |
contra_eqz1 z2 x1 x2 : (x1 != x2 -> z1 != z2) -> z1 = z2 -> x1 = x2.
Proof. by move=> imp /eqP; apply: contraTeq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_eq | |
contra_neqz1 z2 x1 x2 : (x1 = x2 -> z1 = z2) -> z1 != z2 -> x1 != x2.
Proof. by move=> imp; apply: contraNneq => /imp->. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_neq | |
contra_neq_eqz1 z2 x1 x2 : (x1 != x2 -> z1 = z2) -> z1 != z2 -> x1 = x2.
Proof. by move=> imp; apply: contraNeq => /imp->. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_neq_eq | |
contra_eq_neqz1 z2 x1 x2 : (z1 = z2 -> x1 != x2) -> x1 = x2 -> z1 != z2.
Proof. by move=> imp; apply: contra_eqN => /eqP /imp. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | contra_eq_neq | |
memPnA x : reflect {in A, forall y, y != x} (x \notin A).
Proof.
apply: (iffP idP) => [notDx y | notDx]; first by apply: contraTneq => ->.
exact: contraL (notDx x) _.
Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | memPn | |
memPnCA x : reflect {in A, forall y, x != y} (x \notin A).
Proof. by apply: (iffP (memPn A x)) => A'x y /A'x; rewrite eq_sym. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | memPnC | |
ifN_eqR x y vT vF : x != y -> (if x == y then vT else vF) = vF :> R.
Proof. exact: ifN. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | ifN_eq | |
ifN_eqCR x y vT vF : x != y -> (if y == x then vT else vF) = vF :> R.
Proof. by rewrite eq_sym; apply: ifN. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | ifN_eqC | |
eq_irrelevance(T : eqType) x y : forall e1 e2 : x = y :> T, e1 = e2.
Proof.
pose proj z e := if x =P z is ReflectT e0 then e0 else e.
suff: injective (proj y) by rewrite /proj => injp e e'; apply: injp; case: eqP.
pose join (e : x = _) := etrans (esym e).
apply: can_inj (join x y (proj x (erefl x))) _.
by case: y /; case: _ / (proj x _).
Qed.
Corollary eq_axiomK (T : eqType) (x : T) : all_equal_to (erefl x).
Proof. by move=> eq_x_x; apply: eq_irrelevance. Qed. | Theorem | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eq_irrelevance | |
sort: eqType -> predArgType. | Parameter | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | sort | |
eqmod.sort : eqType >-> predArgType. | Coercion | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqmod | |
unit_eqP: Equality.axiom (fun _ _ : unit => true).
Proof. by do 2!case; left. Qed.
HB.instance Definition _ := hasDecEq.Build unit unit_eqP. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | unit_eqP | |
eqbb := addb (~~ b). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqb | |
eqbP: Equality.axiom eqb.
Proof. by do 2!case; constructor. Qed.
HB.instance Definition _ := hasDecEq.Build bool eqbP. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqbP | |
eqbE: eqb = eq_op. Proof. by []. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqbE | |
bool_irrelevance(b : bool) (p1 p2 : b) : p1 = p2.
Proof. exact: eq_irrelevance. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | bool_irrelevance | |
negb_addb1 b2 : ~~ (b1 (+) b2) = (b1 == b2).
Proof. by rewrite -addNb. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | negb_add | |
negb_eqbb1 b2 : (b1 != b2) = b1 (+) b2.
Proof. by rewrite -addNb negbK. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | negb_eqb | |
eqb_idb : (b == true) = b.
Proof. by case: b. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqb_id | |
eqbF_negb : (b == false) = ~~ b.
Proof. by case: b. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqbF_neg | |
eqb_negLRb1 b2 : (~~ b1 == b2) = (b1 == ~~ b2).
Proof. by case: b1; case: b2. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eqb_negLR | |
xpred1:= (fun a1 x => x == a1). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpred1 | |
xpred2:= (fun a1 a2 x => (x == a1) || (x == a2)). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpred2 | |
xpred3:= (fun a1 a2 a3 x => [|| x == a1, x == a2 | x == a3]). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpred3 | |
xpred4:=
(fun a1 a2 a3 a4 x => [|| x == a1, x == a2, x == a3 | x == a4]). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpred4 | |
xpredU1:= (fun a1 (p : pred _) x => (x == a1) || p x). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpredU1 | |
xpredC1:= (fun a1 x => x != a1). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpredC1 | |
xpredD1:= (fun (p : pred _) a1 x => (x != a1) && p x). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | xpredD1 | |
pred1(a1 : T) := SimplPred (xpred1 a1). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | pred1 | |
pred2(a1 a2 : T) := SimplPred (xpred2 a1 a2). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | pred2 | |
pred3(a1 a2 a3 : T) := SimplPred (xpred3 a1 a2 a3). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | pred3 | |
pred4(a1 a2 a3 a4 : T) := SimplPred (xpred4 a1 a2 a3 a4). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | pred4 | |
predU1(a1 : T) p := SimplPred (xpredU1 a1 p). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predU1 | |
predC1(a1 : T) := SimplPred (xpredC1 a1). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predC1 | |
predD1p (a1 : T) := SimplPred (xpredD1 p a1). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predD1 | |
pred1E: pred1 =2 eq_op. Proof. by move=> x y; apply: eq_sym. Qed.
Variables (T2 : eqType) (x y : T) (z u : T2) (b : bool). | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | pred1E | |
predU1P: reflect (x = y \/ b) ((x == y) || b).
Proof. by apply: (iffP orP); do [case=> [/eqP|]; [left | right]]. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predU1P | |
pred2P: reflect (x = y \/ z = u) ((x == y) || (z == u)).
Proof. by apply: (iffP orP); do [case=> /eqP; [left | right]]. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | pred2P | |
predD1P: reflect (x <> y /\ b) ((x != y) && b).
Proof. by apply: (iffP andP)=> [] [] // /eqP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predD1P | |
predU1l: x = y -> (x == y) || b.
Proof. by move->; rewrite eqxx. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predU1l | |
predU1r: b -> (x == y) || b.
Proof. by move->; rewrite orbT. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | predU1r | |
inj_eq: injective f -> forall x y, (f x == f y) = (x == y).
Proof. by move=> inj_f x y; apply/eqP/eqP=> [|-> //]; apply: inj_f. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | inj_eq | |
can_eq: cancel f g -> forall x y, (f x == f y) = (x == y).
Proof. by move/can_inj; apply: inj_eq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | can_eq | |
bij_eq: bijective f -> forall x y, (f x == f y) = (x == y).
Proof. by move/bij_inj; apply: inj_eq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | bij_eq | |
can2_eq: cancel f g -> cancel g f -> forall x y, (f x == y) = (x == g y).
Proof. by move=> fK gK x y; rewrite -[y in LHS]gK; apply: can_eq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | can2_eq | |
inj_in_eq:
{in D &, injective f} -> {in D &, forall x y, (f x == f y) = (x == y)}.
Proof. by move=> inj_f x y Dx Dy; apply/eqP/eqP=> [|-> //]; apply: inj_f. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | inj_in_eq | |
can_in_eq:
{in D, cancel f g} -> {in D &, forall x y, (f x == f y) = (x == y)}.
Proof. by move/can_in_inj; apply: inj_in_eq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | can_in_eq | |
frelf := [rel x y : T | f x == y]. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | frel | |
inv_eqf : involutive f -> forall x y : T, (f x == y) = (x == f y).
Proof. by move=> fK; apply: can2_eq. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | inv_eq | |
eq_frelf f' : f =1 f' -> frel f =2 frel f'.
Proof. by move=> eq_f x y; rewrite /= eq_f. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eq_frel | |
invariant(rT : eqType) f (k : aT -> rT) :=
[pred x | k (f x) == k x].
Variables (rT1 rT2 : eqType) (f : aT -> aT) (h : rT1 -> rT2) (k : aT -> rT1). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | invariant | |
invariant_comp: subpred (invariant f k) (invariant f (h \o k)).
Proof. by move=> x eq_kfx; rewrite /= (eqP eq_kfx). Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | invariant_comp | |
invariant_inj: injective h -> invariant f (h \o k) =1 invariant f k.
Proof. by move=> inj_h x; apply: (inj_eq inj_h). Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | invariant_inj | |
coerced_frelf := (rel_of_simpl (frel f)) (only parsing). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | coerced_frel | |
fun_delta: Type := FunDelta of aT & rT. | Variant | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | fun_delta | |
fwithx y (f : aT -> rT) := [fun z => if z == x then y else f z]. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | fwith | |
app_fdeltadf f z :=
let: FunDelta x y := df in if z == x then y else f z. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | app_fdelta | |
dfwithi (x : T i) (j : I) : T j :=
if (i =P j) is ReflectT ij then ecast j (T j) ij x else f j. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | dfwith | |
dfwith_ini x : dfwith x i = x.
Proof. by rewrite /dfwith; case: eqP => // ii; rewrite eq_axiomK. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | dfwith_in | |
dfwith_outi (x : T i) j : i != j -> dfwith x j = f j.
Proof. by rewrite /dfwith; case: eqP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | dfwith_out | |
dfwith_speci (x : T i) : forall j, T j -> Type:=
| DFunWithIn : dfwith_spec x x
| DFunWithOut j : i != j -> dfwith_spec x (f j). | Variant | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | dfwith_spec | |
dfwithPi (x : T i) (j : I) : dfwith_spec x (dfwith x j).
Proof.
by case: (eqVneq i j) => [<-|nij];
[rewrite dfwith_in|rewrite dfwith_out//]; constructor.
Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | dfwithP | |
comparable:= forall x y : T, decidable (x = y).
Hypothesis compare_T : comparable. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | comparable | |
comparebx y : bool := compare_T x y. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | compareb | |
compareP: Equality.axiom compareb.
Proof. by move=> x y; apply: sumboolP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | compareP | |
comparableMixin:= hasDecEq.Build T compareP. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | comparableMixin | |
eq_comparable(T : eqType) : comparable T :=
fun x y => decP (x =P y).
#[key="sub_sort"]
HB.mixin Record isSub (T : Type) (P : pred T) (sub_sort : Type) := {
val_subdef : sub_sort -> T;
Sub : forall x, P x -> sub_sort;
Sub_rect : forall K (_ : forall x Px, K (@Sub x Px)) u, K u;
SubK_subproof : forall x Px, val_subdef (@Sub x Px) = x
}.
#[short(type="subType")]
HB.structure Definition SubType (T : Type) (P : pred T) := { S of isSub T P S }. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | eq_comparable | |
val:= (isSub.val_subdef (SubType.on _)). | Notation | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | val | |
DefinitionSubEquality T (P : pred T) :=
{ sT of Equality sT & isSub T P sT}. | HB.structure | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | Definition | |
vrefl: forall x, P x -> x = x. Proof. by []. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | vrefl | |
vrefl_rect:= vrefl. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | vrefl_rect | |
SubKx Px : val (@Sub x Px) = x. Proof. exact: SubK_subproof. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | SubK | |
Sub_spec: sT -> Type := subSpec x Px : Sub_spec (Sub x Px). | Variant | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | Sub_spec | |
SubPu : Sub_spec u.
Proof. by elim/(@Sub_rect _ _ sT) : u. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | SubP | |
insubx := if idP is ReflectT Px then Some (Sub x Px) else None. | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insub | |
insubdu0 x := odflt u0 (insub x). | Definition | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insubd | |
insub_specx : option sT -> Type :=
| InsubSome u of P x & val u = x : insub_spec x (Some u)
| InsubNone of ~~ P x : insub_spec x None. | Variant | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insub_spec | |
insubPx : insub_spec x (insub x).
Proof.
by rewrite /insub; case: {-}_ / idP; [left; rewrite ?SubK | right; apply/negP].
Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insubP | |
insubTx Px : insub x = Some (Sub x Px).
Proof.
do [case: insubP => [/SubP[y Py] _ <- | /negP// ]; rewrite SubK] in Px *.
by rewrite (bool_irrelevance Px Py).
Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insubT | |
insubFx : P x = false -> insub x = None.
Proof. by move/idP; case: insubP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insubF | |
insubNx : ~~ P x -> insub x = None.
Proof. by move/negPf/insubF. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insubN | |
isSome_insub: ([eta insub] : pred T) =1 P.
Proof. by apply: fsym => x; case: insubP => // /negPf. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | isSome_insub | |
insubK: ocancel insub val.
Proof. by move=> x; case: insubP. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | insubK | |
valPu : P (val u).
Proof. by case/SubP: u => x Px; rewrite SubK. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | valP | |
valK: pcancel val insub.
Proof. by case/SubP=> x Px; rewrite SubK; apply: insubT. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | valK | |
val_inj: injective val.
Proof. exact: pcan_inj valK. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | val_inj | |
valKdu0 : cancel val (insubd u0).
Proof. by move=> u; rewrite /insubd valK. Qed. | Lemma | boot | [
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool"
] | boot/eqtype.v | valKd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.