Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 295 commits into from

Conversation

dagurtomas
Copy link
Collaborator

@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

Copy link

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 and removed blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) labels Jun 19, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

This PR/issue depends on:

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 [[email protected]](mailto:[email protected])
…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 <[email protected]>
)

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ō <[email protected]>
- Add `slope_neg_fun`
- Add `ConvexOn.slope_mono` and `ConcaveOn.slope_anti` in a new separate section called `slope`



Co-authored-by: Lorenzo Luccioli <[email protected]>
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 <[email protected]>
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
Collaborator Author

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

@jcommelin
Copy link
Member

bors d+

@mathlib-bors
Copy link
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.

@dagurtomas
Copy link
Collaborator 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 <[email protected]>
Co-authored-by: Ralf Stephan <[email protected]>
Co-authored-by: Kim Morrison <[email protected]>
Co-authored-by: dagurtomas <[email protected]>
Co-authored-by: grunweg <[email protected]>
Co-authored-by: Dagur Tómas Ásgeirsson <[email protected]>
Co-authored-by: James Sundstrom <[email protected]>
Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: Christian Merten <[email protected]>
Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: Ruben Van de Velde <[email protected]>
Co-authored-by: Peter Nelson <[email protected]>
Co-authored-by: Jireh Loreaux <[email protected]>
Co-authored-by: Pietro Monticone <[email protected]>
Co-authored-by: Herman Chau <[email protected]>
Co-authored-by: Kyle Miller <[email protected]>
Co-authored-by: Seewoo Lee <[email protected]>
@mathlib-bors
Copy link
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 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.