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.

# Classical Logic This file provides the axioms of classical logic and tools to perform classical reasoning in the Mathematical Component framework. The three axioms are taken from the standard library of Coq, more details can be found in Section 5 of - R. Affeldt, C. Cohen, D. Rouhling. Formalization Techniques for Asymptotic Reasoning in Classical Analysis. JFR 2018 ## Axioms ``` functional_extensionality_dep == functional extensionality (on dependently typed functions), i.e., functions that are pointwise equal are equal propositional_extensionality == propositional extensionality, i.e., iff and equality are the same on Prop constructive_indefinite_description == existential in Prop (ex) implies existential in Type (sig) cid := constructive_indefinite_description (shortcut) ``` A number of properties are derived below from these axioms and are often more pratical to use than directly using the axioms. For instance propext, funext, the excluded middle (EM),... ## Boolean View of Prop ``` `[< P >] == boolean view of P : Prop, see all lemmas about asbool ``` ## Mathematical Components Structures - A decidable equality is defined for any type. It is thus possible to define an eqType structure for any type using the mixin `gen_eqMixin`. - This file adds the possibility to define a choiceType structure for any type thanks to an axiom `gen_choiceMixin` giving a choice mixin. - We chose to have generic mixins and no global instances of the eqType and choiceType structures to let the user choose which definition of equality to use and to avoid conflict with already declared instances. ``` {classic T} == Endow T : Type with a canonical eqType/choiceType. This is intended for local use. E.g., T : Type |- A : {fset {classic T}} Alternatively one may use elim/Pchoice: T => T in H *. to substitute T with T : choiceType once and for all. {eclassic T} == Endow T : eqType with a canonical choiceType. On the model of {classic _}. See also the lemmas Peq and eqPchoice. ``` Functions onto a porderType (resp. latticeType) are equipped with a porderType (resp. latticeType), so that the generic notation (_ <= _)%O (resp. `&`, `|`) from `order.v` can be used. ``` FunOrder.lef f g == pointwise large inequality between two functions FunOrder.ltf f g == pointwise strict inequality between two functions FunLattice.meetf f g == pointwise meet between two functions FunLattice.joinf f g == pointwise join between two functions ```

Unset SsrOldRewriteGoalsOrder.  
Set   Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.

Declare Scope box_scope.
Declare Scope quant_scope.

Axiom functional_extensionality_depUsed by
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.classical.classical_orders

Source code
:
       forall (ASource code : Type) (BSource code : A -> Type) (fSource code gSource code : forall xSource code : A, B x),
       (forall xSource code : A, f x = g x) -> f = g.
Axiom propositional_extensionalitySource code :
       forall PSource code QSource code : Prop, P <-> Q -> P = Q.

Axiom constructive_indefinite_descriptionSource code :
  forall (ASource code : Type) (PSource code : A -> Prop),
  (exists xSource code : A, P x) -> {xSource code : A | P x}.
Notation cidUsed by
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.cantor
  • mathcomp.analysis.kernel
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.classical_sets
  • mathcomp.classical.wochoice
  • mathcomp.classical.functions
  • mathcomp.classical.fsbigop
  • mathcomp.classical.contra
  • mathcomp.classical.cardinality
  • mathcomp.experimental_reals.discrete

Source code
:= constructive_indefinite_description.

Lemma cid2Used by
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.kernel
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.classical.functions
  • mathcomp.classical.contra

Source code
 (ASource code : Type) (PSource code QSource code : A -> Prop) :
  (exists2 xSource code : A, P x & Q x) -> {xSource code : A | P x & Q x}.
Proof.
move=> PQA; suff: {xSource code | P x /\ Q x} by move=> [a [*]]; exists a.
by apply: cid; case: PQA => x; exists x.
Qed.

Lemma existT_inj1Used by
  • mathcomp.analysis.homotopy_theory.wedge_sigT

Source code
 (TSource code : Type) (PSource code : T -> Type) (xSource code ySource code : T) (PxSource code : P x) (PySource code : P y) :
  existT P x Px = existT P y Py -> x = y.
Proof.
by case. Qed.

Lemma existT_inj2Used by
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.homotopy_theory.wedge_sigT

Source code
 (TSource code : eqType) (PSource code : T -> Type) (xSource code : T) (Px1Source code Px2Source code : P x) :
  existT P x Px1 = existT P x Px2 -> Px1 = Px2.
Proof.
apply: internal_Eqdep_dec.inj_pair2_eq_dec => y z.
by have [|/eqP] := eqVneq y z; [left|right].
Qed.

Lemma surjective_existTUsed by
  • mathcomp.analysis.homotopy_theory.wedge_sigT

Source code
 (TSource code : Type) (PSource code : T -> Type) (pSource code : {xSource code : T & P x}):
  existT [eta P] (projT1 p) (projT2 p) = p.
Proof.
by case: p. Qed.

Record mextensionalitySource code := {
  _ : forall (PSource code QSource code : Prop), (P <-> Q) -> (P = Q);
  _ : forall {TSource code USource code : Type} (fSource code gSource code : T -> U),
        (forall xSource code, f x = g x) -> f = g;
}.

Fact extensionalitySource code : mextensionality.
Proof.
split.
- exact: propositional_extensionality.
- by move=> T U f g; apply: functional_extensionality_dep.
Qed.

Lemma propextUsed by
  • mathcomp.analysis.esum
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.analysis.kernel
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.classical.classical_sets
  • mathcomp.classical.functions
  • mathcomp.classical.fsbigop
  • mathcomp.classical.contra
  • mathcomp.classical.cardinality

Source code
 (PSource code QSource code : Prop) : (P <-> Q) -> (P = Q).
Proof.
by have [propext _] := extensionality; apply: propext. Qed.

Ltac eqProp := apply: propext; split.

Lemma funextUsed by
  • mathcomp.analysis.esum
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.probability_theory.poisson_distribution
  • mathcomp.analysis.probability_theory.uniform_distribution
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.probability_theory.binomial_distribution
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.probability_theory.bernoulli_distribution
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.probability_measure
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.measure_theory.measurable_function
  • mathcomp.analysis.measure_theory.dirac_measure
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.kernel
  • mathcomp.analysis.pi_irrational
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.nat_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.homotopy_theory.continuous_path
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.giry
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_Rintegral
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.simple_functions
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp
  • mathcomp.analysis_stdlib.Rstruct_topology
  • mathcomp.classical.classical_sets
  • mathcomp.classical.wochoice
  • mathcomp.classical.set_interval
  • mathcomp.classical.functions
  • mathcomp.classical.contra
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter

Source code
{TSource code USource code : Type} (fSource code gSource code : T -> U) : (f =1 g) -> f = g.
Proof.
by case: extensionality=> _; apply. Qed.

Lemma propeqEUsed by
  • mathcomp.analysis.esum
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.analysis.landau
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.classical_sets
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter
  • mathcomp.reals_stdlib.Rstruct

Source code
 (PSource code QSource code : Prop) : (P = Q) = (P <-> Q).
Proof.
by apply: propext; split=> [->|/propext]. Qed.

Lemma propeqPUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.functions
  • mathcomp.classical.cardinality

Source code
 (PSource code QSource code : Prop) : (P = Q) <-> (P <-> Q).
Proof.
by rewrite propeqE. Qed.

Lemma funeqEUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.realfun
  • mathcomp.analysis.kernel
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.landau
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval
  • mathcomp.classical.functions
  • mathcomp.classical.filter

Source code
{TSource code USource code : Type} (fSource code gSource code : T -> U) : (f = g) = (f =1 g).
Proof.
by rewrite propeqE; split=> [->//|/funext]. Qed.

Lemma funeq2EUsed by
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.classical.functions

Source code
{TSource code USource code VSource code : Type} (fSource code gSource code : T -> U -> V) : (f = g) = (f =2 g).
Proof.
by rewrite propeqE; split=> [->//|?]; rewrite funeqE=> x; rewrite funeqE.
Qed.

Lemma funeq3EUsed by
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule

Source code
{TSource code USource code VSource code WSource code : Type} (fSource code gSource code : T -> U -> V -> W) :
  (f = g) = (forall xSource code ySource code zSource code, f x y z = g x y z).
Proof.
by rewrite propeqE; split=> [->//|?]; rewrite funeq2E=> x y; rewrite funeqE.
Qed.

Lemma funeqPUsed by
  • mathcomp.analysis.probability_theory.exponential_distribution
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.functions

Source code
{TSource code USource code : Type} (fSource code gSource code : T -> U) : (f = g) <-> (f =1 g).
Proof.
by rewrite funeqE. Qed.

Lemma funeq2PSource code {TSource code USource code VSource code : Type} (fSource code gSource code : T -> U -> V) : (f = g) <-> (f =2 g).
Proof.
by rewrite funeq2E. Qed.

Lemma funeq3PSource code {TSource code USource code VSource code WSource code : Type} (fSource code gSource code : T -> U -> V -> W) :
  (f = g) <-> (forall xSource code ySource code zSource code, f x y z = g x y z).
Proof.
by rewrite funeq3E. Qed.

Lemma predeqEUsed by
  • mathcomp.analysis.esum
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.measure_theory.dirac_measure
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.reals.real_interval
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval
  • mathcomp.classical.functions
  • mathcomp.classical.filter
  • mathcomp.experimental_reals.realsum

Source code
{TSource code} (PSource code QSource code : T -> Prop) : (P = Q) = (forall xSource code, P x <-> Q x).
Proof.
by rewrite propeqE; split=> [->//|?]; rewrite funeqE=> x; rewrite propeqE.
Qed.

Lemma predeq2EUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification

Source code
{TSource code USource code} (PSource code QSource code : T -> U -> Prop) :
   (P = Q) = (forall xSource code ySource code, P x y <-> Q x y).
Proof.
by rewrite propeqE; split=> [->//|?]; rewrite funeq2E=> ??; rewrite propeqE.
Qed.

Lemma predeq3EUsed by
  • mathcomp.analysis.normedtype_theory.matrix_normedtype

Source code
{TSource code USource code VSource code} (PSource code QSource code : T -> U -> V -> Prop) :
   (P = Q) = (forall xSource code ySource code zSource code, P x y z <-> Q x y z).
Proof.
by rewrite propeqE; split=> [->//|?]; rewrite funeq3E=> ???; rewrite propeqE.
Qed.

Lemma predeqPUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.numfun
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval
  • mathcomp.classical.functions
  • mathcomp.classical.fsbigop
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter

Source code
{TSource code} (ASource code BSource code : T -> Prop) : (A = B) <-> (forall xSource code, A x <-> B x).
Proof.
by rewrite predeqE. Qed.

Lemma predeq2PSource code {TSource code USource code} (PSource code QSource code : T -> U -> Prop) :
   (P = Q) <-> (forall xSource code ySource code, P x y <-> Q x y).
Proof.
by rewrite predeq2E. Qed.

Lemma predeq3PSource code {TSource code USource code VSource code} (PSource code QSource code : T -> U -> V -> Prop) :
   (P = Q) <-> (forall xSource code ySource code zSource code, P x y z <-> Q x y z).
Proof.
by rewrite predeq3E. Qed.

Lemma propTUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.classical.classical_sets
  • mathcomp.classical.functions

Source code
{PSource code : Prop} : P -> P = True.
Proof.
by move=> p; rewrite propeqE. Qed.

Lemma Prop_irrelevanceUsed by
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.analysis.kernel
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.homotopy_theory.continuous_path
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.classical.classical_sets
  • mathcomp.classical.functions

Source code
 (PSource code : Prop) (xSource code ySource code : P) : x = y.
Proof.
by move: x (x) y => /propT-> [] []. Qed.
#[global] Hint Resolve Prop_irrelevance : core.

Record mclassicSource code := {
  _ : forall (PSource code : Prop), {P} + {~P};
  _ : forall TSource code, hasChoice T
}.

Lemma choiceUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym

Source code
XSource code YSource code (PSource code : X -> Y -> Prop) :
  (forall xSource code, exists ySource code, P x y) -> {fSource code & forall xSource code, P x (f x)}.
Proof.

Theorem EMSource code PSource code : P \/ ~ P.
Proof.
pose U valSource code := fun QSource code : bool => Q = val \/ P.
have Uex val : exists bSource code, U val b by exists val; left.
pose f valSource code := projT1 (cid (Uex val)).
pose Uf valSource code : U val (f val) := projT2 (cid (Uex val)).
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 pselectUsed by
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.kernel
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.counting_lebesgue
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.classical.functions
  • mathcomp.classical.fsbigop
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter
  • mathcomp.experimental_reals.realsum

Source code
 (PSource code : Prop): {P} + {~P}.
Proof.
have : exists bSource code, if b then P else ~ P.
  by case: (EM P); [exists true|exists false].
by move=> /cid [[]]; [left|right].
Qed.

Lemma pselectTSource code TSource code : (T -> False) + T.
Proof.
have [/cid[]//|NT] := pselect (exists tSource code : T, True); first by right.
by left=> t; case: NT; exists t.
Qed.

Lemma classicSource code : mclassic.
Proof.
split=> [|T]; first exact: pselect.
exists (fun (PSource code : pred T) (nSource code : nat) =>
  if pselect (exists xSource code, P x) isn't left ex then None
  else Some (projT1 (cid ex)))
  => [P n x|P [x Px]|P Q /funext -> //].
  by case: pselect => // ex [<- ]; case: cid.
by exists 0; case: pselect => // -[]; exists x.
Qed.

Lemma gen_choiceMixinUsed by
  • mathcomp.analysis.measure_theory.probability_measure
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.homotopy_theory.continuous_path
  • mathcomp.analysis.lebesgue_integral_theory.giry
  • mathcomp.classical.filter

Source code
 (TSource code : Type) : hasChoice T.
Proof.
by case: classic. Qed.

Lemma lemUsed by
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.classical.classical_sets

Source code
 (PSource code : Prop): P \/ ~P.
Proof.
by case: (pselect P); tauto. Qed.

Lemma trueEUsed by
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.normedtype_theory.ereal_normedtype

Source code
: true = True :> Prop.
Proof.
by rewrite propeqE; split. Qed.

Lemma falseEUsed by
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.exp
  • mathcomp.classical.cardinality

Source code
: false = False :> Prop.
Proof.
by rewrite propeqE; split. Qed.

Lemma propFUsed by
  • mathcomp.classical.classical_sets

Source code
 (PSource code : Prop) : ~ P -> P = False.
Proof.
by move=> p; rewrite propeqE; tauto. Qed.

Lemma eq_funUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.esum
  • mathcomp.analysis.probability_theory.exponential_distribution
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.probability_theory.poisson_distribution
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.kernel
  • mathcomp.analysis.pi_irrational
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.giry
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_Rintegral
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter

Source code
TSource code rTSource code (USource code VSource code : T -> rT) :
  (forall xSource code : T, U x = V x) -> (fun xSource code => U x) = (fun xSource code => V x).
Proof.
by move=> /funext->. Qed.

Lemma eq2_funSource code T1Source code T2Source code rTSource code (USource code VSource code : T1 -> T2 -> rT) :
  (forall xSource code ySource code, U x y = V x y) -> (fun xSource code ySource code => U x y) = (fun xSource code ySource code => V x y).
Proof.
by move=> UV; rewrite funeq2E => x y; rewrite UV. Qed.

Lemma eq3_funSource code  T1Source code T2Source code T3Source code rTSource code (USource code VSource code : T1 -> T2 -> T3 -> rT) :
  (forall xSource code ySource code zSource code, U x y z = V x y z) ->
  (fun xSource code ySource code zSource code => U x y z) = (fun xSource code ySource code zSource code => V x y z).
Proof.
by move=> UV; rewrite funeq3E => x y z; rewrite UV. Qed.

Lemma eq_forallUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter

Source code
TSource code (USource code VSource code : T -> Prop) :
  (forall xSource code : T, U x = V x) -> (forall xSource code, U x) = (forall xSource code, V x).
Proof.
by move=> e; rewrite propeqE; split=> ??; rewrite (e,=^~e). Qed.

Lemma eq2_forallUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
TSource code SSource code (USource code VSource code : forall xSource code : T, S x -> Prop) :
  (forall xSource code ySource code, U x y = V x y) -> (forall xSource code ySource code, U x y) = (forall xSource code ySource code, V x y).
Proof.
by move=> UV; apply/eq_forall => x; exact/eq_forall. Qed.

Lemma eq3_forallSource code TSource code SSource code RSource code (USource code VSource code : forall (xSource code : T) (ySource code : S x), R x y -> Prop) :
  (forall xSource code ySource code zSource code, U x y z = V x y z) ->
  (forall xSource code ySource code zSource code, U x y z) = (forall xSource code ySource code zSource code, V x y z).
Proof.
by move=> UV; apply/eq2_forall => x y; exact/eq_forall. Qed.

Lemma eq_existsUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.reals_stdlib.Rstruct

Source code
TSource code (USource code VSource code : T -> Prop) :
  (forall xSource code : T, U x = V x) -> (exists xSource code, U x) = (exists xSource code, V x).
Proof.
by move=> e; rewrite propeqE; split=> - [] x ?; exists x; rewrite (e,=^~e).
Qed.

Lemma eq2_existsSource code TSource code SSource code (USource code VSource code : forall xSource code : T, S x -> Prop) :
  (forall xSource code ySource code, U x y = V x y) -> (exists xSource code ySource code, U x y) = (exists xSource code ySource code, V x y).
Proof.
by move=> UV; apply/eq_exists => x; exact/eq_exists. Qed.

Lemma eq3_existsSource code TSource code SSource code RSource code (USource code VSource code : forall (xSource code : T) (ySource code : S x), R x y -> Prop) :
  (forall xSource code ySource code zSource code, U x y z = V x y z) ->
  (exists xSource code ySource code zSource code, U x y z) = (exists xSource code ySource code zSource code, V x y z).
Proof.
by move=> UV; apply/eq2_exists => x y; exact/eq_exists. Qed.

Lemma eq_existUsed by
  • mathcomp.classical.classical_sets

Source code
TSource code (PSource code : T -> Prop) (sSource code tSource code : T) (pSource code : P s) (qSource code : P t) :
  s = t -> exist P s p = exist P t q.
Proof.
by move=> st; case: _ / st in q *; apply/congr1. Qed.

Lemma forall_swapUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
TSource code SSource code (USource code : forall (xSource code : T) (ySource code : S), Prop) :
   (forall xSource code ySource code, U x y) = (forall ySource code xSource code, U x y).
Proof.
by rewrite propeqE; split. Qed.

Lemma exists_swapSource code TSource code SSource code (USource code : forall (xSource code : T) (ySource code : S), Prop) :
   (exists xSource code ySource code, U x y) = (exists ySource code xSource code, U x y).
Proof.
by rewrite propeqE; split => -[x [y]]; exists y, x. Qed.

Lemma reflect_eqUsed by
  • mathcomp.classical.contra

Source code
 (PSource code : Prop) (bSource code : bool) : reflect P b -> P = b.
Proof.
by rewrite propeqE; exact: rwP. Qed.

Definition asbool

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 324, characters 11-17


Source code
 (PSource code : Prop) := if pselect P then true else false.

Notation "`[< P >]"Source code := (asbool P) : bool_scope.

Lemma asboolEUsed by
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.classical.classical_sets

Source code
 (PSource code : Prop) : `[<P>] = P :> Prop.
Proof.
by rewrite propeqE /asbool; case: pselect; split. Qed.

Lemma asboolPUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.landau
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.classical.wochoice
  • mathcomp.classical.contra
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter
  • mathcomp.experimental_reals.discrete
  • mathcomp.experimental_reals.distr
  • mathcomp.experimental_reals.realsum
  • mathcomp.experimental_reals.realseq

Source code
 (PSource code : Prop) : reflect P `[<P>].
Proof.
by apply: (equivP idP); rewrite asboolE. Qed.

Lemma asboolbUsed by
  • mathcomp.classical.classical_sets
  • mathcomp.experimental_reals.discrete

Source code
 (bSource code : bool) : `[< b >] = b.
Proof.
by apply/asboolP/idP. Qed.

Lemma asboolPnUsed by
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.sequences
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.experimental_reals.discrete
  • mathcomp.experimental_reals.distr
  • mathcomp.experimental_reals.realsum

Source code
 (PSource code : Prop) : reflect (~ P) (~~ `[<P>]).
Proof.
by rewrite /asbool; case: pselect=> h; constructor. Qed.

Lemma asboolWUsed by
  • mathcomp.experimental_reals.distr

Source code
 (PSource code : Prop) : `[<P>] -> P.
Proof.
by case: asboolP. Qed.

Lemma orWUsed by
  • mathcomp.analysis.sequences

Source code
ASource code BSource code : A \/ B -> A + B.
Proof.
have [|NA] := asboolP A; first by left.
have [|NB] := asboolP B; first by right.
by move=> AB; exfalso; case: AB.
Qed.

Lemma or3WSource code ASource code BSource code CSource code : [\/ A, B | C] -> A + B + C.
Proof.
have [|NA] := asboolP A; first by left; left.
have [|NB] := asboolP B; first by left; right.
have [|NC] := asboolP C; first by right.
by move=> ABC; exfalso; case: ABC.
Qed.

Lemma or4WSource code ASource code BSource code CSource code DSource code : [\/ A, B, C | D] -> A + B + C + D.
Proof.
have [|NA] := asboolP A; first by left; left; left.
have [|NB] := asboolP B; first by left; left; right.
have [|NC] := asboolP C; first by left; right.
have [|ND] := asboolP D; first by right.
by move=> ABCD; exfalso; case: ABCD.
Qed.

Lemma asboolTUsed by
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.landau
  • mathcomp.analysis.lebesgue_integral_theory.counting_lebesgue
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.reals.reals
  • mathcomp.experimental_reals.realsum

Source code
 (PSource code : Prop) : P -> `[<P>].
Proof.
by case: asboolP. Qed.

Lemma asboolFUsed by
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.lebesgue_integral_theory.counting_lebesgue
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (PSource code : Prop) : ~ P -> `[<P>] = false.
Proof.
by apply/introF/asboolP. Qed.

Lemma eq_opEUsed by
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval
  • mathcomp.classical.cardinality

Source code
 (TSource code : eqType) (xSource code ySource code : T) : (x == y : Prop) = (x = y).
Proof.
by apply/propext; split=> /eqP. Qed.

Lemma is_true_injUsed by
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.classical.set_interval
  • mathcomp.classical.cardinality

Source code
: injective is_true.
Proof.
by move=> [] []; rewrite ?(trueE, falseE) ?propeqE; tauto. Qed.

Definition gen_eq

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 380, characters 11-17


Source code
 (TSource code : Type) (uSource code vSource code : T) := `[<u = v>].
Lemma gen_eqPSource code (TSource code : Type) : Equality.axiom (@gen_eq T).
Proof.
by move=> x y; apply: (iffP (asboolP _)). Qed.
Definition gen_eqMixin

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 383, characters 11-22


Used by
  • mathcomp.analysis.measure_theory.probability_measure
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.homotopy_theory.continuous_path
  • mathcomp.analysis.lebesgue_integral_theory.giry
  • mathcomp.classical.filter

Source code
 (TSource code : Type) : hasDecEq T :=
  hasDecEq.Build T (@gen_eqP T).

HBSource code.instanceSource code DefinitionSource code _Source code (TSource code :Source code TypeSource code) (T'Source code :Source code TSource code -> eqType) :=
  gen_eqMixin (forall tSource code : T, T' t).

HBSource code.instanceSource code DefinitionSource code _Source code (TSource code :Source code TypeSource code) (T'Source code :Source code TSource code -> choiceType) :=
  gen_choiceMixin (forall tSource code : T, T' t).

HBSource code.instanceSource code DefinitionSource code _Source code :=Source code gen_eqMixinSource code Prop.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code gen_choiceMixinSource code Prop.

Section classicType.
Variable TSource code : Type.
Definition classicType

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 397, characters 11-22


Source code
:= T.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code gen_eqMixinSource code classicType.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code gen_choiceMixinSource code classicType.
End classicType.
Notation "'{classic' T }"Source code := (classicType T)
 (format "'{classic' T }") : type_scope.

Section eclassicType.
Variable TSource code : eqType.
Definition eclassicType

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 406, characters 11-23


Source code
: Type := T.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code EqualitySource code.copy eclassicType T.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code gen_choiceMixinSource code eclassicType.
End eclassicType.
Notation "'{eclassic' T }"Source code := (eclassicType T)
 (format "'{eclassic' T }") : type_scope.

Definition canonical_of

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 413, characters 11-23


Source code
TSource code USource code (sortSource code : U -> T) := forall (GSource code : T -> Type),
  (forall x'Source code, G (sort x')) -> forall xSource code, G x.
Notation canonical_Source code sort := (@canonical_of _ _ sort).
Notation canonicalSource code T E := (@canonical_of T E id).

Lemma canonSource code TSource code USource code (sortSource code : U -> T) :
  (forall xSource code, exists ySource code, sort y = x) -> canonical_ sort.
Proof.
by move=> + G Gs x => /(_ x)/cid[x' <-]. Qed.
Arguments canon {T U sort} x.

Lemma PeqUsed by
  • mathcomp.classical.classical_sets
  • mathcomp.classical.fsbigop

Source code
: canonical Type eqType.
Proof.
by apply: canon => T; exists {classic T}. Qed.
Lemma PchoiceUsed by
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.classical.cardinality

Source code
: canonical Type choiceType.
Proof.
by apply: canon => T; exists {classic T}. Qed.
Lemma eqPchoiceUsed by
  • mathcomp.classical.classical_sets
  • mathcomp.classical.cardinality

Source code
: canonical eqType choiceType.
Proof.
by apply: canon => T; exists {eclassic T}; case: T => //= T [?]//. Qed.

Lemma not_TrueUsed by
  • mathcomp.analysis.topology_theory.subspace_topology

Source code
: (~ True) = False
Proof.
exact/propext. Qed.
Lemma not_FalseUsed by
  • mathcomp.analysis.topology_theory.subspace_topology

Source code
: (~ False) = True
Proof.
by apply/propext; split=> _. Qed.

Lemma asbool_equiv_eqSource code {PSource code QSource code : Prop} : (P <-> Q) -> `[<P>] = `[<Q>].
Proof.
by rewrite -propeqE => ->. Qed.

Lemma asbool_equiv_eqPSource code {PSource code QSource code : Prop} bSource code : reflect Q b -> (P <-> Q) -> `[<P>] = b.
Proof.
by move=> Q_b [PQ QP]; apply/asboolP/Q_b. Qed.

Lemma asbool_equivUsed by
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable

Source code
{PSource code QSource code : Prop} : (P <-> Q) -> (`[<P>] <-> `[<Q>]).
Proof.
by move/asbool_equiv_eq->. Qed.

Lemma asbool_eq_equivUsed by
  • mathcomp.classical.classical_sets

Source code
{PSource code QSource code : Prop} : `[<P>] = `[<Q>] -> (P <-> Q).
Proof.
by move=> eq; split=> /asboolP; rewrite (eq, =^~ eq) => /asboolP. Qed.

Lemma and_asboolPUsed by
  • mathcomp.analysis.sequences

Source code
 (PSource code QSource code : Prop) : reflect (P /\ Q) (`[< P >] && `[< Q >]).
Proof.
apply: (iffP idP); first by case/andP => /asboolP p /asboolP q.
by case=> /asboolP-> /asboolP->.
Qed.

Lemma and3_asboolPSource code (PSource code QSource code RSource code : Prop) :
  reflect [/\ P, Q & R] [&& `[< P >], `[< Q >] & `[< R >]].
Proof.
apply: (iffP idP); first by case/and3P => /asboolP p /asboolP q /asboolP r.
by case => /asboolP -> /asboolP -> /asboolP ->.
Qed.

Lemma or_asboolPUsed by
  • mathcomp.experimental_reals.discrete

Source code
 (PSource code QSource code : Prop) : reflect (P \/ Q) (`[< P >] || `[< Q >]).
Proof.
apply: (iffP idP); first by case/orP=> /asboolP; [left | right].
by case=> /asboolP-> //=; rewrite orbT.
Qed.

Lemma or3_asboolPSource code (PSource code QSource code RSource code : Prop) :
  reflect [\/ P, Q | R] [|| `[< P >], `[< Q >] | `[< R >]].
Proof.
apply: (iffP idP); last by case=> [| |] /asboolP -> //=; rewrite !orbT.
by case/orP=> [/asboolP p|/orP[]/asboolP]; [exact:Or31|exact:Or32|exact:Or33].
Qed.

Lemma asbool_negUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.classical.classical_sets
  • mathcomp.classical.filter
  • mathcomp.experimental_reals.discrete

Source code
{PSource code : Prop} : `[<~ P>] = ~~ `[<P>].
Proof.
by apply/idP/asboolPn=> [/asboolP|/asboolT]. Qed.

Lemma asbool_orUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.classical.classical_sets

Source code
{PSource code QSource code : Prop} : `[<P \/ Q>] = `[<P>] || `[<Q>].
Proof.
exact: (asbool_equiv_eqP (or_asboolP _ _)). Qed.

Lemma asbool_andUsed by
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets

Source code
{PSource code QSource code : Prop} : `[<P /\ Q>] = `[<P>] && `[<Q>].
Proof.
exact: (asbool_equiv_eqP (and_asboolP _ _)). Qed.

Lemma imply_asboolPUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
{PSource code QSource code : Prop} : reflect (P -> Q) (`[<P>] ==> `[<Q>]).
Proof.
apply: (iffP implyP)=> [PQb /asboolP/PQb/asboolW //|].
by move=> PQ /asboolP/PQ/asboolT.
Qed.

Lemma asbool_implyUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
{PSource code QSource code : Prop} : `[<P -> Q>] = `[<P>] ==> `[<Q>].
Proof.

Lemma imply_asboolPnUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.compact

Source code
 (PSource code QSource code : Prop) : reflect (P /\ ~ Q) (~~ `[<P -> Q>]).
Proof.
apply: (iffP idP).
by rewrite asbool_imply negb_imply -asbool_neg => /and_asboolP.
by move/and_asboolP; rewrite asbool_neg -negb_imply asbool_imply.
Qed.

Lemma forall_asboolPSource code {TSource code : Type} (PSource code : T -> Prop) :
  reflect (forall xSource code, `[<P x>]) (`[<forall xSource code, P x>]).
Proof.
apply: (iffP idP); first by move/asboolP=> Px x; apply/asboolP.
by move=> Px; apply/asboolP=> x; apply/asboolP.
Qed.

Lemma exists_asboolPUsed by
  • mathcomp.experimental_reals.discrete
  • mathcomp.experimental_reals.realsum
  • mathcomp.experimental_reals.realseq

Source code
{TSource code : Type} (PSource code : T -> Prop) :
  reflect (exists xSource code, `[<P x>]) (`[<exists xSource code, P x>]).
Proof.
apply: (iffP idP); first by case/asboolP=> x Px; exists x; apply/asboolP.
by case=> x bPx; apply/asboolP; exists x; apply/asboolP.
Qed.


Variant BoolPropSource code : Prop -> Type :=
 | TruePropSource code : BoolProp True
 | FalsePropSource code : BoolProp False.

Lemma PropBSource code PSource code : BoolProp P.
Proof.
by case: (asboolP P) => [/propT-> | /propF->]; [left | right]. Qed.

Lemma notBUsed by
  • mathcomp.classical.contra

Source code
: ((~ True) = False) * ((~ False) = True).
Proof.
by rewrite /not; split; eqProp. Qed.

Lemma andBUsed by
  • mathcomp.classical.contra

Source code
: left_id True and * right_id True and
          * (left_zero False and * right_zero False and * idempotent_op and).
Proof.
by do ![split] => /PropB[]; eqProp=> // -[]. Qed.

Lemma orBUsed by
  • mathcomp.classical.contra

Source code
: left_id False or * right_id False or
          * (left_zero True or * right_zero True or * idempotent_op or).
Proof.
do ![split] => /PropB[]; eqProp=> -[] //; by [left | right]. Qed.

Lemma implyBSource code : let implySource code (PSource code QSource code : Prop) :=  P -> Q in
    (imply False =1 fun=> True) * (imply^~ False =1 not)
  * (left_id True imply * right_zero True imply * self_inverse True imply).
Proof.
by do ![split] => /PropB[]; eqProp=> //; apply. Qed.

Lemma decide_orUsed by
  • mathcomp.classical.contra

Source code
PSource code QSource code : P \/ Q -> {P} + {Q}.
Proof.
by case/PropB: P; [left | rewrite orB; right]. Qed.


Lemma notTSource code (PSource code : Prop) : P = False -> ~ P.
Proof.
by move->. Qed.

Lemma contrapTUsed by
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.classical.functions
  • mathcomp.classical.filter
  • mathcomp.reals_stdlib.Rstruct

Source code
PSource code : ~ ~ P -> P.
Proof.
by case: (PropB P) => //; rewrite not_False. Qed.

Lemma notTESource code (PSource code : Prop) : (~ P) -> P = False
Proof.
by case: (PropB P). Qed.

Lemma notFESource code (PSource code : Prop) : (~ P) = False -> P.
Proof.
by move/notT; exact: contrapT. Qed.

Lemma notKUsed by
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.classical.fsbigop
  • mathcomp.classical.contra
  • mathcomp.classical.cardinality

Source code
: involutive not.
Proof.
by case/PropB; rewrite !(not_False,not_True). Qed.

Lemma contra_notPUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.classical.classical_sets
  • mathcomp.classical.fsbigop
  • mathcomp.classical.cardinality
  • mathcomp.classical.filter
  • mathcomp.experimental_reals.discrete

Source code
 (QSource code PSource code : Prop) : (~ Q -> P) -> ~ P -> Q.
Proof.
by move: Q P => /PropB[] /PropB[]. Qed.

Lemma contraPPUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval
  • mathcomp.classical.fsbigop
  • mathcomp.classical.cardinality
  • mathcomp.experimental_reals.realsum

Source code
 (QSource code PSource code : Prop) : (~ Q -> ~ P) -> P -> Q.
Proof.
by move: Q P => /PropB[] /PropB[]//; rewrite not_False not_True. Qed.

Lemma contra_notTUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.classical.fsbigop
  • mathcomp.classical.cardinality

Source code
bSource code (PSource code : Prop) : (~~ b -> P) -> ~ P -> b.
Proof.
by move=> bP; apply: contra_notP => /negP. Qed.

Lemma contraPTSource code (PSource code : Prop) bSource code : (~~ b -> ~ P) -> P -> b.
Proof.
by move=> /contra_notT; rewrite notK. Qed.

Lemma contraTPUsed by
  • mathcomp.analysis.ereal
  • mathcomp.classical.fsbigop

Source code
bSource code (QSource code : Prop) : (~ Q -> ~~ b) -> b -> Q.
Proof.
by move=> QB; apply: contraPP => /QB/negP. Qed.

Lemma contraNPUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.sequences

Source code
 (PSource code : Prop) (bSource code : bool) : (~ P -> b) -> ~~ b -> P.
Proof.
by move=> /contra_notP + /negP => /[apply]. Qed.

Lemma contra_neqPUsed by
  • mathcomp.analysis.esum
  • mathcomp.classical.fsbigop
  • mathcomp.classical.filter
  • mathcomp.classical.classical_orders

Source code
 (TSource code : eqType) (xSource code ySource code : T) PSource code : (~ P -> x = y) -> x != y -> P.
Proof.
by move=> Pxy; apply: contraNP => /Pxy/eqP. Qed.

Lemma contra_eqPSource code (TSource code : eqType) (xSource code ySource code : T) QSource code : (~ Q -> x != y) -> x = y -> Q.
Proof.
by move=> Qxy /eqP; apply: contraTP. Qed.

Lemma contra_lePUsed by
  • mathcomp.analysis.topology_theory.edist

Source code
{disp1Source code} {T1Source code : porderType disp1} [PSource code : Prop] [xSource code ySource code : T1] :
  (~ P -> (x < y)%O) -> (y <= x)%O -> P.
Proof.
move=> Pxy yx; apply/asboolP.
by apply: Order.POrderTheory.contra_leT yx => /asboolPn.
Qed.

Lemma contra_ltPSource code {disp1Source code} {T1Source code : porderType disp1} [PSource code : Prop] [xSource code ySource code : T1] :
  (~ P -> (x <= y)%O) -> (y < x)%O -> P.
Proof.
move=> Pxy yx; apply/asboolP.
by apply: Order.POrderTheory.contra_ltT yx => /asboolPn.
Qed.

Lemma wlog_negSource code PSource code : (~ P -> P) -> P.
Proof.
by case: (PropB P); exact. Qed.

Lemma not_injSource code : injective not
Proof.
exact: can_inj notK. Qed.

Lemma notLRUsed by
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.classical.classical_sets

Source code
PSource code QSource code : (P = (~ Q)) -> (~ P) = Q
Proof.
exact: canLR notK. Qed.

Lemma notRLUsed by
  • mathcomp.analysis.topology_theory.connected

Source code
PSource code QSource code : (~ P) = Q -> P = (~ Q)
Proof.
exact: canRL notK. Qed.

Lemma iff_notrSource code (PSource code QSource code : Prop) : (P <-> ~ Q) <-> (~ P <-> Q).
Proof.
by split=> [/propext ->|/propext <-]; rewrite notK. Qed.

Lemma iff_not2Used by
  • mathcomp.analysis.topology_theory.edist

Source code
 (PSource code QSource code : Prop) : (~ P <-> ~ Q) <-> (P <-> Q).
Proof.
by split=> [/iff_notr|PQ]; [|apply/iff_notr]; rewrite notK. Qed.


Definition predp

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 611, characters 11-16


Source code
TSource code := T -> Prop.

Identity Coercion fun_of_pred : predp >-> Funclass.

Definition relp

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 615, characters 11-15


Source code
TSource code := T -> predp T.

Identity Coercion fun_of_rel : rel >-> Funclass.

Notation xpredp0Source code := (fun _ => False).
Notation xpredpTSource code := (fun _ => True).
Notation xpredpISource code := (fun (p1Source code p2Source code : predp _) xSource code => p1 x /\ p2 x).
Notation xpredpUSource code := (fun (p1Source code p2Source code : predp _) xSource code => p1 x \/ p2 x).
Notation xpredpCSource code := (fun (pSource code : predp _) xSource code => ~ p x).
Notation xpredpDSource code := (fun (p1Source code p2Source code : predp _) xSource code => ~ p2 x /\ p1 x).
Notation xpreimpSource code := (fun fSource code (pSource code : predp _) xSource code => p (f x)).
Notation xrelpUSource code := (fun (r1Source code r2Source code : relp _) xSource code ySource code => r1 x y \/ r2 x y).

Definition pred0p

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 628, characters 11-17


Source code
 (TSource code : Type) (PSource code : predp T) : bool := `[<P =1 xpredp0>].
Prenex Implicits pred0p.

Lemma pred0pPSource code  (TSource code : Type) (PSource code : predp T) : reflect (P =1 xpredp0) (pred0p P).
Proof.
by apply: (iffP (asboolP _)). Qed.

Lemma forallp_asboolPnUsed by
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.classical.classical_sets
  • mathcomp.classical.filter

Source code
{TSource code} {PSource code : T -> Prop} :
  reflect (forall xSource code : T, ~ P x) (~~ `[<exists xSource code : T, P x>]).
Proof.
apply: (iffP idP)=> [/asboolPn NP x Px|NP].
by apply/NP; exists x. by apply/asboolP=> -[x]; apply/NP.
Qed.

Lemma existsp_asboolPnUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.experimental_reals.realsum

Source code
{TSource code} {PSource code : T -> Prop} :
  reflect (exists xSource code : T, ~ P x) (~~ `[<forall xSource code : T, P x>]).
Proof.
apply: (iffP idP); last by case=> x NPx; apply/asboolPn=> /(_ x).
move/asboolPn=> NP; apply/asboolP/negbNE/asboolPn=> h.
by apply/NP=> x; apply/asboolP/negbNE/asboolPn=> NPx; apply/h; exists x.
Qed.

Lemma asbool_forallNbSource code {TSource code : Type} (PSource code : pred T) :
  `[< forall xSource code : T, ~~ (P x) >] = ~~ `[< exists xSource code : T, P x >].
Proof.
apply: (asbool_equiv_eqP forallp_asboolPn);
  by split=> h x; apply/negP/h.
Qed.

Lemma asbool_existsNbSource code {TSource code : Type} (PSource code : pred T) :
  `[< exists xSource code : T, ~~ (P x) >] = ~~ `[< forall xSource code : T, P x >].
Proof.
apply: (asbool_equiv_eqP existsp_asboolPn);
  by split=> -[x h]; exists x; apply/negP.
Qed.

Lemma not_implyPUsed by
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.reals.reals
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval

Source code
 (PSource code QSource code : Prop) : ~ (P -> Q) <-> P /\ ~ Q.
Proof.
split=> [/asboolP|[p nq pq]]; [|exact/nq/pq].
by rewrite asbool_neg => /imply_asboolPn.
Qed.

Lemma not_andEUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.classical.classical_sets

Source code
 (PSource code QSource code : Prop) : (~ (P /\ Q)) = (~ P \/ ~ Q).
Proof.
eqProp=> [/asboolPn|[|]]; try by apply: contra_not => -[].
by rewrite asbool_and negb_and => /orP[]/asboolPn; [left|right].
Qed.

Lemma not_andPUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.cantor
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.borel_hierarchy
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.classical.classical_sets
  • mathcomp.classical.fsbigop
  • mathcomp.classical.classical_orders

Source code
 (PSource code QSource code : Prop) : ~ (P /\ Q) <-> ~ P \/ ~ Q.
Proof.
by rewrite not_andE. Qed.

Lemma not_and3PUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
 (PSource code QSource code RSource code : Prop) : ~ [/\ P, Q & R] <-> [\/ ~ P, ~ Q | ~ R].
Proof.
split=> [/and3_asboolP|/or3_asboolP].
by rewrite 2!negb_and -3!asbool_neg => /or3_asboolP.
by rewrite 3!asbool_neg -2!negb_and => /and3_asboolP.
Qed.

Lemma not_notPUsed by
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (PSource code : Prop) : ~ ~ P <-> P.
Proof.
by split => [|p]; [exact: contrapT|exact]. Qed.
#[deprecated(since="mathcomp-analysis 1.15.0", note="Renamed to `not_notP`. Warning: a different `notP` is provided by `contra.v`.")]
Notation notPSource code := not_notP (only parsing).

Lemma not_notEUsed by
  • mathcomp.analysis.topology_theory.edist

Source code
 (PSource code : Prop) : (~ ~ P) = P.
Proof.
by rewrite propeqE not_notP. Qed.
#[deprecated(since="mathcomp-analysis 1.15.0", note="Renamed to `not_notE`. Warning: a different `notE` is provided by `contra.v`.")]
Notation notEUsed by
  • mathcomp.classical.classical_sets

Source code
:= not_notE (only parsing).

Lemma not_orEUsed by
  • mathcomp.classical.contra

Source code
 (PSource code QSource code : Prop) : (~ (P \/ Q)) = (~ P /\ ~ Q).
Proof.
by rewrite -[_ /\ _]not_notE not_andE 2!not_notE. Qed.

Lemma not_orPUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measurable_structure
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.derive
  • mathcomp.classical.cardinality

Source code
 (PSource code QSource code : Prop) : ~ (P \/ Q) <-> ~ P /\ ~ Q.
Proof.
by rewrite not_orE. Qed.

Lemma not_implyEUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.topology_structure

Source code
 (PSource code QSource code : Prop) : (~ (P -> Q)) = (P /\ ~ Q).
Proof.
by rewrite propeqE not_implyP. Qed.

Lemma implyEUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist

Source code
 (PSource code QSource code : Prop) : (P -> Q) = (~ P \/ Q).
Proof.

Lemma orCUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.reals.reals

Source code
: commutative or.
Proof.
by move=> /PropB[] /PropB[] => //; rewrite !orB. Qed.

Lemma orAUsed by
  • mathcomp.classical.classical_sets

Source code
: associative or.
Proof.
by move=> P Q R; rewrite propeqE; split=> [|]; tauto. Qed.

Lemma orCASource code : left_commutative or.
Proof.
by move=> P Q R; rewrite !orA (orC P). Qed.

Lemma orACSource code : right_commutative or.
Proof.
by move=> P Q R; rewrite -!orA (orC Q). Qed.

Lemma orACASource code : interchange or or.
Proof.
by move=> P Q R S; rewrite !orA (orAC P). Qed.

Lemma orNpUsed by
  • mathcomp.classical.contra

Source code
PSource code QSource code : (~ P \/ Q) = (P -> Q).
Proof.
by case/PropB: P; rewrite notB orB implyB. Qed.

Lemma orpNSource code PSource code QSource code : (P \/ ~ Q) = (Q -> P)
Proof.
by rewrite orC orNp. Qed.

Lemma or3EUsed by
  • mathcomp.classical.contra

Source code
PSource code QSource code RSource code : [\/ P, Q | R] = (P \/ Q \/ R).
Proof.
rewrite -(asboolE P) -(asboolE Q) -(asboolE R) (reflect_eq or3P).
by rewrite -2!(reflect_eq orP).
Qed.

Lemma or4EUsed by
  • mathcomp.classical.classical_sets
  • mathcomp.classical.contra

Source code
PSource code QSource code RSource code SSource code : [\/ P, Q, R | S] = (P \/ Q \/ R \/ S).
Proof.
rewrite -(asboolE P) -(asboolE Q) -(asboolE R) -(asboolE S) (reflect_eq or4P).
by rewrite -3!(reflect_eq orP).
Qed.

Lemma andCUsed by
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.classical.classical_sets

Source code
: commutative and.
Proof.
by move=> /PropB[] /PropB[]; rewrite !andB. Qed.

Lemma andAUsed by
  • mathcomp.analysis.esum

Source code
: associative and.
Proof.
by move=> P Q R; rewrite propeqE; split=> [|]; tauto. Qed.

Lemma andCASource code : left_commutative and.
Proof.
by move=> P Q R; rewrite !andA (andC P). Qed.

Lemma andACSource code : right_commutative and.
Proof.
by move=> P Q R; rewrite -!andA (andC Q). Qed.

Lemma andACASource code : interchange and and.
Proof.
by move=> P Q R S; rewrite !andA (andAC P). Qed.

Lemma and3EUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.classical.contra

Source code
PSource code QSource code RSource code : [/\ P, Q & R] = (P /\ Q /\ R).
Proof.
by eqProp=> [[] | [? []]]. Qed.

Lemma and4EUsed by
  • mathcomp.classical.contra

Source code
PSource code QSource code RSource code SSource code : [/\ P, Q, R & S] = (P /\ Q /\ R /\ S).
Proof.
by eqProp=> [[] | [? [? []]]]. Qed.

Lemma and5EUsed by
  • mathcomp.classical.contra

Source code
PSource code QSource code RSource code SSource code TSource code : [/\ P, Q, R, S & T] = (P /\ Q /\ R /\ S /\ T).
Proof.
by eqProp=> [[] | [? [? [? []]]]]. Qed.

Lemma implyNpUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.classical.contra

Source code
PSource code QSource code : (~ P -> Q : Prop) = (P \/ Q).
Proof.
by rewrite -orNp notK. Qed.

Lemma implypNUsed by
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.classical.contra

Source code
 (PSource code QSource code : Prop) : (P -> ~ Q) = (~ (P /\ Q)).
Proof.
by case/PropB: P; rewrite implyB andB ?notB. Qed.

Lemma implyNNUsed by
  • mathcomp.classical.contra

Source code
PSource code QSource code : (~ P -> ~ Q) = (Q -> P).
Proof.
by rewrite implyNp orpN. Qed.

Lemma or_andrSource code : right_distributive or and.
Proof.
by case/PropB=> Q R; rewrite !orB ?andB. Qed.

Lemma or_andlSource code : left_distributive or and.
Proof.
by move=> P Q R; rewrite -!(orC R) or_andr. Qed.

Lemma and_orrSource code : right_distributive and or.
Proof.
by move=> P Q R; apply/not_inj; rewrite !(not_andE, not_orE) or_andr. Qed.

Lemma and_orlSource code : left_distributive and or.
Proof.
by move=> P Q R; apply/not_inj; rewrite !(not_andE, not_orE) or_andl. Qed.

Lemma forallNEUsed by
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
{TSource code} (PSource code : T -> Prop) : (forall xSource code, ~ P x) = (~ exists xSource code, P x).
Proof.
by rewrite propeqE; split => [fP [x /fP]//|nexP x Px]; apply: nexP; exists x.
Qed.

Lemma existsNEUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
{TSource code} (PSource code : T -> Prop) : (exists xSource code, ~ P x) = (~ forall xSource code, P x).
Proof.
rewrite propeqE; split=> [[x Px] aP //|NaP].
by apply: contrapT; rewrite -forallNE => aP; apply: NaP => x; apply: contrapT.
Qed.

Lemma existsNPUsed by
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval

Source code
TSource code (PSource code : T -> Prop) : (exists xSource code, ~ P x) <-> ~ forall xSource code, P x.
Proof.
by rewrite existsNE. Qed.

Lemma not_existsPUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.showcase.pnt
  • mathcomp.analysis.sequences

Source code
TSource code (PSource code : T -> Prop) : (exists xSource code, P x) <-> ~ forall xSource code, ~ P x.
Proof.
by rewrite forallNE notK. Qed.

Lemma forallNPUsed by
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.kernel
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.connected
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.classical.classical_sets
  • mathcomp.classical.set_interval

Source code
TSource code (PSource code : T -> Prop) : (forall xSource code, ~ P x) <-> ~ exists xSource code, P x.
Proof.
by rewrite forallNE. Qed.

Lemma not_forallPUsed by
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.reals.reals

Source code
TSource code (PSource code : T -> Prop) : (forall xSource code, P x) <-> ~ exists xSource code, ~ P x.
Proof.
by rewrite existsNE notK. Qed.

Lemma exists2EUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.classical.contra

Source code
ASource code PSource code QSource code : (exists2 xSource code : A, P x & Q x) = (exists xSource code, P x /\ Q x).
Proof.
by eqProp=> -[x]; last case; exists x. Qed.

Lemma exists2PUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis_stdlib.showcase.uniform_bigO

Source code
TSource code (PSource code QSource code : T -> Prop) :
  (exists2 xSource code, P x & Q x) <-> exists xSource code, P x /\ Q x.
Proof.
by rewrite exists2E. Qed.

Lemma not_exists2PUsed by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.sequences
  • mathcomp.reals.reals
  • mathcomp.classical.functions

Source code
TSource code (PSource code QSource code : T -> Prop) :
  (exists2 xSource code, P x & Q x) <-> ~ forall xSource code, ~ P x \/ ~ Q x.
Proof.
rewrite exists2P not_existsP.
by split; apply: contra_not => PQx x;  apply/not_andP; apply: PQx.
Qed.

Lemma forall2NPUsed by
  • mathcomp.analysis.esum
  • mathcomp.analysis.ereal
  • mathcomp.analysis.borel_hierarchy
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.vitali_lemma
  • mathcomp.classical.fsbigop
  • mathcomp.classical.classical_orders
  • mathcomp.experimental_reals.discrete

Source code
TSource code (PSource code QSource code : T -> Prop) :
  (forall xSource code, ~ P x \/ ~ Q x) <-> ~ (exists2 xSource code, P x & Q x).
Proof.
split=> [PQ [t Pt Qt]|PQ t]; first by have [] := PQ t.
by rewrite -not_andP => -[Pt Qt]; apply PQ; exists t.
Qed.

Lemma forallPNPUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.num_topology

Source code
TSource code (PSource code QSource code : T -> Prop) :
  (forall xSource code, P x -> ~ Q x) <-> ~ (exists2 xSource code, P x & Q x).
Proof.
split=> [PQ [t Pt Qt]|PQ t]; first by have [] := PQ t.
by move=> Pt Qt; apply: PQ; exists t.
Qed.

Lemma existsPNPUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.classical.fsbigop

Source code
TSource code (PSource code QSource code : T -> Prop) :
  (exists2 xSource code, P x & ~ Q x) <-> ~ (forall xSource code, P x -> Q x).
Proof.
split=> [[x Px NQx] /(_ x Px)//|]; apply: contra_notP => + x Px.
by apply: contra_notP => NQx; exists x.
Qed.

Lemma forallp_asboolPn2Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
{TSource code} {PSource code QSource code : T -> Prop} :
  reflect (forall xSource code : T, ~ P x \/ ~ Q x) (~~ `[<exists2 xSource code : T, P x & Q x>]).
Proof.
apply: (iffP idP)=> [/asboolPn NP x|NP].
  by move/forallPNP : NP => /(_ x)/and_rec/not_andP.
by apply/asboolP=> -[x Px Qx]; have /not_andP := NP x; exact.
Qed.

Section bigmaxmin.
Local Notation maxSource code := Order.max.
Local Notation minSource code := Order.min.
Local Open Scope order_scope.
Context {dSource code} {TSource code : orderType d} (xSource code : T)
  {ISource code : finType} (PSource code : pred I) (mSource code : T) (FSource code : I -> T).

Import Order.TTheory.

Lemma bigmax_gePUsed by
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.normedtype_theory.matrix_normedtype

Source code
: reflect (m <= x \/ exists2 iSource code, P i & m <= F i)
                           (m <= \big[max/x]_(iSource code | P i) F i).
Proof.
apply: (iffP idP) => [|[mx|[i Pi mFi]]].
- 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 bigmax_gtPSource code : reflect (m < x \/ exists2 iSource code, P i & m < F i)
                           (m < \big[max/x]_(iSource code | P i) F i).
Proof.
apply: (iffP idP) => [|[mx|[i Pi mFi]]].
- 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 bigmin_lePUsed by
  • mathcomp.analysis.real_measure.lebesgue_measure

Source code
: reflect (x <= m \/ exists2 iSource code, P i & F i <= m)
                           (\big[min/x]_(iSource code | P i) F i <= m).
Proof.
apply: (iffP idP) => [|[xm|[i Pi Fim]]].
- 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 bigmin_ltPSource code : reflect (x < m \/ exists2 iSource code, P i & F i < m)
                           (\big[min/x]_(iSource code | P i) F i < m).
Proof.
apply: (iffP idP) => [|[xm|[i Pi Fim]]].
- 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 FunOrderSource code.
Section FunOrder.
Import Order.TTheory.
Context {aTSource code : Type} {dSource code} {TSource code : porderType d}.
Implicit Types f g h : aT -> T.

Lemma fun_displaySource code : Order.disp_t
Proof.
exact: Order.default_display. Qed.

Definition lef

FunOrder.lef : forall {aT : Type} {d : Order.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 909, characters 11-14


Source code
fSource code gSource code := `[< forall xSource code, (f x <= g x)%O >].
Local Notation "f <= g"Source code := (lef f g).

Definition ltf

FunOrder.ltf : forall {aT : Type} {d : Order.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 912, characters 11-14


Source code
fSource code gSource code := `[< (forall xSource code, (f x <= g x)%O) /\ exists xSource code, f x != g x >].
Local Notation "f < g"Source code := (ltf f g).

Lemma ltf_defSource code fSource code gSource code : (f < g) = (g != f) && (f <= g).
Proof.
apply/idP/andP => [fg|[gf fg]]; [split|apply/asboolP; split; [exact/asboolP|]].
- 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 lef_reflSource code : reflexive lef
Proof.
by move=> f; apply/asboolP => x. Qed.

Fact lef_antiSource code : antisymmetric lef.
Proof.
move=> f g => /andP[/asboolP fg /asboolP gf]; rewrite funeqE => x.
by apply/eqP; rewrite eq_le fg gf.
Qed.

Fact lef_transSource code : transitive lef.
Proof.
move=> g f h /asboolP fg /asboolP gh; apply/asboolP => x.
by rewrite (le_trans (fg x)).
Qed.

#[export]Source code
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code @OrderSource code.isPOrder.Build
  fun_display (aT -> T) lef ltf ltf_def lef_refl lef_anti lef_trans.

End FunOrder.

Section FunLattice.
Import Order.TTheory.
Context {aTSource code : Type} {dSource code} {TSource code : latticeType d}.
Implicit Types f g h : aT -> T.

Definition meetf

FunOrder.meetf : forall {aT : Type} {d : Order.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 951, characters 11-16


Source code
fSource code gSource code := fun xSource code => Order.meet (f x) (g x).
Definition joinf

FunOrder.joinf : forall {aT : Type} {d : Order.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 952, characters 11-16


Source code
fSource code gSource code := fun xSource code => Order.join (f x) (g x).

Lemma meetfCSource code : commutative meetf.
Proof.
move=> f g; apply/funext => x; exact: meetC. Qed.

Lemma joinfCSource code : commutative joinf.
Proof.
move=> f g; apply/funext => x; exact: joinC. Qed.

Lemma meetfASource code : associative meetf.
Proof.
move=> f g h; apply/funext => x; exact: meetA. Qed.

Lemma joinfASource code : associative joinf.
Proof.
move=> f g h; apply/funext => x; exact: joinA. Qed.

Lemma joinfKISource code gSource code fSource code : meetf f (joinf f g) = f.
Proof.
apply/funext => x; exact: joinKI. Qed.

Lemma meetfKUSource code gSource code fSource code : joinf f (meetf f g) = f.
Proof.
apply/funext => x; exact: meetKU. Qed.

Lemma lef_meetSource code fSource code gSource code : (f <= g)%O = (meetf f g == f).
Proof.
apply/idP/idP => [/asboolP f_le_g|/eqP <-].
- apply/eqP/funext => x; exact/meet_l/f_le_g.
- apply/asboolP => x; exact: leIr.
Qed.

#[export]Source code
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code OrderSource code.POrder_isLattice.Build _ (aT -> T)
  meetfC joinfC meetfA joinfA joinfKI meetfKU lef_meet.

End FunLattice.
Module ExportsSource code.
HB.reexport.
End Exports.
End FunOrder.
Export FunOrder.Exports.

Lemma lefPUsed by
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.probability_theory.uniform_distribution
  • mathcomp.analysis.kernel
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.giry
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_Rintegral
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.lebesgue_integral_theory.counting_lebesgue
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation

Source code
 (aTSource code : Type) dSource code (TSource code : porderType d) (fSource code gSource code : aT -> T) :
  reflect (forall xSource code, (f x <= g x)%O) (f <= g)%O.
Proof.
by apply: (iffP idP) => [fg|fg]; [exact/asboolP | exact/asboolP]. Qed.

Lemma meetfESource code (aTSource code : Type) dSource code (TSource code : latticeType d) (fSource code gSource code : aT -> T) xSource code :
  ((f `&` g) x = f x `&` g x)%O.
Proof.
by []. Qed.

Lemma joinfESource code (aTSource code : Type) dSource code (TSource code : latticeType d) (fSource code gSource code : aT -> T) xSource code :
  ((f `|` g) x = f x `|` g x)%O.
Proof.
by []. Qed.

Lemma iterfSUsed by
  • mathcomp.classical.functions

Source code
{TSource code} (fSource code : T -> T) nSource code : iter n.+1 f = f \o iter n f.
Proof.
by []. Qed.

Lemma iterfSrUsed by
  • mathcomp.classical.functions

Source code
{TSource code} (fSource code : T -> T) nSource code : iter n.+1 f = iter n f \o f.
Proof.
by apply/funeqP => ?; rewrite iterSr. Qed.

Lemma iter0Source code {TSource code} (fSource code : T -> T) : iter 0 f = id.
Proof.
by []. Qed.

Section Inhabited.
Context (TSource code : Type).

Lemma inhabitedEUsed by
  • mathcomp.classical.contra

Source code
: inhabited T = exists xSource code : T, True.
Proof.
by eqProp; case. Qed.

Lemma inhabited_witnessUsed by
  • mathcomp.classical.contra

Source code
: inhabited T -> T.
Proof.
by rewrite inhabitedE => /cid[]. Qed.

End Inhabited.

Lemma uncurryKUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.homotopy_theory.wedge_sigT

Source code
{XSource code YSource code ZSource code : Type} : cancel (@uncurry X Y Z) curry.
Proof.
by move=> f; rewrite funeq2E. Qed.

Lemma curryKSource code {XSource code YSource code ZSource code : Type} : cancel curry (@uncurry X Y Z).
Proof.
by move=> f; rewrite funeqE=> -[]. Qed.