Skip to content

[Merged by Bors] - chore: fix most phantom #aligns#1794

Closed
rwbarton wants to merge 2 commits intomasterfrom
rwbarton-phantom-1
Closed

[Merged by Bors] - chore: fix most phantom #aligns#1794
rwbarton wants to merge 2 commits intomasterfrom
rwbarton-phantom-1

Conversation

@rwbarton
Copy link
Copy Markdown
Contributor


Open in Gitpod

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
Copy Markdown
Contributor

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
Copy Markdown
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).

· 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
Copy Markdown
Contributor

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
Copy Markdown
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...)


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
Copy Markdown
Contributor

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
Copy Markdown
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.

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Root

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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