Skip to content
Snippets Groups Projects
Commit aa942ca8 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Misc result about Qp.

parent 6916990f
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -660,6 +660,21 @@ Proof. ...@@ -660,6 +660,21 @@ Proof.
- by rewrite (assoc_L _), (comm_L Qp_plus a'). - by rewrite (assoc_L _), (comm_L Qp_plus a').
Qed. Qed.
Lemma Qp_bounded_split (p r : Qp) : q1 q2 : Qp, (q1 r)%Qc p = (q1 + q2)%Qp.
Proof.
destruct (Qclt_le_dec r p) as [?|?].
- assert (0 < p - r)%Qc as Hpos.
{ apply (Qcplus_lt_mono_r _ _ r). rewrite <-Qcplus_assoc, (Qcplus_comm (-r)).
by rewrite Qcplus_opp_r, Qcplus_0_l, Qcplus_0_r. }
exists r, (mk_Qp _ Hpos); simpl; split; [done|].
apply Qp_eq; simpl. rewrite Qcplus_comm, <-Qcplus_assoc, (Qcplus_comm (-r)).
by rewrite Qcplus_opp_r, Qcplus_0_r.
- exists (p / 2)%Qp, (p / 2)%Qp; split.
+ trans p; [|done]. apply Qclt_le_weak, Qp_lt_sum.
exists (p / 2)%Qp. by rewrite Qp_div_2.
+ by rewrite Qp_div_2.
Qed.
Lemma Qp_not_plus_q_ge_1 (q: Qp): ¬ ((1 + q)%Qp 1%Qp)%Qc. Lemma Qp_not_plus_q_ge_1 (q: Qp): ¬ ((1 + q)%Qp 1%Qp)%Qc.
Proof. Proof.
intros Hle. intros Hle.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment