Coded polynomials and the upper-bound certificate check #
The coded layer of the upper semidecision of the commuting-operator value
(planning/tsirelson-campaign.md, §3.5–§3.6). Everything here is a finite list computation on
naturals, primitive recursive, and independent of the algebra NCPoly that gives it meaning; the
semantic layer decodes it.
Coded polynomials. A letter (Letter) is inl (x, a), the first player's effect e_xa, or
inr (y, b), the second player's f_yb; a word is a List Letter. A coded polynomial
(CPoly) is a list of monomials (w, c), a word and a coded Gaussian integer (GInt), and it
denotes Σ c·w; the list is not normalized, so a word may occur several times. The operations
are the list-level ones: cadd concatenates, cneg and cscale c act on the coefficients,
cmul multiplies every monomial of one factor by every monomial of the other, cstar reverses
the words and conjugates the coefficients (the letters are self-adjoint), and cconst c,
cword w, cletter l are the one-monomial polynomials.
Merged coefficients and dominance. The coefficient of a word w in l is the sum of the
coefficients of the monomials of l with word w (coeffRaw). The
distinct words of l are words l = (l.map Prod.fst).dedup, and the off-diagonal mass
offMass l is the sum, over the nonempty distinct words, of the taxicab norm taxi of the merged
coefficient, where taxi z = |Re z| + |Im z| is computed on naturals (taxi_eq). A coded
polynomial is dominant (IsDominant) if the real part of its merged constant coefficient
strictly exceeds its off-diagonal mass. isDominant_iff_sum restates this over any finite set of
words containing those of l: Σ_{w ≠ ∅} (|Re l_w| + |Im l_w|) < Re l_∅.
Relations and the game polynomial. A relation index (RelIdx) is inl x (the first
player's normalization Σ_{a ≤ nA} e_xa − 1), inr (inl y) (the second player's,
Σ_{b ≤ nA} f_yb − 1), or inr (inr (x, y, a, b)) (the commutator e_xa f_yb − f_yb e_xa);
relPoly nA gives the polynomial. For a game description d, Wint d is the integer game
polynomial Σ_{x, y ≤ nX} Σ_{a, b ≤ nA} wt(x, y) [Draw(x, y, a, b)] e_xa f_yb, which is W d
times the game polynomial of d.game. Letters and relation indices are validated against the
alphabets of d.game (questions ≤ nX, answers ≤ nA, for both players): ValidLetter,
ValidWord, ValidCPoly, ValidRel, and every construction here preserves validity
(validCPoly_certR).
Certificates. A certificate (Cert) is a triple (N, sos, ideal): a natural N, a list of
sum-of-squares terms (g, s) standing for s⋆ g s (with g = none read as 1), and a list of
ideal monomials (c, w, ρ, w') standing for c · w · relPoly ρ · w'. With D = N², the
residual is
certR d p q (N, sos, ideal) = D·(p·W d·1 − q·Wint d) − Σ s⋆ g s − Σ c·w·ρ·w',
and CheckUpper (d, p, q) cert accepts iff q > 0, N ≥ 1, all letters and relation indices of
the certificate are valid, and the hermitian residual certRh = certR + certR⋆ is dominant. The
test q > 0 is essential: p / 0 = 0 in the consumer CommutingUpperRE. The test runs on
merged coefficients, without which it would be sound but never complete.
The main result is primrecRel_checkUpper : PrimrecRel CheckUpper, which with
MIPRE.ValueApprox.REPred.of_primrecRel_exists makes the set of accepted (d, p, q) recursively
enumerable.
Main declarations #
Letter,CPoly,cadd,cneg,cscale,cmul,cstar,cconst,cword,cletter;gneg,ptaxi,taxi,taxi_eq;coeffRaw,coeffRaw_eq_zero_of_notMem, and the coefficients ofcadd,cneg,cscale,cstar;words,dedup_eq_foldr,offMass,offMass_eq_sum,offMass_eq_sum_of_subset,IsDominant,isDominant_iff,isDominant_iff_sum;ValidLetter,ValidWord,ValidCPoly,ValidOptLetter,RelIdx,ValidRel,relPoly,Wint,Cert,optPoly,sosSum,idealSum,certR,certRh,ValidCert,CheckUpper, and the validity lemmasvalidCPoly_certR,validCPoly_certRh;- primitive recursiveness of every definition, ending with
primrecRel_checkUpper.
Coded Gaussian integers: negation and the taxicab norm #
The negation of a coded Gaussian integer.
Instances For
Negation of coded Gaussian integers is negation of their complex values.
The absolute value of a coded integer a - b, as the natural number (a - b) + (b - a)
(truncated subtraction).
Equations
- MIPRE.Tsirelson.Coded.ptaxi x = x.1 - x.2 + (x.2 - x.1)
Instances For
ptaxi x is the absolute value of the integer coded by x.
The taxicab norm |Re z| + |Im z| of a coded Gaussian integer, as a natural number.
Equations
Instances For
The coded zero has taxicab norm 0.
Coded polynomials #
A coded polynomial: a list of monomials (w, c), a word and a coded Gaussian coefficient,
denoting Σ c·w. The list is not normalized: a word may occur several times.
Equations
Instances For
The sum of coded polynomials: concatenation.
Equations
- MIPRE.Tsirelson.Coded.cadd p q = p ++ q
Instances For
The negation of a coded polynomial.
Equations
- MIPRE.Tsirelson.Coded.cneg p = List.map (fun (m : List MIPRE.Tsirelson.Coded.Letter × MIPRE.ValueApprox.GInt) => (m.1, MIPRE.Tsirelson.Coded.gneg m.2)) p
Instances For
The multiple c • p of a coded polynomial.
Equations
- MIPRE.Tsirelson.Coded.cscale c p = List.map (fun (m : List MIPRE.Tsirelson.Coded.Letter × MIPRE.ValueApprox.GInt) => (m.1, c.mul m.2)) p
Instances For
The product of coded polynomials: every monomial of p times every monomial of q.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The star of a coded polynomial: reverse the words and conjugate the coefficients (the letters are self-adjoint).
Equations
- MIPRE.Tsirelson.Coded.cstar p = List.map (fun (m : List MIPRE.Tsirelson.Coded.Letter × MIPRE.ValueApprox.GInt) => (m.1.reverse, m.2.conj)) p
Instances For
The constant polynomial c.
Instances For
The word w, as a monomial with coefficient 1.
Equations
Instances For
The letter l, as a polynomial.
Equations
Instances For
Merged coefficients and dominance #
The merged coefficient of the word w in l: the sum of the coefficients of the monomials
of l with word w.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The off-diagonal mass of l: the sum of the taxicab norms of the merged coefficients of
the distinct nonempty words of l.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dominance: the real part of the merged constant coefficient of l strictly exceeds its
off-diagonal mass.
Equations
Instances For
Dominance is decidable: it compares two coded integers.
Equations
- One or more equations did not get rendered due to their size.
Validation, relations and the game polynomial #
The question index of a letter.
Equations
- MIPRE.Tsirelson.Coded.letterQ (Sum.inl t) = t.1
- MIPRE.Tsirelson.Coded.letterQ (Sum.inr t) = t.1
Instances For
The answer index of a letter.
Equations
- MIPRE.Tsirelson.Coded.letterA (Sum.inl t) = t.2
- MIPRE.Tsirelson.Coded.letterA (Sum.inr t) = t.2
Instances For
A letter is valid for questions ≤ nX and answers ≤ nA, the alphabets Fin (nX + 1) and
Fin (nA + 1) of both players in GameData.game.
Equations
- MIPRE.Tsirelson.Coded.ValidLetter nX nA l = (MIPRE.Tsirelson.Coded.letterQ l ≤ nX ∧ MIPRE.Tsirelson.Coded.letterA l ≤ nA)
Instances For
Validity of a letter is decidable.
Equations
- One or more equations did not get rendered due to their size.
Every letter of the word is valid.
Equations
- MIPRE.Tsirelson.Coded.ValidWord nX nA w = ∀ l ∈ w, MIPRE.Tsirelson.Coded.ValidLetter nX nA l
Instances For
Validity of a word is decidable.
Equations
Every word of the coded polynomial is valid.
Equations
- MIPRE.Tsirelson.Coded.ValidCPoly nX nA p = ∀ m ∈ p, MIPRE.Tsirelson.Coded.ValidWord nX nA m.1
Instances For
Validity of a coded polynomial is decidable.
Equations
An optional letter is valid if it is absent or valid.
Equations
- MIPRE.Tsirelson.Coded.ValidOptLetter nX nA none = True
- MIPRE.Tsirelson.Coded.ValidOptLetter nX nA (some l) = MIPRE.Tsirelson.Coded.ValidLetter nX nA l
Instances For
Validity of an optional letter is decidable.
Equations
- One or more equations did not get rendered due to their size.
- MIPRE.Tsirelson.Coded.instDecidablePredOptionLetterValidOptLetter nX nA none = isTrue trivial
A relation index: inl x is the first player's normalization at question x,
inr (inl y) the second player's at y, and inr (inr (x, y, a, b)) the commutator of
e_xa and f_yb.
Instances For
A relation index is valid if its questions are ≤ nX and its answers ≤ nA.
Equations
Instances For
Validity of a relation index is decidable.
Equations
- MIPRE.Tsirelson.Coded.instDecidablePredRelIdxValidRel nX nA (Sum.inl x_1) = { decide := x_1.ble nX, reflects_decide := ⋯ }
- MIPRE.Tsirelson.Coded.instDecidablePredRelIdxValidRel nX nA (Sum.inr (Sum.inl y)) = { decide := y.ble nX, reflects_decide := ⋯ }
- MIPRE.Tsirelson.Coded.instDecidablePredRelIdxValidRel nX nA (Sum.inr (Sum.inr t)) = { decide := decide (t.1 ≤ nX) && decide (t.2.1 ≤ nX ∧ t.2.2.1 ≤ nA ∧ t.2.2.2 ≤ nA), reflects_decide := ⋯ }
The first player's normalization at x: Σ_{a ≤ nA} e_xa − 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The second player's normalization at y: Σ_{b ≤ nA} f_yb − 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The relation polynomial of a relation index, for answers ≤ nA.
Equations
Instances For
The integer game polynomial of a description:
Σ_{x, y ≤ nX} Σ_{a, b ≤ nA} wt(x, y) [Draw(x, y, a, b)] e_xa f_yb, which is W d times the
game polynomial of d.game.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Certificates and the check #
A certificate (N, sos, ideal): the scale N (with D = N²), the sum-of-squares terms
(g, s) standing for s⋆ g s (g = none is 1), and the ideal monomials (c, w, ρ, w')
standing for c · w · relPoly ρ · w'.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The polynomial of an optional letter: 1 for none.
Equations
Instances For
The residual of a certificate for the bound p / q on the description d:
N²·(p·W d·1 − q·Wint d) − Σ s⋆ g s − Σ c·w·ρ·w'.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The hermitian residual R + R⋆.
Equations
- MIPRE.Tsirelson.Coded.certRh d p q cert = MIPRE.Tsirelson.Coded.certR d p q cert ++ MIPRE.Tsirelson.Coded.cstar (MIPRE.Tsirelson.Coded.certR d p q cert)
Instances For
Every letter and relation index of the certificate is valid.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Validity of a certificate is decidable.
Equations
The upper certificate check: cert certifies val_co(d.game) < p / q for
x = (d, p, q). It requires q > 0, N ≥ 1, a valid certificate, and a dominant hermitian
residual.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The upper certificate check is decidable.
Equations
Merged coefficients #
The empty coded polynomial has merged coefficient zero at every word.
Distinct words and dominance #
List.dedup as a right fold that keeps an element when it does not occur later.
The distinct words of l have no duplicates.
Validity #
A concatenation of coded polynomials is valid iff both are.
Negation preserves and reflects validity.
Scaling preserves and reflects validity.
The star preserves and reflects validity.
A product of valid coded polynomials is valid.
A coded constant is valid.
The monomial of a valid word is valid.
The polynomial of a valid letter is valid.
The relation polynomial of a valid relation index is valid.
The integer game polynomial of a description is valid for its alphabets.
The polynomial of a valid optional letter is valid.
A sum of squares with valid terms is valid.
An ideal element with valid monomials is valid.
The residual of a valid certificate is valid.
The hermitian residual of a valid certificate is valid.
Primitive recursiveness: coefficients and operations #
Negation of coded Gaussian integers is primitive recursive.
The absolute value ptaxi of a coded integer is primitive recursive.
The taxicab norm is primitive recursive.
The negation of coded polynomials is primitive recursive.
The multiple of a coded polynomial is primitive recursive.
The product of coded polynomials is primitive recursive.
The star of coded polynomials is primitive recursive.
The monomial of a word is primitive recursive.
The polynomial of a letter is primitive recursive.
The merged coefficient is primitive recursive.
List.dedup is primitive recursive.
The distinct words of a coded polynomial are primitive recursive.
The off-diagonal mass is primitive recursive.
Dominance is a primitive recursive predicate.
Primitive recursiveness: validation #
The question index of a letter is primitive recursive.
The answer index of a letter is primitive recursive.
Validity of a letter is primitive recursive in the letter and the bounds (nX, nA).
Validity of a word is primitive recursive in the word and the bounds.
Validity of a coded polynomial is primitive recursive.
Validity of an optional letter is primitive recursive.
Validity of a relation index is primitive recursive.
Validity of a certificate is primitive recursive.
Primitive recursiveness: relations and the game polynomial #
The first player's coded normalization is primitive recursive.
The second player's coded normalization is primitive recursive.
The coded commutator is primitive recursive.
The relation polynomial is primitive recursive.
The contexts of Wint, from the innermost level ((((d, x), y), a), b) out.
Instances For
The innermost term of Wint.
The map over b in Wint, in the context (((d, x), y), a), is primitive recursive.
The map over a in Wint, in the context ((d, x), y), is primitive recursive.
The map over y in Wint, in the context (d, x), is primitive recursive.
The integer game polynomial is primitive recursive.
Primitive recursiveness: certificates and the check #
The polynomial of an optional letter is primitive recursive.
The sum of squares of a list of terms is primitive recursive.
The ideal element of a list of monomials is primitive recursive.
The upper certificate check is primitive recursive.