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.
Notation
Source code
Lemma
Source code
(forall , U x y z = V x y z) ->
(fun => U x y z) = (fun => V x y z).
Proof.
Notation
Source code
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).
#[deprecated(since="mathcomp-analysis 1.10.0", note="renamed to `eq2_forall`.")]
Notation
Source code
Lemma
Source code
(forall , U x y z = V x y z) ->
(forall , U x y z) = (forall , V x y z).
Proof.
Notation
Source code
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.
Notation
Source code
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
Internals.inhabited_nProp : forall T : Type, Internals.properNegatedProp (T -> False) Internals.inhabited_nProp is not universe polymorphic Arguments Internals.inhabited_nProp T%_type_scope Internals.inhabited_nProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.inhabited_nProp Declared in library mathcomp.classical.contra, line 373, characters 10-25
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
Internals.forall_nProp : forall [A : Type] [b : bool] [P nQ : A -> Prop] [tR : bool] [nR : A -> Prop], (forall x : A, Internals.nBody b P nQ tR nR x) -> Internals.negatedProp false (if b then exists2 x : A, P x & nQ x else exists x : A, nQ x) Internals.forall_nProp is not universe polymorphic Arguments Internals.forall_nProp [A]%_type_scope [b]%_bool_scope [P nQ]%_function_scope [tR]%_bool_scope [nR]%_function_scope R%_function_scope Internals.forall_nProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.forall_nProp Declared in library mathcomp.classical.contra, line 409, characters 10-22
Source code
Lemma
Source code
Definition
Internals.proper_nBody : forall [b : bool] [P nQ nR : Prop], Internals.properNegatedForallBody b P nQ nR -> Internals.negatedForallBody b P nQ false nR Internals.proper_nBody is not universe polymorphic Arguments Internals.proper_nBody [b]%_bool_scope [P nQ nR]%_type_scope R Internals.proper_nBody is transparent Expands to: Constant mathcomp.classical.contra.Internals.proper_nBody Declared in library mathcomp.classical.contra, line 415, characters 10-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
Internals.nonproper_nBody : forall [tP : bool] [nP : Prop], Internals.negatedProp tP nP -> Internals.negatedForallBody false True nP tP nP Internals.nonproper_nBody is not universe polymorphic Arguments Internals.nonproper_nBody [tP]%_bool_scope [nP]%_type_scope P Internals.nonproper_nBody is transparent Expands to: Constant mathcomp.classical.contra.Internals.nonproper_nBody Declared in library mathcomp.classical.contra, line 418, characters 10-25
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
Internals.bounded_nBody : forall [b : bool] [P nQ PnQ : Prop] [tR : bool] [nR : Internals.andRHS b P nQ PnQ], Internals.negatedProp tR (Internals.and_RHS nR) -> Internals.properNegatedForallBody b P nQ PnQ Internals.bounded_nBody is not universe polymorphic Arguments Internals.bounded_nBody [b]%_bool_scope [P nQ PnQ]%_type_scope [tR]%_bool_scope [nR] R Internals.bounded_nBody is transparent Expands to: Constant mathcomp.classical.contra.Internals.bounded_nBody Declared in library mathcomp.classical.contra, line 423, characters 10-23
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
Internals.unbounded_nBody : forall [nQ : Prop], Internals.properNegatedProp nQ -> Internals.properNegatedForallBody false True nQ nQ Internals.unbounded_nBody is not universe polymorphic Arguments Internals.unbounded_nBody [nQ]%_type_scope Q Internals.unbounded_nBody is transparent Expands to: Constant mathcomp.classical.contra.Internals.unbounded_nBody Declared in library mathcomp.classical.contra, line 425, characters 10-25
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
Internals.is_true_nProp : forall [nP : Prop], Internals.negatedBool nP -> Internals.properNegatedProp nP Internals.is_true_nProp is not universe polymorphic Arguments Internals.is_true_nProp [nP]%_type_scope b Internals.is_true_nProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.is_true_nProp Declared in library mathcomp.classical.contra, line 448, characters 10-23
Source code
Identity Coercion fun_of_pred : predp >-> Funclass.
Definition
Internals.true_neg : Internals.negatedBool False Internals.true_neg is not universe polymorphic Internals.true_neg is transparent Expands to: Constant mathcomp.classical.contra.Internals.true_neg Declared in library mathcomp.classical.contra, line 454, characters 10-18
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
Internals.true_pos : Internals.positedBool True Internals.true_pos is not universe polymorphic Internals.true_pos is transparent Expands to: Constant mathcomp.classical.contra.Internals.true_pos Declared in library mathcomp.classical.contra, line 455, characters 10-18
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.
Variables ( : Order.disp_t) ( : orderType d).
Variables ( : 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.
Variables ( : Type) ( : Order.disp_t) ( : porderType d).
Implicit Types f g h : aT -> T.
Lemma
Source code
Proof.
Definition
Internals.id_pos : forall b : bool, Internals.positedBool b Internals.id_pos is not universe polymorphic Arguments Internals.id_pos b%_bool_scope Internals.id_pos is transparent Expands to: Constant mathcomp.classical.contra.Internals.id_pos Declared in library mathcomp.classical.contra, line 461, characters 10-16
Source code
Local Notation
Source code
Definition
Internals.negb_neg : forall [P : Prop], Internals.positedBool P -> Internals.negatedBool P Internals.negb_neg is not universe polymorphic Arguments Internals.negb_neg [P]%_type_scope b Internals.negb_neg is transparent Expands to: Constant mathcomp.classical.contra.Internals.negb_neg Declared in library mathcomp.classical.contra, line 465, characters 10-18
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.
Variables ( : Type) ( : Order.disp_t) ( : latticeType d).
Implicit Types f g h : aT -> T.
Definition
Internals.neg_ltn_LHS : forall n m : nat, Internals.negatedLeqLHS n (n <= m) Internals.neg_ltn_LHS is not universe polymorphic Arguments Internals.neg_ltn_LHS (n m)%_nat_scope Internals.neg_ltn_LHS is transparent Expands to: Constant mathcomp.classical.contra.Internals.neg_ltn_LHS Declared in library mathcomp.classical.contra, line 479, characters 10-21
Source code
Definition
Internals.neg_leq_LHS : forall n m : nat, Internals.negatedLeqLHS n (n < m) Internals.neg_leq_LHS is not universe polymorphic Arguments Internals.neg_leq_LHS (n m)%_nat_scope Internals.neg_leq_LHS is transparent Expands to: Constant mathcomp.classical.contra.Internals.neg_leq_LHS Declared in library mathcomp.classical.contra, line 480, characters 10-21
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.
Variable ( : Type).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End Inhabited.
Lemma
Source code
Proof.
Lemma
Source code