diff options
-rw-r--r-- | theories/Numbers/Rational/BigQ/QMake.v | 20 | ||||
-rw-r--r-- | theories/QArith/Qcanon.v | 13 |
2 files changed, 16 insertions, 17 deletions
diff --git a/theories/Numbers/Rational/BigQ/QMake.v b/theories/Numbers/Rational/BigQ/QMake.v index d9f4b0429..e491f6458 100644 --- a/theories/Numbers/Rational/BigQ/QMake.v +++ b/theories/Numbers/Rational/BigQ/QMake.v @@ -1031,7 +1031,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. Definition of_Qc q := of_Q (this q). - Definition to_Qc q := !! [q]. + Definition to_Qc q := Q2Qc [q]. Notation "[[ x ]]" := (to_Qc x). @@ -1083,7 +1083,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[add x y]] = [[x]] + [[y]]. Proof. unfold to_Qc. - transitivity (!! ([x] + [y])). + transitivity (Q2Qc ([x] + [y])). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_add; auto. @@ -1097,7 +1097,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[add_norm x y]] = [[x]] + [[y]]. Proof. unfold to_Qc. - transitivity (!! ([x] + [y])). + transitivity (Q2Qc ([x] + [y])). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_add_norm; auto. @@ -1145,7 +1145,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[mul x y]] = [[x]] * [[y]]. Proof. unfold to_Qc. - transitivity (!! ([x] * [y])). + transitivity (Q2Qc ([x] * [y])). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_mul; auto. @@ -1159,7 +1159,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[mul_norm x y]] = [[x]] * [[y]]. Proof. unfold to_Qc. - transitivity (!! ([x] * [y])). + transitivity (Q2Qc ([x] * [y])). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_mul_norm; auto. @@ -1183,7 +1183,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[inv x]] = /[[x]]. Proof. unfold to_Qc. - transitivity (!! (/[x])). + transitivity (Q2Qc (/[x])). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_inv; auto. @@ -1197,7 +1197,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[inv_norm x]] = /[[x]]. Proof. unfold to_Qc. - transitivity (!! (/[x])). + transitivity (Q2Qc (/[x])). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_inv_norm; auto. @@ -1245,12 +1245,12 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. Theorem spec_squarec x: [[square x]] = [[x]]^2. Proof. unfold to_Qc. - transitivity (!! ([x]^2)). + transitivity (Q2Qc ([x]^2)). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_square; auto. simpl Qcpower. - replace (!! [x] * 1) with (!![x]); try ring. + replace (Q2Qc [x] * 1) with (Q2Qc [x]); try ring. simpl. unfold Qcmult, Q2Qc. apply Qc_decomp; intros _ _; unfold this. @@ -1262,7 +1262,7 @@ Module Make (NN:NType)(ZZ:ZType)(Import NZ:NType_ZType NN ZZ) <: QType. [[power_pos x p]] = [[x]] ^ Pos.to_nat p. Proof. unfold to_Qc. - transitivity (!! ([x]^Zpos p)). + transitivity (Q2Qc ([x]^Zpos p)). unfold Q2Qc. apply Qc_decomp; intros _ _; unfold this. apply Qred_complete; apply spec_power_pos; auto. diff --git a/theories/QArith/Qcanon.v b/theories/QArith/Qcanon.v index f0edc9f13..2ed7a29ea 100644 --- a/theories/QArith/Qcanon.v +++ b/theories/QArith/Qcanon.v @@ -70,7 +70,6 @@ Qed. Definition Q2Qc (q:Q) : Qc := Qcmake (Qred q) (Qred_involutive q). Arguments Q2Qc q%Q. -Notation " !! " := Q2Qc : Qc_scope. Lemma Qc_is_canon : forall q q' : Qc, q == q' -> q = q'. Proof. @@ -87,8 +86,8 @@ Proof. Qed. Hint Resolve Qc_is_canon. -Notation " 0 " := (!!0) : Qc_scope. -Notation " 1 " := (!!1) : Qc_scope. +Notation " 0 " := (Q2Qc 0) : Qc_scope. +Notation " 1 " := (Q2Qc 1) : Qc_scope. Definition Qcle (x y : Qc) := (x <= y)%Q. Definition Qclt (x y : Qc) := (x < y)%Q. @@ -144,15 +143,15 @@ Defined. (** The addition, multiplication and opposite are defined in the straightforward way: *) -Definition Qcplus (x y : Qc) := !!(x+y). +Definition Qcplus (x y : Qc) := Q2Qc (x+y). Infix "+" := Qcplus : Qc_scope. -Definition Qcmult (x y : Qc) := !!(x*y). +Definition Qcmult (x y : Qc) := Q2Qc (x*y). Infix "*" := Qcmult : Qc_scope. -Definition Qcopp (x : Qc) := !!(-x). +Definition Qcopp (x : Qc) := Q2Qc (-x). Notation "- x" := (Qcopp x) : Qc_scope. Definition Qcminus (x y : Qc) := x+-y. Infix "-" := Qcminus : Qc_scope. -Definition Qcinv (x : Qc) := !!(/x). +Definition Qcinv (x : Qc) := Q2Qc (/x). Notation "/ x" := (Qcinv x) : Qc_scope. Definition Qcdiv (x y : Qc) := x*/y. Infix "/" := Qcdiv : Qc_scope. |