AFTD Auto-Formalizing Theoretical Domains

connection_density

def

Given a type $G$ with [Group G] and [Fintype G], and a finite set $S : \mathrm{Finset}\ G$, connection_density G S is the rational number in $\mathbb{Q}$ defined by $(\sum_{s \in S} (c\ G\ s : \mathbb{Q})) / ((\mathrm{Fintype.card}\ G : \mathbb{Q}) \cdot (S.\mathrm{card} : \mathbb{Q}))$, evaluating to $0$ when $S$ is empty.

Statement

noncomputable def connection_density (G : Type*) [Group G] [Fintype G] (S : Finset G) : ℚ
Defined in
arXiv:2611.26732 Definition 1.1
Verified
23 Nov 2026
Axioms
none listed
Built on 1
  • cFor a group $G$ and an element $s \in G$, the local count $c_G(s)$ is the cardinality of the set of elements $g \in G$ such that…
Used by 5

Read back from the Lean

A definition connection_density that takes a finite group G (with instances [Group G] and [Fintype G]) and a finite subset S : Finset G, returning the rational number defined as the sum over s ∈ S of c G s (cast to ℚ) divided by the product of the cardinality of G (Fintype.card G) and the cardinality of S (S.card), both cast to ℚ.

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

/-- The edge intersection density of a connection set $S$ in a finite group $G$. -/
noncomputable def connection_density (G : Type*) [Group G] [Fintype G] (S : Finset G) : ℚ := (∑ s ∈ S, (c G s : ℚ)) / ((Fintype.card G : ℚ) * (S.card : ℚ))
See it in the graphDiscuss this resultChallenge it