Skip to content

[Merged by Bors] - feat: quasi-isomorphisms of short complexes#7262

Closed
joelriou wants to merge 4 commits intomasterfrom
shortcomplex_quasiiso
Closed

[Merged by Bors] - feat: quasi-isomorphisms of short complexes#7262
joelriou wants to merge 4 commits intomasterfrom
shortcomplex_quasiiso

Conversation

@joelriou
Copy link
Copy Markdown
Contributor


Open in Gitpod

Comment on lines +47 to +55
lemma quasiIso_comp' (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃) (hφ : QuasiIso φ) (hφ' : QuasiIso φ') :
QuasiIso (φ ≫ φ') := by
rw [quasiIso_iff] at hφ hφ' ⊢
rw [homologyMap_comp]
infer_instance

instance quasiIso_comp (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃) [QuasiIso φ] [QuasiIso φ'] :
QuasiIso (φ ≫ φ') :=
quasiIso_comp' φ φ' inferInstance inferInstance
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are essentially duplicating every instance as a lemma. But since Lean 4 permits named variables, I wonder whether it is enough to just provide the instances and give nice names to the instance variables:

Suggested change
lemma quasiIso_comp' (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃) (hφ : QuasiIso φ) (hφ' : QuasiIso φ') :
QuasiIso (φ ≫ φ') := by
rw [quasiIso_iff] at hφ hφ' ⊢
rw [homologyMap_comp]
infer_instance
instance quasiIso_comp (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃) [QuasiIso φ] [QuasiIso φ'] :
QuasiIso (φ ≫ φ') :=
quasiIso_comp' φ φ' inferInstance inferInstance
instance quasiIso_comp (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃) [hφ : QuasiIso φ] [hφ' : QuasiIso φ'] :
QuasiIso (φ ≫ φ') := by
rw [quasiIso_iff] at hφ hφ' ⊢
rw [homologyMap_comp]
infer_instance

This can then be used as quasiIso_comp φ φ' (hφ := foo) (hφ' := bar) when needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have struggled a little bit with the syntax to make this work downstream, but it works. (It seems the exact syntax would be quasiIso_comp (hφ := foo) (hφ' := bar) because from the type of , Lean would find the type of φ!)

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Sep 21, 2023
@joelriou joelriou added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Sep 22, 2023
Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Sep 22, 2023
bors bot pushed a commit that referenced this pull request Sep 22, 2023
@bors
Copy link
Copy Markdown

bors bot commented Sep 22, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: quasi-isomorphisms of short complexes [Merged by Bors] - feat: quasi-isomorphisms of short complexes Sep 22, 2023
@bors bors bot closed this Sep 22, 2023
@bors bors bot deleted the shortcomplex_quasiiso branch September 22, 2023 12:57
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