Skip to content

[Merged by Bors] - refactor(Topology/Category): add CompHausLike.Limits#13905

Closed
dagurtomas wants to merge 295 commits intomasterfrom
dagur/AddCompHausLikeLimits
Closed

[Merged by Bors] - refactor(Topology/Category): add CompHausLike.Limits#13905
dagurtomas wants to merge 295 commits intomasterfrom
dagur/AddCompHausLikeLimits

Conversation

@dagurtomas
Copy link
Copy Markdown
Contributor

@dagurtomas dagurtomas commented Jun 17, 2024

This is the first part of the refactor of CompHaus and friends (adding the new API which will eventually be used to redefine the categories of compact Hausdorff spaces, see #12930)


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 17, 2024

PR summary 644c692821

Import changes

No significant changes to the import graph


Declarations diff

+ HasExplicitFiniteCoproducts
+ HasExplicitPullbacks
+ HasExplicitPullbacksOfInclusions
+ Sigma.openEmbedding_ι
+ finitaryExtensive
+ finiteCoproduct
+ finiteCoproduct.desc
+ finiteCoproduct.hom_ext
+ finiteCoproduct.isColimit
+ finiteCoproduct.openEmbedding_ι
+ finiteCoproduct.ι
+ finiteCoproduct.ι_desc
+ finiteCoproduct.ι_desc_apply
+ finiteCoproduct.ι_injective
+ finiteCoproduct.ι_jointly_surjective
+ hasPullbacksOfInclusions
+ instance (P) [HasExplicitFiniteCoproducts.{0} P] :
+ instance : CreatesLimit (cospan f g) (compHausLikeToTop P) := by
+ instance : HasCoproduct X
+ instance : PreservesLimit (cospan f g) (compHausLikeToTop P)
+ instance [HasExplicitFiniteCoproducts.{w} P] (α : Type w) [Finite α] :
+ instance [HasExplicitFiniteCoproducts.{w} P] : HasFiniteCoproducts (CompHausLike.{max u w} P)
+ instance [HasExplicitPullbacks P] : HasPullbacks (CompHausLike P)
+ instance [HasExplicitPullbacks P] [HasExplicitFiniteCoproducts.{0} P] :
+ instance [HasExplicitPullbacksOfInclusions P] :
+ instance [HasExplicitPullbacksOfInclusions P] : FinitaryExtensive (CompHausLike P)
+ instance [HasExplicitPullbacksOfInclusions P] : HasPullbacksOfInclusions (CompHausLike P)
+ instance {P' : TopCat → Prop}
+ instance {P' : TopCat.{u} → Prop}
+ isTerminalPUnit
+ pullback
+ pullback.condition
+ pullback.cone
+ pullback.fst
+ pullback.hom_ext
+ pullback.isLimit
+ pullback.lift
+ pullback.lift_fst
+ pullback.lift_snd
+ pullback.snd

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

@dagurtomas dagurtomas added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) labels Jun 19, 2024
@ghost
Copy link
Copy Markdown

ghost commented Jun 19, 2024

This PR/issue depends on:

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 19, 2024
Rida-Hamadani and others added 13 commits July 2, 2024 09:23
This will allow us to write `n.toNat` instead of `ENat.toNat n`
We derive the inequality between the harmonic and geometric mean as a consequence of AM-GM for positive real valued functions from a `Finset`. We state a weighted as well as the classical version.
This is one in a series of PRs rewriting most checks from `lint-style.py` in Lean.
This PR moves the check for copyright headers and authors: the check has been rewritten anew (and is hopefully simpler to understand now); this has made it stricter in various places. The necessary adjustments have been made in #13212 and #13247.

This PR also adds a `nolints` file for text-based linters.
…es (#13545)

We define the strict bicategory of based categories. Its objects are categories equipped with a functor to some fixed base-category. The strict bicategory of fibered categories will later be built on top of this one.

Co-authored-by: Paul Lezeau [paul.lezeau@gmail.com](mailto:paul.lezeau@gmail.com)
…14018)

This PR adds the `SpecialFunctions/Log/ENNRealLog.lean` file where we define `log` as an extension of the logarithm of a positive real to the extended nonnegative reals `ℝ≥0∞`. The function takes values in the extended reals `EReal`, with `log 0 = ⊥` and `log ⊤ = ⊤`.

Co-authored with @D-Thomine.
left and right unitor functors for product of categories



Co-authored-by: Shanghe Chen <shanghechen@outlook.com>
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
)

If `F` is an exact functor between abelian categories, we define the induced functor on the derived categories.
We show that `Module.Finite` is preserved under localizations and that if a module is finite after localizing at a spanning set of elements of the ring, it is finite.
The `cc` tactic is a high-cost tactic, so I restored `cc` tactics only if a proof can be reduced significantly.
I made sure that `cc` tactic works on in the all changed proofs except when the other specification changes in Lean 4 changes a goal.



Co-authored-by: Pol'tta / Miyahara Kō <52843868+Komyyy@users.noreply.github.com>
- Add `slope_neg_fun`
- Add `ConvexOn.slope_mono` and `ConcaveOn.slope_anti` in a new separate section called `slope`



Co-authored-by: Lorenzo Luccioli <71074618+LorenzoLuccioli@users.noreply.github.com>
kmill and others added 16 commits July 2, 2024 09:23
The `subsingleton` tactic tries to close equality goals by arguing that the underlying type is a subsingleton type. It might be via a `Subsingleton` instance (via `Subsingleton.elim`), but it also handles some cases where morally the types are subsingletons; for example, it can prove that two `BEq` instances are equal if they both have `LawfulBEq` instances. For heterogeneous equality, it tries the `HEq` version of proof irrelevance.

This tactic avoids the issue where
```lean
example (α : Sort _) (x y : α) : x = y := by apply Subsingleton.elim
```
is a "proof" that every type is trivial. Changing this to `by subsingleton` prevents it from assigning the universe level metavariable in `Sort _` to `0`.

This tactic can accept a list of instances `subsingleton [inst1, inst2, ...]` to do something like `have := inst1; have := inst2; ...; subsingleton`, but it elaborates them in a lenient way (like `simp` arguments), and they can even be universe polymorphic. For example, `subsingleton [CharP.CharOne.subsingleton]` is allowed even though the type of `CharP.CharOne.subsingleton` is `Subsingleton ?R` with a number of pending instance problems.

This PR also eliminates a number of uses of `Subsingleton.elim`, either by switching a `congr` to `congr!` or by using this new tactic.
Extends `convert_to` to be able to operate on any location. When converting the type of a local hypothesis, new congruence goals come first. Suggested [on Zulip](https://leanprover.zulipchat.com/#narrow/stream/239415-metaprogramming-.2F-tactics/topic/.60convert_to.20at.60.20.2F.20non-definitional.20.60change.60/near/447601320).
…functor, then the unit is an isomorphism. (#14017)

This PR proves that to show that the unit of an adjunction `L ⊣ R` is an isomorphism (i.e. that L is fully faithful), it is enough to give an arbitrary isomorphism `L ⋙ R ≅ 𝟭 C`, and the dual result. 

To do this, we give a general way to transport (co)monad structures on functors along isomorphisms of functors.
…rder` (#14121)

We don't want to import the order hierarchy without really needing it.
For an alternating form $B : M \times M \to R$ and $a, b, c \in M$ with $a + b+ c = 0$, we have $B(a, b) = B(b, c)$.
This can be used to prove the same property of Wronskian: see #14243.



Co-authored-by: Seewoo Lee <49933279+seewoo5@users.noreply.github.com>
We can avoid importing `Algebra.Order.Group.Defs` in `Data.Rat.Lemmas` if we use `Nat` versions of some lemmas and slightly modify one proof.
We shouldn't import the whole order hierarchy when we want ring instances on products.
We shouldn't need to import ordered algebraic classes for basic properties of pointwise multiplication of sets.
We can just specialize to the results about `Nat` and avoid importing `Algebra.Order.Ring.Nat`.
…ousOn_eval₂` (#13532)

Also use it to weaken TC assumptions in `ContinuousMultilinearMap.continuous_eval`.
Splitting `Prime.lean` into `Defs`, `Basic`. The split aims at separation of defs and needed lemmas from everything else. With this split 13/18 Mathlib modules no longer import the whole `Prime.lean`. `Prime/Defs.lean` is about half the size.

Motivation is a circular dependency that would prevent me from adding a lemma to `Prime.lean`.

https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/split.20Nat.2FPrime.2Elean
@dagurtomas
Copy link
Copy Markdown
Contributor Author

(Sorry if everyone got github notifications for some unrelated commit, I was merging master and messed up...)

@jcommelin
Copy link
Copy Markdown
Member

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 2, 2024

✌️ dagurtomas can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-review labels Jul 2, 2024
@dagurtomas
Copy link
Copy Markdown
Contributor Author

Thanks!

bors merge

mathlib-bors bot added a commit that referenced this pull request Jul 2, 2024
This is the first part of the refactor of CompHaus and friends (adding the new API which will eventually be used to redefine the categories of compact Hausdorff spaces, see #12930)



Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Co-authored-by: Ralf Stephan <ralf@ark.in-berlin.de>
Co-authored-by: Kim Morrison <kim@tqft.net>
Co-authored-by: dagurtomas <dagurtomas@gmail.com>
Co-authored-by: grunweg <rothgami@math.hu-berlin.de>
Co-authored-by: Dagur Tómas Ásgeirsson <dagurtomas@gmail.com>
Co-authored-by: James Sundstrom <James.Sundstrom@gmail.com>
Co-authored-by: leanprover-community-mathlib4-bot <150093616+mathlib-bors@users.noreply.github.com>
Co-authored-by: Christian Merten <christian@merten.dev>
Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Co-authored-by: Peter Nelson <71660771+apnelson1@users.noreply.github.com>
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
Co-authored-by: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com>
Co-authored-by: Herman Chau <beijingherman@gmail.com>
Co-authored-by: Kyle Miller <kmill31415@gmail.com>
Co-authored-by: Seewoo Lee <seewoo5@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 2, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(Topology/Category): add CompHausLike.Limits [Merged by Bors] - refactor(Topology/Category): add CompHausLike.Limits Jul 2, 2024
@mathlib-bors mathlib-bors bot closed this Jul 2, 2024
@mathlib-bors mathlib-bors bot deleted the dagur/AddCompHausLikeLimits branch July 2, 2024 14:41
@adomani adomani mentioned this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-category-theory Category theory t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.