[Merged by Bors] - chore: adapt to multiple goal linter 2#12361
[Merged by Bors] - chore: adapt to multiple goal linter 2#12361
Conversation
| cyclotomic_mul_prime_pow_eq _ _ a.succ_pos, ← pow_mul] | ||
| congr 1 | ||
| simp only [tsub_zero, Nat.succ_sub_succ_eq_sub] | ||
| rwa [Nat.mul_sub_right_distrib, mul_comm, pow_succ] |
There was a problem hiding this comment.
Does this mean that rwa used assumption on a different goal than the one it rewrote? :O
| refine' (le_of_eq _).trans (ContinuousMap.norm_coe_le_norm _ ⟨-x, _⟩) | ||
| rw [ContinuousMap.restrict_apply_mk, ContinuousMap.comp_apply, ContinuousMap.coe_mk, | ||
| ContinuousMap.coe_mk, neg_neg] | ||
| exact ⟨by linarith [hx.2], by linarith [hx.1]⟩ | ||
| · rw [ContinuousMap.restrict_apply_mk, ContinuousMap.comp_apply, ContinuousMap.coe_mk, | ||
| ContinuousMap.coe_mk, neg_neg] | ||
| exact ⟨by linarith [hx.2], by linarith [hx.1]⟩ |
There was a problem hiding this comment.
Does this really deserve to be indented?
There was a problem hiding this comment.
At that point, there are two goals, the second being
-x ∈ Icc (-x✝ + -S) (-x✝ + -R)I do not understand though how Lean solves this one.
There was a problem hiding this comment.
Oh, I think that I see now.
The "first goal" becomes identical to the second one after the rw. So, I guess that the final exact solves the current goal and then Lean realizes that it already knows how to solve that goal and closes the second one as well.
Mathlib/RingTheory/Norm.lean
Outdated
| letI : ∀ f : L →ₐ[K] E, Fintype (@AlgHom L F E _ _ _ _ f.toRingHom.toAlgebra) := ?_ | ||
| rw [Fintype.prod_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, | ||
| ← Finset.univ_sigma_univ, Finset.prod_sigma, ← Finset.prod_pow] | ||
| refine Finset.prod_congr rfl fun σ _ => ?_ | ||
| · letI : Algebra L E := σ.toRingHom.toAlgebra | ||
| simp_rw [Finset.prod_const] | ||
| congr | ||
| exact AlgHom.card L F E | ||
| · intro σ | ||
| simp only [algHomEquivSigma, Equiv.coe_fn_mk, AlgHom.restrictDomain, AlgHom.comp_apply, | ||
| IsScalarTower.coe_toAlgHom'] | ||
| · rw [Fintype.prod_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, |
There was a problem hiding this comment.
(Can't add a suggestion here.) Should this be instead something like:
letI : ∀ f : L →ₐ[K] E, Fintype (@AlgHom L F E _ _ _ _ f.toRingHom.toAlgebra) := by
...?
There was a problem hiding this comment.
This was puzzling: the letI created an extra goal, wanting to figure out some function. I could not understand where this was used and removing the letI line simply worked!
Maybe this was an instance of an "unused letI"? Is there an "unused have/let" linter? Does it check for letI?
Vierkantor
left a comment
There was a problem hiding this comment.
LGTM otherwise. Thanks for this huge cleanup!
|
Anne, thank you very much for your review! |
|
bors d+ |
|
✌️ adomani can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors r+ |
|
Pull request successfully merged into master. Build succeeded: |
This PR was reduced by approximately half of its original size: the other half of this PR is now the content of #12560. This PR was reduced by approximately half of its halved size: the other half of the halved PR is now the content of #12834. A PR analogous to the merged PRs #12338, #12361 and #12372: reformatting proofs following the multiple goals linter of #12339. This should be the last of the adaptations.
This PR was reduced by approximately half of its original size: the other half of this PR is now the content of #12560. This PR was reduced by approximately half of its halved size: the other half of the halved PR is now the content of #12834. A PR analogous to the merged PRs #12338, #12361 and #12372: reformatting proofs following the multiple goals linter of #12339. This should be the last of the adaptations.
This PR was reduced by approximately half of its original size: the other half of this PR is now the content of #12560. This PR was reduced by approximately half of its halved size: the other half of the halved PR is now the content of #12834. A PR analogous to the merged PRs #12338, #12361 and #12372: reformatting proofs following the multiple goals linter of #12339. This should be the last of the adaptations.
A linter that makes sure that, when multiple goals are present, they are enclosed in `·`s. Adaptations (the order is chronological, there should be no dependency among them): * #12338, * #12361, * #12372, * #12560, * #12834, * #12381, * #12908, * #14939, plus many many more that this comment is too small to contain. Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.