Skip to content

Commit ed881c0

Browse files
committed
revived ProbTh.v. now using the official CoRN and MathClasses.
will update the installation instructions shortly.
1 parent 79979ea commit ed881c0

File tree

11 files changed

+32
-29
lines changed

11 files changed

+32
-29
lines changed

SConstruct

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ while nodes:
1515
if (node.endswith('.v')
1616
and not node.endswith('CRMisc/ContField.v')
1717
and not node.endswith('CRMisc/PointWiseRing.v')
18-
and not node.endswith('CRMisc/OldMetricAsNew.v')
18+
# and not node.endswith('CRMisc/OldMetricAsNew.v')
1919
and not node.endswith('CartAR.v')
20-
and not node.endswith('ProbTh.v')
20+
# and not node.endswith('ProbTh.v')
2121
and not node.endswith('shim/oldJavaShim/icreateConcrete.v')
2222
and not node.endswith('Everything.v')
2323
and not node.endswith('trash.v')):
@@ -31,7 +31,8 @@ includes = ' '.join(map(lambda x: '-I ' + x, dirs[1:]))
3131

3232
#Note that ROSCoq depends on Corn (which depends on MathClasses). Please edit the line below, depending on how you installed them.
3333
# See https://github.com/c-corn/corn
34-
Rs = '-R src ROSCOQ -R dependencies/corn CoRN -R dependencies/corn/math-classes MathClasses'
34+
#Rs = '-R src ROSCOQ -R dependencies/corn CoRN -R dependencies/corn/math-classes MathClasses'
35+
Rs = '-R src ROSCOQ'
3536
coqcmd = 'coqc ${str(SOURCE)[:-2]} ' + Rs
3637

3738
env['COQFLAGS'] = Rs

coqidescript.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
coqide -async-proofs-j 2 -R src ROSCOQ -R dependencies/corn CoRN -R dependencies/corn/math-classes MathClasses $@ > /dev/null &
1+
coqide -async-proofs-j 2 -R src ROSCOQ $@ > /dev/null &
22

src/CRMisc/IRLemmasAsCR.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,8 @@ Qed.
922922

923923

924924

925-
Require Import orders.rings.
926-
Require Import theory.rings.
925+
Require Import MathClasses.orders.rings.
926+
Require Import MathClasses.theory.rings.
927927
Require Import MCMisc.fields.
928928

929929

src/CRMisc/OldMetricAsNew.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Qed.
9999

100100
End OldNew.
101101

102+
(*
102103
Require Export CoRN.metric2.UniformContinuity.
103104
Require Export CoRN.metric2.StepFunction.
104105
Require Export CoRN.metric2.Limit.
@@ -126,3 +127,4 @@ Require Export CoRN.model.metric2.LinfMetric.
126127
Require Export CoRN.model.metric2.L1metric.
127128
Require Export CoRN.model.metric2.Qmetric.
128129
Require Export CoRN.model.metric2.BoundedFunction.
130+
*)

src/CartCR.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Proof.
6969
unfoldMC; intros; lra.
7070
Qed.
7171

72-
Require Export orders.
72+
Require Export MathClasses.interfaces.orders.
7373

7474
Hint Resolve CRweakenLt CRLtAddLHS CRLtAddRHS : CRBasics.
7575

src/MCInstances.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Instance SqrtFun_instancee_IR : SqrtFun IR IR.
1313
intros r. apply (sqrt (AbsIR r)). apply AbsIR_nonneg.
1414
Defined.
1515

16-
Require Import interfaces.abstract_algebra.
16+
Require Import MathClasses.interfaces.abstract_algebra.
1717
Require Import MathClasses.theory.rings.
1818

1919
Definition decAuto : ∀ (P: Prop) `{Decision P},

src/MCMisc/decInstances.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Require Import ROSCOQ.StdlibMisc.
66
(*Move the 2 functions below to other file*)
77

88

9-
Require Import interfaces.abstract_algebra.
9+
Require Import MathClasses.interfaces.abstract_algebra.
1010
Require Export Coq.Lists.List.
1111

1212
Instance InstanceDecidableEq {T:Type} {deq : DecEq T} (x y:T) : Decision (x ≡ y).

src/ProbTh.v

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Variable A : CRing.
4141

4242
Require Export CRRing2MCRing.
4343

44-
Require Export MCMisc.BooleanAlgebra.
44+
Require Export MCMisc.BooleanRing.
4545

4646

4747
(** make sure that A4 and A5 are provable.
@@ -67,7 +67,7 @@ Definition MeasurePropM23
6767

6868
Class MeasureAlgebra (μ : CSetoid_fun A IR)
6969
:= {
70-
mpmboolean :> BooleanAlgebra A;
70+
mpmboolean :> BooleanRing A;
7171
mpm0 : MeasureNonZero μ;
7272
mpm1 : MeasurePropM1 μ;
7373
mpm2 : MeasurePropM23 μ
@@ -160,7 +160,7 @@ Proof.
160160
rewrite boolean_mult.
161161
assert (b * a + b + b * a + b * a + a =
162162
a + b + b * a + (b * a + b * a)) as Hr by ring.
163-
rewrite BooleanAlgebraXplusX in Hr.
163+
rewrite BooleanRingXplusX in Hr.
164164
rewrite Hr.
165165
autounfold with IRMC.
166166
rewrite cm_rht_unit_unfolded.
@@ -176,9 +176,8 @@ Proof.
176176
as Hr by ring; rewrite Hr; clear Hr.
177177
rewrite boolean_mult.
178178
rewrite boolean_mult.
179-
rewrite BooleanAlgebraXplusX.
179+
rewrite BooleanRingXplusX.
180180
rewrite MeasurePropM2Implies; auto with Alg.
181-
unfold negate.
182181
rewrite minus_0_r.
183182
autounfold with IRMC.
184183
apply addNNegLeEq.
@@ -213,11 +212,11 @@ Definition ProbAlgebraPsMSP : CPsMetricSpace.
213212
apply plus_cancel_ap_rht with (z:= y).
214213
eapply ap_wdr_unfolded;[apply Hgt|].
215214
symmetry.
216-
apply BooleanAlgebraXplusX.
215+
apply BooleanRingXplusX.
217216
- unfold tri_ineq. intros ? ? ?.
218217
simpl. simpl.
219218
assert (x + (y + y) + z = (x + y) + (y + z)) as Hr by ring.
220-
rewrite BooleanAlgebraXplusX in Hr.
219+
rewrite BooleanRingXplusX in Hr.
221220
autounfold with IRMC in Hr.
222221
(* Add Ring RisaRing1: (CRing_Ring A). *)
223222
rewrite cm_rht_unit_unfolded in Hr.
@@ -234,7 +233,7 @@ Definition ProbAlgebraMSP : CMetricSpace.
234233
apply mpm2.
235234
apply op_rht_resp_ap with (z:=y) in Hap.
236235
eapply ap_wdr_unfolded in Hap;[exact Hap|].
237-
apply BooleanAlgebraXplusX.
236+
apply BooleanRingXplusX.
238237
Defined.
239238

240239
Notation "a -ᵈ b" := (cms_d a b) (at level 90).
@@ -326,7 +325,7 @@ Proof.
326325
apply paperEq2.
327326
Qed.
328327

329-
Require Export OldMetricAsNew.
328+
Require Import CRMisc.OldMetricAsNew.
330329

331330
(* now we get access to the completion operation.
332331
metric2/ seems to be more developed
@@ -385,30 +384,31 @@ Qed.
385384
386385
Definition Qplus_uc : Q_as_MetricSpace --> Q_as_MetricSpace --> Q_as_MetricSpace :=
387386
Build_UniformlyContinuousFunction Qplus_uc_prf.
388-
*)
389387
Definition PlusSlow_uc : (AMS --> AMS --> AMS).
390388
Admitted.
391389
392-
Require Export CoRN.metric2.Compact.
393-
394-
Definition MetricallyComplete : CProp :=
395-
CompleteSubset AMS (λ x, True).
396-
397-
Definition AMSC : MetricSpace := Complete AMS.
398390
399391
Definition PlusSlowUC : (AMSC --> AMSC --> AMSC) :=
400392
Cmap2_slow PlusSlow_uc.
401393
402-
(** general definition of a completion of a
394+
(* general definition of a completion of a
403395
metric ring? generalize the development of CR
404396
(e.g. [CRPlus_uc])
405397
Make it fast by assuming [PrelengthSpace]
406398
and then using [Cmap] instead of [Cmap2_slow].
407399
Do we need more axioms to prove that [AMS]
408400
is a prelengthspace?
409401
*)
402+
*)
410403

411404

405+
Require Export CoRN.metric2.Compact.
406+
407+
Definition MetricallyComplete : CProp :=
408+
CompleteSubset AMS (λ x, True).
409+
410+
Definition AMSC : MetricSpace := Complete AMS.
411+
412412
End MetricSpace.
413413
End BoolRing.
414414

src/Vector.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Proof.
231231
intros. destruct c. simpl. reflexivity.
232232
Qed.
233233

234-
Require Import interfaces.orders.
234+
Require Import MathClasses.interfaces.orders.
235235

236236
Global Instance LeCart2DPreorder `{l:Le A} `{PreOrder A l}
237237
: PreOrder (Cart2D_instance_le).

src/robots/car/wriggle.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Local Notation SWriggle := (Wriggle α αNZ d).
233233

234234
Local Notation tr := ((@f_rcpcl ℝ α αPos)).
235235

236-
Require Import canonical_names.
236+
Require Import MathClasses.interfaces.canonical_names.
237237

238238
Local Opaque Min.
239239
Local Opaque Max.

0 commit comments

Comments
 (0)