Skip to content

Commit b98ab8b

Browse files
committed
Merge remote-tracking branch 'origin/master' into hint_tactic_parallel
2 parents 25c3b1b + e8acc5c commit b98ab8b

1,232 files changed

Lines changed: 31177 additions & 18815 deletions

File tree

Some content is hidden

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

.github/workflows/bors.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,10 @@ jobs:
260260
run: |
261261
git clone https://github.com/leanprover/lean4checker
262262
cd lean4checker
263-
git checkout toolchain/v4.3.0-rc2
263+
git checkout toolchain/v4.3.0
264+
# Now that the git hash is embedded in each olean,
265+
# we need to compile lean4checker on the same toolchain
266+
cp ../lean-toolchain .
264267
lake build
265268
./test.sh
266269
cd ..

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ jobs:
267267
run: |
268268
git clone https://github.com/leanprover/lean4checker
269269
cd lean4checker
270-
git checkout toolchain/v4.3.0-rc2
270+
git checkout toolchain/v4.3.0
271+
# Now that the git hash is embedded in each olean,
272+
# we need to compile lean4checker on the same toolchain
273+
cp ../lean-toolchain .
271274
lake build
272275
./test.sh
273276
cd ..

.github/workflows/build.yml.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ jobs:
246246
run: |
247247
git clone https://github.com/leanprover/lean4checker
248248
cd lean4checker
249-
git checkout toolchain/v4.3.0-rc2
249+
git checkout toolchain/v4.3.0
250+
# Now that the git hash is embedded in each olean,
251+
# we need to compile lean4checker on the same toolchain
252+
cp ../lean-toolchain .
250253
lake build
251254
./test.sh
252255
cd ..

.github/workflows/build_fork.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ jobs:
264264
run: |
265265
git clone https://github.com/leanprover/lean4checker
266266
cd lean4checker
267-
git checkout toolchain/v4.3.0-rc2
267+
git checkout toolchain/v4.3.0
268+
# Now that the git hash is embedded in each olean,
269+
# we need to compile lean4checker on the same toolchain
270+
cp ../lean-toolchain .
268271
lake build
269272
./test.sh
270273
cd ..

.github/workflows/nightly_detect_failure.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,29 @@ jobs:
4040
toolchain=$(<lean-toolchain)
4141
if [[ $toolchain =~ leanprover/lean4:nightly-([a-zA-Z0-9_-]+) ]]; then
4242
version=${BASH_REMATCH[1]}
43+
echo "NIGHTLY=$version" >> $GITHUB_ENV
4344
git push origin refs/heads/nightly-testing:refs/heads/nightly-testing-$version
4445
else
4546
echo "Error: The file lean-toolchain does not contain the expected pattern."
4647
exit 1
4748
fi
49+
50+
# Next, we'll update the `nightly-with-mathlib` branch at Lean.
51+
- name: Cleanup workspace
52+
run: |
53+
sudo rm -rf *
54+
# Checkout the Lean repository on 'nightly-with-mathlib'
55+
- name: Checkout Lean repository
56+
uses: actions/checkout@v3
57+
with:
58+
repository: leanprover/lean4
59+
token: ${{ secrets.LEAN_PR_TESTING }}
60+
ref: nightly-with-mathlib
61+
# Merge the relevant nightly.
62+
- name: Fetch tags from 'lean4-nightly', and merge relevant nightly into 'nightly-with-mathlib'
63+
run: |
64+
git remote add nightly https://github.com/leanprover/lean4-nightly.git
65+
git fetch nightly --tags
66+
# Note: old jobs may run out of order, but it is safe to merge an older `nightly-YYYY-MM-DD`.
67+
git merge nightly-${NIGHTLY} --strategy-option ours --allow-unrelated-histories || true
68+
git push origin

.github/workflows/nightly_merge_master.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
name: Merge master to nightly
44

55
on:
6-
push:
7-
branches:
8-
- master
6+
schedule:
7+
- cron: '30 */3 * * *' # 8AM CET/11PM PT
98

109
jobs:
1110
merge-to-nightly:
@@ -25,9 +24,11 @@ jobs:
2524
- name: Merge master to nightly favoring nightly changes
2625
run: |
2726
git checkout nightly-testing
28-
# If the merge goes badly, we proceed anyway via '|| true'
27+
# If the merge goes badly, we proceed anyway via '|| true'.
2928
# CI will report failures on the 'nightly-testing' branch direct to Zulip.
3029
git merge master --strategy-option ours --no-commit --allow-unrelated-histories || true
3130
git add .
32-
git commit -m "Merge master into nightly-testing"
31+
# If there's nothing to do (because there are no new commits from master),
32+
# that's okay, hence the '|| true'.
33+
git commit -m "Merge master into nightly-testing" || true
3334
git push origin nightly-testing

Archive/Examples/IfNormalization/WithoutAesop.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,14 @@ def normalize' (l : AList (fun _ : ℕ => Bool)) :
9393
· have := ht₃ v
9494
have := he₃ v
9595
simp_all? says simp_all only [Option.elim, ne_eq, normalized, Bool.and_eq_true,
96-
Bool.not_eq_true', AList.lookup_insert]
96+
Bool.not_eq_true', AList.lookup_insert, imp_false]
9797
obtain ⟨⟨⟨tn, tc⟩, tr⟩, td⟩ := ht₂
9898
split <;> rename_i h'
9999
· subst h'
100100
simp_all
101101
· simp_all? says simp_all only [ne_eq, hasNestedIf, Bool.or_self, hasConstantIf,
102102
and_self, hasRedundantIf, Bool.or_false, beq_eq_false_iff_ne, not_false_eq_true,
103-
disjoint, List.disjoint, decide_not, Bool.and_true, Bool.and_eq_true,
104-
Bool.not_eq_true', decide_eq_false_iff_not, true_and]
105-
constructor <;> assumption
103+
disjoint, List.disjoint, decide_True, Bool.and_self]
106104
· have := ht₃ w
107105
have := he₃ w
108106
by_cases h : w = v

Archive/Imo/Imo1972Q5.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ from `hneg` directly), finally raising a contradiction with `k' < k'`.
2727
theorem imo1972_q5 (f g : ℝ → ℝ) (hf1 : ∀ x, ∀ y, f (x + y) + f (x - y) = 2 * f x * g y)
2828
(hf2 : ∀ y, ‖f y‖ ≤ 1) (hf3 : ∃ x, f x ≠ 0) (y : ℝ) : ‖g y‖ ≤ 1 := by
2929
-- Suppose the conclusion does not hold.
30-
by_contra' hneg
30+
by_contra! hneg
3131
set S := Set.range fun x => ‖f x‖
3232
-- Introduce `k`, the supremum of `f`.
3333
let k : ℝ := sSup S
@@ -82,8 +82,8 @@ This is a more concise version of the proof proposed by Ruben Van de Velde.
8282
-/
8383
theorem imo1972_q5' (f g : ℝ → ℝ) (hf1 : ∀ x, ∀ y, f (x + y) + f (x - y) = 2 * f x * g y)
8484
(hf2 : BddAbove (Set.range fun x => ‖f x‖)) (hf3 : ∃ x, f x ≠ 0) (y : ℝ) : ‖g y‖ ≤ 1 := by
85-
-- porting note: moved `by_contra'` up to avoid a bug
86-
by_contra' H
85+
-- porting note: moved `by_contra!` up to avoid a bug
86+
by_contra! H
8787
obtain ⟨x, hx⟩ := hf3
8888
set k := ⨆ x, ‖f x‖
8989
have h : ∀ x, ‖f x‖ ≤ k := le_ciSup hf2

Archive/Imo/Imo1994Q1.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ theorem imo1994_q1 (n : ℕ) (m : ℕ) (A : Finset ℕ) (hm : A.card = m + 1)
7575
_ = (m + 1) * (n + 1) := by rw [sum_const, card_fin, Nat.nsmul_eq_mul]
7676
-- It remains to prove the key inequality, by contradiction
7777
rintro k -
78-
by_contra' h : a k + a (rev k) < n + 1
78+
by_contra! h : a k + a (rev k) < n + 1
7979
-- We exhibit `k+1` elements of `A` greater than `a (rev k)`
8080
set f : Fin (m + 1) ↪ ℕ :=
8181
fun i => a i + a (rev k), by

Archive/Imo/Imo2008Q4.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ theorem imo2008_q4 (f : ℝ → ℝ) (H₁ : ∀ x > 0, f x > 0) :
6868
field_simp at H₂ ⊢
6969
linear_combination 1 / 2 * H₂
7070
have h₃ : ∀ x > 0, f x = x ∨ f x = 1 / x := by simpa [sub_eq_zero] using h₂
71-
by_contra' h
71+
by_contra! h
7272
rcases h with ⟨⟨b, hb, hfb₁⟩, ⟨a, ha, hfa₁⟩⟩
7373
obtain hfa₂ := Or.resolve_right (h₃ a ha) hfa₁
7474
-- f(a) ≠ 1/a, f(a) = a

0 commit comments

Comments
 (0)