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(number_theory/quadratic_reciprocity): change type of a in API lemmas to int #13393

Closed
wants to merge 1 commit into from

Conversation

MichaelStollBayreuth
Copy link
Collaborator

@MichaelStollBayreuth MichaelStollBayreuth commented Apr 12, 2022

This is step 2 in the overhaul of number_theory/quadratic_reciprocity.

The only changes are that the argument a is now of type int rather than nat in a bunch of statements.
This is more natural, since the corresponding (now second) argument of legendre_symnbol is of type int; it therefore makes the API lemmas more easily useable.


Open in Gitpod

@MichaelStollBayreuth MichaelStollBayreuth added the awaiting-review The author would like community review of the PR label Apr 12, 2022
@jcommelin
Copy link
Member

Thanks 🎉

If CI passes, please remove the label awaiting-CI and merge this yourself, by adding a comment bors r+.

bors d+

@bors
Copy link

bors bot commented Apr 12, 2022

✌️ MichaelStollBayreuth can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@jcommelin jcommelin added the awaiting-CI The author would like to see what CI has to say before doing more work. label Apr 12, 2022
@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels Apr 12, 2022
@MichaelStollBayreuth
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Apr 12, 2022
…emmas to `int` (#13393)

This is step 2 in the overhaul of number_theory/qudratic_reciprocity.

The only changes are that the argument `a` is now of type `int` rather than `nat` in a bunch of statements.
This is more natural, since the corresponding (now second) argument of `legendre_symnbol` is of type `int`; it therefore makes the API lemmas more easily useable.
legendre_sym p a = 1 ↔ (∃ b : zmod p, b ^ 2 = a) :=
begin
rw [euler_criterion p ha0, legendre_sym, int.cast_coe_nat, if_neg ha0],
rw [euler_criterion p ha0, legendre_sym, if_neg ha0],
split_ifs,
{ simp only [h, eq_self_iff_true] },
{ simp only [h, iff_false], tauto }
end

lemma eisenstein_lemma [fact (p % 2 = 1)] {a : ℕ} (ha1 : a % 2 = 1) (ha0 : (a : zmod p) ≠ 0) :
Copy link
Member

Choose a reason for hiding this comment

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

Should this become an integer too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have left this, since the proof does not seem to be easily adaptable. The result is used for proving quadratic reciprocity, wheere the arguments are (natural) prime numbers, and there is probably not much use outside of this.

@YaelDillies YaelDillies changed the title feat(number_theory/qudratic_reciprocity): change type of a in API lemmas to int feat(number_theory/quadratic_reciprocity): change type of a in API lemmas to int Apr 12, 2022
@bors
Copy link

bors bot commented Apr 12, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(number_theory/quadratic_reciprocity): change type of a in API lemmas to int [Merged by Bors] - feat(number_theory/quadratic_reciprocity): change type of a in API lemmas to int Apr 12, 2022
@bors bors bot closed this Apr 12, 2022
@bors bors bot deleted the legendre_symbol branch April 12, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants