Skip to content

Commit ba92f09

Browse files
committed
Add support for coq 8.18
Signed-off-by: Avi Shinnar <[email protected]>
1 parent 495639a commit ba92f09

25 files changed

+88
-89
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
coq_container:
1414
# - coqorg/coq:8.12.2
1515
- coqorg/coq:8.16.1-ocaml-4.13.1-flambda
16+
- coqorg/coq:8.18.0-ocaml-4.13.1-flambda
1617
container:
1718
image: ${{ matrix.coq_container }}
1819
options: --user root

_CoqProject

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-R coq FormalML -arg -set -arg "Warnings=+default,-ambiguous-path,-typechecker,-ssr-search-moved,-deprecated,-notation-overridden"
1+
-R coq FormalML -arg -set -arg "Warnings=+default,-ambiguous-path,-coercions,-hiding-delimiting-key,-overwriting-delimiting-key,-redundant-canonical-projection,-typechecker,-ssr-search-moved,-deprecated,-notation-overridden"

coq/CertRL/LM/lax_milgram.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,12 +1005,11 @@ intro x; field.
10051005
repeat (rewrite Hx1 in HU0).
10061006
rewrite Rmult_comm.
10071007
trivial.
1008-
absurd (norm u0 = 0).
1008+
try revert HU0.
10091009
apply Rgt_not_eq.
10101010
apply Rlt_gt.
10111011
apply norm_gt_0.
10121012
trivial.
1013-
trivial.
10141013
apply norm_ge_0.
10151014
simpl.
10161015
apply is_finite_correct in Hfin.

coq/CertRL/qvalues.v

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,11 @@ Qed.
444444
Proof.
445445
destruct (is_nil_dec l); try now subst.
446446
apply Rle_antisym.
447-
+ rewrite Rmax_list_le_iff; try rewrite map_not_nil; try easy.
448-
intros x Hx. rewrite in_map_iff in Hx.
449-
destruct Hx as [x0 [Hx0 Hx0']].
450-
now subst. congruence.
447+
+ rewrite Rmax_list_le_iff; try rewrite map_not_nil.
448+
* intros x Hx. rewrite in_map_iff in Hx.
449+
destruct Hx as [x0 [Hx0 Hx0']].
450+
now subst.
451+
* congruence.
451452
+ apply Rmax_spec.
452453
rewrite in_map_iff.
453454
rewrite BasicUtils.ne_symm in n.

coq/FHE/encode.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ Canonical ev_C_rmorphism (x:R[i]) := RMorphism (ev_C_is_rmorphism x).
12831283
Proof.
12841284
move=> p.
12851285
rewrite /peval_C_quot -eq_lock.
1286-
case piP => a /EquivQuot.eqmodP.
1286+
case: piP => a /EquivQuot.eqmodP.
12871287
rewrite /Quotient.equiv_equiv /Quotient.equiv /in_mem /mem /= /peval_C_ker_pred.
12881288
destruct (ev_C_is_rmorphism x).
12891289
rewrite base => eqq.
@@ -1713,7 +1713,7 @@ Section eval_vectors.
17131713
Proof.
17141714
move=> x.
17151715
rewrite /mx_eval_quot -eq_lock.
1716-
case piP => a /EquivQuot.eqmodP.
1716+
case: piP => a /EquivQuot.eqmodP.
17171717
rewrite /Quotient.equiv_equiv /Quotient.equiv /in_mem /mem /= /mx_eval_ker_pred.
17181718
destruct mx_eval_is_rmorphism.
17191719
rewrite base => eqq.

coq/NeuralNetworks/DefinedFunctions.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11783,8 +11783,8 @@ Tactic Notation "DefinedFunction_scalar_cases" tactic(first) ident(c) :=
1178311783
intros fa.
1178411784
do 2 (apply functional_extensionality; intro).
1178511785
unfold scaleUnitVector; simpl.
11786-
match_destr.
11787-
now specialize (fa x1); simpl in fa.
11786+
match_destr
11787+
; try now specialize (fa x1); simpl in fa.
1178811788
Qed.
1178911789

1179011790

coq/ProbTheory/ConditionalExpectation.v

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4293,7 +4293,7 @@ Section cond_exp_l2.
42934293
unfold norm, minus, plus, opp in *; simpl in *.
42944294
rewrite L2RRVq_norm_norm in HH2.
42954295
autorewrite with quot in HH2.
4296-
rewrite LpRRVq_normE in HH2.
4296+
try rewrite LpRRVq_normE in HH2.
42974297
rewrite LpRRVminus_plus.
42984298
unfold nonneg in HH2 |- *; simpl in *.
42994299
rewrite HH2.
@@ -4315,7 +4315,7 @@ Section cond_exp_l2.
43154315
exists w'.
43164316
split; trivial.
43174317
autorewrite with quot.
4318-
rewrite LpRRVq_normE.
4318+
try rewrite LpRRVq_normE.
43194319
now rewrite LpRRVminus_plus.
43204320
+ subst.
43214321
exists (Quot _ w).
@@ -4324,7 +4324,7 @@ Section cond_exp_l2.
43244324
split; trivial.
43254325
* rewrite L2RRVq_norm_norm.
43264326
autorewrite with quot.
4327-
rewrite LpRRVq_normE.
4327+
try rewrite LpRRVq_normE.
43284328
now rewrite LpRRVminus_plus.
43294329
}
43304330
repeat split.
@@ -4360,7 +4360,7 @@ Section cond_exp_l2.
43604360
eauto.
43614361
* rewrite L2RRVq_norm_norm.
43624362
autorewrite with quot.
4363-
rewrite LpRRVq_normE.
4363+
try rewrite LpRRVq_normE.
43644364
rewrite <- LpRRVminus_plus.
43654365
unfold nonneg in *; simpl in *.
43664366
rewrite xeqq.
@@ -4490,7 +4490,7 @@ Section cond_exp_l2.
44904490
rewrite L2RRVq_norm_norm.
44914491
unfold minus, plus, opp; simpl.
44924492
LpRRVq_simpl.
4493-
rewrite LpRRVq_normE.
4493+
try rewrite LpRRVq_normE.
44944494
now rewrite LpRRVminus_plus.
44954495
- intros [?[??]]; subst.
44964496
destruct H0 as [?[??]]; subst.
@@ -4500,7 +4500,7 @@ Section cond_exp_l2.
45004500
rewrite L2RRVq_norm_norm.
45014501
unfold minus, plus, opp; simpl.
45024502
LpRRVq_simpl.
4503-
rewrite LpRRVq_normE.
4503+
try rewrite LpRRVq_normE.
45044504
now rewrite LpRRVminus_plus.
45054505
Qed.
45064506

coq/ProbTheory/Expectation.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ Section Expectation_sec.
11731173
+ split; intros.
11741174
* field_simplify in H.
11751175
-- now apply INR_eq.
1176-
-- revert H.
1176+
-- try revert H.
11771177
now apply pow_nzero.
11781178
* subst.
11791179
field_simplify; trivial.
@@ -4730,8 +4730,7 @@ Section EventRestricted.
47304730
+ typeclasses eauto.
47314731
+ intro z.
47324732
unfold lift_event_restricted_domain_fun.
4733-
match_destr.
4734-
apply H5.
4733+
match_destr; try apply H5.
47354734
+ subst.
47364735
erewrite event_restricted_SimpleExpectation; eauto.
47374736
apply SimpleExpectation_ext.
@@ -4927,7 +4926,7 @@ Section indep.
49274926
; lra.
49284927
}
49294928

4930-
generalize (simple_approx_rv
4929+
generalize (simple_approx_rv (dom:= borel_sa)
49314930
(rvchoice (fun x => if Req_EM_T (c x) 0 then false else true)
49324931
(fun x => x)
49334932
(fun _ => 0)) n).

coq/ProbTheory/Martingale.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ Section martingale.
13851385
Global Instance martingale_transform_adapted (H X : nat -> Ts -> R) sas
13861386
{adapt:IsAdapted borel_sa X sas}
13871387
{filt:IsFiltration sas} :
1388-
is_predictable H sas ->
1388+
is_predictable (saD:=borel_sa) H sas ->
13891389
IsAdapted borel_sa (martingale_transform H X) sas.
13901390
Proof.
13911391
intros is_pre [|n]; simpl.
@@ -1419,7 +1419,7 @@ Section martingale.
14191419
{isfeS:forall n, IsFiniteExpectation prts (rvmult (H (S n)) (rvminus (X (S n)) (X n)))}
14201420
{isfe : forall n : nat, IsFiniteExpectation prts (martingale_transform H X n)}
14211421
{adapt:IsAdapted borel_sa (martingale_transform H X) sas}
1422-
(predict: is_predictable H sas)
1422+
(predict: is_predictable (saD:=borel_sa) H sas)
14231423
{mart:IsMartingale eq X sas} :
14241424
IsMartingale eq (martingale_transform H X) sas.
14251425
Proof.
@@ -1560,7 +1560,7 @@ Section martingale.
15601560
{isfeS:forall n, IsFiniteExpectation prts (rvmult (H (S n)) (rvminus (X (S n)) (X n)))}
15611561
{isfe : forall n : nat, IsFiniteExpectation prts (martingale_transform H X n)}
15621562
{adapt:IsAdapted borel_sa (martingale_transform H X) sas}
1563-
(predict: is_predictable H sas)
1563+
(predict: is_predictable (saD:=borel_sa) H sas)
15641564
(Hpos: forall n, almostR2 prts Rle (const 0) (H n))
15651565
{mart:IsMartingale Rle X sas} :
15661566
IsMartingale Rle (martingale_transform H X) sas.

coq/ProbTheory/MartingaleConvergence.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Section mct.
167167
end)))).
168168

169169
Lemma upcrossing_bound_is_predictable a b :
170-
is_predictable (upcrossing_bound a b) sas.
170+
is_predictable (saD:=borel_sa) (upcrossing_bound a b) sas.
171171
Proof.
172172
intros m.
173173
unfold upcrossing_bound.
@@ -2390,7 +2390,7 @@ Section mct.
23902390
apply Rbar_plus_le_compat
23912391
; [| now rewrite IsFiniteNonnegExpectation; try reflexivity].
23922392

2393-
assert (ispredminus1:is_predictable (fun k : nat => rvminus (const 1) (upcrossing_bound Y a b k)) sas).
2393+
assert (ispredminus1:is_predictable (saD:=borel_sa) (fun k : nat => rvminus (const 1) (upcrossing_bound Y a b k)) sas).
23942394
{
23952395
red.
23962396
apply is_adapted_minus.

0 commit comments

Comments
 (0)