The pairing sum over perfect matchings of Fin m #
Category: 1-Mathlib (CSD-free; staged for upstream).
A perfect matching of Fin m is a fixed-point-free involution σ : Fin m → Fin m; its pairs
are {i, σ i}. The pairing sum of a weight c : Fin m → Fin m → R is the sum over perfect
matchings of the product over pairs, each pair {i, σ i} with i < σ i weighted c i (σ i) —
the combinatorial skeleton of Wick's theorem (the hafnian when c is symmetric).
IsPerfectMatching σ—∀ i, σ (σ i) = i ∧ σ i ≠ i;pairingSum c— the sum over{σ // IsPerfectMatching σ}of∏ i, if i < σ i then c i (σ i) else 1;pairingSum_zero(m = 0: the empty matching, value1),pairingSum_one(m = 1: no matching, value0);- ★
pairingSum_succ_succ— the first-contraction recursion: form = n + 2,pairingSum c = ∑ j : Fin (n + 1), c 0 j.succ · pairingSum (c ∘ emb j), whereemb j : Fin n ↪ Fin (n + 2)is the order embedding onto the complement of{0, j.succ}(emb j a = (j.succAbove a).succ). A matching ofFin (n + 2)is the pair{0, j.succ}together with a matching of the rest, and the weights multiply (glue, the bijectionglue_bijective); pairingSum_cast— transport alongm = m';- ★
card_isPerfectMatching_even/card_isPerfectMatching_odd— the number of perfect matchings ofFin (2n)is(2n − 1)‼, ofFin (2n + 1)zero: the pairing sum of the constant weight1.
References: G. C. Wick, The evaluation of the collision matrix, Phys. Rev. 80, 268 (1950)
(the pairing sum); CV/WickTime.lean (wickSum, the same recursion on words of the lattice
field, and wickSum_eq_pairingSum); specs/BACKLOG.md #36(b)(iv′); specs/future-work.md.
Perfect matchings #
The pairing sum of a weight c: over perfect matchings σ, the product over the pairs
{i, σ i}, i < σ i, of c i (σ i).
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Fin 0 has one perfect matching, the empty one: the pairing sum is 1.
Fin 1 has no perfect matching: the pairing sum is 0.
The first-contraction recursion #
★ The first-contraction recursion. A perfect matching of Fin (n + 2) is the pair
{0, j.succ} together with a perfect matching of the complement, and the weights multiply.
Transport and counting #
Transport of the pairing sum along m = m'.
The pairing sum of the constant weight 1 counts the perfect matchings.
★ Fin (2n) has (2n − 1)‼ perfect matchings.