AFTD Auto-Formalizing Theoretical Domains

orderedPairSumCount

def

The restricted two-fold representation function ν_A(x): the number of ordered pairs (a, b) of distinct elements of A with a + b = x.

Statement

def orderedPairSumCount {G : Type*} [AddCommGroup G] [DecidableEq G] (A : Finset G) (x : G) : ℕ
Source
step towards restricted_diff_card_le_of_missing
Verified
24 Oct 2026
Axioms
none listed
Used by 1
  • highRepSetThe set P(A) of all group elements having more than two ordered restricted pair representations from A.

Lean source view module on GitHub

/-- Number of ordered representations of x as a sum of two distinct elements of A. -/
def orderedPairSumCount {G : Type*} [AddCommGroup G] [DecidableEq G] (A : Finset G) (x : G) : ℕ := ((A ×ˢ A).filter (fun p : G × G => p.1 ≠ p.2 ∧ p.1 + p.2 = x)).card
See it in the graphDiscuss this resultChallenge it