Module mathcomp.experimental_reals.discrete
From Corelib Require Setoid.
From HB Require Import structures.
From mathcomp Require Import boot order algebra.
From mathcomp.classical Require Import boolp.
From mathcomp Require Import xfinmap reals.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GRing.Theory Num.Theory.
Local Open Scope ring_scope.
Local Open Scope real_scope.
Section ProofIrrelevantChoice.
Context { : choiceType}.
Lemma
Source code
Proof.
End ProofIrrelevantChoice.
Section PredSubtype.
Section Def.
Variable : Type.
Variable : pred T.
Record
Source code
PSubSub {
Source code
Source code
.
Source code
Source code
Source code
End Def.
.
Source code
Source code
Source code
[Equality of pred_sub E by <:].
.
Source code
Source code
Source code
[Choice of pred_sub E by <:].
.
Source code
Source code
Source code
[Countable of pred_sub E by <:].
End PredSubtype.
Notation
Source code
(format "[ 'psub' E ]").
Section PIncl.
Variables ( : Type) ( : pred T) ( : {subset E <= F}).
Definition
eclamp : forall {R : realType}, R -> R eclamp is not universe polymorphic Arguments eclamp {R} e%_ring_scope eclamp is transparent Expands to: Constant mathcomp.experimental_reals.realseq.eclamp Declared in library mathcomp.experimental_reals.realseq, line 91, characters 11-17
Source code
PSubSub (le (valP x)).
End PIncl.
Section Countable.
Variable ( : Type) ( : pred T).
Variant
Source code
Source code
(
Source code
(
Source code
of pcancel rpickle runpickle.
Definition
B1 : forall {R : realType} (x : R), nbh x%:E B1 is not universe polymorphic Arguments B1 {R} x%_ring_scope B1 is transparent Expands to: Constant mathcomp.experimental_reals.realseq.B1 Declared in library mathcomp.experimental_reals.realseq, line 100, characters 11-13
Source code
let: Countable p _ _ := c in p.
Definition
B : forall {R : realType} (x : R), R -> nbh x%:E B is not universe polymorphic Arguments B {R} (x e)%_ring_scope B is transparent Expands to: Constant mathcomp.experimental_reals.realseq.B Declared in library mathcomp.experimental_reals.realseq, line 103, characters 11-12
Source code
let: Countable _ p _ := c in p.
Lemma
Source code
Proof.
Section CountableTheory.
Lemma
Source code
Section CanCountable.
Variables ( : Type) ( : countType) ( : pred T).
Variables ( : [psub E] -> U) ( : U -> [psub E]).
Lemma
Source code
Proof.
Section CountType.
Variables ( : eqType) ( : pred T) ( : countable E).
Definition
ncvg : forall [R : realType], (nat -> R) -> \bar R -> Prop ncvg is not universe polymorphic Arguments ncvg [R] u%_function_scope l%_ereal_scope ncvg is transparent Expands to: Constant mathcomp.experimental_reals.realseq.ncvg Declared in library mathcomp.experimental_reals.realseq, line 148, characters 11-15
Source code
(pcan_type (rpickleK c)).
Definition
iscvg : forall [R : realType], (nat -> R) -> Prop iscvg is not universe polymorphic Arguments iscvg [R] u%_function_scope iscvg is transparent Expands to: Constant mathcomp.experimental_reals.realseq.iscvg Declared in library mathcomp.experimental_reals.realseq, line 151, characters 11-16
Source code
(pcan_type (rpickleK c)).
End CountType.
End CountableTheory.
Section Finite.
Variables ( : eqType).
CoInductive
Source code
|
Source code
End Finite.
Section FiniteTheory.
Context { : choiceType}.
Lemma
Source code
Proof.
by move=> x; rewrite mem_undup; exact: sEs.
Qed.
Lemma
Source code
forall , exists : seq T, [/\ size s = n, uniq s & {subset s <= E}].
Proof.
have [x sxN xE]: exists2 , x \notin s & x \in E.
apply: contra_notP (finN (filter (mem E) s)) => /forall2NP finE x Ex.
move/or_asboolP: (finE x).
by rewrite !asbool_neg !asboolb negbK Ex mem_filter orbF [(mem E) x]Ex.
exists (x :: s) => /=; rewrite sxN; split=> // y.
by rewrite in_cons => /orP[/eqP->//|/sE].
Qed.
End FiniteTheory.
Section FiniteCountable.
Variables ( : eqType) ( : pred T).
Lemma
Source code
Proof.
pose f := index x t; pose g := nth None [seq Some x | <- t] i.
apply (@Countable _ E f g) => x; rewrite {}/f {}/g /=.
have x_in_t: x \in t; first case: x => x h.
by rewrite {}/t mem_pmap_sub /= Es.
by rewrite (nth_map x) ?index_mem ?nth_index.
Qed.
Section CountSub.
Variables ( : eqType) ( : pred T).
Lemma
Source code
Proof.
Section CountableUnion.
Variables ( : eqType) ( : nat -> pred T).
Hypothesis : forall , countable (E i).
Lemma
Source code
Proof.
pose S := { : nat & Ci i }; set F := [pred | _].
have H: forall ( : [psub F]), exists : nat, val x \in E i.
by case=> x /= /asboolP[i] Eix; exists i.
have G: forall ( : S), val (tagged x) \in F.
by case=> i [x /= Eix]; apply/asboolP; exists i.
pose f ( : [psub F]) : S := Tagged (fun => [psub E i])
(PSubSub (xchooseP (H x))).
pose g ( : S) := PSubSub (G x).
by have /can_countable: cancel f g by case=> x hx; apply/val_inj.
Qed.