Repository navigation
chore: don't use by assumption for hypothesis with exposed name - #42007
felixpernegger wants to merge 7 commits into
Conversation
|
!bench |
|
Benchmark results for 3d1ca39 against eb6a272 are in. No significant results found. @felixpernegger
No significant changes detected. |
PR summary 51d83494edImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
!bench |
|
Benchmark results for 9618ba5 against eb6a272 are in. No significant results found. @felixpernegger
No significant changes detected. |
Vierkantor
left a comment
There was a problem hiding this comment.
I'm not convinced that this PR is useful. The assumption tactic does convey information to the reader, just like in written maths saying "this holds by assumption" is different from making very precise which assumption we made.
Could you open a Zulip discussion before making this change?
| theorem Filter.EventuallyEq.hasFDerivWithinAt_iff (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) : | ||
| HasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x := | ||
| h.prodMap (by assumption) |>.hasFDerivAtFilter_iff fun _ => _root_.rfl | ||
| h.prodMap (by exact hx) |>.hasFDerivAtFilter_iff fun _ => _root_.rfl |
There was a problem hiding this comment.
by exact seems worse to me than by assumption. Would the following not work:
| h.prodMap (by exact hx) |>.hasFDerivAtFilter_iff fun _ => _root_.rfl | |
| h.prodMap hx |>.hasFDerivAtFilter_iff fun _ => _root_.rfl |
|
This pull request has conflicts, please merge |
| obtain ⟨M, _, i, hi⟩ := | ||
| CochainComplex.Plus.exists_quasiIso_injective ⟨L, ⟨n, inferInstance⟩⟩ n | ||
| have : QuasiIso i.hom := by assumption | ||
| have : QuasiIso i.hom := hi |
There was a problem hiding this comment.
| have : QuasiIso i.hom := hi | |
| change QuasiIso i.hom at hi |
| (hP : ∀ i, ∃ j, P j ∧ Nonempty (j ⟶ i)) : InitiallySmall.{v} J := by | ||
| obtain ⟨Q, H, hQ⟩ := ObjectProperty.EssentiallySmall.exists_small_le'.{v} P | ||
| have : Small.{v} (show Set _ from Q) := by assumption | ||
| have : Small.{v} (show Set _ from Q) := H |
There was a problem hiding this comment.
| have : Small.{v} (show Set _ from Q) := H | |
| change Small (show Set _ from Q) at H |
or maybe even
| have : Small.{v} (show Set _ from Q) := H | |
| change Set J at Q | |
| change Small Q at H |
| (Types.FilteredColimit.isColimit_eq_iff' hc _ _).1 (congr_hom h x) | ||
| dsimp at f g h k a hk ⊢ | ||
| replace hk : ∀ x, F.map (a x) (f x) = F.map (a x) (g x) := by assumption | ||
| replace hk : ∀ x, F.map (a x) (f x) = F.map (a x) (g x) := hk |
There was a problem hiding this comment.
| replace hk : ∀ x, F.map (a x) (f x) = F.map (a x) (g x) := hk | |
| change ∀ x, F.map (a x) (f x) = F.map (a x) (g x) at hk |
| (ofHom _ ⟨fun _ ↦ b, continuous_const⟩) | ||
| (by ext; exact hab)) | ||
| a⟩) by assumption | ||
| a⟩) from this |
There was a problem hiding this comment.
This 8-line suffices is just a change in disguise, which also fits in 2 lines:
change g = ofHom _ (IsQuotientMap.liftEquiv _ ⟨e.hom.hom, fun a b hab ↦ CategoryTheory.congr_fun
(h (ofHom _ ⟨_, continuous_const⟩) (ofHom _ ⟨_, continuous_const⟩) (by ext; exact hab)) a⟩)or a rewrite if you prefer
rw [← IsQuotientMap.liftEquiv_apply (g := ⟨e.hom.hom, fun a b hab ↦ CategoryTheory.congr_fun
(h (ofHom _ ⟨_, continuous_const⟩) (ofHom _ ⟨_, continuous_const⟩) (by ext; exact hab)) a⟩)]| rintro f ⟨l, rfl⟩ | ||
| let L : Products I → Prop := fun m ↦ m.eval C ∈ span ℤ (Set.range (GoodProducts.eval C)) | ||
| suffices L l by assumption | ||
| suffices L l from this |
There was a problem hiding this comment.
| suffices L l from this | |
| change L l |
| (ofHom ⟨fun _ ↦ b, continuous_const⟩) | ||
| (by ext; exact hab)) | ||
| a⟩) by assumption | ||
| a⟩) from this |
There was a problem hiding this comment.
This suffices is a change
|
|
||
| instance [IsStronglyCoatomic α] {s : Set α} [h : Set.OrdConnected s] : IsStronglyCoatomic s := | ||
| Set.OrdConnected.isStronglyCoatomic <| by assumption | ||
| Set.OrdConnected.isStronglyCoatomic h |
There was a problem hiding this comment.
| Set.OrdConnected.isStronglyCoatomic h | |
| h.isStronglyCoatomic |
although in this case maybe removing the name h is preferable
|
btw did you also look for |
|
This pull request has conflicts, please merge |
Let's say some goal if solve with
:= by assumptionandassumptionis usinghto solve it. Then:= hwould also solve the goal (note: in most cases this is not possible, we would need to expose names before). This is more readable (tells the used explicitly what is being used) and at least in theory slightly faster.This PR replace all such
by assumptionwith the hypothesis directly. If this looks good / gets merged, I will make another PR replacing alsoassumption's which do not immediately follow aby.