proposition: Lemma Qscale_uc_prf (a:Q) : @is_UniformlyContinuousFunction Q_as_MetricSpace Q_as_MetricSpace (fun b:Q => a*b) (Qscale_modulus a).
proof: Proof. revert a. intros [[|an|an] ad] e b0 b1 H. - simpl in *. setoid_replace ((0 # ad)) with 0 by constructor. rewrite Qmult_0_l, Qmult_0_l. apply Qball_Reflexive, Qpos_nonneg. - simpl. simpl in *. unfold Qball in *. unfold QAbsSmall. setoid_replace ((Zpos an # ad) * b0 - (Zpos an # ad) * b1) with (b0 * (Zpos an # ad) - b1 * (Zpos an # ad)) by (unfold equiv, stdlib_rationals.Q_eq; ring). unfold QAbsSmall in H. setoid_replace ((Zpos ad # an) * ` e) with (` e / (Zpos an # ad)) in H. apply (Qball_Qmult_r e (an#ad)) in H. exact H. rewrite Qmult_comm. apply Qmult_comp; reflexivity. - simpl. setoid_replace ((Z.neg an # ad) * b0) with (-((Z.pos an # ad) * b0)). setoid_replace ((Z.neg an # ad) * b1) with (-((Z.pos an # ad) * b1)). apply Qball_opp. simpl in H. unfold Qball, QAbsSmall. setoid_replace ((Zpos an # ad) * b0 - (Zpos an # ad) * b1) with (b0*(Zpos an#ad)-b1*(Zpos an#ad)) by (unfold equiv, stdlib_rationals.Q_eq; ring). setoid_replace ((Zpos ad # an) * ` e) with (` e / (Zpos an # ad)) in H. apply (Qball_Qmult_r e (an#ad)) in H. simpl in H. apply H. rewrite Qmult_comm. apply Qmult_comp; reflexivity. destruct b1, Qnum; reflexivity. destruct b0, Qnum; reflexivity. Qed.
imports: CoRN.metric2.Metric CoRN.metric2.UniformContinuity CoRN.model.totalorder.QposMinMax CoRN.model.lattice.CRlattice CoRN.model.totalorder.QMinMax Coq.QArith.Qabs CoRN.model.metric2.Qmetric CoRN.metric2.ProductMetric MathClasses.interfaces.canonical_names