Skip to content

Commit 71b4c33

Browse files
2 parents 76d4b7c + a535bdc commit 71b4c33

2,012 files changed

Lines changed: 31156 additions & 15085 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/actions/get-mathlib-ci/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
# Default pinned commit used by workflows unless they explicitly override.
1111
# Update this ref as needed to pick up changes to mathlib-ci scripts
1212
# This is also updated automatically by .github/workflows/update_dependencies.yml
13-
default: b6def9edd1c39de8602b8c177c66e9416e5dbc60
13+
default: ca86f6900d53e503e28ec1cfa2bff2f505474553
1414
path:
1515
description: Checkout destination path.
1616
required: false

.github/workflows/build_template.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,12 @@ jobs:
743743
- name: clean up the import graph file
744744
run: rm import_graph.dot
745745

746+
- name: check all scripts build successfully
747+
run: |
748+
lake env lean scripts/create_deprecated_modules.lean
749+
lake env lean scripts/autolabel.lean
750+
lake exe check_title_labels --labels "t-algebra" "feat: dummy PR for testing"
751+
746752
- name: build everything
747753
# make sure everything is available for test/import_all.lean
748754
# and that miscellaneous executables still work

.github/workflows/rm_set_option.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ name: Remove unnecessary set_option lines
22

33
on:
44
schedule:
5-
- cron: "0 4 * * 1" # At 04:00 UTC on Monday.
5+
# Run several hours before the technical debt report which runs Mondays at 04:00 UTC
6+
- cron: "20 23 * * 0" # At 23:20 UTC on Sunday.
67
workflow_dispatch:
78
inputs:
89
dry_run:
910
description: 'If true, only scan and report without modifying files or opening a PR'
1011
required: false
1112
default: false
1213
type: boolean
14+
auto_merge:
15+
description: 'If true, apply the auto-merge-after-CI label when creating a PR'
16+
required: false
17+
default: true
18+
type: boolean
1319
global_timeout:
1420
description: 'Global timeout in seconds (default: 18000 = 5 hours)'
1521
required: false
@@ -121,7 +127,7 @@ jobs:
121127
base: master
122128
title: "chore: remove unnecessary set_option lines"
123129
body: ${{ steps.pr_body.outputs.body }}
124-
# labels: "auto-merge-after-CI"
130+
labels: ${{ toJson(inputs.auto_merge) == 'true' && 'auto-merge-after-CI' || '' }}
125131

126132
- name: Send Zulip message (success)
127133
if: steps.pr.outcome == 'success'

Archive/Imo/Imo1962Q1.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ lemma case_more_digits {c n : ℕ} (hc : (digits 10 c).length ≥ 6) (hpp : Prob
105105
Now we combine these cases to show that 153846 is the smallest solution.
106106
-/
107107

108-
lemma satisfied_by_153846 : ProblemPredicate 153846 := by
109-
norm_num [ProblemPredicate]
110-
decide
108+
lemma satisfied_by_153846 : ProblemPredicate 153846 := by simp +decide [ProblemPredicate]
111109

112110
lemma no_smaller_solutions (n : ℕ) (hn : ProblemPredicate n) : n ≥ 153846 := by
113111
have ⟨c, hcn⟩ := without_digits hn

Archive/Imo/Imo1962Q4.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ Now we can solve for `x` using basic-ish trigonometry.
5959
-/
6060
theorem solve_cos2_half {x : ℝ} : cos x ^ 2 = 1 / 2 ↔ ∃ k : ℤ, x = (2 * ↑k + 1) * π / 4 := by
6161
rw [cos_sq]
62-
simp only [add_eq_left, div_eq_zero_iff]
63-
norm_num
62+
simp only [add_eq_left, div_eq_zero_iff, OfNat.ofNat_ne_zero, or_false]
6463
rw [cos_eq_zero_iff]
6564
constructor <;>
6665
· rintro ⟨k, h⟩

Archive/Imo/Imo1988Q6.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ theorem constant_descent_vieta_jumping (x y : ℕ) {claim : Prop} {H : ℕ →
179179
suffices hc : c ≠ mx from lt_of_le_of_ne (mod_cast c_lt) hc
180180
-- However, recall that B(m_x) ≠ m_x + m_y.
181181
-- If c = m_x, we can prove B(m_x) = m_x + m_y.
182-
contrapose! hm_B₂
182+
contrapose hm_B₂
183183
subst c
184184
simp [hV₁]
185185
-- Hence p' = (c, m_x) lies on the upper branch, and we are done.
@@ -281,7 +281,7 @@ example {a b : ℕ} (h : a * b ∣ a ^ 2 + b ^ 2 + 1) : 3 * a * b = a ^ 2 + b ^
281281
apply ne_of_gt
282282
push Not at h_base
283283
calc
284-
z * y > x * y := by apply mul_lt_mul_of_pos_right <;> lia
284+
z * y > x * y := by gcongr; lia
285285
_ ≥ x * (x + 1) := by apply mul_le_mul <;> lia
286286
_ > x * x + 1 := by
287287
rw [mul_add]

Archive/Imo/Imo2002Q3.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Mathlib.RingTheory.Polynomial.Content
1212
Find all pairs of positive integers $m,n ≥ 3$ for which there exist infinitely many
1313
positive integers $a$ such that $(a^m+a-1) / (a^n+a^2-1)$ is itself an integer.
1414
15-
# Solution
15+
## Solution
1616
1717
It suffices to find $(m,n)$ pairs for which $a^n+a^2-1 ∣ a^m+a-1$, where both sides are viewed as
1818
polynomials in $a$. This automatically gives $n ≤ m$, so we have

Archive/Imo/Imo2008Q2.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ theorem imo2008_q2a (x y z : ℝ) (h : x * y * z = 1) (hx : x ≠ 1) (hy : y ≠
4646
x ^ 2 / (x - 1) ^ 2 + y ^ 2 / (y - 1) ^ 2 + z ^ 2 / (z - 1) ^ 21 := by
4747
obtain ⟨a, b, c, ha, hb, hc, rfl, rfl, rfl⟩ := subst_abc h
4848
obtain ⟨m, n, rfl, rfl⟩ : ∃ m n, b = c - m ∧ a = c - m - n := by use c - b, b - a; simp
49-
have hm_ne_zero : m ≠ 0 := by contrapose! hy; simpa [field]
50-
have hn_ne_zero : n ≠ 0 := by contrapose! hx; simpa [field]
51-
have hmn_ne_zero : m + n ≠ 0 := by contrapose! hz; field_simp; linarith
49+
have hm_ne_zero : m ≠ 0 := by contrapose hy; simpa [field]
50+
have hn_ne_zero : n ≠ 0 := by contrapose hx; simpa [field]
51+
have hmn_ne_zero : m + n ≠ 0 := by contrapose hz; field_simp; linarith
5252
have hc_sub_sub : c - (c - m - n) = m + n := by abel
5353
rw [ge_iff_le, ← sub_nonneg]
5454
convert sq_nonneg ((c * (m ^ 2 + n ^ 2 + m * n) - m * (m + n) ^ 2) / (m * n * (m + n)))

Archive/Imo/Imo2010Q5.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Determine if there exists a finite sequence of operations of the allowed types,
2525
that the five boxes $B_1, B_2, B_3, B_4, B_5$ become empty, while box $B_6$ contains exactly
2626
$2010^{2010^{2010}}$ coins.
2727
28-
# Solution
28+
## Solution
2929
3030
We follow the solution from https://web.evanchen.cc/exams/IMO-2010-notes.pdf.
3131

Archive/Imo/Imo2019Q4.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ theorem upper_bound {k n : ℕ} (hk : k > 0)
7575

7676
end Imo2019Q4
7777

78+
set_option linter.flexible false in -- TODO: fix non-terminal simp
7879
theorem imo2019_q4 {k n : ℕ} (hk : 0 < k) (hn : 0 < n) :
7980
(k ! : ℤ) = ∏ i ∈ range n, ((2 : ℤ) ^ n - (2 : ℤ) ^ i) ↔ (k, n) = (1, 1) ∨ (k, n) = (3, 2) := by
8081
-- The implication `←` holds.
@@ -90,7 +91,7 @@ theorem imo2019_q4 {k n : ℕ} (hk : 0 < k) (hn : 0 < n) :
9091
-- n = 2
9192
· right; congr; norm_num [prod_range_succ] at h; norm_cast at h; rwa [← factorial_inj']
9293
norm_num
93-
all_goals exfalso; norm_num [prod_range_succ] at h; norm_cast at h
94+
all_goals exfalso; simp [prod_range_succ] at h; norm_cast at h
9495
-- n = 3
9596
· refine monotone_factorial.ne_of_lt_of_lt_nat 5 ?_ ?_ _ h <;> decide
9697
-- n = 4

0 commit comments

Comments
 (0)