Skip to content

Commit bd05c57

Browse files
authored
Merge pull request #1921 from proux01/reworder
Port last files to new rewrite goals order
2 parents 9cc5fa2 + bb5cd62 commit bd05c57

8 files changed

Lines changed: 21 additions & 18 deletions

File tree

analysis_stdlib/Rstruct_topology.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ From mathcomp Require normedtype sequences.
1717
(* The following line is for RlnE. *)
1818
From mathcomp Require exp.
1919

20-
Set SsrOldRewriteGoalsOrder. (* change Set to Unset when porting the file, then remove the line when requiring MathComp >= 2.6 *)
20+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
2121
Set Implicit Arguments.
2222
Unset Strict Implicit.
2323
Unset Printing Implicit Defensive.

analysis_stdlib/showcase/uniform_bigO.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ From mathcomp Require Import ssrnat eqtype choice fintype bigop order ssralg ssr
55
From mathcomp Require Import boolp reals Rstruct_topology ereal classical_sets.
66
From mathcomp Require Import interval_inference topology normedtype landau.
77

8-
Set SsrOldRewriteGoalsOrder. (* change Set to Unset when porting the file, then remove the line when requiring MathComp >= 2.6 *)
8+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
99
Set Implicit Arguments.
1010
Unset Strict Implicit.
1111
Unset Printing Implicit Defensive.

classical/boolp.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ From mathcomp Require internal_Eqdep_dec.
7373
(* *)
7474
(******************************************************************************)
7575

76+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
7677
Set Implicit Arguments.
7778
Unset Strict Implicit.
7879
Unset Printing Implicit Defensive.

experimental_reals/discrete.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ From mathcomp.classical Require Import boolp.
1111
From mathcomp Require Import xfinmap reals.
1212

1313
(* -------------------------------------------------------------------- *)
14-
Set SsrOldRewriteGoalsOrder. (* change Set to Unset when porting the file, then remove the line when requiring MathComp >= 2.6 *)
14+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
1515
Set Implicit Arguments.
1616
Unset Strict Implicit.
1717
Unset Printing Implicit Defensive.

experimental_reals/xfinmap.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
From mathcomp Require Import all_ssreflect_compat all_algebra.
88
From mathcomp Require Export finmap.
99

10-
Set SsrOldRewriteGoalsOrder. (* change Set to Unset when porting the file, then remove the line when requiring MathComp >= 2.6 *)
10+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
1111
Set Implicit Arguments.
1212
Unset Strict Implicit.
1313
Unset Printing Implicit Defensive.
@@ -139,7 +139,7 @@ Lemma big_nat_mkfset (F : nat -> R) n :
139139
Proof.
140140
rewrite -(big_map val xpredT) /=; apply/perm_big.
141141
apply/uniq_perm; rewrite ?iota_uniq //.
142-
rewrite map_inj_uniq /=; last apply/val_inj.
142+
rewrite map_inj_uniq /=; first apply/val_inj.
143143
by rewrite /index_enum -enumT enum_uniq.
144144
by move=> i; rewrite /index_enum -enumT -enum_fsetE in_fset /index_iota subn0.
145145
Qed.

reals/reals.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ From mathcomp Require Import mathcomp_extra boolp classical_sets set_interval.
5252
Declare Scope real_scope.
5353

5454
(* -------------------------------------------------------------------- *)
55-
Set SsrOldRewriteGoalsOrder. (* change Set to Unset when porting the file, then remove the line when requiring MathComp >= 2.6 *)
55+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
5656
Set Implicit Arguments.
5757
Unset Strict Implicit.
5858
Unset Printing Implicit Defensive.
@@ -349,7 +349,7 @@ Lemma inf_sumE (A B : set R) :
349349
Proof.
350350
move/has_inf_supN => ? /has_inf_supN ?; rewrite /inf.
351351
rewrite [X in - sup X = _](_ : _ =
352-
[set x + y | x in [set - x | x in A ] & y in [set - x | x in B]]).
352+
[set x + y | x in [set - x | x in A ] & y in [set - x | x in B]]); last first.
353353
by rewrite sup_sumE // -opprD.
354354
rewrite eqEsubset; split => /= t [] /= x []a Aa.
355355
case => b Bb <- <-; exists (- a); first by exists a.
@@ -607,9 +607,9 @@ have [supA|supNA] := pselect (has_sup A); last first.
607607
by rewrite !sup_out // => /has_sup_down.
608608
have supDA : has_sup (down A) by apply/has_sup_down.
609609
apply/eqP; rewrite eq_le !sup_le //.
610+
- by case: supA => -[x xA] _; exists x; apply/le_down.
610611
- by rewrite downK; exact: le_down.
611612
- by case: supA.
612-
- by case: supA => -[x xA] _; exists x; apply/le_down.
613613
Qed.
614614

615615
Lemma lt_sup_imfset {T : Type} (F : T -> R) l :

reals_stdlib/Rstruct.v

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ the economic rights, and the successive licensors have only limited
3939
liability. See the COPYING file for more details.
4040
*)
4141

42-
Set SsrOldRewriteGoalsOrder. (* change Set to Unset when porting the file, then remove the line when requiring MathComp >= 2.6 *)
42+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
4343
Set Implicit Arguments.
4444
Unset Strict Implicit.
4545
Unset Printing Implicit Defensive.
@@ -284,7 +284,7 @@ apply/RltbP/Rabs_def1.
284284
apply: (Rlt_le_trans _ (IZR (up x)))=> //.
285285
elim/(well_founded_ind (Zwf_well_founded 0)): (up x) => z IHz.
286286
case: (Z_lt_le_dec 0 z) => [zp | zn].
287-
rewrite [z]Hz plus_IZR Zabs_nat_Zplus //; last exact: Zlt_0_le_0_pred.
287+
rewrite [z]Hz plus_IZR Zabs_nat_Zplus //; first exact: Zlt_0_le_0_pred.
288288
rewrite plusE mulrnDr.
289289
apply/Rplus_le_compat_r/IHz; split; first exact: Zlt_le_weak.
290290
exact: Zlt_pred.
@@ -296,7 +296,7 @@ apply: (Rlt_le_trans _ (IZR (up x) - 1)).
296296
elim/(well_founded_ind (Zwf_well_founded 0)): (- up x)%Z => z IHz .
297297
case: (Z_lt_le_dec 0 z) => [zp | zn].
298298
rewrite [z]Hz Zabs_nat_Zopp plus_IZR.
299-
rewrite Zabs_nat_Zplus //; last exact: Zlt_0_le_0_pred.
299+
rewrite Zabs_nat_Zplus //; first exact: Zlt_0_le_0_pred.
300300
rewrite plusE -Rplus_assoc -addnA [(_ + 2)%N]addnC addnA mulrnDr.
301301
apply: Rplus_lt_compat_r; rewrite -Zabs_nat_Zopp.
302302
apply: IHz; split; first exact: Zlt_le_weak.
@@ -503,7 +503,7 @@ Proof. by rewrite -Pos_to_natE INR_IPR. Qed.
503503
Let ge0_RsqrtE x : 0 <= x -> sqrt x = Num.sqrt x.
504504
Proof.
505505
move => x0; apply/eqP; have [t1 t2] := conj (sqrtr_ge0 x) (sqrt_pos x).
506-
rewrite eq_sym -(eqrXn2 (_: 0 < 2)%N t1) //; last exact/RleP.
506+
rewrite eq_sym -(eqrXn2 (_: 0 < 2)%N t1) //; first exact/RleP.
507507
by rewrite sqr_sqrtr // !exprS expr0 mulr1 -RmultE ?sqrt_sqrt //; exact/RleP.
508508
Qed.
509509

@@ -584,10 +584,10 @@ Proof.
584584
#[warning="-deprecated"]
585585
rewrite (_ : bigmaxr _ _ = if s isn't h :: t then r else \big[Num.max/h]_(i <- s) i).
586586
#[warning="-deprecated"]
587-
case: s => // ? t; rewrite big_cons /bigmaxr.
588-
by elim: t => //= [|? ? <-]; [rewrite big_nil maxxx | rewrite big_cons maxCA].
587+
by case: s => //=; rewrite /bigmaxr big_nil.
589588
#[warning="-deprecated"]
590-
by case: s => //=; rewrite /bigmaxr big_nil.
589+
case: s => // ? t; rewrite big_cons /bigmaxr.
590+
by elim: t => //= [|? ? <-]; [rewrite big_nil maxxx | rewrite big_cons maxCA].
591591
Qed.
592592

593593
#[deprecated(note="To be removed. Use order.v's bigmax/min lemmas instead.")]
@@ -753,7 +753,7 @@ Lemma bmaxrf_index n (f : {ffun 'I_n.+1 -> R}) :
753753
Proof.
754754
#[warning="-deprecated"]
755755
rewrite /bmaxrf.
756-
rewrite [in X in (_ < X)%N](_ : n.+1 = size (codom f)); last first.
756+
rewrite [in X in (_ < X)%N](_ : n.+1 = size (codom f)).
757757
by rewrite size_codom card_ord.
758758
#[warning="-deprecated"]
759759
by apply: bigmaxr_index; rewrite size_codom card_ord.
@@ -777,9 +777,9 @@ move: (bmaxrf_index f).
777777
rewrite -[X in _ (_ < X)%N]card_ord -(size_codom f) index_mem.
778778
move/(nth_index (f ord0)) => <-; rewrite (nth_map ord0).
779779
#[warning="-deprecated"]
780-
by rewrite (ordnat (bmaxrf_index _)) /index_bmaxrf nth_ord_enum.
780+
by rewrite size_enum_ord; apply: bmaxrf_index.
781781
#[warning="-deprecated"]
782-
by rewrite size_enum_ord; apply: bmaxrf_index.
782+
by rewrite (ordnat (bmaxrf_index _)) /index_bmaxrf nth_ord_enum.
783783
Qed.
784784

785785
#[deprecated(note="To be removed. Use order.v's bigmax/min lemmas instead.")]

reals_stdlib/nsatz_realtype.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ From mathcomp Require Import boolp reals constructive_ereal.
1616

1717
Import GRing.Theory Num.Theory.
1818

19+
Unset SsrOldRewriteGoalsOrder. (* remove the line when requiring MathComp >= 2.6 *)
20+
1921
Local Open Scope ring_scope.
2022

2123
Section Nsatz_realType.

0 commit comments

Comments
 (0)