Module mathcomp.reals.reals
From HB Require Import structures.From mathcomp Require Import boot order algebra.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import boolp classical_sets contra set_interval.
Declare Scope real_scope.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Theory.
Delimit Scope real_scope with real.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
Section subr_image.
Variable : numDomainType.
Implicit Types (E : set R) (x : R).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End subr_image.
Section has_bound_lemmas.
Variable : realDomainType.
Implicit Types E : set R.
Implicit Types x : R.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
~ has_sup E <-> (forall , exists2 , E y & x < y).
Proof.
End has_bound_lemmas.
.
Source code
Source code
Source code
Source code
sup_upper_bound_subdef : forall : set R,
has_sup E -> ubound E (supremum 0 E) ;
sup_adherent_subdef : forall ( : set R) (
Source code
0 < eps -> has_sup E -> exists2 : R, E e & (supremum 0 E - eps) < e
}.
Source code
Source code
.
Source code
Source code
Source code
& Num.ArchiRealField R & Num.RealClosedField R}.
Bind Scope ring_scope with Real.sort.
Definition
Internals.sigT2_wType : forall [A : Type] [P Q : A -> Prop], (forall x : A, Internals.witnessedType (P x)) -> (forall x : A, Internals.witnessedType (Q x)) -> Internals.properWitnessedType (exists2 x : A, P x & Q x) Internals.sigT2_wType is not universe polymorphic Arguments Internals.sigT2_wType [A]%_type_scope [P Q]%_function_scope (S T)%_function_scope Internals.sigT2_wType is transparent Expands to: Constant mathcomp.classical.contra.Internals.sigT2_wType Declared in library mathcomp.classical.contra, line 629, characters 10-21
Source code
Definition
Internals.witness : forall {T : Type} {P0 : Prop} {P : Internals.witnessProp false P0 T}, Internals.move_view (Internals.unwrap_Prop (Internals.witness_Prop P)) T Internals.witness is not universe polymorphic Arguments Internals.witness {T P0}%_type_scope {P} Internals.witness is transparent Expands to: Constant mathcomp.classical.contra.Internals.witness Declared in library mathcomp.classical.contra, line 691, characters 11-18
Source code
Lemma
Source code
has_sup E -> ubound E (sup E).
Proof.
Lemma
Source code
Source code
has_sup E -> exists2 : R, E e & (sup E - eps) < e.
Proof.
Section IsInt.
Context { : realFieldType}.
Definition
Internals.proper_wProp : forall [T : Type], Internals.properWitnessProp T -> Internals.witnessProp false True T Internals.proper_wProp is not universe polymorphic Arguments Internals.proper_wProp [T]%_type_scope P Internals.proper_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.proper_wProp Declared in library mathcomp.classical.contra, line 697, characters 10-22
Source code
Arguments Rint_pred _ /.
Definition
Internals.forall_wProp : forall [A : Type] [T : A -> Type] [P0 : A -> Prop], (forall x : A, Internals.witnessProp false (P0 x) (T x)) -> Internals.witnessProp false True (forall x : A, T x) Internals.forall_wProp is not universe polymorphic Arguments Internals.forall_wProp [A]%_type_scope [T P0]%_function_scope P%_function_scope Internals.forall_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.forall_wProp Declared in library mathcomp.classical.contra, line 704, characters 10-22
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Hint Resolve Rint0 Rint1 RintC : core.
Lemma
Source code
Proof.
.
Source code
Source code
Source code
Rint_subring_closed.
Lemma
Source code
(x + 1 <= y) = (x < y).
Proof.
Lemma
Source code
(x < y + 1) = (x <= y).
Proof.
End IsInt.
Arguments Rint_pred _ _ /.
Section ToInt.
Context { : realType}.
Implicit Types x y : R.
Definition
Internals.trivial_wProp : forall P : Prop, Internals.witnessProp true P P Internals.trivial_wProp is not universe polymorphic Arguments Internals.trivial_wProp P%_type_scope Internals.trivial_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.trivial_wProp Declared in library mathcomp.classical.contra, line 707, characters 10-23
Source code
if insub x : {? | x \is a Rint} is Some Px then
xchoose (asboolP _ (tagged Px))
else 0.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
End ToInt.
Section RealDerivedOps.
Variable : realType.
Implicit Types x y : R.
Definition
Internals.inhabited_wProp : forall T : Type, Internals.properWitnessProp T Internals.inhabited_wProp is not universe polymorphic Arguments Internals.inhabited_wProp T%_type_scope Internals.inhabited_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.inhabited_wProp Declared in library mathcomp.classical.contra, line 712, characters 10-25
Source code
Definition
Internals.nand_false_bool : forall b : bool, Internals.nandBool b Internals.nand_false_bool is not universe polymorphic Arguments Internals.nand_false_bool b%_bool_scope Internals.nand_false_bool is transparent Expands to: Constant mathcomp.classical.contra.Internals.nand_false_bool Declared in library mathcomp.classical.contra, line 724, characters 10-25
Source code
Definition
Internals.nand_true_bool : Internals.nandBool false Internals.nand_true_bool is not universe polymorphic Internals.nand_true_bool is transparent Expands to: Constant mathcomp.classical.contra.Internals.nand_true_bool Declared in library mathcomp.classical.contra, line 725, characters 10-24
Source code
Definition
Internals.and_wProp : forall [s : bool] [S : Type] [P0 : Prop], Internals.witnessProp s P0 S -> forall [t : Internals.nandBool s] [T : Type] [Q0 : Prop], Internals.witnessProp (Internals.nand_bool t) Q0 T -> Internals.properWitnessProp (S * T) Internals.and_wProp is not universe polymorphic Arguments Internals.and_wProp [s]%_bool_scope [S P0]%_type_scope P [t] [T Q0]%_type_scope Q Internals.and_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.and_wProp Declared in library mathcomp.classical.contra, line 730, characters 10-19
Source code
End RealDerivedOps.
Section RealLemmas.
Context { : realType}.
Implicit Types (A B : set R) (r : R).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by apply/ubP/sup_upper_bound=> //; split; first by exists x.
Qed.
Lemma
Source code
~ A (sup A) -> A `<=` [set | r < sup A].
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
have Dz: 2%:R * z = r + y by rewrite mulrC divfK// pnatr_eq0.
have ubA : has_sup A by split => //; exists r.
have [/downP [t At lezt] | leyz] := sup_total z ubA.
rewrite -(lerD2l r) -Dz -mulr2n -[leRHS]mulr_natl.
rewrite ler_pM2l ?ltr0Sn //; apply/(le_trans lezt).
by move/ubP : leAr; exact.
rewrite -(lerD2r y) -Dz -mulr2n -[leLHS]mulr_natl.
by rewrite ler_pM2l ?ltr0Sn.
Qed.
Lemma
Source code
(forall , A a -> B b -> a <= b) -> sup (A `|` B) = sup B.
Proof.
- apply: ge_sup => [|x [Ax|]]; first by apply: subset_nonempty B0 => ?; right.
by case: B0 => b Bb; rewrite (le_trans (AB _ _ Ax Bb))// ub_le_sup//; exists l.
- by move=> Bx; rewrite ub_le_sup //; exists l.
- apply: ge_sup => // b Bb; apply: ub_le_sup; last by right.
by exists l => x [Ax|Bx]; [rewrite (le_trans (AB _ _ Ax Bb)) // Bl|exact: Bl].
Qed.
Lemma
Source code
(r < sup A -> exists2 , A y & r < y)%R.
Proof.
Section SupInterchange.
Context { : Type} ( : X -> Y -> R).
Implicit Types (x : X) (y : Y).
Let
Source code
Let
Source code
Let
Source code
Let
Source code
Lemma
Source code
sup rows = sup cols.
Proof.
have col_nonempty y : col y !=set0.
by case: rows_sup => -[_ [x _ _]] _; eexists; exact/imageT.
have col_bound u : ubound (col u) (sup rows).
move=> r [t _ <-]; apply: le_trans.
- have /sup_upper_bound := row_sup t.
by apply; exists u.
- have /sup_upper_bound := rows_sup.
by apply; exists t.
have col_le_rows y : sup (col y) <= sup rows.
by apply: ge_sup; [exact: col_nonempty|exact: col_bound].
have cols_sup : has_sup cols.
split.
- case: rows_sup => -[_ [x _ _]] _.
case: (row_sup x) => -[_ [y _ _]] _.
by exists (sup (col y)), y.
- by exists (sup rows) => _ [y _ <-]; exact: col_le_rows.
apply/eqP; rewrite eq_le; apply/andP; split.
- apply: ge_sup; first by case: rows_sup.
move=> _ [x _ <-].
apply: ge_sup; first by case: (row_sup x).
move=> _ [y _ <-]; apply: le_trans.
suff col_y_sup : has_sup (col y).
move: col_y_sup => /sup_upper_bound.
by apply; exists x.
split; first exact: col_nonempty.
by exists (sup rows).
move: cols_sup => /sup_upper_bound.
by apply; exists y.
- apply: ge_sup; first by case: cols_sup.
by move=> _ [y _ <-]; exact: col_le_rows.
Qed.
End SupInterchange.
End RealLemmas.
#[deprecated(since="mathcomp-analysis 1.14.0", note="Renamed `ub_le_sup`.")]
Notation
Source code
#[deprecated(since="mathcomp-analysis 1.14.0", note="Renamed `ge_sup`.")]
Notation
Source code
#[deprecated(since="1.17.0", note="use `interchange_sup` instead")]
Notation
Source code
Section sup_sum.
Context { : realType}.
Lemma
Source code
has_sup A -> has_sup B -> sup [set x + y | in A & in B] = sup A + sup B.
Proof.
have ABsup : has_sup [set x + y | in A & in B].
split; first by exists (a + b), a => //; exists b.
case: ubA ubB => p up [q uq]; exists (p + q) => ? [r Ar [s Bs] <-].
by apply: lerD; [exact: up | exact: uq].
apply: le_anti; apply/andP; split.
apply: ge_sup; first by case: ABsup.
by move=> ? [p Ap [q Bq] <-]; apply: lerD; exact: ub_le_sup.
rewrite leNgt -subr_gt0; apply/negP.
set eps := (_ + _ - _) => epos.
have e2pos : 0 < eps / 2%:R by rewrite divr_gt0// ltr0n.
have [r Ar supBr] := sup_adherent e2pos supA.
have [s Bs supAs] := sup_adherent e2pos supB.
have := ltrD supBr supAs.
rewrite -addrACA -opprD -splitr subKr; apply/negP; rewrite -leNgt.
by apply: sup_upper_bound => //; exists r => //; exists s.
Qed.
Lemma
Source code
has_inf A -> has_inf B -> inf [set x + y | in A & in B] = inf A + inf B.
Proof.
rewrite [X in - sup X = _](_ : _ =
[set x + y | in [set - x | in A ] & in [set - x | in B]]); last first.
by rewrite sup_sumE // -opprD.
rewrite eqEsubset; split => /= t [] /= x []a Aa.
case => b Bb <- <-; exists (- a); first by exists a.
by exists (- b); [exists b|rewrite opprD].
move=> <- [y] [b Bb] <- <-; exists (a + b); last by rewrite opprD.
by exists a => //; exists b.
Qed.
End sup_sum.
Section InfTheory.
Variables ( : realType).
Implicit Types E : set R.
Implicit Types x : R.
Lemma
Source code
Source code
has_inf E -> exists2 , E e & e < inf E + eps.
Proof.
exists (- e); first by case: NEx => x Ex <-{}; rewrite opprK.
by rewrite ltrNl -mulN1r mulrDr !mulN1r opprK.
Qed.
Lemma
Source code
Proof.
exact/has_inf_supN.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
~ E (inf E) -> E `<=` [set | inf E < r].
Proof.
Lemma
Source code
Lemma
Source code
~ has_inf E <-> (forall , exists2 , E y & y < x).
Proof.
Lemma
Source code
(forall , A a -> B b -> a <= b) -> inf (A `|` B) = inf A.
Proof.
rewrite image_setU setUC sup_setU //; first exact/has_inf_supN.
by move=> _ _ [] b Bb <-{} [] a Aa <-{}; rewrite lerNl opprK; apply AB.
Qed.
Lemma
Source code
(inf S < x -> exists2 , S y & y < x)%R.
Proof.
End InfTheory.
#[deprecated(since="mathcomp-analysis 1.14.0", note="Renamed `ge_inf`.")]
Notation
Source code
Section FloorTheory.
Variable : realType.
Implicit Types (x y : R) (i : int).
Lemma
Source code
Proof.
rewrite /floor_set/mkset rpredN rpred_int /= lerNl.
case: (ger0P (-x)) => [/archi_boundP/ltW//|].
by move/ltW/le_trans; apply; rewrite ler0z.
apply/ubP=> y /andP[_] /le_trans; apply.
case: (ger0P x)=> [/archi_boundP/ltW|] //.
by move/ltW/le_trans; apply; rewrite ler0z.
Qed.
Lemma
Source code
Proof.
have /sup_upper_bound /ubP /(_ _ Fy) := has_sup_floor_set x.
rewrite le_eqVlt=> /orP[/eqP<-//| lt_yFx].
rewrite ltrBlDr -ltrBlDl => lt1_FxBy.
pose e := sup (floor_set x) - y; have := has_sup_floor_set x.
move/sup_adherent=> -/(_ e) []; first by rewrite subr_gt0.
move=> z Fz; rewrite /= subKr => lt_yz.
have /sup_upper_bound /ubP /(_ _ Fz) := has_sup_floor_set x.
rewrite -(lerD2r (-y)) => /le_lt_trans /(_ lt1_FxBy).
case/andP: Fy Fz lt_yz=> /RintP[yi -> _].
case/andP=> /RintP[zi -> _]; rewrite -rmorphB /= ltrz1 ltr_int.
rewrite lt_neqAle => /andP[ne_yz le_yz].
rewrite -[_-_]gez0_abs ?subr_ge0 // ltz_nat ltnS leqn0.
by rewrite absz_eq0 subr_eq0 eq_sym (negbTE ne_yz).
Qed.
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
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
Proof.
End FloorTheory.
Section CeilTheory.
Variable : realType.
Implicit Types x y : R.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
End CeilTheory.
Section Sup.
Context { : realType}.
Implicit Types A B : set R.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
case: nzA => x /downP[y yS le_xy]; split; first by exists y.
case: nzubA=> u /ubP ubA; exists u; apply/ubP=> z zS.
by apply/ubA; apply/downP; exists z.
case: nzA => x xA; split; first by exists x; apply/le_down.
case: nzubA => u /ubP ubA; exists u; apply/ubP=> y /downP [].
by move=> z zA /le_trans; apply; apply/ubA.
Qed.
Lemma
Source code
sup A <= sup B.
Proof.
split=> //; case: hs_B => _ [x ubx].
exists x; apply/ubP=> y /le_AB /downP[z zB le_yz].
by apply/(le_trans le_yz); move/ubP: ubx; apply.
rewrite leNgt -subr_gt0; apply/negP => lt_sup.
case: (sup_adherent lt_sup hs_A )=> x /le_AB xdB.
rewrite subKr => lt_Bx; case/downP: xdB => z zB.
move/(lt_le_trans lt_Bx); rewrite ltNge.
by move/ubP : (sup_upper_bound hs_B) => ->.
Qed.
Lemma
Source code
inf A <= inf B.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
[exact/nonemptyN|exact/has_inf_supN|exact/image_subset].
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
has_sup [set | exists , y = F x] ->
l < sup [set | exists , y = F x] ->
exists2 , l < F x & F x <= sup [set | exists , y = F x].
Proof.
move=> /sup_adherent/(_ hs)[_ [x ->]]; rewrite subKr=> lt_lFx.
by exists x => //; move/ubP : (sup_upper_bound hs) => -> //; exists x.
Qed.
Lemma
Source code
has_inf [set | exists , y = F x] ->
inf [set | exists , y = F x] < l ->
exists2 , F x < l & inf [set | exists , y = F x] <= F x.
Proof.
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
has_sup [set a * x | in A ].
Proof.
Lemma
Source code
has_sup A.
Proof.
by exists (b / a) => y Ay; rewrite ler_pdivlMr// mulrC ub//; exists y.
Qed.
Lemma
Source code
Proof.
have [->|A0] := eqVneq A set0; first by rewrite image_set0 sup0 mulr0.
suff -> : [set 0 * x | in A] = [set 0] by rewrite sup1 mul0r.
under eq_fun do rewrite mul0r.
by rewrite set_cst (negbTE A0).
have [->|A0] := eqVneq A set0; first by rewrite image_set0 sup0 mulr0.
have [[[x Ax] ubA]|not_ex_sup] := pselect (has_sup A); last first.
rewrite !sup_out ?mulr0//.
by apply: contra_not not_ex_sup; exact: gt0_has_supZl.
apply/eqP; rewrite eq_le; apply/andP; split.
apply: ge_sup; first by exists (a * x), x.
by move=> _ [x0 Axo <-]; rewrite ler_pM2l// ub_le_sup.
rewrite -ler_pdivlMl// ge_sup//; first exact/set0P.
move=> x0 Ax0; rewrite ler_pdivlMl// ub_le_sup//; last by exists x0.
have [x1 ubx1] := ubA.
by exists (a * x1) => _ [x2 Ax2 <-]; rewrite ler_pM2l// ubx1.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End Sup.
#[deprecated(since="mathcomp-analysis 1.14.0", note="Renamed `inf_le`.")]
Notation
Source code
#[deprecated(since="mathcomp-analysis 1.14.0", note="Renamed `sup_le`.")]
Notation
Source code
Lemma
Source code
exists , B j /\ forall , B k -> j <= k.
Proof.
by exists `|i0 - i|%N; rewrite gez0_abs // subr_ge0; exact: lbBi.
elim: n i lbBi i0in => [i lbBi /eqP|n ih i lbBi i0in1].
by rewrite subr_eq0 => /eqP i0i; exists i0; split =>// k Bk; rewrite i0i lbBi.
have i0i1n : i0 - (i + 1) = n by rewrite opprD addrA i0in1 -addn1 PoszD addrK.
have [?|/not_forallP] := pselect (lbound B (i + 1)); first exact: (ih (i + 1)).
move=> /contrapT[x /not_implyP[Bx i1x]]; exists x; split => // k Bk.
rewrite (le_trans _ (lbBi _ Bk)) //.
by move/negP : i1x; rewrite -ltNge ltzD1.
Qed.
Lemma
Source code
exists , A j /\ forall , A k -> (j <= k)%N.
Proof.
Section rat_in_itvoo.
Let
Source code
if y < 0 then 0%N else Num.bound (y / x).
Let
Source code
0 < x -> y < x *+ bound_div x y.
Proof.
rewrite /bound_div (ltNge y 0) y0/= -mulr_natl -ltr_pdivrMr//.
by rewrite archi_boundP// (divr_ge0 _(ltW _)).
Qed.
Lemma
Source code
x < y -> exists , ratr q \in `]x, y[.
Proof.
move=> /(archi_bound_divP 1); set n := bound_div _ _ => nyx.
have [m1 m1nx] : exists , m1.+1%:~R > x *+ n.
have := archi_bound_divP (x *+ n) ltr01; set p := bound_div _ _ => nxp.
have [x0|x0] := ltP 0 x.
exists p.-1; rewrite prednK // lt0n; apply: contraPN nxp => /eqP ->.
by apply/negP; rewrite -leNgt mulrn_wge0 // ltW.
by exists 0%N; rewrite (le_lt_trans _ ltr01) // mulrn_wle0.
have [m2 m2nx] : exists , m2.+1%:~R > - x *+ n.
have := archi_bound_divP (- x *+ n) ltr01; set p := bound_div _ _ => nxp.
have [x0|x0] := ltP 0 x.
by exists O; rewrite (le_lt_trans _ ltr01) // nmulrn_rle0// oppr_lt0.
exists p.-1; rewrite prednK // -(ltr_nat R) (le_lt_trans _ nxp) //.
by rewrite mulrn_wge0 // oppr_ge0.
have : exists , -(m2.+1 : int) <= m <= m1.+1 /\ m%:~R - 1 <= x *+ n < m%:~R.
have m2m1 : - (m2.+1 : int) < m1.+1.
by rewrite -(ltr_int R) (lt_trans _ m1nx)// rmorphN /= ltrNl // -mulNrn.
pose B := [set : int | m%:~R > x *+ n].
have m1B : B m1.+1 by [].
have m2B : lbound B (- m2.+1%:~R).
move=> i; rewrite /B /= -(opprK (x *+ n)) -ltrNl -mulNrn => nxi.
rewrite -(mulN1r m2.+1%:~R) mulN1r -lerNl.
by have := lt_trans nxi m2nx; rewrite intz -mulrNz ltr_int => /ltW.
have [m [Bm infB]] := int_lbound_has_minimum (ex_intro _ _ m1B) m2B.
have mN1B : ~ B (m - 1).
by move=> /infB; apply/negP; rewrite -ltNge ltrBlDr ltzD1.
exists m; split; [apply/andP; split|apply/andP; split] => //.
- by move: m2B; rewrite /lbound /= => /(_ _ Bm); rewrite intz.
- exact: infB.
- by rewrite leNgt; apply/negP; rewrite /B /= intrD in mN1B.
move=> [m [/andP[m2m mm1] /andP[mnx nxm]]].
have [/andP[a b] c] : x *+ n < m%:~R <= 1 + x *+ n /\ 1 + x *+ n < y *+ n.
split; [apply/andP; split|] => //; first by rewrite -lerBlDl.
by move: nyx; rewrite mulrnDl -ltrBrDr mulNrn.
have n_gt0 : n != 0%N by apply: contraTN nyx => /eqP ->; rewrite mulr0n ltr10.
exists (m%:Q / n%:Q); rewrite in_itv /= fmorph_div/= ratr_nat ratr_int.
rewrite ltr_pdivlMr ?ltr_pdivrMr ?ltr0n ?lt0n// !mulr_natr nxm/=.
apply: (le_lt_trans b c).
Qed.
End rat_in_itvoo.
Section rational.
Context { : realType}.
Definition
Internals.or_wProp : forall [s : bool] [S : Type] [P0 : Prop], Internals.witnessProp s P0 S -> forall [t : bool] [T : Type] [Q0 : Prop], Internals.witnessProp t Q0 T -> Internals.properWitnessProp (if t then if s then {P0} + {Q0} : Type else S + {Q0} else S + T : Type) Internals.or_wProp is not universe polymorphic Arguments Internals.or_wProp [s]%_bool_scope [S P0]%_type_scope P [t]%_bool_scope [T Q0]%_type_scope Q Internals.or_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.or_wProp Declared in library mathcomp.classical.contra, line 742, characters 10-18
Source code
Lemma
Source code
rational r <-> exists ( : int) ( : nat), r = a%:~R / b%:R.
Proof.
Definition
Internals.exists_wProp : forall [A : Type] [t : bool] [T : A -> Type] [P0 : A -> Prop], (forall x : A, Internals.witnessProp t (P0 x) (T x)) -> Internals.properWitnessProp (if t then {x : A | P0 x} else {x : A & T x}) Internals.exists_wProp is not universe polymorphic Arguments Internals.exists_wProp [A]%_type_scope [t]%_bool_scope [T P0]%_function_scope P%_function_scope Internals.exists_wProp is transparent Expands to: Constant mathcomp.classical.contra.Internals.exists_wProp Declared in library mathcomp.classical.contra, line 748, characters 10-22
Source code
Lemma
Source code
Proof.
by apply: (rE q Logic.I) => /=; exists q.
by apply: contra_not rE => -[_ -> <-{r}]; exists q.
Qed.
End rational.