Skip to content

Commit ac36b28

Browse files
committed
chore: update std 05-22 (#4248)
The main breaking change is that `tac <;> [t1, t2]` is now written `tac <;> [t1; t2]`, to avoid clashing with tactics like `cases` and `use` that take comma-separated lists.
1 parent 598588d commit ac36b28

File tree

82 files changed

+198
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+198
-245
lines changed

Mathlib/Algebra/EuclideanDomain/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ theorem gcd_zero_right (a : R) : gcd a 0 = a := by
143143

144144
theorem gcd_val (a b : R) : gcd a b = gcd (b % a) a := by
145145
rw [gcd]
146-
split_ifs with h <;> [simp only [h, mod_zero, gcd_zero_right], rfl]
146+
split_ifs with h <;> [simp only [h, mod_zero, gcd_zero_right]; rfl]
147147
#align euclidean_domain.gcd_val EuclideanDomain.gcd_val
148148

149149
theorem gcd_dvd (a b : R) : gcd a b ∣ a ∧ gcd a b ∣ b :=

Mathlib/Algebra/GCDMonoid/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ theorem lcm_eq_zero_iff [GCDMonoid α] (a b : α) : lcm a b = 0 ↔ a = 0 ∨ b
730730
(fun h : lcm a b = 0 => by
731731
have : Associated (a * b) 0 := (gcd_mul_lcm a b).symm.trans <| by rw [h, mul_zero]
732732
rwa [← mul_eq_zero, ← associated_zero_iff_eq_zero])
733-
(by rintro (rfl | rfl) <;> [apply lcm_zero_left, apply lcm_zero_right])
733+
(by rintro (rfl | rfl) <;> [apply lcm_zero_left; apply lcm_zero_right])
734734
#align lcm_eq_zero_iff lcm_eq_zero_iff
735735

736736
-- Porting note: lower priority to avoid linter complaints about simp-normal form

Mathlib/Algebra/GroupPower/Lemmas.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ theorem WithBot.coe_nsmul [AddMonoid A] (a : A) (n : ℕ) : ↑(n • a) = n •
501501
#align with_bot.coe_nsmul WithBot.coe_nsmul
502502

503503
theorem nsmul_eq_mul' [NonAssocSemiring R] (a : R) (n : ℕ) : n • a = a * n := by
504-
induction' n with n ih <;> [rw [zero_nsmul, Nat.cast_zero, mul_zero],
504+
induction' n with n ih <;> [rw [zero_nsmul, Nat.cast_zero, mul_zero];
505505
rw [succ_nsmul', ih, Nat.cast_succ, mul_add, mul_one]]
506506
#align nsmul_eq_mul' nsmul_eq_mul'ₓ
507507
-- typeclasses do not match up exactly.
@@ -548,7 +548,7 @@ theorem Int.coe_nat_pow (n m : ℕ) : ((n ^ m : ℕ) : ℤ) = (n : ℤ) ^ m := b
548548
#align int.coe_nat_pow Int.coe_nat_pow
549549

550550
theorem Int.natAbs_pow (n : ℤ) (k : ℕ) : Int.natAbs (n ^ k) = Int.natAbs n ^ k := by
551-
induction' k with k ih <;> [rfl, rw [pow_succ', Int.natAbs_mul, pow_succ', ih]]
551+
induction' k with k ih <;> [rfl; rw [pow_succ', Int.natAbs_mul, pow_succ', ih]]
552552
#align int.nat_abs_pow Int.natAbs_pow
553553

554554
section bit0_bit1

Mathlib/Algebra/GroupWithZero/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ theorem mul_right_inj' (ha : a ≠ 0) : a * b = a * c ↔ b = c :=
177177

178178
@[simp]
179179
theorem mul_eq_mul_right_iff : a * c = b * c ↔ a = b ∨ c = 0 := by
180-
by_cases hc : c = 0 <;> [simp [hc], simp [mul_left_inj', hc]]
180+
by_cases hc : c = 0 <;> [simp [hc]; simp [mul_left_inj', hc]]
181181
#align mul_eq_mul_right_iff mul_eq_mul_right_iff
182182

183183
@[simp]
184184
theorem mul_eq_mul_left_iff : a * b = a * c ↔ b = c ∨ a = 0 := by
185-
by_cases ha : a = 0 <;> [simp [ha], simp [mul_right_inj', ha]]
185+
by_cases ha : a = 0 <;> [simp [ha]; simp [mul_right_inj', ha]]
186186
#align mul_eq_mul_left_iff mul_eq_mul_left_iff
187187

188188
theorem mul_right_eq_self₀ : a * b = a ↔ b = 1 ∨ a = 0 :=

Mathlib/Algebra/Order/Floor.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ theorem abs_sub_round_eq_min (x : α) : |x - round x| = min (fract x) (1 - fract
14101410

14111411
theorem round_le (x : α) (z : ℤ) : |x - round x| ≤ |x - z| := by
14121412
rw [abs_sub_round_eq_min, min_le_iff]
1413-
rcases le_or_lt (z : α) x with (hx | hx) <;> [left, right]
1413+
rcases le_or_lt (z : α) x with (hx | hx) <;> [left; right]
14141414
· conv_rhs => rw [abs_eq_self.mpr (sub_nonneg.mpr hx), ← fract_add_floor x, add_sub_assoc]
14151415
simpa only [le_add_iff_nonneg_right, sub_nonneg, cast_le] using le_floor.mpr hx
14161416
· rw [abs_eq_neg_self.mpr (sub_neg.mpr hx).le]

Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def transReflReparamAux (t : I) : ℝ :=
138138
@[continuity]
139139
theorem continuous_transReflReparamAux : Continuous transReflReparamAux := by
140140
refine' continuous_if_le _ _ (Continuous.continuousOn _) (Continuous.continuousOn _) _ <;>
141-
[continuity, continuity, continuity, continuity, skip]
141+
[continuity; continuity; continuity; continuity; skip]
142142
intro x hx
143143
-- Porting note: norm_num ignores arguments.
144144
simp [hx]
@@ -203,7 +203,7 @@ theorem continuous_transAssocReparamAux : Continuous transAssocReparamAux := by
203203
refine' continuous_if_le _ _ (Continuous.continuousOn _)
204204
(continuous_if_le _ _ (Continuous.continuousOn _) (Continuous.continuousOn _) _).continuousOn
205205
_ <;>
206-
[continuity, continuity, continuity, continuity, continuity, continuity, continuity, skip,
206+
[continuity; continuity; continuity; continuity; continuity; continuity; continuity; skip;
207207
skip] <;>
208208
· intro x hx
209209
-- Porting note: norm_num ignores arguments.

Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ variable {α β : Type _} [NormedField β] {t u v w : α → β} {l : Filter α}
197197
theorem isEquivalent_iff_exists_eq_mul :
198198
u ~[l] v ↔ ∃ (φ : α → β) (_ : Tendsto φ l (𝓝 1)), u =ᶠ[l] φ * v := by
199199
rw [IsEquivalent, isLittleO_iff_exists_eq_mul]
200-
constructor <;> rintro ⟨φ, hφ, h⟩ <;> [refine' ⟨φ + 1, _, _⟩, refine' ⟨φ - 1, _, _⟩]
200+
constructor <;> rintro ⟨φ, hφ, h⟩ <;> [refine' ⟨φ + 1, _, _⟩; refine' ⟨φ - 1, _, _⟩]
201201
· conv in 𝓝 _ => rw [← zero_add (1 : β)]
202202
exact hφ.add tendsto_const_nhds
203203
· convert h.add (EventuallyEq.refl l v) <;> simp [add_mul]

Mathlib/Analysis/BoxIntegral/Partition/Split.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ theorem split_of_not_mem_Ioo (h : x ∉ Ioo (I.lower i) (I.upper i)) : split I i
206206
rcases mem_top.1 hJ with rfl; clear hJ
207207
rw [mem_boxes, mem_split_iff]
208208
rw [mem_Ioo, not_and_or, not_lt, not_lt] at h
209-
cases h <;> [right, left]
209+
cases h <;> [right; left]
210210
· rwa [eq_comm, Box.splitUpper_eq_self]
211211
· rwa [eq_comm, Box.splitLower_eq_self]
212212
#align box_integral.prepartition.split_of_not_mem_Ioo BoxIntegral.Prepartition.split_of_not_mem_Ioo
@@ -230,7 +230,7 @@ theorem restrict_split (h : I ≤ J) (i : ι) (x : ℝ) : (split J i x).restrict
230230
refine' ((isPartitionSplit J i x).restrict h).eq_of_boxes_subset _
231231
simp only [Finset.subset_iff, mem_boxes, mem_restrict', exists_prop, mem_split_iff']
232232
have : ∀ s, (I ∩ s : Set (ι → ℝ)) ⊆ J := fun s => (inter_subset_left _ _).trans h
233-
rintro J₁ ⟨J₂, H₂ | H₂, H₁⟩ <;> [left, right] <;>
233+
rintro J₁ ⟨J₂, H₂ | H₂, H₁⟩ <;> [left; right] <;>
234234
simp [H₁, H₂, inter_left_comm (I : Set (ι → ℝ)), this]
235235
#align box_integral.prepartition.restrict_split BoxIntegral.Prepartition.restrict_split
236236

Mathlib/Analysis/Convex/Slope.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ theorem ConvexOn.slope_mono_adjacent (hf : ConvexOn 𝕜 s f) {x y z : 𝕜} (hx
3737
set b := (y - x) / (z - x)
3838
have hy : a • x + b • z = y := by
3939
field_simp
40-
rw [div_eq_iff] <;> [ring, linarith]
40+
rw [div_eq_iff] <;> [ring; linarith]
4141
have key :=
4242
hf.2 hx hz (show 0 ≤ a by apply div_nonneg <;> linarith)
4343
(show 0 ≤ b by apply div_nonneg <;> linarith)
4444
(show a + b = 1 by
4545
field_simp
46-
rw [div_eq_iff] <;> [ring, linarith])
46+
rw [div_eq_iff] <;> [ring; linarith])
4747
rw [hy] at key
4848
replace key := mul_le_mul_of_nonneg_left key hxz.le
4949
field_simp [hxy.ne', hyz.ne', hxz.ne', mul_comm (z - x) _] at key⊢
@@ -77,12 +77,12 @@ theorem StrictConvexOn.slope_strict_mono_adjacent (hf : StrictConvexOn 𝕜 s f)
7777
set b := (y - x) / (z - x)
7878
have hy : a • x + b • z = y := by
7979
field_simp
80-
rw [div_eq_iff] <;> [ring, linarith]
80+
rw [div_eq_iff] <;> [ring; linarith]
8181
have key :=
8282
hf.2 hx hz hxz' (div_pos hyz hxz) (div_pos hxy hxz)
8383
(show a + b = 1 by
8484
field_simp
85-
rw [div_eq_iff] <;> [ring, linarith])
85+
rw [div_eq_iff] <;> [ring; linarith])
8686
rw [hy] at key
8787
replace key := mul_lt_mul_of_pos_left key hxz
8888
field_simp [hxy.ne', hyz.ne', hxz.ne', mul_comm (z - x) _] at key⊢

Mathlib/Analysis/Convex/Strict.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ variable [TopologicalSpace β] [LinearOrderedCancelAddCommMonoid β] [OrderTopol
163163
protected theorem Set.OrdConnected.strictConvex {s : Set β} (hs : OrdConnected s) :
164164
StrictConvex 𝕜 s := by
165165
refine' strictConvex_iff_openSegment_subset.2 fun x hx y hy hxy => _
166-
cases' hxy.lt_or_lt with hlt hlt <;> [skip, rw [openSegment_symm]] <;>
166+
cases' hxy.lt_or_lt with hlt hlt <;> [skip; rw [openSegment_symm]] <;>
167167
exact
168168
(openSegment_subset_Ioo hlt).trans
169169
(isOpen_Ioo.subset_interior_iff.2 <| Ioo_subset_Icc_self.trans <| hs.out ‹_› ‹_›)

0 commit comments

Comments
 (0)