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] - feat: port Topology.Instances.AddCircle #3984

Closed
wants to merge 13 commits into from

Conversation

Ruben-VandeVelde
Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde commented May 14, 2023


TODO:

  • DivisibleBy (AddCircle p) ℤ fails quickly ("failed to synthesize instance Archimedean 𝕜") without etaExperiment; fails slowly ("failed to synthesize Zero ℤ") with etaExperiment
  • addOrderOf_eq_pos_iff uses a questionable trick with have he := _; ... do something with he ... which no longer works (not with ?_ either)
  • equivIccQuot uses the same trick

Open in Gitpod

Mathbin -> Mathlib
fix certain import statements
move "by" to end of line
add import to Mathlib.lean
@Ruben-VandeVelde Ruben-VandeVelde added WIP Work in progress mathlib-port This is a port of a theory file from mathlib. labels May 14, 2023
@loefflerd
Copy link
Collaborator

I added an explicit coercion instance which fixes the first few failures, but I couldn't get much further than that.

@loefflerd
Copy link
Collaborator

I was looking at this earlier, and noticed there are some naming inconsistencies QuotientAddGroup vs quotientAddGroup which it would be good to fix at the same time.

@loefflerd
Copy link
Collaborator

I can try to sort out the have _ later today if nobody else gets there first

rw [nsmul_eq_mul, mul_comm, ← div_eq_iff h0, ← a.div_add_mod' n, add_smul, add_div, zsmul_eq_mul,
Int.cast_mul, Int.cast_ofNat, mul_assoc, ← mul_div, mul_comm _ p, mul_div_cancel p h0] at ha
have han : _ = a % n := Int.toNat_of_nonneg (Int.emod_nonneg _ <| by exact_mod_cast h.ne')
have he := _; refine' ⟨(a % n).toNat, _, _, he⟩
Copy link
Member

Choose a reason for hiding this comment

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

I think it's worth asking on Zulip what the Lean4 way to spell this is. This was a useful trick, and it would be a shame to lose it.

@loefflerd
Copy link
Collaborator

I can try to sort out the have : _ later today if nobody else gets there first

Well, I tried, but unfortunately, I didn't succeed. I'm going to have to give up on this and flag it as "help wanted".

@loefflerd loefflerd added the help-wanted The author needs attention to resolve issues label May 15, 2023
@loefflerd loefflerd added awaiting-review The author would like community review of the PR awaiting-CI and removed help-wanted The author needs attention to resolve issues please-adopt WIP Work in progress labels May 15, 2023
@semorrison
Copy link
Contributor

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label May 16, 2023
@github-actions github-actions bot removed the awaiting-review The author would like community review of the PR label May 16, 2023
bors bot pushed a commit that referenced this pull request May 16, 2023
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
@bors
Copy link

bors bot commented May 16, 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: port Topology.Instances.AddCircle [Merged by Bors] - feat: port Topology.Instances.AddCircle May 16, 2023
@bors bors bot closed this May 16, 2023
@bors bors bot deleted the port/Topology.Instances.AddCircle branch May 16, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants