Skip to content

[Merged by Bors] - chore(CategoryTheory/Sites): remove unused lemmas and simplify some proofs in Sites.Discrete#16385

Closed
dagurtomas wants to merge 7 commits intomasterfrom
dagur/SimplifyDiscrete3
Closed

[Merged by Bors] - chore(CategoryTheory/Sites): remove unused lemmas and simplify some proofs in Sites.Discrete#16385
dagurtomas wants to merge 7 commits intomasterfrom
dagur/SimplifyDiscrete3

Conversation

@dagurtomas
Copy link
Copy Markdown
Contributor

@dagurtomas dagurtomas commented Sep 1, 2024

This PR does the following

  • Renames Sheaf.IsDiscrete to Sheaf.IsConstant and changes the definition to being in the essential image of the constant sheaf functor instead of requiring the counit to be an isomorphism.
  • Removes two lemmas from the file Sites.Discrete which were essentially duplicates of other ones, and simplifies a proof to be able to remove an auxiliary lemma.
  • Moves the remaining contets of Sites.Discrete to the file Sites.ConstantSheaf.

I added these lemmas initially because I used them in #14027, but it turns out they're essentially duplicates of other lemmas, now merged into one lemma constantSheafAdj_counit_w which is used in this file and in #14027.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 1, 2024

PR summary aa22c849a9

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.CategoryTheory.Sites.Discrete 891 0 -891 (-100.00%)
Mathlib.CategoryTheory.Sites.ConstantSheaf 672 890 +218 (+32.44%)
Import changes for all files
Files Import difference
Mathlib.CategoryTheory.Sites.Discrete -891
Mathlib.CategoryTheory.Sites.SheafCohomology.Basic 126
Mathlib.CategoryTheory.Sites.ConstantSheaf 218

Declarations diff

+ IsConstant
+ Sheaf.isConstant_iff_forget
+ Sheaf.isConstant_iff_of_equivalence
+ Sheaf.isConstant_of_forget
+ constantCommuteCompose_hom_app_val
+ constantSheafAdj_counit_w
+ instance [(constantSheaf J D).Faithful] [(constantSheaf J D).Full] (F : Sheaf J D)
+ instance [h : F.IsConstant J] : ((sheafCompose J U).obj F).IsConstant J := by
+ isConstant_congr
+ isConstant_iff_isIso_counit_app
+ isConstant_iff_isIso_counit_app'
+ isConstant_iff_mem_essImage
+ isConstant_of_isIso_counit_app
+ isConstant_of_iso
+ mem_essImage_of_isConstant
- IsDiscrete
- constantCommuteComposeApp_comp_counit
- constantSheafAdj_counit_app
- instance [h : F.IsDiscrete J ht] : ((sheafCompose J U).obj F).IsDiscrete J ht := by
- isDiscrete_iff_forget
- isDiscrete_iff_isIso_counit_app
- isDiscrete_iff_mem_essImage
- isDiscrete_iff_mem_essImage'
- isDiscrete_iff_of_equivalence
- isDiscrete_of_iso
- sheafComposeNatIso_app_counit
- sheafCompose_reflects_discrete

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

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

The doc-module for script/declarations_diff.sh contains some details about this script.

@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 1, 2024
@dagurtomas dagurtomas removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 2, 2024
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 2, 2024
dagurtomas and others added 2 commits September 2, 2024 11:08
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@dagurtomas dagurtomas removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 2, 2024
@joelriou joelriou added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 2, 2024
@dagurtomas dagurtomas removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 4, 2024
@joelriou
Copy link
Copy Markdown
Contributor

joelriou commented Sep 4, 2024

Thanks!

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Sep 4, 2024
mathlib-bors bot pushed a commit that referenced this pull request Sep 4, 2024
…roofs in Sites.Discrete (#16385)

This PR does the following
- Renames `Sheaf.IsDiscrete` to `Sheaf.IsConstant` and changes the definition to being in the essential image of the constant sheaf functor instead of requiring the counit to be an isomorphism. 
- Removes two lemmas from the file `Sites.Discrete` which were essentially duplicates of other ones, and simplifies a proof to be able to remove an auxiliary lemma. 
- Moves the remaining contets of `Sites.Discrete` to the file `Sites.ConstantSheaf`.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Sep 4, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(CategoryTheory/Sites): remove unused lemmas and simplify some proofs in Sites.Discrete [Merged by Bors] - chore(CategoryTheory/Sites): remove unused lemmas and simplify some proofs in Sites.Discrete Sep 4, 2024
@mathlib-bors mathlib-bors bot closed this Sep 4, 2024
@mathlib-bors mathlib-bors bot deleted the dagur/SimplifyDiscrete3 branch September 4, 2024 11:51
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…roofs in Sites.Discrete (#16385)

This PR does the following
- Renames `Sheaf.IsDiscrete` to `Sheaf.IsConstant` and changes the definition to being in the essential image of the constant sheaf functor instead of requiring the counit to be an isomorphism. 
- Removes two lemmas from the file `Sites.Discrete` which were essentially duplicates of other ones, and simplifies a proof to be able to remove an auxiliary lemma. 
- Moves the remaining contets of `Sites.Discrete` to the file `Sites.ConstantSheaf`.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…roofs in Sites.Discrete (#16385)

This PR does the following
- Renames `Sheaf.IsDiscrete` to `Sheaf.IsConstant` and changes the definition to being in the essential image of the constant sheaf functor instead of requiring the counit to be an isomorphism. 
- Removes two lemmas from the file `Sites.Discrete` which were essentially duplicates of other ones, and simplifies a proof to be able to remove an auxiliary lemma. 
- Moves the remaining contets of `Sites.Discrete` to the file `Sites.ConstantSheaf`.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
…roofs in Sites.Discrete (#16385)

This PR does the following
- Renames `Sheaf.IsDiscrete` to `Sheaf.IsConstant` and changes the definition to being in the essential image of the constant sheaf functor instead of requiring the counit to be an isomorphism. 
- Removes two lemmas from the file `Sites.Discrete` which were essentially duplicates of other ones, and simplifies a proof to be able to remove an auxiliary lemma. 
- Moves the remaining contets of `Sites.Discrete` to the file `Sites.ConstantSheaf`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-category-theory Category theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants