For $q\in\set{2,3}$, we show that a $k$-dimensional linear code over the finite field $\F_q$ of order $q$ is linear complementary dual (LCD) exactly when one root-of-unity value of its weight enumerator has magnitude $q^{k/2}$. We convert the phase of this value, together with the parity type in the binary case, into exact linear constraints on the weight distribution and incorporate them into a Gauss-phase linear program. The resulting program uses only the ordinary weight distributions of the code and its dual and adds only a constant-size set of branch equations to the usual Hamming/MacWilliams constraints, so it remains close in size to the standard Hamming LP while retaining additional arithmetic information. Computations over the audited binary and ternary ranges show systematic strengthening of the Hamming LCD relaxation. In the binary case, comparison with the established mixed joint-weight-enumerator LP yields four strict improvements, lowering the benchmark upper bound by one in each case. Each strict comparison is verified exactly by rational feasibility witnesses and integer Farkas certificates.
In this paper we derive new Delsarte-type linear programming bounds for $q$-ary $(r,\delta)$-locally recoverable codes (LRCs) with three attributes: first, the variable set is comparable in size to that of the classical Delsarte LP; second, our LP exploits the higher-order information forced by the local-distance condition through order \(\delta-2\), in the sense that for nondegenerate linear codes, its balanced base part gives exactly the same dimension bound as the symmetrized refined-weight LP of Gruica, Jany, and Ravagnani, while the additional constraints, nonvacuous whenever $\delta \ge 3$, give a further strengthening; and third, it applies to general $(r,\delta)$-LRCs, linear and nonlinear alike. Extensive computations over binary and ternary alphabets show that the convex-hull LP yields improvements not captured by the previous LP and often sharpens the shortening and generalized Singleton bounds.