AFTD Auto-Formalizing Theoretical Domains

op_2274_alternating_order_sum_two_tight

theoremverifiedformalization

At n = 2, the sum of element orders of the symmetric group S_2 equals 3 times the sum of element orders of the alternating group A_2, showing that the inequality 3 * ψ(A_n) > ψ(S_n) holds with equality at n = 2.

Statement

theorem op_2274_alternating_order_sum_two_tight :
    group_element_order_sum (Equiv.Perm (Fin 2)) = 3 * group_element_order_sum (alternatingGroup (Fin 2))
Formalizes
arXiv:2611.29409 Section 1
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • group_element_order_sumFor a finite group (or monoid) G, group_element_order_sum G is the sum of element orders ψ(G) = ∑_{g ∈ G} o(g), returning a natural number.

Read back from the Lean

The sum over all elements $g$ in the symmetric group on 2 elements (Equiv.Perm (Fin 2)) of the order of $g$ is equal to 3 times the sum over all elements $g$ in the alternating group on 2 elements (alternatingGroup (Fin 2)) of the order of $g$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The theorem is proved by explicitly calculating the sum of element orders for both S_2 and A_2 and verifying 3 = 3 * 1. For S_2, the permutations are the identity (order 1) and a single transposition (order 2), giving a sum of 3. For A_2, the group has cardinality 1, making it trivial with its sole element having order 1, giving a sum of 1.

  1. The sum of element orders of S_2 reduces to orderOf(1) + orderOf((0 1)).

    Unfolding the definition of the sum of element orders, the sum ranges over all permutations in S_2. Exhaustive check (`decide`) verifies that the universal set of S_2 consists solely of the identity and the transposition (0 1), which are distinct. Applying `Finset.sum_pair` then simplifies the sum to the sum of the orders of these two elements.

    lines 4–9

    uses Finset.sum_pair

      have h_perm : group_element_order_sum (Equiv.Perm (Fin 2)) = 3 := by
        dsimp [group_element_order_sum]
        have h_univ : (Finset.univ : Finset (Equiv.Perm (Fin 2))) = {1, Equiv.swap 0 1} := by decide
        rw [h_univ]
        have h_ne : (1 : Equiv.Perm (Fin 2)) ≠ Equiv.swap 0 1 := by decide
        rw [Finset.sum_pair h_ne]
  2. The sum of element orders of S_2 is 3.

    The identity permutation has order 1 by `orderOf_one`. Because 2 is prime (`Nat.prime_two`), the transposition (0 1) has order 2 if and only if its square is 1 and it is not 1 itself (`orderOf_eq_prime_iff`). The condition (0 1) ≠ 1 is verified by `decide`, and (0 1)^2 = 1 is verified by checking both elements of Fin 2 (`fin_cases` and `decide`). Substituting orderOf(1) = 1 and orderOf((0 1)) = 2 into the sum yields 1 + 2 = 3.

    lines 10–17

    uses orderOf_one, Nat.prime_two, orderOf_eq_prime_iff

        have h1 : orderOf (1 : Equiv.Perm (Fin 2)) = 1 := orderOf_one
        have h2 : orderOf (Equiv.swap (0 : Fin 2) (1 : Fin 2)) = 2 := by
          have : Fact (Nat.Prime 2) := ⟨Nat.prime_two⟩
          rw [orderOf_eq_prime_iff]
          refine ⟨?_, by decide⟩
          ext x
          fin_cases x <;> decide
        rw [h1, h2]
  3. The sum of element orders of the alternating group A_2 is 1.

    The alternating group A_2 has cardinality at most 1, so it is a subsingleton (`Fintype.card_le_one_iff_subsingleton.mp`), checked by `decide`. In any subsingleton group, every element has order 1 (`Subsingleton.orderOf_eq`). Rewriting the summand to 1 leaves the cardinality of A_2, which `decide` evaluates to 1.

    lines 18–25

    uses Fintype.card_le_one_iff_subsingleton.mp, Subsingleton.orderOf_eq

      have h_alt : group_element_order_sum (alternatingGroup (Fin 2)) = 1 := by
        have : Subsingleton (alternatingGroup (Fin 2)) :=
          Fintype.card_le_one_iff_subsingleton.mp (by decide)
        dsimp [group_element_order_sum]
        have h (g : alternatingGroup (Fin 2)) : orderOf g = 1 := Subsingleton.orderOf_eq g
        simp_rw [h]
        simp
        decide
  4. The relation ψ(S_2) = 3 * ψ(A_2) reduces to 3 = 3 * 1.

    Substituting the computed values ψ(S_2) = 3 and ψ(A_2) = 1 transforms the goal into 3 = 3 * 1, which holds immediately.

    line 26

      rw [h_perm, h_alt]
Finset.sum_pair
The sum of a function over a two-element set {a, b} with a ≠ b equals f(a) + f(b).
orderOf_one
In any monoid, the identity element has order 1.
Nat.prime_two
The natural number 2 is prime.
orderOf_eq_prime_iff
In a monoid, for a prime p, an element has order p if and only if its p-th power is 1 and it is not 1 itself.
Fintype.card_le_one_iff_subsingleton.mp
A finite type with at most one element is a subsingleton.
Subsingleton.orderOf_eq
In a monoid that is a subsingleton, every element has order 1.

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

/-- At n = 2, ψ(S_2) = 3 * ψ(A_2), showing sharpness of n ≥ 3 in Conjecture 7.1. -/theorem op_2274_alternating_order_sum_two_tight :    group_element_order_sum (Equiv.Perm (Fin 2)) = 3 * group_element_order_sum (alternatingGroup (Fin 2)) := by  have h_perm : group_element_order_sum (Equiv.Perm (Fin 2)) = 3 := by    dsimp [group_element_order_sum]    have h_univ : (Finset.univ : Finset (Equiv.Perm (Fin 2))) = {1, Equiv.swap 0 1} := by decide    rw [h_univ]    have h_ne : (1 : Equiv.Perm (Fin 2)) ≠ Equiv.swap 0 1 := by decide    rw [Finset.sum_pair h_ne]    have h1 : orderOf (1 : Equiv.Perm (Fin 2)) = 1 := orderOf_one    have h2 : orderOf (Equiv.swap (0 : Fin 2) (1 : Fin 2)) = 2 := by      have : Fact (Nat.Prime 2) := ⟨Nat.prime_two⟩      rw [orderOf_eq_prime_iff]      refine ⟨?_, by decide⟩      ext x      fin_cases x <;> decide    rw [h1, h2]  have h_alt : group_element_order_sum (alternatingGroup (Fin 2)) = 1 := by    have : Subsingleton (alternatingGroup (Fin 2)) :=      Fintype.card_le_one_iff_subsingleton.mp (by decide)    dsimp [group_element_order_sum]    have h (g : alternatingGroup (Fin 2)) : orderOf g = 1 := Subsingleton.orderOf_eq g    simp_rw [h]    simp    decide  rw [h_perm, h_alt]
See it in the graphDiscuss this resultChallenge it