From cf31b5881a27f784a1848d67418f2afb61dab48e Mon Sep 17 00:00:00 2001 From: Pierre Roux Date: Wed, 4 Nov 2026 10:57:16 +0100 Subject: [PATCH] Adapt to https://github.com/rocq-prover/rocq/pull/22711 --- algebra/CPoly_Newton.v | 8 ++++---- algebra/Expon.v | 2 +- model/totalorder/QMinMax.v | 4 ++-- reals/fast/CRroot.v | 4 ++-- reals/faster/ARArith.v | 2 +- reals/faster/ARroot.v | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/algebra/CPoly_Newton.v b/algebra/CPoly_Newton.v index e0866629..616d9002 100644 --- a/algebra/CPoly_Newton.v +++ b/algebra/CPoly_Newton.v @@ -40,7 +40,7 @@ Section contents. Fixpoint divdiff_l (a: QPoint) (xs: list QPoint) {struct xs} : CR := match xs with | nil => snd a - | cons b l => (divdiff_l a l - divdiff_l b l) * ' / (fst a - fst b) + | cons b l => (divdiff_l a l - divdiff_l b l) * ' (/ (fst a - fst b)) end. Definition divdiff (l: ne_list QPoint): CR := divdiff_l (ne_list.head l) (ne_list.tail l). @@ -49,9 +49,9 @@ Section contents. divdiff l = match l with | ne_list.one a => snd a - | a ::: ne_list.one b => (snd a - snd b) * ' / (fst a - fst b) + | a ::: ne_list.one b => (snd a - snd b) * ' (/ (fst a - fst b)) | a ::: b ::: l => - (divdiff (ne_list.cons a l) - divdiff (ne_list.cons b l)) * ' / (fst a - fst b) + (divdiff (ne_list.cons a l) - divdiff (ne_list.cons b l)) * ' (/ (fst a - fst b)) end. Proof. induction l as [|?[|]]; auto. Qed. @@ -212,7 +212,7 @@ Section contents. Definition applied (x: Q) := @Σ CRasCMonoid (map (an_applied x) (ne_list.tails qpoints)). - Lemma apply x: (N ! ' x) [=] applied x. + Lemma apply x: (N ! (' x)) [=] applied x. Proof. unfold N, applied, an, an_applied. rewrite cm_Sum_apply, map_map. diff --git a/algebra/Expon.v b/algebra/Expon.v index 0ba81e44..3b3f56cb 100644 --- a/algebra/Expon.v +++ b/algebra/Expon.v @@ -380,7 +380,7 @@ Definition zexp (x : R) x_ (n : Z) : R := End Zexp_def. Arguments zexp [R]. -Notation "( x [//] Hx ) [^^] n" := (zexp x Hx n) (at level 0). +Notation "( x [//] Hx ) [^^] n" := (zexp x Hx n) (at level 0, n at level 0). (** ** Properties of [zexp] diff --git a/model/totalorder/QMinMax.v b/model/totalorder/QMinMax.v index 6745a318..0d8104f1 100644 --- a/model/totalorder/QMinMax.v +++ b/model/totalorder/QMinMax.v @@ -28,8 +28,8 @@ Require Import CoRN.order.TotalOrder. Definition Qlt_le_dec_fast x y : {x < y} + {y <= x}. Proof. - change ({x ?= y = Lt}+{y<=x}). - cut (x ?= y <> Lt -> y <= x). + change ({(x ?= y) = Lt}+{y<=x}). + cut ((x ?= y) <> Lt -> y <= x). destruct (x?=y); intros H; (right; abstract(apply H; discriminate)) || (left; reflexivity). refine (Qnot_lt_le _ _). Defined. diff --git a/reals/fast/CRroot.v b/reals/fast/CRroot.v index 44873b0b..cb69079a 100644 --- a/reals/fast/CRroot.v +++ b/reals/fast/CRroot.v @@ -1249,8 +1249,8 @@ Proof. simpl. rewrite Qmult_1_r. now ring_simplify. intros n. - setoid_replace ('((2#1) ^ (1 + n)) * rational_sqrt (a * (4#1) ^ -(1 + n)))%CR - with ('((2#1) ^ n) * scale (2#1) (rational_sqrt ((a * (4#1) ^ -n) / (4#1))))%CR. + setoid_replace ('((2#1) ^ (1 + n)) * rational_sqrt (a * (4#1) ^ (-(1 + n))))%CR + with ('((2#1) ^ n) * scale (2#1) (rational_sqrt ((a * (4#1) ^ (-n)) / (4#1))))%CR. assert (Pa1 : [0][<=](inj_Q IR (a * (4#1) ^ (- n)))). stepl (inj_Q IR 0); [| now (apply (inj_Q_nring IR 0))]. apply inj_Q_leEq. diff --git a/reals/faster/ARArith.v b/reals/faster/ARArith.v index 8eec7676..fb836e38 100644 --- a/reals/faster/ARArith.v +++ b/reals/faster/ARArith.v @@ -783,7 +783,7 @@ Definition AQinv_pos_uc (c : AQ₊) := Build_UniformlyContinuousFunction (AQinv_ Definition ARinv_pos (c : AQ₊) : AR --> AR := Cbind AQPrelengthSpace (AQinv_pos_uc c). Lemma ARtoCR_preserves_inv_pos_aux c (x : AR) : is_RegularFunction_noInf _ - (λ γ, / Qmax (''c) ('approximate x (Qinv_modulus ('c) γ)) : Q_as_MetricSpace). + (λ γ, / Qmax ('('c)) ('approximate x (Qinv_modulus ('c) γ)) : Q_as_MetricSpace). Proof. intros ε1 ε2. apply_simplified (Qinv_pos_uc_prf ('c) (ε1 + ε2)%Qpos). diff --git a/reals/faster/ARroot.v b/reals/faster/ARroot.v index 3035ed3f..0f0854b8 100644 --- a/reals/faster/ARroot.v +++ b/reals/faster/ARroot.v @@ -138,7 +138,7 @@ Proof with auto. now apply rings.flip_le_negate, semirings.le_2_4. Qed. -Definition AQsqrt_mid_bounded_raw (n : N) := snd (AQsqrt_loop ('n)) ≪ -((1 + 'n)%mc : Z). +Definition AQsqrt_mid_bounded_raw (n : N) := snd (AQsqrt_loop ('n)) ≪ (-((1 + 'n)%mc : Z)). Instance AQsqrt_mid_bounded_raw_proper: Proper ((=) ==> (=)) AQsqrt_mid_bounded_raw. Proof. intros x y E. change (x ≡ y) in E. now subst. Qed. @@ -208,7 +208,7 @@ Proof. Qed. Lemma AQsqrt_mid_bounded_spec (n : N) : - (AQsqrt_mid_bounded_raw n ^ (2%mc:N)) = a - fst (AQsqrt_loop ('n)) ≪ -(2 * 'n). + (AQsqrt_mid_bounded_raw n ^ (2%mc:N)) = a - fst (AQsqrt_loop ('n)) ≪ (-(2 * 'n)). Proof. unfold AQsqrt_mid_bounded_raw. rewrite shiftl_base_nat_pow, rings.preserves_2.