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] - chore: fix most phantom #aligns #1794

Closed
wants to merge 2 commits into from

Conversation

rwbarton
Copy link
Contributor


Open in Gitpod

@@ -239,11 +239,13 @@ theorem coe_mul {α : Type u} [Mul α] {a b : α} : ((a * b : α) : WithZero α)
-- prove it because we've just proved we're in MulZeroClass.
theorem zero_mul {α : Type u} [Mul α] (a : WithZero α) : 0 * a = 0 :=
rfl
#align with_zero.zero_mul WithZero.zero_mul
-- Porting note: This lemma and the next one
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you looked into why that is? Otherwise maybe leave it for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well with_zero.zero_mul definitely doesn't exist. So it doesn't make a lot of sense for it to have an #align, right? regardless of what else is going on?
But we could just leave an erroneous align, as well (it's not like there will be none, after this PR).

@@ -135,13 +135,13 @@ theorem Commute.mul_pow {a b : M} (h : Commute a b) (n : ℕ) : (a * b) ^ n = a
· rw [pow_zero, pow_zero, pow_zero, one_mul]
· simp only [pow_succ, ih, ← mul_assoc, (h.pow_left n).right_comm]
#align commute.mul_pow Commute.mul_pow
#align add_commute.add_smul AddCommute.add_smul
#align add_commute.add_nsmul AddCommute.add_smul
Copy link
Collaborator

Choose a reason for hiding this comment

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

It turns out these are wrong on the mathlib4 side. Should we fix the names here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a separate PR #1502 for that (which will unfortunately have a lot of merge conflicts with this one...)

@@ -33,7 +33,7 @@ protected def mulLeft₀ (a : G) (ha : a ≠ 0) : Perm G :=

theorem mulLeft_bijective₀ (a : G) (ha : a ≠ 0) : Function.Bijective ((· * ·) a : G → G) :=
(Equiv.mulLeft₀ a ha).bijective
#align equiv.mul_left_bijective₀ Equiv.mulLeft_bijective₀
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing _root_.? I'm also not sure this is translated correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would sort of prefer to only change #aligns in this PR.
We can make a note of the name changes for another PR.

@@ -35,7 +35,7 @@ namespace Pi
theorem IsSMulRegular.pi {α : Type _} [∀ i, SMul α <| f i] {k : α}
(hk : ∀ i, IsSMulRegular (f i) k) : IsSMulRegular (∀ i, f i) k := fun _ _ h =>
funext fun i => hk i (congr_fun h i : _)
#align pi.is_smul_regular.pi Pi.IsSMulRegular.pi
Copy link
Collaborator

Choose a reason for hiding this comment

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

Root

@@ -40,22 +40,22 @@ theorem coe_add (x y : { x : M // 0 < x }) : ↑(x + y) = (x + y : M) :=

instance addSemigroup : AddSemigroup { x : M // 0 < x } :=
Subtype.coe_injective.addSemigroup _ coe_add
#align subtype.add_semigroup Positive.addSemigroup
#align positive.subtype.add_semigroup Positive.addSemigroup
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -816,13 +816,13 @@ theorem exists_lt (f : CauSeq α abs) : ∃ a : α, const a < f :=
theorem rat_sup_continuous_lemma {ε : α} {a₁ a₂ b₁ b₂ : α} :
abs (a₁ - b₁) < ε → abs (a₂ - b₂) < ε → abs (a₁ ⊔ a₂ - b₁ ⊔ b₂) < ε := fun h₁ h₂ =>
(abs_max_sub_max_le_max _ _ _ _).trans_lt (max_lt h₁ h₂)
#align cau_seq.rat_sup_continuous_lemma CauSeq.rat_sup_continuous_lemma
#align rat_sup_continuous_lemma CauSeq.rat_sup_continuous_lemma
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


#align equiv.remove_none_aux Equiv.removeNone_aux
-- Porting note: private
-- #align equiv.remove_none_aux Equiv.removeNone_aux
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we make it private as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably but maybe in a separate PR?

@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Jan 24, 2023
bors bot pushed a commit that referenced this pull request Jan 24, 2023
@bors
Copy link

bors bot commented Jan 24, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore: fix most phantom #aligns [Merged by Bors] - chore: fix most phantom #aligns Jan 24, 2023
@bors bors bot closed this Jan 24, 2023
@bors bors bot deleted the rwbarton-phantom-1 branch January 24, 2023 12:09
bors bot pushed a commit that referenced this pull request Jan 25, 2023
* [ ] depends on: #1794

Implements a linter for lean 3 declarations containing capital letters (as [suggested on Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/non-aligned.20definitions/near/323102645)).

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
bors bot pushed a commit that referenced this pull request Jan 26, 2023
* [ ] depends on: #1794

Implements a linter for lean 3 declarations containing capital letters (as [suggested on Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/non-aligned.20definitions/near/323102645)).

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants