Skip to content

Commit b3aa57a

Browse files
author
leanprover-community-mathlib4-bot
committed
2 parents 0b8c7f0 + f8584e6 commit b3aa57a

File tree

63 files changed

+1495
-670
lines changed

Some content is hidden

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

63 files changed

+1495
-670
lines changed

.github/build.in.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ jobs:
422422
423423
post_steps:
424424
name: Post-Build StepJOB_NAME
425+
if: FORK_CONDITION
425426
needs: [build]
426427
runs-on: ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
427428
steps:
@@ -503,13 +504,24 @@ jobs:
503504
504505
style_lint:
505506
name: Lint styleJOB_NAME
507+
if: FORK_CONDITION
506508
runs-on: ubuntu-latest
507509
steps:
508510
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
509511
with:
510512
mode: check
511513
lint-bib-file: true
512514

515+
build_and_lint:
516+
name: CI Success
517+
if: FORK_CONDITION
518+
needs: [style_lint, build]
519+
runs-on: ubuntu-latest
520+
steps:
521+
- name: succeed
522+
run: |
523+
echo "Success: Required build and lint checks completed!"
524+
513525
final:
514526
name: Post-CI jobJOB_NAME
515527
if: FORK_CONDITION

.github/workflows/bors.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ jobs:
432432
433433
post_steps:
434434
name: Post-Build Step
435+
if: true
435436
needs: [build]
436437
runs-on: ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
437438
steps:
@@ -513,13 +514,24 @@ jobs:
513514
514515
style_lint:
515516
name: Lint style
517+
if: true
516518
runs-on: ubuntu-latest
517519
steps:
518520
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
519521
with:
520522
mode: check
521523
lint-bib-file: true
522524

525+
build_and_lint:
526+
name: CI Success
527+
if: true
528+
needs: [style_lint, build]
529+
runs-on: ubuntu-latest
530+
steps:
531+
- name: succeed
532+
run: |
533+
echo "Success: Required build and lint checks completed!"
534+
523535
final:
524536
name: Post-CI job
525537
if: true

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ jobs:
439439
440440
post_steps:
441441
name: Post-Build Step
442+
if: true
442443
needs: [build]
443444
runs-on: ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
444445
steps:
@@ -520,13 +521,24 @@ jobs:
520521
521522
style_lint:
522523
name: Lint style
524+
if: true
523525
runs-on: ubuntu-latest
524526
steps:
525527
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
526528
with:
527529
mode: check
528530
lint-bib-file: true
529531

532+
build_and_lint:
533+
name: CI Success
534+
if: true
535+
needs: [style_lint, build]
536+
runs-on: ubuntu-latest
537+
steps:
538+
- name: succeed
539+
run: |
540+
echo "Success: Required build and lint checks completed!"
541+
530542
final:
531543
name: Post-CI job
532544
if: true

.github/workflows/build_fork.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ jobs:
436436
437437
post_steps:
438438
name: Post-Build Step (fork)
439+
if: github.event.pull_request.head.repo.fork
439440
needs: [build]
440441
runs-on: ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
441442
steps:
@@ -517,13 +518,24 @@ jobs:
517518
518519
style_lint:
519520
name: Lint style (fork)
521+
if: github.event.pull_request.head.repo.fork
520522
runs-on: ubuntu-latest
521523
steps:
522524
- uses: leanprover-community/lint-style-action@f2e7272aad56233a642b08fe974cf09dd664b0c8 # 2025-05-22
523525
with:
524526
mode: check
525527
lint-bib-file: true
526528

529+
build_and_lint:
530+
name: CI Success
531+
if: github.event.pull_request.head.repo.fork
532+
needs: [style_lint, build]
533+
runs-on: ubuntu-latest
534+
steps:
535+
- name: succeed
536+
run: |
537+
echo "Success: Required build and lint checks completed!"
538+
527539
final:
528540
name: Post-CI job (fork)
529541
if: github.event.pull_request.head.repo.fork

.github/workflows/build_status.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

Mathlib.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ import Mathlib.Algebra.GroupWithZero.Pointwise.Finset
468468
import Mathlib.Algebra.GroupWithZero.Pointwise.Set.Basic
469469
import Mathlib.Algebra.GroupWithZero.Pointwise.Set.Card
470470
import Mathlib.Algebra.GroupWithZero.Prod
471+
import Mathlib.Algebra.GroupWithZero.ProdHom
471472
import Mathlib.Algebra.GroupWithZero.Semiconj
472473
import Mathlib.Algebra.GroupWithZero.Subgroup
473474
import Mathlib.Algebra.GroupWithZero.Submonoid.Pointwise
@@ -4325,6 +4326,7 @@ import Mathlib.MeasureTheory.Integral.Periodic
43254326
import Mathlib.MeasureTheory.Integral.Pi
43264327
import Mathlib.MeasureTheory.Integral.Prod
43274328
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Basic
4329+
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.NNReal
43284330
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real
43294331
import Mathlib.MeasureTheory.Integral.SetIntegral
43304332
import Mathlib.MeasureTheory.Integral.SetToL1
@@ -4554,6 +4556,7 @@ import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic
45544556
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Defs
45554557
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.IsBoundedAtImInfty
45564558
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.MDifferentiable
4559+
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Summable
45574560
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.UniformConvergence
45584561
import Mathlib.NumberTheory.ModularForms.Identities
45594562
import Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds

Mathlib/Algebra/Group/Pi/Basic.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ theorem mulSingle_op₂ (op : ∀ i, M i → N i → O i) (h : ∀ i, op i 1 1 =
201201
mulSingle i (op i x₁ x₂) = fun j => op j (mulSingle i x₁ j) (mulSingle i x₂ j) :=
202202
Eq.symm <| funext <| apply_mulSingle₂ op h i x₁ x₂
203203

204-
variable (f)
205-
206204
@[to_additive]
207205
theorem mulSingle_injective (i : ι) : Function.Injective (mulSingle i : M i → ∀ i, M i) :=
208206
Function.update_injective _ i

Mathlib/Algebra/Group/Pi/Lemmas.lean

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ variable [DecidableEq I]
187187

188188
open Pi
189189

190-
variable (f)
191-
190+
variable (f) in
192191
/-- The one-preserving homomorphism including a single value
193192
into a dependent family of values, as functions supported at a point.
194193
@@ -206,6 +205,11 @@ nonrec def OneHom.mulSingle [∀ i, One <| f i] (i : I) : OneHom (f i) (∀ i, f
206205
theorem OneHom.mulSingle_apply [∀ i, One <| f i] (i : I) (x : f i) :
207206
mulSingle f i x = Pi.mulSingle i x := rfl
208207

208+
@[to_additive (attr := simp, norm_cast)]
209+
theorem OneHom.coe_mulSingle [∀ i, One <| f i] (i : I) :
210+
mulSingle f i = Pi.mulSingle (M := f) i := rfl
211+
212+
variable (f) in
209213
/-- The monoid homomorphism including a single monoid into a dependent family of additive monoids,
210214
as functions supported at a point.
211215
@@ -223,7 +227,9 @@ theorem MonoidHom.mulSingle_apply [∀ i, MulOneClass <| f i] (i : I) (x : f i)
223227
mulSingle f i x = Pi.mulSingle i x :=
224228
rfl
225229

226-
variable {f}
230+
@[to_additive (attr := simp, norm_cast)]
231+
theorem MonoidHom.coe_mulSingle [∀ i, MulOneClass <| f i] (i : I) :
232+
mulSingle f i = Pi.mulSingle (M := f) i := rfl
227233

228234
@[to_additive]
229235
theorem Pi.mulSingle_sup [∀ i, SemilatticeSup (f i)] [∀ i, One (f i)] (i : I) (x y : f i) :

Mathlib/Algebra/GroupWithZero/Hom.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,26 @@ instance {β} [CommMonoidWithZero β] : Mul (α →*₀ β) where
214214
{ (f * g : α →* β) with
215215
map_zero' := by dsimp; rw [map_zero, zero_mul] }
216216

217+
/-- The trivial homomorphism between monoids with zero, sending everything to 1 other than 0. -/
218+
protected instance one (M₀ N₀ : Type*) [MulZeroOneClass M₀] [MulZeroOneClass N₀]
219+
[DecidablePred fun x : M₀ ↦ x = 0] [Nontrivial M₀] [NoZeroDivisors M₀] :
220+
One (M₀ →*₀ N₀) where
221+
one.toFun x := if x = 0 then 0 else 1
222+
one.map_zero' := by simp
223+
one.map_one' := by simp
224+
one.map_mul' x y := by split_ifs <;> simp_all
225+
226+
@[simp]
227+
lemma one_apply_zero {M₀ N₀ : Type*} [MulZeroOneClass M₀] [MulZeroOneClass N₀]
228+
[DecidablePred fun x : M₀ ↦ x = 0] [Nontrivial M₀] [NoZeroDivisors M₀] :
229+
(1 : M₀ →*₀ N₀) 0 = 0 :=
230+
if_pos rfl
231+
232+
lemma one_apply_of_ne_zero {M₀ N₀ : Type*} [MulZeroOneClass M₀] [MulZeroOneClass N₀]
233+
[DecidablePred fun x : M₀ ↦ x = 0] [Nontrivial M₀] [NoZeroDivisors M₀] {x : M₀} (hx : x ≠ 0) :
234+
(1 : M₀ →*₀ N₀) x = 1 :=
235+
if_neg hx
236+
217237
end MonoidWithZeroHom
218238

219239
section CommMonoidWithZero

Mathlib/Algebra/GroupWithZero/Prod.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Eric Wieser, Yaël Dillies
66
import Mathlib.Algebra.Group.Prod
77
import Mathlib.Algebra.GroupWithZero.Hom
88
import Mathlib.Algebra.GroupWithZero.Units.Basic
9+
import Mathlib.Algebra.GroupWithZero.WithZero
910

1011
/-!
1112
# Products of monoids with zero, groups with zero
@@ -49,6 +50,14 @@ instance instCommMonoidWithZero [CommMonoidWithZero M₀] [CommMonoidWithZero N
4950

5051
end Prod
5152

53+
variable (M₀) in
54+
@[simp]
55+
lemma WithZero.toMonoidWithZeroHom_withZeroUnitsEquiv [GroupWithZero M₀]
56+
[DecidablePred fun x : M₀ ↦ x = 0] :
57+
MonoidWithZeroHomClass.toMonoidWithZeroHom WithZero.withZeroUnitsEquiv =
58+
WithZero.lift' (Units.coeHom M₀) :=
59+
rfl
60+
5261
/-! ### Multiplication and division as homomorphisms -/
5362

5463
section BundledMulDiv

0 commit comments

Comments
 (0)