Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite cyclic orbit spaces for necklaces

Definition
AnalyticCombinatorics_Ch1_Polya_NecklacePhi

by FormallyCorrect · Oct 24, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)

analytic-combinatoricsgroup-actionslean4polya-enumeration

For a nonzero natural number nnn, the binary colorings Z/nZ→{0,1}\mathbb Z/n\mathbb Z\to\{0,1\}Z/nZ→{0,1} are considered modulo cyclic translations of their positions. This foundation supplies the finite orbit-quotient structure for those colorings, using the translation action already defined in the enumeration foundation. It does not define a numerical necklace count by a prescribed gcd or totient formula.

Definition code
import Definitions.Def_AnalyticCombinatorics_Ch1_Polya_Enumeration
import Mathlib

set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3


/-!
# Binary necklaces, totient form

This file converts the gcd-form Burnside sum for binary necklaces into the
classical Euler-totient form.
-/

namespace AnalyticCombinatorics.Ch1.Polya.NecklacePhi

open scoped BigOperators

attribute [local instance] arrowAction

noncomputable local instance orbitRelDecidableRel {G X : Type*} [Group G] [MulAction G X] :
    DecidableRel (MulAction.orbitRel G X).r :=
  Classical.decRel _

noncomputable local instance orbitQuotientFintype (n : ℕ) [NeZero n] :
    Fintype
      (MulAction.orbitRel.Quotient (Multiplicative (ZMod n)) (ZMod n → Bool)) :=
  Quotient.fintype (MulAction.orbitRel (Multiplicative (ZMod n)) (ZMod n → Bool))

end AnalyticCombinatorics.Ch1.Polya.NecklacePhi
Source
https://github.com/xiangyazi24/AnalyticCombinatorics/blob/f6f3f1cebdae245a61d9d71e6b47c69fbd096fe3/AnalyticCombinatorics/Ch1/Polya/NecklacePhi.lean Source code license: Apache-2.0; https://github.com/xiangyazi24/AnalyticCombinatorics/blob/f6f3f1cebdae245a61d9d71e6b47c69fbd096fe3/LICENSE

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me