AFTD Auto-Formalizing Theoretical Domains

factorizationMobiusToTop_two_three

theoremverified

In the factorization poset of 6, the Möbius function between the factorization 2·3 and 6 is -1.

Statement

theorem factorizationMobiusToTop_two_three : factorizationMobiusToTop 6 {2, 3} = -1
Source
arXiv:2611.18194 (The Möbius function of factorizations with a simple prime factor): sanity lemma for the factorization-poset definitions
Verified
17 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • factorizationMobiusToTopFor a natural number n and a multiset x of natural numbers, factorizationMobiusToTop n x (n first, then x) is the integer defined by…
  • IsNatFactorizationA factorization of a natural number n is a multiset of integers greater than 1 whose product is n.
  • IsFactorizationCoarseningA multiset y is a coarsening of a multiset x of positive integers if x can be partitioned into nonempty groups so that y is the multiset…

The proof, explained

The Möbius function value of a factorization x with |x| > 1 is defined recursively as the negative sum of the values of all proper coarsenings of x. For x = {2, 3}, any proper coarsening y must have cardinality strictly less than 2, which forces y = {6} since the product of its factors must be 6. The sum therefore collapses to the single term at {6}, where the base case applies and gives 1, making the final value -1.

  1. The only factorization of 6 coarsening {2, 3} with cardinality strictly less than |{2, 3}| is {6}.

    We show the two directions of the equivalence. In the forward direction, let y be a factorization of 6 coarsening {2, 3} with cardinality |y| < |{2, 3}| = 2. Then either |y| = 0 or |y| = 1. If |y| = 0, y is the empty multiset by Multiset.card_eq_zero.mp, whose product is 1, contradicting that the product of elements of y is 6. If |y| = 1, by Multiset.card_eq_one.mp y is a singleton {a}; since the product is 6, a = 6, so y = {6}. In the reverse direction, {6} is a valid factorization of 6 whose elements are strictly greater than 1, it coarsen {2, 3} via the partition {{2, 3}}, and its cardinality 1 is strictly less than |{2, 3}| = 2.

    lines 2–14

    uses Multiset.card_eq_zero.mp, Multiset.card_eq_one.mp

      have hset : ∀ y : Multiset ℕ,
          (IsNatFactorization 6 y ∧ IsFactorizationCoarsening {2, 3} y ∧
            Multiset.card y < Multiset.card ({2, 3} : Multiset ℕ)) ↔ y = {6} := by
        intro y
        constructor
        · rintro ⟨⟨_, h2⟩, _, h3⟩
          have hc : Multiset.card y = 0 ∨ Multiset.card y = 1 := by simp at h3; omega
          rcases hc with hc | hc
          · rw [Multiset.card_eq_zero.mp hc] at h2; simp at h2
          · obtain ⟨a, rfl⟩ := Multiset.card_eq_one.mp hc
            simp at h2; simp [h2]
        · rintro rfl
          refine ⟨⟨by simp, by simp⟩, ⟨{{2, 3}}, by simp, by simp, by simp⟩, by simp⟩
  2. It suffices to show that the negated sum of the Möbius function over all proper coarsenings of {2, 3} equals -1.

    By the recursive definition of factorizationMobiusToTop, since |{2, 3}| = 2 > 1, the base case does not apply, and the function is defined as the negation of the sum of factorizationMobiusToTop 6 y over all factorizations y of 6 coarsening {2, 3} with strictly smaller cardinality.

    line 15

      rw [factorizationMobiusToTop]
  3. The sum over all proper coarsenings of {2, 3} reduces to the single term factorizationMobiusToTop 6 {6}.

    Rewriting the summation condition using the characterization hset, the condition on y is equivalent to y = {6}. Applying finsum_eq_single, every summand with y ≠ {6} has an empty domain and thus vanishes, leaving only the single term at y = {6}.

    lines 16–22

    uses finsum_eq_single

      have hfs : (∑ᶠ (y : Multiset ℕ) (_ : IsNatFactorization 6 y ∧ IsFactorizationCoarsening {2, 3} y ∧
            Multiset.card y < Multiset.card ({2, 3} : Multiset ℕ)), factorizationMobiusToTop 6 y) =
          factorizationMobiusToTop 6 {6} := by
        simp_rw [hset]
        rw [finsum_eq_single _ ({6} : Multiset ℕ)]
        · simp
        · intro y hy; simp [hy]
  4. factorizationMobiusToTop 6 {2, 3} = -1

    Substituting the collapsed sum into the goal leaves -factorizationMobiusToTop 6 {6}. Unfolding factorizationMobiusToTop at {6}, since |{6}| = 1 ≤ 1, the base case evaluates factorizationMobiusToTop 6 {6} to 1. The outer negation gives -1, completing the proof.

    lines 23–24

      rw [hfs, factorizationMobiusToTop]
      simp
Multiset.card_eq_zero.mp
If a multiset has cardinality 0, it is the empty multiset.
Multiset.card_eq_one.mp
If a multiset has cardinality 1, it is a singleton {a} for some element a.
finsum_eq_single
If a function is zero everywhere except possibly at a single point a, its sum over the domain equals its value at a.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem factorizationMobiusToTop_two_three : factorizationMobiusToTop 6 {2, 3} = -1 := by  have hset : ∀ y : Multiset ℕ,      (IsNatFactorization 6 y ∧ IsFactorizationCoarsening {2, 3} y ∧        Multiset.card y < Multiset.card ({2, 3} : Multiset ℕ)) ↔ y = {6} := by    intro y    constructor    · rintro ⟨⟨_, h2⟩, _, h3⟩      have hc : Multiset.card y = 0 ∨ Multiset.card y = 1 := by simp at h3; omega      rcases hc with hc | hc      · rw [Multiset.card_eq_zero.mp hc] at h2; simp at h2      · obtain ⟨a, rfl⟩ := Multiset.card_eq_one.mp hc        simp at h2; simp [h2]    · rintro rfl      refine ⟨⟨by simp, by simp⟩, ⟨{{2, 3}}, by simp, by simp, by simp⟩, by simp⟩  rw [factorizationMobiusToTop]  have hfs : (∑ᶠ (y : Multiset ℕ) (_ : IsNatFactorization 6 y ∧ IsFactorizationCoarsening {2, 3} y ∧        Multiset.card y < Multiset.card ({2, 3} : Multiset ℕ)), factorizationMobiusToTop 6 y) =      factorizationMobiusToTop 6 {6} := by    simp_rw [hset]    rw [finsum_eq_single _ ({6} : Multiset ℕ)]    · simp    · intro y hy; simp [hy]  rw [hfs, factorizationMobiusToTop]  simp
See it in the graphDiscuss this resultChallenge it