Lax59.InterestingNumbers
Classification of Interesting Numbers
concepts/Lax59/InterestingNumbers.lean · lax-59
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Theorem
Let be interesting when there are distinct primes and such that , and when replacing by its next prime and by its previous prime gives a factorization of . Then is interesting exactly when or .
The two factors are existentially labelled. This is equivalent to the opposite labelling used in mathlib4 issue #6091 because multiplication is commutative.
Lean source view on GitHub
| 1 | import Mathlib |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Classification of Interesting Numbers |
| 6 | type: theorem |
| 7 | --- |
| 8 | Let be interesting when there are distinct primes and such that |
| 9 | , and when replacing by its next prime and by its previous prime |
| 10 | gives a factorization of . Then is interesting exactly when |
| 11 | or . |
| 12 | |
| 13 | The two factors are existentially labelled. This is equivalent to the |
| 14 | opposite labelling used in mathlib4 issue #6091 because multiplication is |
| 15 | commutative. |
| 16 | -/ |
| 17 | |
| 18 | namespace Lax59.InterestingNumbers |
| 19 | |
| 20 | /-- The number called `pNext` is the first prime strictly after `p`. -/ |
| 21 | def NextPrime (p pNext : ℕ) : Prop := |
| 22 | pNext.Prime ∧ p < pNext ∧ ∀ r, r.Prime → p < r → pNext ≤ r |
| 23 | |
| 24 | /-- The number called `qPrev` is the last prime strictly before `q`. -/ |
| 25 | def PrevPrime (qPrev q : ℕ) : Prop := |
| 26 | qPrev.Prime ∧ qPrev < q ∧ ∀ r, r.Prime → r < q → r ≤ qPrev |
| 27 | |
| 28 | /-- The neighboring-prime factorization property from issue #6091. -/ |
| 29 | def Interesting (n : ℕ) : Prop := |
| 30 | ∃ p q pNext qPrev : ℕ, |
| 31 | p.Prime ∧ q.Prime ∧ p ≠ q ∧ |
| 32 | NextPrime p pNext ∧ PrevPrime qPrev q ∧ |
| 33 | n = p * q ∧ n + 1 = pNext * qPrev |
| 34 | |
| 35 | /-- Exactly 14 and 21 satisfy the interesting-number property. -/ |
| 36 | axiom interesting_iff (n : ℕ) : Interesting n ↔ n = 14 ∨ n = 21 |
| 37 | |
| 38 | end Lax59.InterestingNumbers |
| 39 |
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments