AFTD Auto-Formalizing Theoretical Domains

intersection_density

def

For a finite group G, intersection_density G : ℚ is the unrestricted intersection density ρ(G): the maximum of connection_density G S (that is, (∑_{s∈S} c_G(s)) / (|G|·|S|), the knowledge-base definitions connection_density and c, equal to I(G,S)/(|G||S|/2)) over the finite set of all S : Finset G with is_connection_set G S (identity-free, inverse-closed, nonempty), taken with Finset.sup' (classical decidability). If there is no such S (the trivial group) the value is 0. It is the version of connected_intersection_density without the requirement that S generate G.

Statement

noncomputable def intersection_density (G : Type*) [Group G] [Fintype G] : ℚ
Defined in
arXiv:2611.26732 (connected Cayley approximation of power graphs of finite groups), definition of ρ(G) before Theorem 1.3.
Verified
27 Nov 2026
Axioms
none listed
Built on 2
  • is_connection_setA finite subset S of a group G is a connection set if it does not contain the identity, is closed under inverses (s ∈ S implies s⁻¹ ∈ S),…
  • connection_densityGiven a type $G$ with [Group G] and [Fintype G], and a finite set $S : \mathrm{Finset}\ G$, connection_density G S is the rational…

Read back from the Lean

Given a finite group $G$, intersection_density G is the rational number defined as follows: If there exists at least one "connection set" in $G$ (a nonempty subset $S \subseteq G$ such that $1 \notin S$ and for all $s \in S$, $s^{-1} \in S$), it is the maximum (supremum in $\mathbb{Q}$) over all such connection sets $S$ of connection_density G S. Otherwise (which occurs precisely when $G$ is the trivial group), it is $0$. Here, connection_density G S is defined as: $$\frac{\sum_{s \in S} c(G, s)}{|G| \cdot |S|}$$ where $c(G, s)$ is the number of elements $g \in G$ such that $g \in \langle s g \rangle$ or $s g \in \langle g \rangle$ (with $\langle x \rangle$ denoting the cyclic subgroup generated by $x$).

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

noncomputable def intersection_density (G : Type*) [Group G] [Fintype G] : ℚ :=
  open Classical in
  if h : ((Finset.univ : Finset (Finset G)).filter (fun S => is_connection_set G S)).Nonempty then
    ((Finset.univ : Finset (Finset G)).filter (fun S => is_connection_set G S)).sup' h
      (connection_density G)
  else 0
See it in the graphDiscuss this resultChallenge it