Skip to content

Commit a66f1d6

Browse files
committed
Merge branch 'master' into class_group_equiv
2 parents 101f5dc + cc9c9b7 commit a66f1d6

1,925 files changed

Lines changed: 27527 additions & 13754 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: 8c3d31d2beba80d86de30b6ccd373d2c3a76b26e
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

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/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/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

Archive/MiuLanguage/DecisionNec.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ theorem goodm_of_rule2 (xs : Miustr) (_ : Derivable (M :: xs)) (h₂ : Goodm (M
133133
constructor
134134
· rfl
135135
· obtain ⟨mhead, mtail⟩ := h₂
136-
contrapose! mtail
136+
contrapose mtail
137137
rw [cons_append] at mtail
138138
exact or_self_iff.mp (mem_append.mp mtail)
139139

@@ -145,7 +145,7 @@ theorem goodm_of_rule3 (as bs : Miustr) (h₁ : Derivable (as ++ [I, I, I] ++ bs
145145
· cases as
146146
· contradiction
147147
exact mhead
148-
· contrapose! nmtail
148+
· contrapose nmtail
149149
rcases exists_cons_of_ne_nil k with ⟨x, xs, rfl⟩
150150
simp_rw [cons_append] at nmtail ⊢
151151
simpa using nmtail
@@ -163,7 +163,7 @@ theorem goodm_of_rule4 (as bs : Miustr) (h₁ : Derivable (as ++ [U, U] ++ bs))
163163
· cases as
164164
· contradiction
165165
exact mhead
166-
· contrapose! nmtail
166+
· contrapose nmtail
167167
rcases exists_cons_of_ne_nil k with ⟨x, xs, rfl⟩
168168
simp_rw [cons_append] at nmtail ⊢
169169
simpa using nmtail

Archive/OxfordInvariants/Summer2021/Week3P1.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ theorem OxfordInvariants.Week3P1 (n : ℕ) (a : ℕ → ℕ) (a_pos : ∀ i ≤
9595
Claim that the sum equals `1` -/
9696
refine ⟨1, ?_, ?_⟩
9797
-- Check that this indeed equals the sum
98-
· rw [Nat.cast_one, Finset.sum_range_one]
99-
norm_num
100-
rw [div_self]
98+
· rw [Nat.cast_one, Finset.sum_range_one, zero_add, div_self]
10199
exact (mul_pos (a_pos 0 (Nat.zero_le _)) (a_pos 1 (Nat.zero_lt_succ _))).ne'
102100
-- Check the divisibility condition
103101
· rw [mul_one, tsub_self]

Archive/Sensitivity.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ theorem adj_iff_proj_adj {p q : Q n.succ} (h₀ : p 0 = q 0) :
131131
rw [← Fin.pred_inj (ha := (?ha : y ≠ 0)) (hb := (?hb : i.succ ≠ 0)),
132132
Fin.pred_succ]
133133
case ha =>
134-
contrapose! hy
134+
contrapose hy
135135
rw [hy, h₀]
136136
case hb =>
137137
apply Fin.succ_ne_zero

0 commit comments

Comments
 (0)