AFTD Auto-Formalizing Theoretical Domains

is_perfect_set

def

A perfect set of order n is a finite set of n - 1 permutations of Fin n that are derangements and pairwise mutually deranged.

Statement

def is_perfect_set (n : ℕ) (S : Finset (Equiv.Perm (Fin n))) : Prop
Defined in
arXiv:2611.07118, Perfect Partitions of Regular Bipartite Graphs, Section 1.1
Verified
06 Nov 2026
Axioms
none listed
Used by 1
  • is_perfect_set_twoThe singleton set containing the transposition swap 0 1 on Fin 2 is a perfect set of order 2.

Read back from the Lean

A predicate is_perfect_set n S on a natural number n and a finite set S of permutations of Fin n, defining that: 1. S has cardinality n - 1; 2. Every permutation σ ∈ S is a derangement of Fin n; and 3. For all σ, τ ∈ S, if σ ≠ τ, then for every x : Fin n, σ x ≠ τ x (any two distinct permutations in S disagree at every point of Fin n).

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

Lean source view module on GitHub

/-- A perfect set of order n: a set of n - 1 pairwise mutually deranged derangements of Fin n. -/
def is_perfect_set (n : ℕ) (S : Finset (Equiv.Perm (Fin n))) : Prop := S.card = n - 1 ∧
  (∀ σ ∈ S, σ ∈ derangements (Fin n)) ∧
  ∀ ⦃σ⦄, σ ∈ S → ∀ ⦃τ⦄, τ ∈ S → σ ≠ τ → ∀ x, σ x ≠ τ x
See it in the graphDiscuss this resultChallenge it