Module mathcomp.classical.boolp
From HB Require Import structures.From mathcomp Require Import boot order.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require internal_Eqdep_dec.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Declare Scope box_scope.
Declare Scope quant_scope.
Axiom
Source code
forall ( : Type) ( : A -> Type) ( : forall : A, B x),
(forall : A, f x = g x) -> f = g.
Axiom
Source code
forall : Prop, P <-> Q -> P = Q.
Axiom
Source code
forall ( : Type) ( : A -> Prop),
(exists : A, P x) -> { : A | P x}.
Notation
Source code
Lemma
Source code
(exists2 : A, P x & Q x) -> { : A | P x & Q x}.
Proof.
Lemma
Source code
existT P x Px = existT P y Py -> x = y.
Proof.
Lemma
Source code
Source code
Source code
existT P x Px1 = existT P x Px2 -> Px1 = Px2.
Proof.
by have [|/eqP] := eqVneq y z; [left|right].
Qed.
Lemma
Source code
existT [eta P] (projT1 p) (projT2 p) = p.
Proof.
Record
Source code
_ : forall ( : Prop), (P <-> Q) -> (P = Q);
_ : forall { : Type} ( : T -> U),
(forall , f x = g x) -> f = g;
}.
Fact
Source code
Proof.
- exact: propositional_extensionality.
- by move=> T U f g; apply: functional_extensionality_dep.
Qed.
Lemma
Source code
Proof.
Ltac eqProp := apply: propext; split.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
(f = g) = (forall , f x y z = g x y z).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(f = g) <-> (forall , f x y z = g x y z).
Proof.
Lemma
Source code
Lemma
Source code
(P = Q) = (forall , P x y <-> Q x y).
Lemma
Source code
(P = Q) = (forall , P x y z <-> Q x y z).
Lemma
Source code
Proof.
Lemma
Source code
(P = Q) <-> (forall , P x y <-> Q x y).
Proof.
Lemma
Source code
(P = Q) <-> (forall , P x y z <-> Q x y z).
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Record
Source code
_ : forall ( : Prop), {P} + {~P};
_ : forall , hasChoice T
}.
Lemma
Source code
(forall , exists , P x y) -> { & forall , P x (f x)}.
Proof.
Theorem : P \/ ~ P.
Proof.
Source code
have Uex val : exists , U val b by exists val; left.
pose f
Source code
pose Uf
Source code
have : f true != f false \/ P.
have [] := (Uf true, Uf false); rewrite /U.
by move=> [->|?] [->|?] ; do ?[by right]; left.
move=> [/eqP fTFN|]; [right=> p|by left]; apply: fTFN.
have UTF : U true = U false by rewrite predeqE /U => b; split=> _; right.
rewrite /f; move: (Uex true) (Uex false); rewrite UTF => p1 p2.
by congr (projT1 (cid _)).
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(forall : T, U x = V x) -> (fun => U x) = (fun => V x).
Proof.
Lemma
Source code
(forall , U x y = V x y) -> (fun => U x y) = (fun => V x y).
Proof.
Lemma
Source code
(forall , U x y z = V x y z) ->
(fun => U x y z) = (fun => V x y z).
Proof.
Lemma
Source code
(forall : T, U x = V x) -> (forall , U x) = (forall , V x).
Lemma
Source code
(forall , U x y = V x y) -> (forall , U x y) = (forall , V x y).
Lemma
Source code
(forall , U x y z = V x y z) ->
(forall , U x y z) = (forall , V x y z).
Proof.
Lemma
Source code
(forall : T, U x = V x) -> (exists , U x) = (exists , V x).
Lemma
Source code
(forall , U x y = V x y) -> (exists , U x y) = (exists , V x y).
Lemma
Source code
(forall , U x y z = V x y z) ->
(exists , U x y z) = (exists , V x y z).
Proof.
Lemma
Source code
s = t -> exist P s p = exist P t q.
Proof.
Lemma
Source code
(forall , U x y) = (forall , U x y).
Proof.
Lemma
Source code
(exists , U x y) = (exists , U x y).
Proof.
Lemma
Source code
Definition
glue1 : forall {T T' : Type} {X Y : set T} {A B : set T'} {XY : [disjoint X & Y]%classic} {AB : [disjoint A & B]%classic} (f g : T -> T'), {in X, glue XY AB f g =1 f} glue1 is not universe polymorphic Expanded type for implicit arguments glue1 : forall {T T' : Type} {X Y : set T} {A B : set T'} {XY : [disjoint X & Y]%classic} {AB : [disjoint A & B]%classic} (f g : T -> T') [x : T], x \in X -> glue XY AB f g x = f x Arguments glue1 {T T'}%_type_scope {X Y A B}%_classical_set_scope {XY AB} (f g)%_function_scope [x] _ glue1 is opaque Expands to: Constant mathcomp.classical.functions.glue1 Declared in library mathcomp.classical.functions, line 1500, characters 11-16
Source code
Notation
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Definition
glue2 : forall {T T' : Type} {X Y : set T} {A B : set T'} {XY : [disjoint X & Y]%classic} {AB : [disjoint A & B]%classic} (f g : T -> T'), {in Y, glue XY AB f g =1 g} glue2 is not universe polymorphic Expanded type for implicit arguments glue2 : forall {T T' : Type} {X Y : set T} {A B : set T'} {XY : [disjoint X & Y]%classic} {AB : [disjoint A & B]%classic} (f g : T -> T') [x : T], x \in Y -> glue XY AB f g x = g x Arguments glue2 {T T'}%_type_scope {X Y A B}%_classical_set_scope {XY AB} (f g)%_function_scope [x] _ glue2 is opaque Expands to: Constant mathcomp.classical.functions.glue2 Declared in library mathcomp.classical.functions, line 1503, characters 11-16
Source code
Lemma
Source code
Definition
fun_set_bij : forall {aT rT : Type} {A : set aT} {B : set rT} {f : aT -> rT}, set_bij A B f -> aT -> rT fun_set_bij is not universe polymorphic Arguments fun_set_bij {aT rT}%_type_scope {A B}%_classical_set_scope {f}%_function_scope _ _ fun_set_bij is a coercion fun_set_bij is transparent Expands to: Constant mathcomp.classical.functions.fun_set_bij Declared in library mathcomp.classical.functions, line 1789, characters 11-22
Source code
hasDecEq.Build T (@gen_eqP T).
.
Source code
Source code
Source code
gen_eqMixin (forall : T, T' t).
.
Source code
Source code
Source code
gen_choiceMixin (forall : T, T' t).
.
Source code
Source code
Source code
.
Source code
Source code
Source code
Section classicType.
Variable : Type.
Definition
set_bij_bijfun : forall [aT rT : Type] [A : set aT] [B : set rT] [f : aT -> rT] (fS : set_bij A B f), Bij.axioms_ A B fS set_bij_bijfun is not universe polymorphic Arguments set_bij_bijfun [aT rT]%_type_scope [A B]%_classical_set_scope [f]%_function_scope fS set_bij_bijfun is a coercion set_bij_bijfun is transparent Expands to: Constant mathcomp.classical.functions.set_bij_bijfun Declared in library mathcomp.classical.functions, line 1808, characters 9-23
Source code
.
Source code
Source code
Source code
.
Source code
Source code
Source code
End classicType.
Notation
Source code
(format "'{classic' T }") : type_scope.
Section eclassicType.
Variable : eqType.
Definition
bij_of_set_bijection : forall {aT rT : Type} {A : set aT} {B : set rT} {f : aT -> rT}, set_bij A B f -> {bij A >-> B} bij_of_set_bijection is not universe polymorphic Arguments bij_of_set_bijection {aT rT}%_type_scope {A B}%_classical_set_scope {f}%_function_scope fbij bij_of_set_bijection is a coercion bij_of_set_bijection is transparent Expands to: Constant mathcomp.classical.functions.bij_of_set_bijection Declared in library mathcomp.classical.functions, line 1814, characters 11-31
Source code
.
Source code
Source code
Source code
.
Source code
Source code
Source code
End eclassicType.
Notation
Source code
(format "'{eclassic' T }") : type_scope.
Definition
phant_bij : forall [aT rT : Type] [A : set aT] [B : set rT] [f : {bij A >-> B}], phantom (aT -> rT) f -> set_bij A B f phant_bij is not universe polymorphic Arguments phant_bij [aT rT]%_type_scope [A B]%_classical_set_scope [f] _ phant_bij is transparent Expands to: Constant mathcomp.classical.functions.phant_bij Declared in library mathcomp.classical.functions, line 1821, characters 11-20
Source code
Source code
(forall , G (sort x')) -> forall , G x.
Notation
Source code
Notation
Source code
Lemma
Source code
Source code
(forall , exists , sort y = x) -> canonical_ sort.
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
reflect [/\ P, Q & R] [&& `[< P >], `[< Q >] & `[< R >]].
Proof.
Lemma
Source code
Proof.
Lemma
Source code
reflect [\/ P, Q | R] [|| `[< P >], `[< Q >] | `[< R >]].
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by rewrite asbool_imply negb_imply -asbool_neg => /and_asboolP.
by move/and_asboolP; rewrite asbool_neg -negb_imply asbool_imply.
Qed.
Lemma
Source code
reflect (forall , `[<P x>]) (`[<forall , P x>]).
Proof.
Lemma
Source code
reflect (exists , `[<P x>]) (`[<exists , P x>]).
Proof.
Variant
Source code
|
Source code
|
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
* (left_zero False and * right_zero False and * idempotent_op and).
Proof.
Lemma
Source code
* (left_zero True or * right_zero True or * idempotent_op or).
Proof.
Lemma
Source code
Source code
(imply False =1 fun=> True) * (imply^~ False =1 not)
* (left_id True imply * right_zero True imply * self_inverse True imply).
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Source code
(~ P -> (x < y)%O) -> (y <= x)%O -> P.
Proof.
Lemma
Source code
Source code
(~ P -> (x <= y)%O) -> (y < x)%O -> P.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Definition
bijection_of_bijective : forall {aT rT : Type} {f : aT -> rT}, bijective f -> {splitbij [set: aT] >-> [set: rT]} bijection_of_bijective is not universe polymorphic Arguments bijection_of_bijective {aT rT}%_type_scope {f}%_function_scope fbijTT bijection_of_bijective is transparent Expands to: Constant mathcomp.classical.functions.bijection_of_bijective Declared in library mathcomp.classical.functions, line 1829, characters 11-33
Source code
Identity Coercion fun_of_pred : predp >-> Funclass.
Definition
phant_bijTT : forall [aT rT : Type] [f : {bij [set: aT] >-> [set: rT]}], phantom (aT -> rT) f -> bijective f phant_bijTT is not universe polymorphic Arguments phant_bijTT [aT rT]%_type_scope [f] _ phant_bijTT is transparent Expands to: Constant mathcomp.classical.functions.phant_bijTT Declared in library mathcomp.classical.functions, line 1845, characters 11-22
Source code
Identity Coercion fun_of_rel : rel >-> Funclass.
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Definition
patch : forall {aT rT : Type}, (aT -> rT) -> set aT -> (aT -> rT) -> aT -> rT patch is not universe polymorphic Arguments patch {aT rT}%_type_scope d%_function_scope A%_classical_set_scope f%_function_scope u patch is transparent Expands to: Constant mathcomp.classical.functions.patch Declared in library mathcomp.classical.functions, line 1856, characters 11-16
Source code
Prenex Implicits pred0p.
Lemma
Source code
Lemma
Source code
reflect (forall : T, ~ P x) (~~ `[<exists : T, P x>]).
Proof.
Lemma
Source code
reflect (exists : T, ~ P x) (~~ `[<forall : T, P x>]).
Proof.
Lemma
Source code
`[< forall : T, ~~ (P x) >] = ~~ `[< exists : T, P x >].
Proof.
Lemma
Source code
`[< exists : T, ~~ (P x) >] = ~~ `[< forall : T, P x >].
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by rewrite asbool_and negb_and => /orP[]/asboolPn; [left|right].
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by rewrite 2!negb_and -3!asbool_neg => /or3_asboolP.
by rewrite 3!asbool_neg -2!negb_and => /and3_asboolP.
Qed.
Lemma
Source code
Proof.
Notation
Source code
Lemma
Source code
#[deprecated(since="mathcomp-analysis 1.15.0", note="Renamed to `not_notE`. Warning: a different `notE` is provided by `contra.v`.")]
Notation
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
by rewrite -2!(reflect_eq orP).
Qed.
Lemma
Source code
Proof.
by rewrite -3!(reflect_eq orP).
Qed.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
(exists2 , P x & Q x) <-> exists , P x /\ Q x.
Proof.
Lemma
Source code
(exists2 , P x & Q x) <-> ~ forall , ~ P x \/ ~ Q x.
Proof.
by split; apply: contra_not => PQx x; apply/not_andP; apply: PQx.
Qed.
Lemma
Source code
(forall , ~ P x \/ ~ Q x) <-> ~ (exists2 , P x & Q x).
Proof.
by rewrite -not_andP => -[Pt Qt]; apply PQ; exists t.
Qed.
Lemma
Source code
(forall , P x -> ~ Q x) <-> ~ (exists2 , P x & Q x).
Proof.
by move=> Pt Qt; apply: PQ; exists t.
Qed.
Lemma
Source code
(exists2 , P x & ~ Q x) <-> ~ (forall , P x -> Q x).
Proof.
by apply: contra_notP => NQx; exists x.
Qed.
Lemma
Source code
reflect (forall : T, ~ P x \/ ~ Q x) (~~ `[<exists2 : T, P x & Q x>]).
Proof.
Section bigmaxmin.
Local Notation
Source code
Local Notation
Source code
Local Open Scope order_scope.
Context {} { : orderType d} ( : T)
{ : finType} ( : pred I) ( : T) ( : I -> T).
Import Order.TTheory.
Lemma
Source code
(m <= \big[max/x]_( | P i) F i).
Proof.
- rewrite leNgt => /bigmax_ltP /not_andP[/negP|]; first by rewrite -leNgt; left.
by move=> /existsNP[i /not_implyP[Pi /negP]]; rewrite -leNgt; right; exists i.
- by rewrite bigmax_idl le_max mx.
- by rewrite (bigmaxD1 i)// le_max mFi.
Qed.
Lemma
Source code
(m < \big[max/x]_( | P i) F i).
Proof.
- rewrite ltNge => /bigmax_leP /not_andP[/negP|]; first by rewrite -ltNge; left.
by move=> /existsNP[i /not_implyP[Pi /negP]]; rewrite -ltNge; right; exists i.
- by rewrite bigmax_idl lt_max mx.
- by rewrite (bigmaxD1 i)// lt_max mFi.
Qed.
Lemma
Source code
(\big[min/x]_( | P i) F i <= m).
Proof.
- rewrite leNgt => /bigmin_gtP /not_andP[/negP|]; first by rewrite -leNgt; left.
by move=> /existsNP[i /not_implyP[Pi /negP]]; rewrite -leNgt; right; exists i.
- by rewrite bigmin_idl ge_min xm.
- by rewrite (bigminD1 i)// ge_min Fim.
Qed.
Lemma
Source code
(\big[min/x]_( | P i) F i < m).
Proof.
- rewrite ltNge => /bigmin_geP /not_andP[/negP|]; first by rewrite -ltNge; left.
by move=> /existsNP[i /not_implyP[Pi /negP]]; rewrite -ltNge; right; exists i.
- by rewrite bigmin_idl gt_min xm.
- by rewrite (bigminD1 _ _ _ Pi) gt_min Fim.
Qed.
End bigmaxmin.
Module
Source code
Section FunOrder.
Import Order.TTheory.
Context { : Type} {} { : porderType d}.
Implicit Types f g h : aT -> T.
Lemma
Source code
Proof.
Definition
valL_ : forall {U V : Type}, V -> forall {A : set U}, (A -> V) -> U -> V valL_ is not universe polymorphic Arguments valL_ {U V}%_type_scope v {A}%_classical_set_scope f%_function_scope u / (where some original arguments have been renamed) The reduction tactics unfold valL_ when applied to 6 arguments valL_ is transparent Expands to: Constant mathcomp.classical.functions.valL_ Declared in library mathcomp.classical.functions, line 1950, characters 11-16
Source code
Local Notation
Source code
Definition
valLfun_ : forall {U V : Type}, V -> forall {A : set U} {B : set V}, {fun [set: A] >-> B} -> {fun A >-> B} valLfun_ is not universe polymorphic Arguments valLfun_ {U V}%_type_scope v {A B}%_classical_set_scope f valLfun_ is transparent Expands to: Constant mathcomp.classical.functions.valLfun_ Declared in library mathcomp.classical.functions, line 1956, characters 11-19
Source code
Local Notation
Source code
Lemma
Source code
Proof.
- by apply/eqP => gf; move: fg => /asboolP[fg] [x /eqP]; apply; rewrite gf.
- apply/asboolP => x; rewrite le_eqVlt; move/asboolP : fg => [fg [y gfy]].
by have [//|gfx /=] := boolP (f x == g x); rewrite lt_neqAle gfx /= fg.
- apply/not_existsP => h.
have : f =1 g by move=> x; have /negP/negPn/eqP := h x.
by rewrite -funeqE; apply/nesym/eqP.
Qed.
Fact
Source code
Proof.
Fact
Source code
Proof.
Fact
Source code
Source code
.
Source code
Source code
Source code
fun_display (aT -> T) lef ltf ltf_def lef_refl lef_anti lef_trans.
End FunOrder.
Section FunLattice.
Import Order.TTheory.
Context { : Type} {} { : latticeType d}.
Implicit Types f g h : aT -> T.
Definition
valR : forall {U V : Type} {A : set V}, (U -> A) -> U -> V valR is not universe polymorphic Arguments valR {U V}%_type_scope {A}%_classical_set_scope f%_function_scope x valR is transparent Expands to: Constant mathcomp.classical.functions.valR Declared in library mathcomp.classical.functions, line 2025, characters 11-15
Source code
Definition
valR_fun : forall {U V : Type} {A : set V}, (U -> A) -> {fun [set: U] >-> A} valR_fun is not universe polymorphic Arguments valR_fun {U V}%_type_scope {A}%_classical_set_scope f%_function_scope valR_fun is transparent Expands to: Constant mathcomp.classical.functions.valR_fun Declared in library mathcomp.classical.functions, line 2028, characters 11-19
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Source code
.
Source code
Source code
Source code
meetfC joinfC meetfA joinfA joinfKI meetfKU lef_meet.
End FunLattice.
Module
Source code
HB.reexport.
End Exports.
End FunOrder.
Export FunOrder.Exports.
Lemma
Source code
reflect (forall , (f x <= g x)%O) (f <= g)%O.
Lemma
Source code
((f `&` g) x = f x `&` g x)%O.
Proof.
Lemma
Source code
((f `|` g) x = f x `|` g x)%O.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Section Inhabited.
Context ( : Type).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End Inhabited.
Lemma
Source code
Proof.
Lemma
Source code