@@ -2973,63 +2973,49 @@ Qed.
29732973End adjacent_cut.
29742974
29752975Section finite_range_sequence_constant.
2976- Context {R : realFieldType}.
29772976
2978- Lemma finite_range_cst (u_ : R^nat) : finite_set (range u_) ->
2979- exists N, exists2 A, infinite_set A & (forall k, A k <-> u_ k = u_ N).
2980- Proof .
2981- case=> n; elim: n => [|n ih] in u_ *.
2982- by rewrite card_eq_sym => /card_set_bijP[/= f [_ _ /(_ _ (imageT u_ 0))[]]].
2983- move/eq_cardSP => -[r [N _ uNr]] urn.
2984- apply: assume_not => /forallNP/(_ N) uN.
2985- have {uN}[B finB BuN] : exists2 B, finite_set B &
2986- (forall k, B k <-> u_ k = u_ N).
2987- exists (u_ @^-1` [set u_ N]); last by move=> k; split.
2988- by apply: contrapT => u_N; apply: uN; eexists; [exact: u_N|by []].
2989- have [M BM] : exists M, ~ B M.
2990- apply/existsNP => allB.
2991- move: finB; rewrite (_ : B = setT); first exact/infinite_nat.
2992- by rewrite -subTset => x _; exact: allB.
2993- have uMuN : u_ M != u_ N by apply: contra_not_neq BM; exact: (BuN _).2.
2994- pose v_ k := if k \in B then u_ M else u_ k.
2995- have /ih[k [A infA Ak]] : (range v_ #= `I_n)%card.
2996- suff : range v_ = (range u_) `\ u_ N by move=> ->; rewrite uNr.
2997- apply/seteqP; split=> [_ [y] _ <-|_ [[y _ <-]] uyuN]; rewrite /v_.
2998- - case: ifPn => [yB|]; first by split; [exists M|exact/eqP].
2999- by rewrite notin_setE => /BuN.
3000- - by exists y => //; case: ifPn => // /set_mem /BuN.
3001- have [Bk|Bk] := pselect (B k).
3002- - exists M, (A `\` B); [exact: infinite_setD|move=> m; split=> [[+ Bm]|]].
3003- + by move/(Ak _).1; rewrite /v_ memNset// mem_set.
3004- + apply: contraPP; rewrite -[~ _]/((~` (_ `\` _)) m) setCD => -[|/BuN ->].
3005- * have /iff_not2[+ _] := Ak m.
3006- by move/[apply]; rewrite /v_; case: ifPn => mB; rewrite mem_set// eqxx.
3007- * exact/nesym/eqP.
3008- - exists k, (A `\` B); [exact: infinite_setD|move=> m].
3009- split=> [[+ Bm]|]; first by move/(Ak _).1; rewrite /v_ memNset// memNset.
3010- apply: contraPP; rewrite -[~ _]/((~` (_ `\` _)) m) setCD => -[|Bm].
3011- + have /iff_not2[+ _] := Ak m.
3012- move=> /[apply]; rewrite /v_; case: ifPn => mB; rewrite memNset//.
3013- by move: mB Bk => /set_mem /BuN -> /BuN /nesym.
3014- + have /iff_not2[+ _] := BuN k.
3015- by move=> /(_ Bk); apply: contra_not; rewrite ((BuN m).1 Bm).
3016- Qed .
3017-
3018- Lemma finite_range_cvg (x_ : R ^nat) : finite_set (range x_) ->
3019- exists2 f : nat -> nat, increasing_seq f & cvgn (x_ \o f).
3020- Proof .
3021- move=> /finite_range_cst[k [A /infiniteP/pcard_leP/unsquash f Ak]].
3022- have : forall n, {y | (n < y)%N /\ A y}.
3023- move=> n; apply/cid.
3024- have [m xfm] : exists m, (n < f m)%N by exact: injectiveT_ltn.
3025- by exists (f m); split => //; exact: funS.
3026- move/dependent_choice => /(_ 0)[g [g00 gincr]].
3027- exists g; first by apply/increasing_seqP => n; exact: (gincr _).1.
3028- apply/cvg_ex; exists (x_ k); apply/cvgrPdist_le => /= e e0.
3029- near=> n.
3030- have := (gincr n.-1).2; rewrite prednK; last by near: n; by exists 1%N.
3031- by move/(Ak (g n)).1 => ->; rewrite subrr normr0 ltW.
3032- Unshelve. all: end_near. Qed .
2977+ Lemma finite_range_cst {T} (u_ : T^nat) : finite_set (range u_) ->
2978+ exists x, exists2 A, infinite_set A & (forall k, A k <-> u_ k = x).
2979+ Proof .
2980+ move=> range_u_finite; pose A x := u_ @^-1` [set x].
2981+ suff [x Aoo] : exists x, infinite_set (A x) by exists x, (A x) => // k.
2982+ apply/existsNP => Afin.
2983+ have: finite_set (\bigcup_(x in range u_) A x) by exact: bigcup_finite.
2984+ rewrite -preimage_bigcup bigcup_imset1 image_id preimage_range.
2985+ exact: infinite_nat.
2986+ Qed .
2987+
2988+ Lemma infinite_increasing_seq {d} {T : orderType d} (A : set T) :
2989+ (forall x, infinite_set [set y | A y /\ (x < y)%O]) ->
2990+ forall x0 : T, exists f, [/\ increasing_seq f, forall n : nat, (x0 < f n)%O & forall n, A (f n)].
2991+ Proof .
2992+ pose R (x y : T) := A y /\ (x < y)%O => Roo x0.
2993+ have [x|f [f0 /all_and2[fA fS]]] := @dependent_choice T R _ x0.
2994+ by have /infinite_setN0/cid := Roo x.
2995+ exists (f \o S); split => //=; first by apply/increasing_seqP => n; apply: fS.
2996+ by elim=> /= [|n IHn]; rewrite (le_lt_trans _ (fS _)) ?f0//= ltW.
2997+ Qed .
2998+
2999+ Lemma infinite_increasing_seq_wf {d} {T : orderType d} (A : set T) :
3000+ (forall x : T, finite_set [set y | (y <= x)%O]) -> infinite_set A ->
3001+ forall x0 : T, exists f,[/\ increasing_seq f, forall n : nat, (x0 < f n)%O & forall n, A (f n)].
3002+ Proof .
3003+ move=> down_fin Aoo; apply: infinite_increasing_seq.
3004+ move=> x; suff -> : [set y | A y /\ (x < y)%O] = A `\` [set y | (y <= x)%O].
3005+ exact: infinite_setI.
3006+ by apply/seteqP; split => y /=; case: leP => _ [].
3007+ Qed .
3008+
3009+ Lemma finite_range_cvg {T : ptopologicalType} (x_ : T ^nat) :
3010+ finite_set (range x_) ->
3011+ exists2 f : nat -> nat, increasing_seq f & cvg ((x_ \o f) @ \oo).
3012+ Proof .
3013+ move=> /finite_range_cst[x [A Aoo Ax_]].
3014+ have /= [|f [fincr _ Af]] := infinite_increasing_seq_wf _ Aoo 0.
3015+ by move=> n; apply: sub_finite_set (finite_II n.+1) => m /=.
3016+ exists f => //=; suff -> : x_ \o f = fun=> x by apply: is_cvg_cst.
3017+ by apply/funext => k /=; rewrite (Ax_ _).1.
3018+ Qed .
30333019
30343020End finite_range_sequence_constant.
30353021
0 commit comments