proposition: Lemma FinCompact_prf : forall x, is_RegularFunction (@ball (FinEnum X)) (FinCompact_raw x).
proof: Proof. intros x. cut (forall (e1 e2:Qpos), hemiMetric X (proj1_sig e1 + proj1_sig e2) (fun a : X => InFinEnumC a (FinCompact_raw x e1)) (fun a : X => InFinEnumC a (FinCompact_raw x e2))). intros L e1 e2. split. apply (Qpos_nonneg (e1+e2)). split; auto. eapply hemiMetric_wd1;[|apply L]. unfold QposEq; simpl; ring. intros e1 e2. induction x. apply hemiMetric_refl. apply (Qpos_nonneg (e1+e2)). intros b Hb. apply FinSubset_ball_orC in Hb. destruct Hb as [G | Hb | Hb] using orC_ind. auto using existsC_stable. apply existsWeaken. exists (approximate a e2). split. intro abs; contradict abs. exists (approximate a e2). split. left. reflexivity. reflexivity. rewrite -> Hb. apply regFun_prf. destruct (IHx b Hb) as [G | y [Hy0 Hy1]] using existsC_ind. auto using existsC_stable. apply existsWeaken. exists y. split; auto. apply FinSubset_ball_cons. exact Hy0. Qed.
imports: CoRN.model.totalorder.QposMinMax CoRN.metric2.Limit CoRN.metric2.FinEnum Coq.ZArith.Zpow_facts CoRN.metric2.Complete CoRN.logic.Classic Coq.QArith.Qpower Coq.QArith.Qround CoRN.metric2.Prelength