Skip to content

Commit acc2aa6

Browse files
author
leanprover-community-mathlib4-bot
committed
2 parents b3aa57a + 4bc3282 commit acc2aa6

File tree

25 files changed

+241
-102
lines changed

25 files changed

+241
-102
lines changed

.github/build.in.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ jobs:
136136
shell: bash # We're only building the `master` branch version of the tools, so don't need to run inside landrun.
137137
run: |
138138
cd master-branch
139-
lake build cache mk_all check-yaml graph
139+
lake build cache check-yaml graph
140140
ls .lake/build/bin/cache
141-
ls .lake/build/bin/mk_all
142141
ls .lake/build/bin/check-yaml
143142
ls .lake/packages/importGraph/.lake/build/bin/graph
144143
@@ -219,13 +218,11 @@ jobs:
219218
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
220219
id: mk_all
221220
continue-on-error: true # Allow workflow to continue, outcome checked later
222-
# This only runs `mk_all --check` from the `master-branch`, so doesn't need to be inside landrun
223-
shell: bash
221+
# This runs `mk_all --check` from the `pr-branch` inside landrun
224222
run: |
225223
cd pr-branch
226-
227-
echo "Running mk_all --check (from master-branch)..."
228-
LAKE_HOME="$TOOLCHAIN_DIR" ../master-branch/.lake/build/bin/mk_all --check
224+
echo "Running mk_all --check (from pr-branch)..."
225+
lake exe mk_all --check
229226
230227
- name: begin gh-problem-match-wrap for build step
231228
uses: leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23

.github/workflows/bors.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ jobs:
146146
shell: bash # We're only building the `master` branch version of the tools, so don't need to run inside landrun.
147147
run: |
148148
cd master-branch
149-
lake build cache mk_all check-yaml graph
149+
lake build cache check-yaml graph
150150
ls .lake/build/bin/cache
151-
ls .lake/build/bin/mk_all
152151
ls .lake/build/bin/check-yaml
153152
ls .lake/packages/importGraph/.lake/build/bin/graph
154153
@@ -229,13 +228,11 @@ jobs:
229228
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
230229
id: mk_all
231230
continue-on-error: true # Allow workflow to continue, outcome checked later
232-
# This only runs `mk_all --check` from the `master-branch`, so doesn't need to be inside landrun
233-
shell: bash
231+
# This runs `mk_all --check` from the `pr-branch` inside landrun
234232
run: |
235233
cd pr-branch
236-
237-
echo "Running mk_all --check (from master-branch)..."
238-
LAKE_HOME="$TOOLCHAIN_DIR" ../master-branch/.lake/build/bin/mk_all --check
234+
echo "Running mk_all --check (from pr-branch)..."
235+
lake exe mk_all --check
239236
240237
- name: begin gh-problem-match-wrap for build step
241238
uses: leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23

.github/workflows/build.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ jobs:
153153
shell: bash # We're only building the `master` branch version of the tools, so don't need to run inside landrun.
154154
run: |
155155
cd master-branch
156-
lake build cache mk_all check-yaml graph
156+
lake build cache check-yaml graph
157157
ls .lake/build/bin/cache
158-
ls .lake/build/bin/mk_all
159158
ls .lake/build/bin/check-yaml
160159
ls .lake/packages/importGraph/.lake/build/bin/graph
161160
@@ -236,13 +235,11 @@ jobs:
236235
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
237236
id: mk_all
238237
continue-on-error: true # Allow workflow to continue, outcome checked later
239-
# This only runs `mk_all --check` from the `master-branch`, so doesn't need to be inside landrun
240-
shell: bash
238+
# This runs `mk_all --check` from the `pr-branch` inside landrun
241239
run: |
242240
cd pr-branch
243-
244-
echo "Running mk_all --check (from master-branch)..."
245-
LAKE_HOME="$TOOLCHAIN_DIR" ../master-branch/.lake/build/bin/mk_all --check
241+
echo "Running mk_all --check (from pr-branch)..."
242+
lake exe mk_all --check
246243
247244
- name: begin gh-problem-match-wrap for build step
248245
uses: leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23

.github/workflows/build_fork.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,8 @@ jobs:
150150
shell: bash # We're only building the `master` branch version of the tools, so don't need to run inside landrun.
151151
run: |
152152
cd master-branch
153-
lake build cache mk_all check-yaml graph
153+
lake build cache check-yaml graph
154154
ls .lake/build/bin/cache
155-
ls .lake/build/bin/mk_all
156155
ls .lake/build/bin/check-yaml
157156
ls .lake/packages/importGraph/.lake/build/bin/graph
158157
@@ -233,13 +232,11 @@ jobs:
233232
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
234233
id: mk_all
235234
continue-on-error: true # Allow workflow to continue, outcome checked later
236-
# This only runs `mk_all --check` from the `master-branch`, so doesn't need to be inside landrun
237-
shell: bash
235+
# This runs `mk_all --check` from the `pr-branch` inside landrun
238236
run: |
239237
cd pr-branch
240-
241-
echo "Running mk_all --check (from master-branch)..."
242-
LAKE_HOME="$TOOLCHAIN_DIR" ../master-branch/.lake/build/bin/mk_all --check
238+
echo "Running mk_all --check (from pr-branch)..."
239+
lake exe mk_all --check
243240
244241
- name: begin gh-problem-match-wrap for build step
245242
uses: leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ import Mathlib.Algebra.Ring.Fin
10311031
import Mathlib.Algebra.Ring.GrindInstances
10321032
import Mathlib.Algebra.Ring.Hom.Basic
10331033
import Mathlib.Algebra.Ring.Hom.Defs
1034+
import Mathlib.Algebra.Ring.Hom.InjSurj
10341035
import Mathlib.Algebra.Ring.Idempotent
10351036
import Mathlib.Algebra.Ring.Identities
10361037
import Mathlib.Algebra.Ring.InjSurj
@@ -3480,6 +3481,7 @@ import Mathlib.Deprecated.Cardinal.Continuum
34803481
import Mathlib.Deprecated.Cardinal.Finite
34813482
import Mathlib.Deprecated.Cardinal.PartENat
34823483
import Mathlib.Deprecated.Order
3484+
import Mathlib.Deprecated.RingHom
34833485
import Mathlib.Dynamics.BirkhoffSum.Average
34843486
import Mathlib.Dynamics.BirkhoffSum.Basic
34853487
import Mathlib.Dynamics.BirkhoffSum.NormedSpace

Mathlib/Algebra/Equiv/TransferInstance.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Mathlib.Algebra.Algebra.Equiv
77
import Mathlib.Algebra.Field.Basic
88
import Mathlib.Logic.Equiv.Defs
99
import Mathlib.Logic.Small.Defs
10+
import Mathlib.Algebra.Ring.Hom.InjSurj
1011

1112
/-!
1213
# Transfer algebraic structures across `Equiv`s

Mathlib/Algebra/Polynomial/Div.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,8 @@ theorem eval₂_modByMonic_eq_self_of_root [CommRing S] {f : R →+* S} {p q : R
617617

618618
theorem sub_dvd_eval_sub (a b : R) (p : R[X]) : a - b ∣ p.eval a - p.eval b := by
619619
suffices X - C b ∣ p - C (p.eval b) by
620-
simpa only [coe_evalRingHom, eval_sub, eval_X, eval_C] using (evalRingHom a).map_dvd this
620+
simpa only [coe_evalRingHom, eval_sub, eval_X, eval_C]
621+
using (_root_.map_dvd (evalRingHom a)) this
621622
simp [dvd_iff_isRoot]
622623

623624
@[simp]

Mathlib/Algebra/Polynomial/Eval/Defs.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ theorem eval₂_pow (n : ℕ) : (p ^ n).eval₂ f x = p.eval₂ f x ^ n :=
215215
(eval₂RingHom _ _).map_pow _ _
216216

217217
theorem eval₂_dvd : p ∣ q → eval₂ f x p ∣ eval₂ f x q :=
218-
(eval₂RingHom f x).map_dvd
218+
map_dvd (eval₂RingHom f x)
219219

220220
theorem eval₂_eq_zero_of_dvd_of_eval₂_eq_zero (h : p ∣ q) (h0 : eval₂ f x p = 0) :
221221
eval₂ f x q = 0 :=
@@ -524,7 +524,7 @@ protected theorem map_ofNat (n : ℕ) [n.AtLeastTwo] :
524524

525525
--TODO rename to `map_dvd_map`
526526
theorem map_dvd (f : R →+* S) {x y : R[X]} : x ∣ y → x.map f ∣ y.map f :=
527-
(mapRingHom f).map_dvd
527+
_root_.map_dvd (mapRingHom f)
528528

529529
lemma mapRingHom_comp_C {R S : Type*} [Semiring R] [Semiring S] (f : R →+* S) :
530530
(mapRingHom f).comp C = C.comp f := by ext; simp

Mathlib/Algebra/Polynomial/Roots.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ variable {A B : Type*} [CommRing A] [CommRing B]
729729
theorem le_rootMultiplicity_map {p : A[X]} {f : A →+* B} (hmap : map f p ≠ 0) (a : A) :
730730
rootMultiplicity a p ≤ rootMultiplicity (f a) (p.map f) := by
731731
rw [le_rootMultiplicity_iff hmap]
732-
refine _root_.trans ?_ ((mapRingHom f).map_dvd (pow_rootMultiplicity_dvd p a))
732+
refine _root_.trans ?_ (_root_.map_dvd (mapRingHom f) (pow_rootMultiplicity_dvd p a))
733733
rw [map_pow, map_sub, coe_mapRingHom, map_X, map_C]
734734

735735
theorem eq_rootMultiplicity_map {p : A[X]} {f : A →+* B} (hf : Function.Injective f) (a : A) :

Mathlib/Algebra/Ring/Hom/Basic.lean

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,15 @@ Copyright (c) 2019 Amelia Livingston. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Amelia Livingston, Jireh Loreaux
55
-/
6-
import Mathlib.Algebra.Divisibility.Hom
7-
import Mathlib.Algebra.GroupWithZero.InjSurj
6+
87
import Mathlib.Algebra.Ring.Hom.Defs
9-
import Mathlib.Data.Set.Insert
108

119
/-!
1210
# Additional lemmas about homomorphisms of semirings and rings
13-
14-
These lemmas have been banished here to avoid unnecessary imports in
15-
`Mathlib/Algebra/Hom/Ring/Defs.lean`.
16-
17-
They could be moved to more natural homes.
1811
-/
1912

2013
assert_not_exists RelIso Field
2114

22-
open Function
23-
24-
variable {α β : Type*}
25-
2615
namespace RingHom
2716

28-
section
29-
30-
variable {_ : NonAssocSemiring α} {_ : NonAssocSemiring β} (f : α →+* β)
31-
32-
/-- `f : α →+* β` has a trivial codomain iff its range is `{0}`. -/
33-
theorem codomain_trivial_iff_range_eq_singleton_zero : (0 : β) = 1 ↔ Set.range f = {0} :=
34-
f.codomain_trivial_iff_range_trivial.trans
35-
fun h =>
36-
Set.ext fun y => ⟨fun ⟨x, hx⟩ => by simp [← hx, h x], fun hy => ⟨0, by simpa using hy.symm⟩⟩,
37-
fun h x => Set.mem_singleton_iff.mp (h ▸ Set.mem_range_self x)⟩
38-
39-
end
40-
41-
section Semiring
42-
43-
variable [Semiring α] [Semiring β]
44-
45-
protected theorem map_dvd (f : α →+* β) {a b : α} : a ∣ b → f a ∣ f b :=
46-
map_dvd f
47-
48-
end Semiring
49-
5017
end RingHom
51-
52-
/-- Pullback `IsDomain` instance along an injective function. -/
53-
protected theorem Function.Injective.isDomain [Semiring α] [IsDomain α] [Semiring β] {F}
54-
[FunLike F β α] [MonoidWithZeroHomClass F β α] (f : F) (hf : Injective f) : IsDomain β where
55-
__ := domain_nontrivial f (map_zero _) (map_one _)
56-
__ := hf.isCancelMulZero f (map_zero _) (map_mul _)

0 commit comments

Comments
 (0)