Skip to content

fix(NumberTheory/Carmichael): definition and import#4281

Open
mo271 wants to merge 3 commits into
google-deepmind:mainfrom
mo271:carmichael_fix
Open

fix(NumberTheory/Carmichael): definition and import#4281
mo271 wants to merge 3 commits into
google-deepmind:mainfrom
mo271:carmichael_fix

Conversation

@mo271

@mo271 mo271 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

Copy link
Copy Markdown

👋 This is an automated welcome message. 🤖
Thanks for the contributions!

A few friendly reminders while the review gets started:

  • Please take a look at the style guidelines,
    especially the conventions for references, categories, AMS tags, and answer(sorry).
  • You can manage some PR labels by leaving a comment with +label-name or -label-name; for example, +awaiting-author or -awaiting-author.
  • This repository is mainly for formalised statements. Proofs longer than about 25-50 lines are usually out of scope; longer proofs are welcome to be included/linked via the formal_proof mechanism.

Thanks again for helping improve Formal Conjectures.

@mo271 mo271 requested a review from danielchin June 17, 2026 06:49
@mo271

mo271 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

making sure the definition and the docstring are aligned and fixing making the import more specific

@danielchin danielchin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks a lot cleaner and I prefer this organization a lot more. LGTM

@mo271 mo271 enabled auto-merge (squash) June 20, 2026 11:45
@mo271 mo271 requested a review from YaelDillies June 20, 2026 12:03
Comment on lines 112 to +114
/-- A composite Carmichael number is squarefree. -/
@[category textbook, AMS 11]
theorem squarefree_of_isCarmichael {a : ℕ} (ha₁ : a.Composite) (ha₂ : IsCarmichael a) :
Squarefree a := by
have ha₂_forall := ha₂
simp_all [IsCarmichael, Nat.Composite, a.squarefree_iff_prime_squarefree, Nat.FermatPsp, Nat.ProbablePrime]
rintro p hp ⟨N, rfl⟩
apply absurd (ha₂_forall (p * N + 1) ((1).le_add_left _))
have : Fact p.Prime := ⟨hp⟩
rw [mul_assoc] at ha₁
rw [mul_assoc, ← geom_sum_mul_of_one_le ((1).le_add_left (p * N)), p.coprime_mul_iff_left]
simpa using (mul_dvd_mul_iff_right fun _ ↦ by simp_all only [mul_zero, not_lt_zero']).not.mpr
((ZMod.natCast_eq_zero_iff _ _).not.mp (by simp [le_of_lt ha₁.1]))
theorem squarefree_of_isCarmichael {a : ℕ} (_ha₁ : a.Composite) (ha₂ : IsCarmichael a) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Surely you don't need the compositeness assumption?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants