Skip to content

Commit bdb702d

Browse files
authored
Merge pull request #203 from coq-community/coq_18590
Adapt to coq/coq#18590
2 parents 79e7ee7 + 9ed2c9f commit bdb702d

16 files changed

+41
-41
lines changed

.github/workflows/docker-action.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ jobs:
1818
matrix:
1919
image:
2020
- 'coqorg/coq:dev'
21+
- 'coqorg/coq:8.19'
2122
- 'coqorg/coq:8.18'
22-
- 'coqorg/coq:8.17'
23-
- 'coqorg/coq:8.16'
24-
- 'coqorg/coq:8.15'
25-
- 'coqorg/coq:8.14'
2623
fail-fast: false
2724
steps:
2825
- uses: actions/checkout@v3

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Follow the instructions on https://github.com/coq-community/templates to regener
99
[![Code of Conduct][conduct-shield]][conduct-link]
1010
[![Zulip][zulip-shield]][zulip-link]
1111

12-
[docker-action-shield]: https://github.com/coq-community/corn/workflows/Docker%20CI/badge.svg?branch=master
13-
[docker-action-link]: https://github.com/coq-community/corn/actions?query=workflow:"Docker%20CI"
12+
[docker-action-shield]: https://github.com/coq-community/corn/actions/workflows/docker-action.yml/badge.svg?branch=master
13+
[docker-action-link]: https://github.com/coq-community/corn/actions/workflows/docker-action.yml
1414

1515
[contributing-shield]: https://img.shields.io/badge/contributions-welcome-%23f7931e.svg
1616
[contributing-link]: https://github.com/coq-community/manifesto/blob/master/CONTRIBUTING.md
@@ -87,7 +87,7 @@ CoRN includes the following parts:
8787
- Bas Spitters ([**@spitters**](https://github.com/spitters))
8888
- Vincent Semeria ([**@vincentse**](https://github.com/vincentse))
8989
- License: [GNU General Public License v2](LICENSE)
90-
- Compatible Coq versions: Coq 8.14 or greater
90+
- Compatible Coq versions: Coq 8.18 or greater
9191
- Additional dependencies:
9292
- [Math-Classes](https://github.com/coq-community/math-classes) 8.8.1 or
9393
greater, which is a library of abstract interfaces for mathematical

algebra/RSetoid.v

+2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Set Warnings "-unsupported-attributes".
2525
Set Implicit Arguments.
2626

2727
Require Export Coq.Setoids.Setoid.
28+
Require Export (hints) MathClasses.interfaces.orders.
2829
Require Import MathClasses.interfaces.abstract_algebra.
30+
Export (hints) MathClasses.interfaces.abstract_algebra.
2931

3032
(**
3133
* Classic Setoids presented in a bundled way.

classes/Qclasses.v

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Require Import
22
CoRN.model.totalorder.QMinMax
3+
MathClasses.interfaces.orders
34
MathClasses.interfaces.abstract_algebra
45
MathClasses.orders.minmax.
56
Require Export

coq-corn.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build: [
4646
]
4747
install: [make "install"]
4848
depends: [
49-
"coq" {(>= "8.14" & < "8.19~") | (= "dev")}
49+
"coq" {(>= "8.18" & < "8.20~") | (= "dev")}
5050
"coq-math-classes" {(>= "8.8.1") | (= "dev")}
5151
"coq-bignums"
5252
]

meta.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,13 @@ license:
7979
identifier: GPL-2.0
8080

8181
supported_coq_versions:
82-
text: Coq 8.14 or greater
83-
opam: '{(>= "8.14" & < "8.19~") | (= "dev")}'
82+
text: Coq 8.18 or greater
83+
opam: '{(>= "8.18" & < "8.20~") | (= "dev")}'
8484

8585
tested_coq_opam_versions:
8686
- version: dev
87+
- version: "8.19"
8788
- version: "8.18"
88-
- version: "8.17"
89-
- version: "8.16"
90-
- version: "8.15"
91-
- version: "8.14"
9289

9390
dependencies:
9491
- opam:

metric2/Classified.v

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ Hint Unfold relation : type_classes.
4646
Context `{!MetricSpaceBall}.
4747

4848
Class MetricSpaceClass: Prop :=
49-
{ mspc_ball_proper:> forall (e1 e2 : Qinf) (x y : X),
49+
{ mspc_ball_proper:: forall (e1 e2 : Qinf) (x y : X),
5050
equiv e1 e2 -> (mspc_ball e1 x y <-> mspc_ball e2 x y)
5151
; mspc_ball_inf: ∀ x y, mspc_ball Qinf.infinite x y
5252
; mspc_ball_negative: ∀ (e: Q), (e < 0)%Q → ∀ x y, ~ mspc_ball e x y
53-
; mspc_refl:> ∀ e, (0 <= e)%Qinf → Reflexive (mspc_ball e)
54-
; mspc_sym:> ∀ e, Symmetric (mspc_ball e)
53+
; mspc_refl:: ∀ e, (0 <= e)%Qinf → Reflexive (mspc_ball e)
54+
; mspc_sym:: ∀ e, Symmetric (mspc_ball e)
5555
; mspc_triangle: ∀ (e1 e2: Qinf) (a b c: X),
5656
mspc_ball e1 a b → mspc_ball e2 b c → mspc_ball (e1 + e2) a c
5757
; mspc_closed: ∀ (e: Qinf) (a b: X),
@@ -665,7 +665,7 @@ Section local_uniform_continuity.
665665
:= f ∘ @proj1_sig _ _.
666666

667667
Class LocallyUniformlyContinuous_mu (f: X → Y): Type :=
668-
luc_mu (b: Ball X Qpos):> UniformlyContinuous_mu (restrict b f).
668+
luc_mu (b: Ball X Qpos):: UniformlyContinuous_mu (restrict b f).
669669

670670
Context (f: X → Y) {mu: LocallyUniformlyContinuous_mu f}.
671671

metric2/MetricMorphisms.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Arguments app_inverse {X Y} f {AppInverse}.
6363

6464
Class DenseEmbedding `{Equiv X} {Y : MetricSpace} (f : X → Y) `{!AppInverse f} := {
6565
dense_embed_setoid : Setoid X ;
66-
dense_injective :> Injective f ;
66+
dense_injective :: Injective f ;
6767
dense_inverse : ∀ x (ε:Qpos), ball (proj1_sig ε) (f (app_inverse f x ε)) x
6868
}.
6969

model/setoids/decsetoid.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Class Apartness `{SetoidClass.Setoid} (ap: Crelation A): Type :=
2020

2121
Class CSetoid_class `(Setoid): Type :=
2222
{ apart: Crelation A
23-
; csetoid_apart:> Apartness apart
23+
; csetoid_apart :: Apartness apart
2424
}.
2525

2626
Definition is_CSetoid_from_class `{Apartness}: is_CSetoid _ equiv ap0.

ode/AbstractIntegration.v

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Require CoRN.reals.fast.CRtrans CoRN.reals.faster.ARtrans. (* This is almost all
2222

2323
Import Qinf.coercions QnonNeg.coercions QnnInf.coercions CoRN.stdlib_omissions.Q.
2424

25-
2625
Ltac done :=
2726
trivial; hnf; intros; solve
2827
[ repeat (first [solve [trivial | apply: sym_equal; trivial]

ode/FromMetric2.v

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Require Import CoRN.metric2.Complete CoRN.metric2.Metric CoRN.ode.metric.
55

66
Require Import
77
CoRN.model.totalorder.QposMinMax
8-
MathClasses.interfaces.abstract_algebra MathClasses.implementations.stdlib_rationals
8+
MathClasses.interfaces.abstract_algebra MathClasses.interfaces.rationals MathClasses.implementations.stdlib_rationals
99
MathClasses.orders.orders MathClasses.orders.semirings MathClasses.orders.rings MathClasses.theory.rings.
1010

1111
Import Qinf.notations Qinf.coercions.
@@ -211,11 +211,13 @@ Lemma nested_balls (x1 x2 : Q) {y1 y2 : Q} {e : Qinf} :
211211
Proof.
212212
intros B A1 A2 A3. destruct e as [e |]; [| apply mspc_inf].
213213
apply mspc_ball_Qabs_flip in B. apply mspc_ball_Qabs_flip.
214-
assert (x1 ≤ x2) by (transitivity y1; [| transitivity y2]; trivial).
214+
assert (x1 ≤ x2).
215+
now apply (PreOrder_Transitive _ y1); [|apply (PreOrder_Transitive _ y2)].
215216
rewrite abs.abs_nonneg by now apply rings.flip_nonneg_minus.
216217
rewrite abs.abs_nonneg in B by now apply rings.flip_nonneg_minus.
217218
apply rings.flip_le_minus_l. apply rings.flip_le_minus_l in B.
218-
transitivity x2; [easy |]. transitivity (e + x1); [easy |].
219+
apply (PreOrder_Transitive _ x2); [easy|].
220+
apply (PreOrder_Transitive _ (e + x1)); [easy|].
219221
apply (orders.order_preserving (e +)); easy.
220222
Qed. (* Too long? *)
221223

ode/SimpleIntegration.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Section integral_interface.
5959
(forall x, from <= x <= from+ proj1_sig width -> ball (proj1_sig r) (f x) ('mid)) ->
6060
ball (proj1_sig (width * r)%Qpos) (∫ f from (from_Qpos width)) (' (proj1_sig width * mid)%Q)
6161

62-
; integral_wd:> Proper (Qeq ==> QnonNeg.eq ==> @msp_eq _) (∫ f) }.
62+
; integral_wd:: Proper (Qeq ==> QnonNeg.eq ==> @msp_eq _) (∫ f) }.
6363

6464
(* Todo: Show that the sign function is integrable while not locally uniformly continuous. *)
6565

ode/metric.v

+6-6
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ Class ExtMetricSpaceClass (X : Type) `{MetricSpaceBall X} : Prop := {
142142
mspc_radius_proper : Proper ((=) ==> (≡) ==> (≡) ==> iff) ball;
143143
mspc_inf: ∀ x y, ball Qinf.infinite x y;
144144
mspc_negative: ∀ (e: Q), e < 0 → ∀ x y, ~ ball e x y;
145-
mspc_refl:> ∀ e : Q, 0 ≤ e → Reflexive (ball e);
146-
mspc_symm:> ∀ e, Symmetric (ball e);
145+
mspc_refl:: ∀ e : Q, 0 ≤ e → Reflexive (ball e);
146+
mspc_symm:: ∀ e, Symmetric (ball e);
147147
mspc_triangle: ∀ (e1 e2: Q) (a b c: X),
148148
ball e1 a b → ball e2 b c → ball (e1 + e2) a c;
149149
mspc_closed: ∀ (e: Q) (a b: X),
@@ -437,7 +437,7 @@ Definition restrict (f : X -> Y) (x : X) (r : Q) : sig (ball r x) -> Y :=
437437
IsUniformlyContinuous and IsLocallyUniformlyContinuous *)
438438

439439
Class IsLocallyUniformlyContinuous (f : X -> Y) (lmu : X -> Q -> Q -> Qinf) :=
440-
luc_prf :> forall (x : X) (r : Q), IsUniformlyContinuous (restrict f x r) (lmu x r).
440+
luc_prf :: forall (x : X) (r : Q), IsUniformlyContinuous (restrict f x r) (lmu x r).
441441

442442
Global Arguments luc_prf f lmu {_} x r.
443443

@@ -580,7 +580,7 @@ particular, integral_lipschitz in AbstractIntegration.v defines [L] as
580580
[λ a r, abs (f a) + L' a r * r]. *)
581581

582582
Class IsLocallyLipschitz (f : X -> Y) (L : X -> Q -> Q) :=
583-
llip_prf :> forall (x : X) (r : Q), PropHolds (0 ≤ r) -> IsLipschitz (restrict f x r) (L x r).
583+
llip_prf :: forall (x : X) (r : Q), PropHolds (0 ≤ r) -> IsLipschitz (restrict f x r) (L x r).
584584

585585
Global Arguments llip_prf f L {_} x r _.
586586

@@ -625,7 +625,7 @@ Section Contractions.
625625
Context `{MetricSpaceBall X, MetricSpaceBall Y}.
626626

627627
Class IsContraction (f : X -> Y) (q : Q) := {
628-
contr_prf :> IsLipschitz f q;
628+
contr_prf :: IsLipschitz f q;
629629
contr_lt_1 : q < 1
630630
}.
631631

@@ -815,7 +815,7 @@ Qed.
815815

816816
Class Limit := lim : RegularFunction -> X.
817817

818-
Class CompleteMetricSpaceClass `{Limit} := cmspc :> Surjective reg_unit (inv := lim).
818+
Class CompleteMetricSpaceClass `{Limit} := cmspc :: Surjective reg_unit (inv := lim).
819819

820820
Definition tends_to (f : RegularFunction) (l : X) :=
821821
forall e : Q, 0 < e -> ball e (f e) l.

reals/faster/AQmetric.v

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Add Ring AQ : (rings.stdlib_ring_theory AQ).
1414

1515
Local Open Scope uc_scope.
1616

17+
(* To ensure the definitions below don't use sg_setoid instead *)
18+
Existing Instance strong_setoids.Setoid_instance_0.
1719
Definition AQ_as_MetricSpace := Emetric (cast AQ Q_as_MetricSpace).
1820
Definition AQPrelengthSpace := EPrelengthSpace QPrelengthSpace (cast AQ Q_as_MetricSpace).
1921
Definition AQLocated : locatedMetric AQ_as_MetricSpace.

reals/faster/ARbigD.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Require Import
66
CoRN.model.totalorder.QposMinMax
77
CoRN.metric2.MetricMorphisms CoRN.model.metric2.Qmetric CoRN.util.Qdlog CoRN.reals.faster.ARArith
88
MathClasses.theory.int_pow MathClasses.theory.nat_pow
9-
MathClasses.implementations.stdlib_rationals MathClasses.implementations.stdlib_binary_integers MathClasses.implementations.fast_integers MathClasses.implementations.dyadics.
9+
MathClasses.interfaces.rationals MathClasses.implementations.stdlib_rationals MathClasses.interfaces.integers MathClasses.implementations.stdlib_binary_integers MathClasses.implementations.fast_integers MathClasses.implementations.dyadics.
1010

1111
Add Field Q : (dec_fields.stdlib_field_theory Q).
1212

reals/faster/ApproximateRationals.v

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ Class AppRationals AQ {e plus mult zero one inv} `{Apart AQ} `{Le AQ} `{Lt AQ}
2525
`{!AppInverse AQtoQ} {ZtoAQ : Cast Z AQ} `{!AppDiv AQ} `{!AppApprox AQ}
2626
`{!Abs AQ} `{!Pow AQ N} `{!ShiftL AQ Z}
2727
`{∀ x y : AQ, Decision (x = y)} `{∀ x y : AQ, Decision (x ≤ y)} : Prop := {
28-
aq_ring :> @Ring AQ e plus mult zero one inv ;
29-
aq_trivial_apart :> TrivialApart AQ ;
30-
aq_order_embed :> OrderEmbedding AQtoQ ;
31-
aq_strict_order_embed :> StrictOrderEmbedding AQtoQ ;
32-
aq_ring_morphism :> SemiRing_Morphism AQtoQ ;
33-
aq_dense_embedding :> DenseEmbedding AQtoQ ;
28+
aq_ring :: @Ring AQ e plus mult zero one inv ;
29+
aq_trivial_apart :: TrivialApart AQ ;
30+
aq_order_embed :: OrderEmbedding AQtoQ ;
31+
aq_strict_order_embed :: StrictOrderEmbedding AQtoQ ;
32+
aq_ring_morphism :: SemiRing_Morphism AQtoQ ;
33+
aq_dense_embedding :: DenseEmbedding AQtoQ ;
3434
aq_div : ∀ x y k, ball (2 ^ k) ('app_div x y k) ('x / 'y) ;
3535
aq_compress : ∀ x k, ball (2 ^ k) ('app_approx x k) ('x) ;
36-
aq_shift :> ShiftLSpec AQ Z (≪) ;
37-
aq_nat_pow :> NatPowSpec AQ N (^) ;
38-
aq_ints_mor :> SemiRing_Morphism ZtoAQ
36+
aq_shift :: ShiftLSpec AQ Z (≪) ;
37+
aq_nat_pow :: NatPowSpec AQ N (^) ;
38+
aq_ints_mor :: SemiRing_Morphism ZtoAQ
3939
}.
4040

4141
Lemma order_embedding_iff `{OrderEmbedding A B f} x y :

0 commit comments

Comments
 (0)