Skip to content

Sync upstream mathlib4 (2026-08-04, +16 commits) - #94

Merged
winstonyin-ax merged 17 commits into
masterfrom
sync/upstream
Aug 4, 2026
Merged

Sync upstream mathlib4 (2026-08-04, +16 commits)#94
winstonyin-ax merged 17 commits into
masterfrom
sync/upstream

Conversation

@winstonyin-ax

@winstonyin-ax winstonyin-ax commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Automated daily sync from leanprover-community/mathlib4@master.

Auto-merges to master once CI (self-hosted) passes. Regenerated
daily until merged or until a conflict appears.


Note

Low Risk
Mostly mechanical renames and deprecations with broad but low-impact call-site updates; the new counterexample file is self-contained. Dedekind and LinearEquiv changes are standard mathlib refactors with deprecated aliases retained.

Overview
New counterexample: Adds Counterexamples/GrothendieckPower (~1k lines), formalizing a rank-four affine group scheme over a finite base ring whose fourth power map is nontrivial—giving a negative answer to Grothendieck’s question in the non-commutative case—and wires it into Counterexamples.lean.

API churn: Prime / IsPrimePow / FiniteMultiplicity / WfDvdMonoid rename not_unit to not_isUnit (old names deprecated). LinearEquiv.ofLinear is deprecated in favor of ofLinearMap with maps in the definition; call sites are updated across linear algebra, representation theory, and related files.

Dedekind domains: Reorganizes the invertible-ideal section and exposes isDedekindDomain_iff_mul_inv_cancel; FractionalIdeal.semifield is built from that equivalence rather than inline IsDedekindDomainInv logic.

Topology & analysis: New locally connected / locally path-connected instances and characterizations for products and pi types; ContinuousOn variants for connected-component images and preimages; coinduced locally connected spaces; small fixes to order bornology and ContinuousLinearMap.toLinearMap₁₂ (now a bundled linear map with renamed simp lemmas).

Misc: finprod_nonneg uses weaker typeclass assumptions; QuadraticAlgebra.omega_mul_omega_eq_algebraMap; removal of a few redundant inferInstance/have blocks in sheaf/category files.

Reviewed by Cursor Bugbot for commit e3e354c. Bugbot is set up for automated code reviews on this repo. Configure here.

NoahW314 and others added 17 commits August 3, 2026 08:23
…t_isUnit` (#42390)

Co-authored-by: NoahW314 <noahwalker3.14@gmail.com>
Co-authored-by: Batixx <s59fpern@uni-bonn.de>
Co-authored-by: NoahW314 <noahwalker3.14@gmail.com>
Co-authored-by: NoahW314 <noahwalker3.14@gmail.com>
Co-authored-by: NoahW314 <noahwalker3.14@gmail.com>
This PR removes some unused `have`/`let` that have been caught using the `unusedHavesSuffices` linter from batteries.

Unfortunately, the linter has quite a few false positives as well. See also leanprover-community/batteries#1932
…illed by four (#41748)

This PR adds a `Counterexamples/` file resolving a question of Grothendieck in the negative.

## Statement

Grothendieck asked whether a finite locally free group scheme of order `n` is killed by `n`. Deligne proved this holds for **commutative** group schemes. This file gives a counterexample in the non-commutative case.

Over the base ring `R = ℤ[a, b] / (a³, b³, a²b + 2)`, the coordinate algebra

    A = R[U, V] / (U² − abU + b²V, V² − a²V)

is a Hopf algebra, finite free of rank four over `R`, whose associated affine group scheme has order four but is **not killed by four**. Concretely, the fourth convolution power of the identity is not the convolution unit:

    `Counterexample.GrothendieckPower.counterexample :
       Nontrivial R ∧ Module.Free R A ∧ Module.Finite R A ∧ Module.finrank R A = 4 ∧
         powerMap 4 ≠ (Algebra.ofId R A).comp counit`

## Disclosure

As stated in the module docstring, and per mathlib policy: the construction of this group scheme and its formalization were carried out with the AI assistants Codex (OpenAI) and Claude (Anthropic), under the direction of the author, who takes responsibility for the contribution.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
…tions of hemicontinuity (#40377)

We prove two things: First, we prove a sequential characterization of lower hemicontinuity in terms of sequences. `LowerHemicontinuousAt.of_sequences`

Second, we show that upper and lower hemicontinuity are preserved under uniform limits in the Hausdorff uniformity.

N.B. the increase in imports comes from importing uniformity structures (including the Hausdorff uniformity). If preferred, I can break these uniform convergence lemmas out into their own file to minimize imports in this file.

AI Disclosure: Initial proof outlined by me, lean statement written by me, initial draft of lean proof provided by claude code, then I provided edits, comments, and docstrings

- [x] depends on: #38601

Co-authored-by: Kevin H Wilson <khwilson@gmail.com>
Co-authored-by: Joscha <joscha@plugh.de>
This PR updates the Mathlib dependencies.
…Equiv (#40865)

Change the name of `LinearEquiv.ofLinear` to  `LinearEquiv.ofLinearMap` and change the API. This replaces `_apply` by `coe_`, introduces `_symm`, which makes `_symm_apply` and `_symm_toLinearMap` redundant, and changes `_toLinearMap` to `toLinearMap_`.
…pi types (#41663)

Add product and pi instances for `LocallyConnectedSpace` and `LocallyPathConnectedSpace`, together with a full characterization of local (path-)connectedness of pi types:

- `Prod.locallyConnectedSpace` / `Prod.locallyPathConnectedSpace`: binary products.
- `Pi.locallyConnectedSpace_of_finite_not_preconnectedSpace` / `Pi.locallyPathConnectedSpace_of_finite_not_pathConnectedSpace`: a product of locally (path-)connected spaces is locally (path-)connected provided all but finitely many factors are preconnected (resp. path-connected). The `Finite ι` and all-factors-preconnected (resp. path-connected) instances are corollaries.
- `Pi.locallyConnectedSpace_iff` / `Pi.locallyPathConnectedSpace_iff`: a product is locally (path-)connected iff it is empty or the above conditions hold.
- Topology.IsCoinducing.locallyConnectedSpace: a topology coinduced by a locally connected topology is locally connected (used for the forward direction via the projections). Since IsQuotientMap is by definition IsCoinducing, this covers quotient maps; the analogous IsQuotientMap.locallyPathConnectedSpace already existed.

Supporting API in Topology/Connected/Basic.lean:
- ContinuousOn.image_connectedComponentIn_subset, ContinuousOn.mapsTo_connectedComponentIn, ContinuousOn.preimage_connectedComponentIn: ContinuousOn generalizations of the existing Continuous lemmas.
- Continuous.preimage_connectedComponent: the connectedComponent form of the preimage lemma.
- Deprecates Continuous.image_connectedComponentIn_subset and Continuous.mapsTo_connectedComponentIn in favor of the ContinuousOn versions.

Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
…LinearMap₁₂` to a linear map (#41731)

Convert the projection `toLinearMap₁₂` (which strips the topology from a continuous semibilinear map) to a linear map, by showing that it preserves addition and scalar multiplication. We also rename `toLinearMap₁₂_apply` to `toLinearMap₁₂_apply_apply_apply` without deprecation so that we can have `_apply` be a different lemma.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
Co-authored-by: JX-Mo <296066944+JX-Mo@users.noreply.github.com>
Co-authored-by: mathlib-splicebot[bot] <261196803+mathlib-splicebot[bot]@users.noreply.github.com>
Co-authored-by: Felix Pernegger <188575194+felixpernegger@users.noreply.github.com>
Co-authored-by: Rémy Degenne <4094732+RemyDegenne@users.noreply.github.com>
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
Co-authored-by: Yi.Yuan <kysyy1@126.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Thomas Browning <13339017+tb65536@users.noreply.github.com>
Co-authored-by: mitchell-horner <29882987+mitchell-horner@users.noreply.github.com>
Co-authored-by: Seewoo Lee <49933279+seewoo5@users.noreply.github.com>
Co-authored-by: Monica Omar <23701951+themathqueen@users.noreply.github.com>
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Jz Pan <3397779+acmepjz@users.noreply.github.com>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Michał Pacholski <mpacholski@google.com>
Co-authored-by: Bhavik Mehta <29959226+b-mehta@users.noreply.github.com>
Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com>
Co-authored-by: Richard Osborn <richardosborn@mac.com>
Co-authored-by: Brian Nugent <b.nugent@utah.edu>
…ial (#42030)

Also generalise the fact that cobounded sets tend to top/bot from linear orders to preorders (without a max/min element).
@winstonyin-ax
winstonyin-ax merged commit fdd194a into master Aug 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.