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

Fermat #1139

Merged
merged 8 commits into from
Aug 17, 2023
Merged

Fermat #1139

merged 8 commits into from
Aug 17, 2023

Conversation

jhlchan
Copy link
Contributor

@jhlchan jhlchan commented Aug 15, 2023

Update algebra library, incorporate an improved algorithm for Fermat's Two Squares Theorem.

…cate theorems now in standard libraries, make the set of divisors positive, update windmill for a triple, and improve documentation.
…t FILTER is a sublist, and a sublist preserves the ordering of elements.
… a better upper bound for the number of windmills.
…ion algorithm, to find the two squares for a tik prime.
Take them and form a pair (a,b).
*)
Theorem fermat_two_squares_by_corners:
!p. tik p /\ prime p ==> ?(a, b). p = a ** 2 + b ** 2 /\ a < b
Copy link
Member

Choose a reason for hiding this comment

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

Unless there's strong reason to, please don't use paired existentials, like ?(a,b).... Instead, just have the existentially quantified variables listed: ?a b. ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New commit uses simple existentially quantified variables. Should I worry about the failure of [d64379b]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. Now I learn how to read the log, and fixed the problem. Hope this is the only one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This time it is the standard kernel, but I have used rename1 to ensure proper variable rename. Log seems not to fail in fermat/ folder. Any suggestion about the exact issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for all your help, much appreciated.

@mn200
Copy link
Member

mn200 commented Aug 17, 2023

Failure (visible through link) is:

#13 3771.2  ∀n. n MOD 4 ≠ 0 ⇒ fixes zagier (mills n) = {(x,x,z) | n = windmill (x,x,z)}
#13 3771.2  
#13 3771.2  failed.
#13 3771.2  Failed to prove theorem zagier_fixes.
#13 3771.2  

This was in the experimental kernel where variable names chosen by the kernel can be different.

@mn200
Copy link
Member

mn200 commented Aug 17, 2023

Still seem to be an issue?

@mn200
Copy link
Member

mn200 commented Aug 17, 2023

That more recent error is not yours; it's a common repeated error that that file throws up non-deterministically.

Thanks for your work!

@mn200 mn200 merged commit c505f57 into HOL-Theorem-Prover:develop Aug 17, 2023
1 of 2 checks passed
@jhlchan jhlchan deleted the fermat branch August 17, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants