Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Entanglement entropy of two disjoint intervals in conformal field theory II

Definition
QAlgorithms_Papers_Independent_Intakenext100_P22

by Gohan · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Entanglement entropy of two disjoint intervals in conformal field theory II (arXiv:1011.5482) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • bilinear: Bilinear dot product without conjugation, PDF pp. 3–4, (8),(12).
  • thetaSummand: The actual characteristic-theta summand, PDF p. 4, (12).
  • characteristicTheta: Riemann–Siegel theta with complex characteristics, PDF p. 4, (12). On the Siegel domain absolute convergence is part of theta_inversion. The accepted Support21.P18.theta is a qubit antiunitary, a different object.
  • Siegel: Symmetry and positive definite imaginary part, PDF pp. 12–13, (53).
  • gaussianFactor: Holomorphic Gaussian factor det(-iT)^(-1/2), PDF p. 12, (53). The integral fixes the branch continuously from T=iY, Y positive definite, rather than taking the principal scalar square root of the determinant.
  • betaRatio: Hypergeometric ratio, PDF p. 3, (7), on 0<y,x<1.
  • periodMatrix: Computed period data (6)–(7), PDF pp. 2–3; not a physical moment.
  • thetaDenominator: Theta denominator in (68)–(70), PDF pp. 15–16. For this pure imaginary period matrix the theta value is positive real.
  • replicaWeight: Geometric exponent for c=1, PDF p. 16, (71).
  • cosineMatrix: Cosine matrix with source indices shifted to Fin, PDF p. 14, (61).
  • cosineQuadratic: v^t C v in (59)–(64), PDF pp. 14–15.
  • exponentA: Exponent a_v defined independently by the Fourier sum (59), PDF p. 14.
  • digammaCombination: Digamma combination f_y in §5.1, PDF p. 14.
  • exponentB: Amplitude b_v defined independently by (60), PDF p. 14.
  • chainValue: Zero extension m_0=m_n=0 in (62), PDF p. 14.
  • chainEnergy: Domain-wall energy including both endpoints at n=2, PDF p. 14, (62).
  • intervalBlock: Block (a,b] of height h in source coordinates, PDF pp. 15–16, (63),(75). The accepted operator/channel definitions named block are different objects.
  • secondPattern: Explicit second-sector patterns m_0,m_1,m_2 in (85), PDF p. 18.
  • halfShift: Canonical m+ε with ε_i in {0,1/2}, PDF p. 16, (74).
  • sheetSine: Sine of a sheet difference, PDF pp. 18–19, (91)–(93). Subtraction is in ℝ, never truncated in ℕ.
  • qFactor: Q_0,Q_1,Q_2 defined by (91)–(93), PDF pp. 18–19.
  • rectangleSum: Direct finite rectangle sum, PDF p. 18, (86).
  • reducedQSum: Reduced ordered sum with j_1=0, PDF p. 19, (97).
Definition code
import Mathlib

/-! Statements from Calabrese–Cardy–Tonni, arXiv:1011.5482v1.
Physical CFT moments are not defined by their proposed answers; see HARD.md.
All new definitions below belong only to this paper. -/

noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P22

open scoped BigOperators Topology
open Filter MeasureTheory

/-- Bilinear dot product without conjugation, PDF pp. 3–4, (8),(12). -/
def bilinear {g : ℕ} (v w : Fin g → ℂ) : ℂ := ∑ i, v i * w i

/-- The actual characteristic-theta summand, PDF p. 4, (12). -/
noncomputable def thetaSummand {g : ℕ} (T : Matrix (Fin g) (Fin g) ℂ)
    (a b z : Fin g → ℂ) (m : Fin g → ℤ) : ℂ :=
  Complex.exp (Complex.I * Real.pi *
    bilinear (fun i => (m i : ℂ) + a i) (T.mulVec (fun i => (m i : ℂ) + a i)) +
    2 * Real.pi * Complex.I * bilinear (fun i => (m i : ℂ) + a i) (z + b))

/-- Riemann–Siegel theta with complex characteristics, PDF p. 4, (12).
On the Siegel domain absolute convergence is part of theta_inversion.
The accepted Support21.P18.theta is a qubit antiunitary, a different object. -/
noncomputable def characteristicTheta {g : ℕ} (T : Matrix (Fin g) (Fin g) ℂ)
    (a b z : Fin g → ℂ) : ℂ := ∑' m : Fin g → ℤ, thetaSummand T a b z m

/-- Symmetry and positive definite imaginary part, PDF pp. 12–13, (53). -/
def Siegel {g : ℕ} (T : Matrix (Fin g) (Fin g) ℂ) : Prop :=
  T.transpose = T ∧ Matrix.PosDef (fun i j : Fin g => (T i j).im)

/-- Holomorphic Gaussian factor det(-iT)^(-1/2), PDF p. 12, (53).
The integral fixes the branch continuously from T=iY, Y positive definite,
rather than taking the principal scalar square root of the determinant. -/
noncomputable def gaussianFactor {g : ℕ} (T : Matrix (Fin g) (Fin g) ℂ) : ℂ :=
  ∫ y : Fin g → ℝ, Complex.exp (Complex.I * Real.pi *
    bilinear (fun i => (y i : ℂ)) (T.mulVec (fun i => (y i : ℂ))))

example : bilinear (fun _ : Fin 1 => (2 : ℂ)) (fun _ => 3) = 6 := by
  norm_num [bilinear]

example : thetaSummand (0 : Matrix (Fin 1) (Fin 1) ℂ) 0 0 0 0 = 1 := by
  simp [thetaSummand, bilinear]

example : gaussianFactor (0 : Matrix (Fin 0) (Fin 0) ℂ) = 1 := by
  have hvolume : (volume : Measure (Fin 0 → ℝ)) Set.univ = 1 := by
    simpa using (volume_pi_pi (fun _ : Fin 0 => (Set.univ : Set ℝ)))
  simp [gaussianFactor, bilinear, Measure.real, hvolume]

example : characteristicTheta (0 : Matrix (Fin 0) (Fin 0) ℂ) 0 0 0 = 1 := by
  simp [characteristicTheta, thetaSummand, bilinear]

/-- Hypergeometric ratio, PDF p. 3, (7), on 0<y,x<1. -/
noncomputable def betaRatio (y x : ℝ) : ℝ :=
  ordinaryHypergeometric y (1 - y) (1 : ℝ) (1 - x) /
    ordinaryHypergeometric y (1 - y) (1 : ℝ) x

/-- Computed period data (6)–(7), PDF pp. 2–3; not a physical moment. -/
noncomputable def periodMatrix (n : ℕ) (x : ℝ) :
    Matrix (Fin (n - 1)) (Fin (n - 1)) ℂ :=
  fun r s => 2 * Complex.I / (n : ℂ) *
    ∑ k ∈ Finset.Ico 1 n,
      ((Real.sin (Real.pi * (k : ℝ) / n) * betaRatio ((k : ℝ) / n) x *
        Real.cos (2 * Real.pi * (k : ℝ) / n * ((r.val : ℝ) - s.val)) : ℝ) : ℂ)

/-- Theta denominator in (68)–(70), PDF pp. 15–16.
For this pure imaginary period matrix the theta value is positive real. -/
noncomputable def thetaDenominator (n : ℕ) (x : ℝ) : ℝ :=
  ‖characteristicTheta (periodMatrix n x) 0 0 0‖

/-- Geometric exponent for c=1, PDF p. 16, (71). -/
def replicaWeight (n : ℕ) : ℝ := ((n : ℝ) - 1 / n) / 6

example : periodMatrix 1 (1 / 2) = (0 : Matrix (Fin 0) (Fin 0) ℂ) := by
  ext i
  exact Fin.elim0 i

example : replicaWeight 2 = 1 / 4 := by norm_num [replicaWeight]

example (y : ℝ)
    (h : ordinaryHypergeometric y (1 - y) (1 : ℝ) (1 / 2 : ℝ) ≠ 0) :
    betaRatio y (1 / 2) = 1 := by
  norm_num [betaRatio, h]

/-- Cosine matrix with source indices shifted to Fin, PDF p. 14, (61). -/
noncomputable def cosineMatrix (n k : ℕ) : Matrix (Fin (n - 1)) (Fin (n - 1)) ℝ :=
  fun i j => Real.cos (2 * Real.pi * (k : ℝ) / n * ((i.val : ℝ) - j.val))

/-- v^t C v in (59)–(64), PDF pp. 14–15. -/
noncomputable def cosineQuadratic (n k : ℕ) (v : Fin (n - 1) → ℝ) : ℝ :=
  ∑ i, ∑ j, v i * cosineMatrix n k i j * v j

/-- Exponent a_v defined independently by the Fourier sum (59), PDF p. 14. -/
noncomputable def exponentA (n : ℕ) (v : Fin (n - 1) → ℝ) : ℝ :=
  2 / (n : ℝ) * ∑ k ∈ Finset.Ico 1 n,
    Real.sin (Real.pi * (k : ℝ) / n) ^ 2 * cosineQuadratic n k v

/-- Digamma combination f_y in §5.1, PDF p. 14. -/
noncomputable def digammaCombination (y : ℝ) : ℝ :=
  2 * Real.eulerMascheroniConstant +
    (Complex.digamma (y : ℂ)).re + (Complex.digamma ((1 - y : ℝ) : ℂ)).re

/-- Amplitude b_v defined independently by (60), PDF p. 14. -/
noncomputable def exponentB (n : ℕ) (v : Fin (n - 1) → ℝ) : ℝ :=
  2 / (n : ℝ) * ∑ k ∈ Finset.Ico 1 n,
    Real.sin (Real.pi * (k : ℝ) / n) ^ 2 * digammaCombination ((k : ℝ) / n) *
      cosineQuadratic n k v

/-- Zero extension m_0=m_n=0 in (62), PDF p. 14. -/
def chainValue (n : ℕ) (v : Fin (n - 1) → ℝ) (j : ℕ) : ℝ :=
  if j = 0 then 0 else if h : j - 1 < n - 1 then v ⟨j - 1, h⟩ else 0

/-- Domain-wall energy including both endpoints at n=2, PDF p. 14, (62). -/
def chainEnergy (n : ℕ) (v : Fin (n - 1) → ℝ) : ℝ :=
  (∑ j ∈ Finset.range n, (chainValue n v (j + 1) - chainValue n v j) ^ 2) / 2

/-- Block (a,b] of height h in source coordinates, PDF pp. 15–16, (63),(75).
The accepted operator/channel definitions named block are different objects. -/
def intervalBlock (n a b : ℕ) (h : ℝ) : Fin (n - 1) → ℝ :=
  fun i => if a < i.val + 1 ∧ i.val + 1 ≤ b then h else 0

/-- Explicit second-sector patterns m_0,m_1,m_2 in (85), PDF p. 18. -/
def secondPattern (n a b c d : ℕ) (s : ℝ) (r : Fin 3) : Fin (n - 1) → ℝ :=
  if r.val = 0 then intervalBlock n a b s + intervalBlock n c d s
  else if r.val = 1 then intervalBlock n a b s - intervalBlock n c d s
  else intervalBlock n a d s + intervalBlock n b c s

/-- Canonical m+ε with ε_i in {0,1/2}, PDF p. 16, (74). -/
def halfShift (n : ℕ) (e : Fin (n - 1) → Bool)
    (m : Fin (n - 1) → ℤ) : Fin (n - 1) → ℝ :=
  fun i => (m i : ℝ) + if e i then (1 / 2 : ℝ) else 0

/-- Sine of a sheet difference, PDF pp. 18–19, (91)–(93).
Subtraction is in ℝ, never truncated in ℕ. -/
noncomputable def sheetSine (n a b : ℕ) : ℝ :=
  Real.sin (Real.pi * ((b : ℝ) - a) / n)

/-- Q_0,Q_1,Q_2 defined by (91)–(93), PDF pp. 18–19. -/
noncomputable def qFactor (n a b c d : ℕ) (r : Fin 3) : ℝ :=
  if r.val = 0 then
    sheetSine n b d * sheetSine n a c /
      (sheetSine n a b * sheetSine n c d * sheetSine n a d * sheetSine n b c)
  else if r.val = 1 then
    sheetSine n a d * sheetSine n b c /
      (sheetSine n a b * sheetSine n c d * sheetSine n b d * sheetSine n a c)
  else
    sheetSine n a b * sheetSine n c d /
      (sheetSine n b d * sheetSine n a c * sheetSine n a d * sheetSine n b c)

example : intervalBlock 2 0 1 (1 : ℝ) = fun _ => 1 := by
  ext i
  simp [intervalBlock, Fin.eq_zero i]

example : chainEnergy 2 (fun _ => (1 : ℝ)) = 1 := by
  norm_num [chainEnergy, chainValue, Finset.sum_range_succ]

example : halfShift 2 (fun _ => true) (fun _ => (0 : ℤ)) = intervalBlock 2 0 1 (1 / 2) := by
  ext i
  simp [halfShift, intervalBlock, Fin.eq_zero i]

example : exponentA 2 (fun _ => (0 : ℝ)) = 0 ∧
    exponentB 2 (fun _ => (0 : ℝ)) = 0 := by
  simp [exponentA, exponentB, cosineQuadratic]

example : secondPattern 4 0 1 2 3 1 0 = intervalBlock 4 0 1 1 + intervalBlock 4 2 3 1 := rfl

example : sheetSine 2 0 1 = 1 := by norm_num [sheetSine]

example : qFactor 4 0 0 1 2 0 = 0 := by simp [qFactor, sheetSine]

/-- Direct finite rectangle sum, PDF p. 18, (86). -/
noncomputable def rectangleSum (n k p lr q lc : ℕ) : ℝ :=
  ∑ i ∈ Finset.Ico (p + 1) (p + lr + 1),
    ∑ j ∈ Finset.Ico (q + 1) (q + lc + 1),
      Real.cos (2 * Real.pi * (k : ℝ) / n * ((i : ℝ) - j))

example : rectangleSum 4 1 0 0 0 1 = 0 := by simp [rectangleSum]

example : rectangleSum 4 1 0 1 0 1 = 1 := by norm_num [rectangleSum]

/-- Reduced ordered sum with j_1=0, PDF p. 19, (97). -/
noncomputable def reducedQSum (n : ℕ) (alpha : ℝ) (r : Fin 3) : ℝ :=
  ∑ b ∈ Finset.Ico 1 n, ∑ c ∈ Finset.Ico (b + 1) n,
    ∑ d ∈ Finset.Ico (c + 1) n, Real.rpow (qFactor n 0 b c d r) (2 * alpha)

example : reducedQSum 3 1 1 = 0 := by
  unfold reducedQSum
  apply Finset.sum_eq_zero
  intro b hb
  apply Finset.sum_eq_zero
  intro c hc
  apply Finset.sum_eq_zero
  intro d hd
  have hb_lower := (Finset.mem_Ico.mp hb).1
  have hc_lower := (Finset.mem_Ico.mp hc).1
  have hd_lower := (Finset.mem_Ico.mp hd).1
  have hd_upper := (Finset.mem_Ico.mp hd).2
  omega

end QAlgorithms.Papers.Independent.Intakenext100.P22
Source
Entanglement entropy of two disjoint intervals in conformal field theory II, arXiv:1011.5482v1, https://arxiv.org/abs/1011.5482v1
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Intakenext100.P22.Siegel

For every natural number ggg and complex g×gg\times gg×g matrix TTT, this defines a condition requiring that TT=TT^{\mathsf T}=TTT=T and that its real matrix of entrywise imaginary parts is positive definite: writing Yjℓ=Im⁡(Tjℓ)Y_{j\ell}=\operatorname{Im}(T_{j\ell})Yjℓ​=Im(Tjℓ​), the matrix YYY is symmetric and

∑j,ℓ=0g−1xjYjℓxℓ>0for every nonzero x∈Rg.\sum_{j,\ell=0}^{g-1}x_jY_{j\ell}x_\ell>0 \quad\text{for every nonzero }x\in\mathbb R^g.j,ℓ=0∑g−1​xj​Yjℓ​xℓ​>0for every nonzero x∈Rg.

The symmetry of TTT is ordinary transpose symmetry, without complex conjugation. When g=0g=0g=0, the matrix symmetry holds and there are no nonzero real vectors, so the condition holds.

QAlgorithms.Papers.Independent.Intakenext100.P22.betaRatio

For every pair of real numbers y,xy,xy,x, this defines

β(y,x)=2F1(y,1−y;1;1−x)2F1(y,1−y;1;x),\beta(y,x)= \frac{{}_2F_1(y,1-y;1;1-x)} {{}_2F_1(y,1-y;1;x)},β(y,x)=2​F1​(y,1−y;1;x)2​F1​(y,1−y;1;1−x)​,

where 2F1{}_2F_12​F1​ denotes the real ordinary hypergeometric function used in the declaration. There are no restrictions on yyy or xxx, and no assumption that the denominator is nonzero; real division is totalized, so the ratio is 000 when its denominator is 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.bilinear

For every natural number ggg, including g=0g=0g=0, and every pair of complex vectors v,w∈Cgv,w\in\mathbb C^gv,w∈Cg, this defines

B(v,w)=∑j=0g−1vjwj.B(v,w)=\sum_{j=0}^{g-1}v_jw_j.B(v,w)=j=0∑g−1​vj​wj​.

There is no complex conjugation in this product. When g=0g=0g=0, the sum is empty and its value is 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.chainEnergy

For every natural number nnn and every real vector vvv indexed by the natural numbers less than the natural-number difference n−1n-1n−1, define xj=vj−1x_j=v_{j-1}xj​=vj−1​ when 1≤j<n1\le j<n1≤j<n, and xj=0x_j=0xj​=0 for every other natural number jjj. This declaration defines the real number

12∑j=0n−1(xj+1−xj)2,\frac12\sum_{j=0}^{n-1}(x_{j+1}-x_j)^2,21​j=0∑n−1​(xj+1​−xj​)2,

where the sum is over 0≤j<n0\le j<n0≤j<n. In particular, for n≥1n\ge1n≥1 the endpoint values are x0=xn=0x_0=x_n=0x0​=xn​=0; for n=0n=0n=0 the sum is empty, and for n=1n=1n=1 its only summand is 000, so both cases give energy 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.chainValue

For any natural number nnn, any real vector vvv indexed by the natural numbers less than the natural-number difference n−1n-1n−1, and any natural number jjj, this defines

chainValue⁡(n,v,j)={vj−1,1≤j<n,0,otherwise.\operatorname{chainValue}(n,v,j)= \begin{cases} v_{j-1},&1\le j<n,\\ 0,&\text{otherwise}. \end{cases}chainValue(n,v,j)={vj−1​,0,​1≤j<n,otherwise.​

Thus the value at j=0j=0j=0 is explicitly 000, as is every value at j≥nj\ge nj≥n; when n=0n=0n=0 or n=1n=1n=1, the vector has no coordinates and the function is identically 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.characteristicTheta

For every natural number ggg, every complex g×gg\times gg×g matrix TTT, and complex vectors a,b,z∈Cga,b,z\in\mathbb C^ga,b,z∈Cg, this defines

Θ(T;a,b,z)=∑m∈Zgexp⁡ ⁣(iπ∑j,ℓ=0g−1(mj+aj)Tjℓ(mℓ+aℓ)+2πi∑j=0g−1(mj+aj)(zj+bj)).\Theta(T;a,b,z)= \sum_{m\in\mathbb Z^g} \exp\!\left( \mathrm i\pi\sum_{j,\ell=0}^{g-1}(m_j+a_j)T_{j\ell}(m_\ell+a_\ell) +2\pi\mathrm i\sum_{j=0}^{g-1}(m_j+a_j)(z_j+b_j) \right).Θ(T;a,b,z)=m∈Zg∑​exp​iπj,ℓ=0∑g−1​(mj​+aj​)Tjℓ​(mℓ​+aℓ​)+2πij=0∑g−1​(mj​+aj​)(zj​+bj​)​.

The sum is the sum of the indexed family, with the convention that its value is 000 if the family is not summable; this definition assumes neither summability nor any symmetry or positivity of TTT. When g=0g=0g=0, there is exactly one integer vector, the empty vector, and the value is 111.

QAlgorithms.Papers.Independent.Intakenext100.P22.cosineMatrix

For every pair of natural numbers n,kn,kn,k, let d=max⁡(n−1,0)d=\max(n-1,0)d=max(n−1,0). This defines the real d×dd\times dd×d matrix CCC, indexed by integers 0≤i,j<d0\le i,j<d0≤i,j<d, with entries

Cij=cos⁡ ⁣(2πkn(i−j)),C_{ij}=\cos\!\left(\frac{2\pi k}{n}(i-j)\right),Cij​=cos(n2πk​(i−j)),

where the indices and parameters in the formula are interpreted as real numbers, so i−ji-ji−j is real subtraction. There is no restriction on kkk, including k=0k=0k=0. When n=0n=0n=0 or n=1n=1n=1, the matrix has no entries; real division by zero, wherever evaluated, has value 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.cosineQuadratic

For arbitrary natural numbers n,kn,kn,k and a real vector vvv indexed by In={i∈N:i<n−1}I_n=\{i\in\mathbb N:i<n-1\}In​={i∈N:i<n−1}, where n−1n-1n−1 uses natural-number subtraction, this defines the real number

∑i∈In∑j∈Invicos⁡ ⁣(2πkn(i−j))vj,\sum_{i\in I_n}\sum_{j\in I_n} v_i\cos\!\left(\frac{2\pi k}{n}(i-j)\right)v_j,i∈In​∑​j∈In​∑​vi​cos(n2πk​(i−j))vj​,

with the subtraction i−ji-ji−j performed in R\mathbb RR. No positivity or range assumptions are imposed on nnn or kkk. For n=0n=0n=0 or n=1n=1n=1, the index set is empty and the result is 000; real division by zero is defined to be 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.digammaCombination

For every real number yyy, this defines the real number

2γ+Re⁡ψ(y)+Re⁡ψ(1−y),2\gamma+\operatorname{Re}\psi(y)+\operatorname{Re}\psi(1-y),2γ+Reψ(y)+Reψ(1−y),

where γ\gammaγ is the Euler–Mascheroni constant and ψ\psiψ is the complex digamma function, evaluated at the complex embeddings of the real numbers yyy and 1−y1-y1−y. There is no restriction on yyy, including no exclusion of arguments at poles of the classical digamma function; the expression uses the values assigned by the total complex function in the formalization.

QAlgorithms.Papers.Independent.Intakenext100.P22.exponentA

For every natural number nnn and every real vector vvv indexed by In={i∈N:i<n−1}I_n=\{i\in\mathbb N:i<n-1\}In​={i∈N:i<n−1}, with natural-number subtraction in n−1n-1n−1, this defines

2n∑k=1n−1sin⁡2 ⁣(πkn)(∑i∈In∑j∈Invicos⁡ ⁣(2πkn(i−j))vj),\frac{2}{n}\sum_{k=1}^{n-1} \sin^2\!\left(\frac{\pi k}{n}\right) \left( \sum_{i\in I_n}\sum_{j\in I_n} v_i\cos\!\left(\frac{2\pi k}{n}(i-j)\right)v_j \right),n2​k=1∑n−1​sin2(nπk​)​i∈In​∑​j∈In​∑​vi​cos(n2πk​(i−j))vj​​,

where all arithmetic inside the trigonometric expressions is real, and the sum over kkk means 1≤k<n1\le k<n1≤k<n. There is no lower bound on nnn. For n=0n=0n=0 or n=1n=1n=1, the sums are empty and the result is 000, using the convention that real division by zero is 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.exponentB

For every natural number nnn and every real vector vvv indexed by In={i∈N:i<n−1}I_n=\{i\in\mathbb N:i<n-1\}In​={i∈N:i<n−1}, with natural-number subtraction in n−1n-1n−1, this defines

2n∑k=1n−1sin⁡2 ⁣(πkn)(2γ+Re⁡ψ ⁣(kn)+Re⁡ψ ⁣(1−kn))(∑i∈In∑j∈Invicos⁡ ⁣(2πkn(i−j))vj),\frac{2}{n}\sum_{k=1}^{n-1} \sin^2\!\left(\frac{\pi k}{n}\right) \left( 2\gamma+\operatorname{Re}\psi\!\left(\frac{k}{n}\right) +\operatorname{Re}\psi\!\left(1-\frac{k}{n}\right) \right) \left( \sum_{i\in I_n}\sum_{j\in I_n} v_i\cos\!\left(\frac{2\pi k}{n}(i-j)\right)v_j \right),n2​k=1∑n−1​sin2(nπk​)(2γ+Reψ(nk​)+Reψ(1−nk​))​i∈In​∑​j∈In​∑​vi​cos(n2πk​(i−j))vj​​,

where γ\gammaγ is the Euler–Mascheroni constant, ψ\psiψ is the complex digamma function evaluated at complex embeddings of real arguments, and the sum over kkk means 1≤k<n1\le k<n1≤k<n. All arithmetic in the trigonometric arguments is real. No lower bound on nnn is assumed; for n=0n=0n=0 or n=1n=1n=1, the result is 000 because the sums are empty, with real division by zero defined as 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.gaussianFactor

For every natural number ggg and every complex g×gg\times gg×g matrix TTT, this defines the complex Lebesgue integral

G(T)=∫Rgexp⁡ ⁣(iπ∑j,ℓ=0g−1yjTjℓyℓ) dy,G(T)=\int_{\mathbb R^g} \exp\!\left(\mathrm i\pi \sum_{j,\ell=0}^{g-1}y_jT_{j\ell}y_\ell\right)\,dy,G(T)=∫Rg​exp​iπj,ℓ=0∑g−1​yj​Tjℓ​yℓ​​dy,

where the real coordinates yjy_jyj​ are regarded as complex numbers inside the exponential. No symmetry, positivity, or integrability hypothesis is imposed; the integral uses the convention that a nonintegrable function has integral 000. When g=0g=0g=0, the domain consists of the empty vector with measure 111, and the value is 111.

QAlgorithms.Papers.Independent.Intakenext100.P22.halfShift

For every natural number nnn, every Boolean-valued vector eee and every integer-valued vector mmm, both indexed by In={i∈N:i<n−1}I_n=\{i\in\mathbb N:i<n-1\}In​={i∈N:i<n−1} with natural-number subtraction, this defines the real vector

vi={mi+12,ei=true,mi,ei=false,i∈In,v_i= \begin{cases} m_i+\frac12,&e_i=\mathrm{true},\\ m_i,&e_i=\mathrm{false}, \end{cases} \qquad i\in I_n,vi​={mi​+21​,mi​,​ei​=true,ei​=false,​i∈In​,

where each integer mim_imi​ is embedded in R\mathbb RR. No restriction is imposed on eee or mmm; for n=0n=0n=0 or n=1n=1n=1, the resulting vector has no coordinates.

QAlgorithms.Papers.Independent.Intakenext100.P22.intervalBlock

For arbitrary natural numbers n,a,bn,a,bn,a,b and a real number hhh, this defines a real vector indexed by In={i∈N:i<n−1}I_n=\{i\in\mathbb N:i<n-1\}In​={i∈N:i<n−1}, with natural-number subtraction in n−1n-1n−1, by

vi={h,a<i+1≤b,0,otherwise.v_i= \begin{cases} h,&a<i+1\le b,\\ 0,&\text{otherwise}. \end{cases}vi​={h,0,​a<i+1≤b,otherwise.​

There are no assumptions that a<ba<ba<b or that either endpoint lies within the coordinate range: the condition is tested only at existing coordinates. In particular, the vector is zero if a≥ba\ge ba≥b, and its coordinate domain is empty when n=0n=0n=0 or n=1n=1n=1.

QAlgorithms.Papers.Independent.Intakenext100.P22.periodMatrix

For every natural number nnn and real number xxx, let d=max⁡(n−1,0)d=\max(n-1,0)d=max(n−1,0). This defines a complex d×dd\times dd×d matrix Pn(x)P_n(x)Pn​(x), whose rows and columns are indexed by integers 0≤r,s<d0\le r,s<d0≤r,s<d, by

(Pn(x))rs=2in∑1≤k<nsin⁡ ⁣(πkn)2F1(k/n,1−k/n;1;1−x)2F1(k/n,1−k/n;1;x)cos⁡ ⁣(2πkn(r−s)),(P_n(x))_{rs} = \frac{2\mathrm i}{n} \sum_{1\le k<n} \sin\!\left(\frac{\pi k}{n}\right) \frac{{}_2F_1(k/n,1-k/n;1;1-x)} {{}_2F_1(k/n,1-k/n;1;x)} \cos\!\left(\frac{2\pi k}{n}(r-s)\right),(Pn​(x))rs​=n2i​1≤k<n∑​sin(nπk​)2​F1​(k/n,1−k/n;1;x)2​F1​(k/n,1−k/n;1;1−x)​cos(n2πk​(r−s)),

where 2F1{}_2F_12​F1​ is the real ordinary hypergeometric function and the real summands are embedded into C\mathbb CC. No restriction on xxx or nonvanishing hypothesis for the hypergeometric denominators is imposed; a ratio with zero denominator is 000. When n=0n=0n=0 or n=1n=1n=1, the matrix has no entries and the indicated finite sum is empty; division by n=0n=0n=0, wherever evaluated, also has value 000.

QAlgorithms.Papers.Independent.Intakenext100.P22.qFactor

For arbitrary natural numbers n,a,b,c,dn,a,b,c,dn,a,b,c,d and a selector r∈{0,1,2}r\in\{0,1,2\}r∈{0,1,2}, put Suv=sin⁡(π(v−u)/n)S_{uv}=\sin(\pi(v-u)/n)Suv​=sin(π(v−u)/n), with u,v,nu,v,nu,v,n interpreted as real numbers in this expression. This defines

qr={SbdSacSabScdSadSbc,r=0,SadSbcSabScdSbdSac,r=1,SabScdSbdSacSadSbc,r=2.q_r= \begin{cases} \dfrac{S_{bd}S_{ac}}{S_{ab}S_{cd}S_{ad}S_{bc}},&r=0,\\[6pt] \dfrac{S_{ad}S_{bc}}{S_{ab}S_{cd}S_{bd}S_{ac}},&r=1,\\[6pt] \dfrac{S_{ab}S_{cd}}{S_{bd}S_{ac}S_{ad}S_{bc}},&r=2. \end{cases}qr​=⎩⎨⎧​Sab​Scd​Sad​Sbc​Sbd​Sac​​,Sab​Scd​Sbd​Sac​Sad​Sbc​​,Sbd​Sac​Sad​Sbc​Sab​Scd​​,​r=0,r=1,r=2.​

There are no ordering assumptions on the endpoints, no assumption that n>0n>0n>0, and no requirement that a denominator be nonzero. Real division by zero is 000, so any branch with a zero denominator returns 000; in particular, all three branches return 000 when n=0n=0n=0.

QAlgorithms.Papers.Independent.Intakenext100.P22.rectangleSum

For arbitrary natural numbers n,k,p,ℓr,q,ℓcn,k,p,\ell_r,q,\ell_cn,k,p,ℓr​,q,ℓc​, this defines the real number

∑i=p+1p+ℓr ∑j=q+1q+ℓccos⁡ ⁣(2πkn(i−j)),\sum_{i=p+1}^{p+\ell_r}\ \sum_{j=q+1}^{q+\ell_c} \cos\!\left(\frac{2\pi k}{n}(i-j)\right),i=p+1∑p+ℓr​​ j=q+1∑q+ℓc​​cos(n2πk​(i−j)),

where the indices are natural numbers, and all quantities inside the cosine are interpreted as real numbers, so i−ji-ji−j is real subtraction. Each range includes both displayed endpoints and is empty when its corresponding length is zero; thus the value is zero if ℓr=0\ell_r=0ℓr​=0 or ℓc=0\ell_c=0ℓc​=0. There are no bounds on the offsets or lengths relative to nnn, and n=0n=0n=0 and k=0k=0k=0 are allowed. Real division by zero has value zero here, so when n=0n=0n=0, every summand is 111 and the value is ℓrℓc\ell_r\ell_cℓr​ℓc​.

QAlgorithms.Papers.Independent.Intakenext100.P22.reducedQSum

For every natural number nnn, real number α\alphaα, and index r∈{0,1,2}r\in\{0,1,2\}r∈{0,1,2}, define Suv=sin⁡ ⁣(π(v−u)/n)S_{uv}=\sin\!\left(\pi(v-u)/n\right)Suv​=sin(π(v−u)/n), with u,v,nu,v,nu,v,n interpreted as real numbers in this expression, and, for natural numbers b,c,db,c,db,c,d, define

Qr(b,c,d)={SbdS0cS0bScdS0dSbc,r=0,S0dSbcS0bScdSbdS0c,r=1,S0bScdSbdS0cS0dSbc,r=2.Q_r(b,c,d)= \begin{cases} \displaystyle\frac{S_{bd}S_{0c}}{S_{0b}S_{cd}S_{0d}S_{bc}},&r=0,\\[6pt] \displaystyle\frac{S_{0d}S_{bc}}{S_{0b}S_{cd}S_{bd}S_{0c}},&r=1,\\[6pt] \displaystyle\frac{S_{0b}S_{cd}}{S_{bd}S_{0c}S_{0d}S_{bc}},&r=2. \end{cases}Qr​(b,c,d)=⎩⎨⎧​S0b​Scd​S0d​Sbc​Sbd​S0c​​,S0b​Scd​Sbd​S0c​S0d​Sbc​​,Sbd​S0c​S0d​Sbc​S0b​Scd​​,​r=0,r=1,r=2.​

The declaration defines the real number

∑b,c,d∈N1≤b<c<d<n(Qr(b,c,d))2α,\sum_{\substack{b,c,d\in\mathbb N\\1\le b<c<d<n}} \bigl(Q_r(b,c,d)\bigr)^{2\alpha},b,c,d∈N1≤b<c<d<n​∑​(Qr​(b,c,d))2α,

where the power is the real-power operation. There is no restriction on α\alphaα, including its sign or whether it is zero. If n≤3n\le3n≤3, there are no admissible triples and the value is zero. The formulas use total real division, with division by zero assigned value zero.

QAlgorithms.Papers.Independent.Intakenext100.P22.replicaWeight

For every natural number nnn, this defines the real number

wn=n−1/n6,w_n=\frac{n-1/n}{6},wn​=6n−1/n​,

where both occurrences of nnn are interpreted as real numbers and the subtraction is real subtraction. Division by zero has value 000, so w0=0w_0=0w0​=0; also w1=0w_1=0w1​=0.

QAlgorithms.Papers.Independent.Intakenext100.P22.secondPattern

For arbitrary natural numbers n,a,b,c,dn,a,b,c,dn,a,b,c,d, a real number sss, and a selector r∈{0,1,2}r\in\{0,1,2\}r∈{0,1,2}, let In={i∈N:i<n−1}I_n=\{i\in\mathbb N:i<n-1\}In​={i∈N:i<n−1}, using natural-number subtraction, and for natural numbers u,wu,wu,w let 1u<i+1≤w\mathbf1_{u<i+1\le w}1u<i+1≤w​ be 111 when that condition holds and 000 otherwise. This defines a real vector on InI_nIn​ by

vi={s1a<i+1≤b+s1c<i+1≤d,r=0,s1a<i+1≤b−s1c<i+1≤d,r=1,s1a<i+1≤d+s1b<i+1≤c,r=2.v_i= \begin{cases} s\mathbf1_{a<i+1\le b}+s\mathbf1_{c<i+1\le d},&r=0,\\ s\mathbf1_{a<i+1\le b}-s\mathbf1_{c<i+1\le d},&r=1,\\ s\mathbf1_{a<i+1\le d}+s\mathbf1_{b<i+1\le c},&r=2. \end{cases}vi​=⎩⎨⎧​s1a<i+1≤b​+s1c<i+1≤d​,s1a<i+1≤b​−s1c<i+1≤d​,s1a<i+1≤d​+s1b<i+1≤c​,​r=0,r=1,r=2.​

No ordering or range assumptions are imposed on a,b,c,da,b,c,da,b,c,d, and sss is unrestricted; overlapping blocks are added or subtracted as displayed. For n=0n=0n=0 or n=1n=1n=1, the coordinate domain is empty.

QAlgorithms.Papers.Independent.Intakenext100.P22.sheetSine

For arbitrary natural numbers n,a,bn,a,bn,a,b, this defines the real number

sin⁡ ⁣(π(b−a)n),\sin\!\left(\frac{\pi(b-a)}{n}\right),sin(nπ(b−a)​),

where b−ab-ab−a is subtraction after embedding a,ba,ba,b into R\mathbb RR, so it can be negative. No ordering, range, or positivity assumptions are imposed. When n=0n=0n=0, real division by zero gives 000, so the result is sin⁡0=0\sin 0=0sin0=0.

QAlgorithms.Papers.Independent.Intakenext100.P22.thetaDenominator

For every natural number nnn and real number xxx, let d=max⁡(n−1,0)d=\max(n-1,0)d=max(n−1,0) and define the complex d×dd\times dd×d matrix PPP, indexed by 0≤r,s<d0\le r,s<d0≤r,s<d, by

Prs=2in∑1≤k<nsin⁡ ⁣(πkn)2F1(k/n,1−k/n;1;1−x)2F1(k/n,1−k/n;1;x)cos⁡ ⁣(2πkn(r−s)).P_{rs}=\frac{2\mathrm i}{n} \sum_{1\le k<n} \sin\!\left(\frac{\pi k}{n}\right) \frac{{}_2F_1(k/n,1-k/n;1;1-x)} {{}_2F_1(k/n,1-k/n;1;x)} \cos\!\left(\frac{2\pi k}{n}(r-s)\right).Prs​=n2i​1≤k<n∑​sin(nπk​)2​F1​(k/n,1−k/n;1;x)2​F1​(k/n,1−k/n;1;1−x)​cos(n2πk​(r−s)).

Here 2F1{}_2F_12​F1​ is the real ordinary hypergeometric function, real summands are embedded into C\mathbb CC, and division by zero has value 000. This defines the real number

Dn(x)=∣∑m∈Zdexp⁡ ⁣(iπ∑r,s=0d−1mrPrsms)∣,D_n(x)= \left| \sum_{m\in\mathbb Z^d} \exp\!\left(\mathrm i\pi\sum_{r,s=0}^{d-1}m_rP_{rs}m_s\right) \right|,Dn​(x)=​m∈Zd∑​exp(iπr,s=0∑d−1​mr​Prs​ms​)​,

where the absolute value is complex modulus and the indexed sum has value 000 if nonsummable. No condition on xxx or convergence is assumed. For n=0n=0n=0 and n=1n=1n=1, the matrix is empty and the lattice contains only the empty vector, so Dn(x)=1D_n(x)=1Dn​(x)=1.

QAlgorithms.Papers.Independent.Intakenext100.P22.thetaSummand

For every natural number ggg, every complex g×gg\times gg×g matrix TTT, complex vectors a,b,z∈Cga,b,z\in\mathbb C^ga,b,z∈Cg, and integer vector m∈Zgm\in\mathbb Z^gm∈Zg, this defines the complex number

exp⁡ ⁣(iπ∑j=0g−1∑ℓ=0g−1(mj+aj)Tjℓ(mℓ+aℓ)+2πi∑j=0g−1(mj+aj)(zj+bj)),\exp\!\left( \mathrm i\pi\sum_{j=0}^{g-1}\sum_{\ell=0}^{g-1} (m_j+a_j)T_{j\ell}(m_\ell+a_\ell) +2\pi\mathrm i\sum_{j=0}^{g-1}(m_j+a_j)(z_j+b_j) \right),exp(iπj=0∑g−1​ℓ=0∑g−1​(mj​+aj​)Tjℓ​(mℓ​+aℓ​)+2πij=0∑g−1​(mj​+aj​)(zj​+bj​)),

where the integer coordinates are regarded as complex numbers and no factors are conjugated. No symmetry or positivity condition is imposed on TTT. When g=0g=0g=0, both sums are empty and the value is 111.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me