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 Import mathcomp_extra.
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
asbool : Prop -> bool asbool is not universe polymorphic Arguments asbool P%_type_scope asbool is transparent Expands to: Constant mathcomp.classical.boolp.asbool Declared in library mathcomp.classical.boolp, line 335, characters 11-17
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
gen_eq : forall [T : Type], T -> T -> bool gen_eq is not universe polymorphic Arguments gen_eq [T]%_type_scope u v gen_eq is transparent Expands to: Constant mathcomp.classical.boolp.gen_eq Declared in library mathcomp.classical.boolp, line 391, characters 11-17
Source code
Lemma
Source code
Definition
gen_eqMixin : forall T : Type, hasDecEq.phant_axioms T gen_eqMixin is not universe polymorphic Arguments gen_eqMixin T%_type_scope gen_eqMixin is transparent Expands to: Constant mathcomp.classical.boolp.gen_eqMixin Declared in library mathcomp.classical.boolp, line 394, 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
classicType : Type -> Type classicType is not universe polymorphic Arguments classicType T%_type_scope classicType is transparent Expands to: Constant mathcomp.classical.boolp.classicType Declared in library mathcomp.classical.boolp, line 408, characters 11-22
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
eclassicType : eqType -> Type eclassicType is not universe polymorphic Arguments eclassicType T eclassicType is transparent Expands to: Constant mathcomp.classical.boolp.eclassicType Declared in library mathcomp.classical.boolp, line 417, characters 11-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
canonical_of : forall [T U : Type], (U -> T) -> Type canonical_of is not universe polymorphic Arguments canonical_of [T U]%_type_scope sort%_function_scope canonical_of is transparent Expands to: Constant mathcomp.classical.boolp.canonical_of Declared in library mathcomp.classical.boolp, line 424, characters 11-23
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
predp : Type -> Type predp is not universe polymorphic Arguments predp T%_type_scope predp is transparent Expands to: Constant mathcomp.classical.boolp.predp Declared in library mathcomp.classical.boolp, line 622, characters 11-16
Source code
Identity Coercion fun_of_pred : predp >-> Funclass.
Definition
relp : Type -> Type relp is not universe polymorphic Arguments relp T%_type_scope relp is transparent Expands to: Constant mathcomp.classical.boolp.relp Declared in library mathcomp.classical.boolp, line 626, characters 11-15
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
pred0p : forall {T : Type}, predp T -> bool pred0p is not universe polymorphic Arguments pred0p {T}%_type_scope P pred0p is transparent Expands to: Constant mathcomp.classical.boolp.pred0p Declared in library mathcomp.classical.boolp, line 639, characters 11-17
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
FunOrder.lef : forall [aT : Type] [d : disp_t] [T : porderType d], (aT -> T) -> (aT -> T) -> bool FunOrder.lef is not universe polymorphic Arguments FunOrder.lef [aT]%_type_scope [d T] (f g)%_function_scope FunOrder.lef is transparent Expands to: Constant mathcomp.classical.boolp.FunOrder.lef Declared in library mathcomp.classical.boolp, line 920, characters 11-14
Source code
Local Notation
Source code
Definition
FunOrder.ltf : forall [aT : Type] [d : disp_t] [T : porderType d], (aT -> T) -> (aT -> T) -> bool FunOrder.ltf is not universe polymorphic Arguments FunOrder.ltf [aT]%_type_scope [d T] (f g)%_function_scope FunOrder.ltf is transparent Expands to: Constant mathcomp.classical.boolp.FunOrder.ltf Declared in library mathcomp.classical.boolp, line 923, characters 11-14
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
FunOrder.meetf : forall [aT : Type] [d : disp_t] [T : latticeType d], (aT -> T) -> (aT -> T) -> aT -> T FunOrder.meetf is not universe polymorphic Arguments FunOrder.meetf [aT]%_type_scope [d T] (f g)%_function_scope x FunOrder.meetf is transparent Expands to: Constant mathcomp.classical.boolp.FunOrder.meetf Declared in library mathcomp.classical.boolp, line 962, characters 11-16
Source code
Definition
FunOrder.joinf : forall [aT : Type] [d : disp_t] [T : latticeType d], (aT -> T) -> (aT -> T) -> aT -> T FunOrder.joinf is not universe polymorphic Arguments FunOrder.joinf [aT]%_type_scope [d T] (f g)%_function_scope x FunOrder.joinf is transparent Expands to: Constant mathcomp.classical.boolp.FunOrder.joinf Declared in library mathcomp.classical.boolp, line 963, characters 11-16
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