Skip to content

Commit 7e1e400

Browse files
[auto-sync] Merge upstream mathlib4 into master (PR #77)
Auto-merged by sync_finalize after CI success.
2 parents 04d36cb + 8e0fd64 commit 7e1e400

936 files changed

Lines changed: 5114 additions & 3453 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.

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
fc48848e4374f13c796a7399bfccd2e228f776df
55
# 2025-11-19 move Mathlib to the module system (#31786)
66
6a54a80825b060ab20dc31751ebdce78b3a3b518
7+
# 2025-12-01 fix spelling in doc-strings (#32286)
8+
b728e1450a53133aa4171eeadc0bc8d3ee58415c
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Periodic safety net that keeps the Zulip emoji reactions on PR-related messages
2+
# in sync with each PR's actual state (open/closed/merged, labels, CI result).
3+
# The event-driven zulip_emoji_* workflows react to individual label/close/CI
4+
# events; this sweep repairs any drift they miss (dropped webhooks, outages,
5+
# state changes while a workflow was broken). See
6+
# https://github.com/leanprover-community/mathlib-ci/blob/master/docs/zulip-emoji-reconcile.md
7+
name: Zulip emoji reconcile
8+
9+
on:
10+
schedule:
11+
- cron: "37 * * * *" # hourly, offset to dodge top-of-hour runner load
12+
workflow_dispatch:
13+
inputs:
14+
dry-run:
15+
description: Log planned reaction changes without modifying Zulip
16+
type: boolean
17+
default: false
18+
19+
concurrency:
20+
group: ${{ github.workflow }}
21+
cancel-in-progress: false
22+
23+
permissions:
24+
contents: read
25+
pull-requests: read
26+
27+
jobs:
28+
reconcile:
29+
if: github.repository == 'leanprover-community/mathlib4'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Check out reconcile config
33+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
34+
with:
35+
sparse-checkout: .github/zulip-emoji-config.json
36+
sparse-checkout-cone-mode: false
37+
38+
- name: Reconcile
39+
uses: leanprover-community/mathlib-ci/.github/actions/zulip-emoji-reconcile@5668fbbccf0fecefdfcddf539b8406db197dfc59
40+
with:
41+
config: .github/zulip-emoji-config.json
42+
sweep: true
43+
dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run }}
44+
zulip-api-key: ${{ secrets.ZULIP_API_KEY }}
45+
github-token: ${{ github.token }}

.github/zulip-emoji-config.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"_comment": "Config for the zulip-emoji-reconcile action (see .github/workflows/zulip_emoji_reconcile.yml), which keeps Zulip emoji reactions in sync with PR state. Format and semantics: https://github.com/leanprover-community/mathlib-ci/blob/master/docs/zulip-emoji-reconcile.md. Derived from scripts/zulip/examples/mathlib4-config.json in that repo; keep the two in sync when the emoji table changes.",
3+
4+
"github_repo": "leanprover-community/mathlib4",
5+
6+
"_merged_comment": "bors merges by rebasing a PR's commits onto master, so GitHub reports the PR as CLOSED (not merged) and renames its title to start with '[Merged by Bors] -'. Treat such closed PRs as merged so they get the 'merge' emoji rather than 'closed-pr'. Drop this key for repos that merge via the GitHub merge button/queue, where the PR state is reported as MERGED directly.",
7+
"merged_title_prefix": "[Merged by Bors] -",
8+
9+
"zulip": {
10+
"site": "https://leanprover.zulipchat.com",
11+
"email": "github-mathlib4-bot@leanprover.zulipchat.com"
12+
},
13+
14+
"channels": {
15+
"pr_reviews": "PR reviews",
16+
"reviewers": "mathlib reviewers",
17+
"rss_allow": ["mathlib bors notifications"]
18+
},
19+
20+
"ci": {
21+
"_comment": "Case-insensitive substring match against check-run name, workflow name, or status context. The first three select the gating jobs of 'continuous integration' / 'continuous integration (mathlib forks)' -- their check runs are named 'ci / Build', 'ci (fork) / Build', etc. -- while leaving auxiliary jobs (Upload to cache, Post-CI job) out of the emoji. 'Check workflows' is the actionlint workflow: it runs only on PRs touching .github/**, so it contributes nothing on ordinary PRs and becomes the CI signal on workflows-only PRs where the main CI never triggers.",
22+
"check_names": ["Build", "Lint style", "Post-Build Step", "Check workflows"]
23+
},
24+
25+
"states": [
26+
{
27+
"name": "merged", "group": "pr", "priority": 30,
28+
"source": {"state": "merged"}, "emoji": "merge"
29+
},
30+
{
31+
"name": "closed", "group": "pr", "priority": 20,
32+
"source": {"state": "closed"},
33+
"emoji": "closed-pr", "emoji_code": "61293", "reaction_type": "realm_emoji"
34+
},
35+
{
36+
"name": "ready-to-merge", "group": "pr", "priority": 12,
37+
"source": {"label": "ready-to-merge"},
38+
"emoji": "bors", "emoji_code": "22134", "reaction_type": "realm_emoji"
39+
},
40+
{
41+
"name": "delegated", "group": "pr", "priority": 11,
42+
"source": {"label": "delegated"}, "emoji": "peace_sign"
43+
},
44+
{
45+
"name": "awaiting-author", "group": "pr", "priority": 10,
46+
"source": {"label": "awaiting-author"}, "emoji": "writing"
47+
},
48+
49+
{"name": "ci-running", "group": "ci", "source": {"ci": "running"}, "emoji": "yellow"},
50+
{"name": "ci-success", "group": "ci", "source": {"ci": "success"}, "emoji": "check"},
51+
{"name": "ci-failure", "group": "ci", "source": {"ci": "failure"}, "emoji": "cross_mark"},
52+
53+
{
54+
"name": "maintainer-merge", "group": null,
55+
"source": {"label": "maintainer-merge"}, "emoji": "hammer",
56+
"suppress_in": {"channel": "reviewers", "subject_prefix": "maintainer merge"}
57+
},
58+
{
59+
"name": "migrated", "group": null, "sticky": true,
60+
"source": {"label": "migrated-from-branch"}, "emoji": "skip_forward"
61+
}
62+
]
63+
}

Archive/Imo/Imo1987Q1.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fixed points. -/
5656
def fiber (k : ℕ) : Set (Perm α) :=
5757
{σ : Perm α | card (fixedPoints σ) = k}
5858

59-
instance {k : ℕ} : Fintype (fiber α k) := inferInstanceAs <| Fintype (setOf _)
59+
instance {k : ℕ} : Fintype (fiber α k) := inferInstanceAs <| Fintype (Set.ofPred _)
6060

6161
@[simp]
6262
theorem mem_fiber {σ : Perm α} {k : ℕ} : σ ∈ fiber α k ↔ card (fixedPoints σ) = k :=

Archive/Imo/Imo1988Q6.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ theorem constant_descent_vieta_jumping (x y : ℕ) {claim : Prop} {H : ℕ →
9292
-- Our assumptions ensure that we can then prove the claim.
9393
suffices exc : exceptional.Nonempty by
9494
-- Suppose that there exists an element in the exceptional locus.
95-
simp only [Set.Nonempty, Prod.exists, Set.mem_setOf_eq, exceptional] at exc
95+
simp only [Set.Nonempty, Prod.exists, Set.mem_ofPred_eq, exceptional] at exc
9696
-- Let (a,b) be such an element, and consider all the possible cases.
9797
rcases exc with ⟨a, b, hH, hb⟩
9898
rcases hb with (_ | rfl | rfl | hB | hB)
@@ -138,7 +138,7 @@ theorem constant_descent_vieta_jumping (x y : ℕ) {claim : Prop} {H : ℕ →
138138
-- This means that m_y = m,
139139
-- and the conditions H(m_x, m_y) and m_x < m_y are satisfied.
140140
simp only at mx_lt_my hHm m_eq
141-
simp only [exceptional, hHm, Set.mem_setOf_eq, true_and] at h_base
141+
simp only [exceptional, hHm, Set.mem_ofPred_eq, true_and] at h_base
142142
push Not at h_base
143143
-- Finally, it also means that (m_x, m_y) does not lie in the base locus,
144144
-- that m_x ≠ 0, m_x ≠ m_y, B(m_x) ≠ m_y, and B(m_x) ≠ m_x + m_y.

Archive/Imo/Imo2008Q2.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
6565
have hW_sub_S : W ⊆ rationalSolutions := by
6666
intro s hs_in_W
6767
rw [rationalSolutions]
68-
simp only [Set.mem_setOf_eq] at hs_in_W ⊢
68+
simp only [Set.mem_ofPred_eq] at hs_in_W ⊢
6969
rcases hs_in_W with ⟨x, y, z, h₁, t, ht_gt_zero, hx_t, hy_t, hz_t⟩
7070
use x, y, z
7171
have key_gt_zero : 0 < t ^ 2 + t + 1 := by linarith [pow_pos ht_gt_zero 2, ht_gt_zero]
@@ -99,7 +99,7 @@ theorem imo2008_q2b : Set.Infinite rationalSolutions := by
9999
set z : ℚ := -t * (t + 1) with hz_def
100100
simp only [t, W, K, g, Set.mem_image, Prod.exists]
101101
use x, y, z; constructor
102-
· simp only [Set.mem_setOf_eq]
102+
· simp only [Set.mem_ofPred_eq]
103103
use x, y, z; constructor
104104
· rfl
105105
· use t; constructor

0 commit comments

Comments
 (0)