Zulip Chat Archive

Stream: mathlib4

Topic: Dual cones without the inner product space assumption


Mitchell Lee (Dec 05 2024 at 06:54):

The "inner dual cone" and "dual cone" constructions in mathlib (Set.innerDualCone and PointedCone.dual) require the cone to be a subset of an inner product space over R\mathbb{R}. However, the construction can be done in much more generality, as follows.

Let MM be a module over an arbitrary ordered semiring RR, and let CMC \subseteq M be a pointed cone (i.e. an R0R_{\geq 0}-submodule of MM, where R0R_{\geq 0} is the subsemiring of RR consisting of the nonnegative elements). Then we may define the dual of CC to be the set

C={fMf(v)0 for all vC}M,C^* = \{f \in M^* \, | \, \text{$f(v) \geq 0$ for all $v \in C$} \} \subseteq M^*,

where M=HomR(M,R)M^* = \operatorname{Hom}_R(M, R) is the dual module. It is not hard to see that CMC^* \subseteq M^* is also a pointed cone.

If R=RR = \mathbb{R} and MM is an inner product space, then there is a canonical isomorphism between MM and MM^*, and thus the dual cone of CC can be thought of as a subset of MM rather than as a subset of MM^*. This recovers the constructions that are currently in mathlib.

Many important theorems about cones can be stated in this generality. For example, one formulation of the Minkowski–Weyl theorem is that if MM is a finite-dimensional vector space over an ordered field RR and CMC \subseteq M is a pointed cone which is finitely generated as an R0R_{\geq 0}-module, then so is CC^*. I know @Yaël Dillies is working on this (#Is there code for X? > Main Theorem of Polytope Theory ).

Unfortunately, the supporting hyperplane theorem (which, in this formulation, can be stated simply as C=CC = C^{**}) seems to require MM to be a finite-dimensional vector space over R\mathbb{R}. But this assumption can be relaxed to RR being any ordered field if CC is finitely generated as an R0R_{\geq 0}-module (this is Farkas' lemma).

I think that this generality is quite important, because it is common to work with polytopes and cones over Q\mathbb{Q} and Z\mathbb{Z}. (For one thing, this makes them computable.) I have created a github issue: #19738. However, I am not sure how to proceed with actually refactoring the existing library to work in this generality, or whether this is even a good idea. Does anyone have any thoughts?

Johan Commelin (Dec 05 2024 at 07:24):

Would it make sense to abstract away from M=HomR(M,R)M^* = \text{Hom}_R(M,R) to a pair of modules M,NM,N with a perfect pairing?

Johan Commelin (Dec 05 2024 at 07:24):

Of course this excludes MM of infinite rank. But at the same time it brings back a symmetry, so that C=CC^{**} = C will typecheck again.

Johan Commelin (Dec 05 2024 at 07:25):

The perfect pairing approach is also the one used in docs#RootPairing

Mitchell Lee (Dec 05 2024 at 07:27):

Yeah, that would probably be a good idea.

Mitchell Lee (Dec 05 2024 at 10:50):

The dual can be defined with respect to any pairing (yielding an antitone Galois connection between the pointed cones in MM and the pointed cones in NN), though many of the theorems will only hold for perfect pairings.

Mitchell Lee (Dec 05 2024 at 11:00):

Also, the concept of dual can be made even more general by replacing the subsemiring R0R_{\geq 0} with an arbitrary subsemiring, though I am not sure if this has any use.

Mitchell Lee (Dec 05 2024 at 11:08):

For example, let L/KL / K be a field extension and let VV be a vector space over LL. Then for any subspace WVW \subseteq V over KK, one may form the space

{fVf(v)K for all vW}V\{f \in V^* \, | \, \text{$f(v) \in K$ for all $v \in W$}\} \subseteq V^*

where V=HomL(V,L)V^{*} = \operatorname{Hom}_L(V, L). Is this concept useful?

Johan Commelin (Dec 05 2024 at 16:25):

I don't see an immediate use for it. So I would stick to R0R_{\ge0} for now.

Mitchell Lee (Dec 06 2024 at 06:02):

By the way, here's a coordinate-free and topology-free proof of (one direction of) Minkowski–Weyl for cones by a "deletion-contraction" argument. I can't find this in the literature, but I'm sure I'm not the first person to write this down. It is the result of simply taking the existing proofs using Fourier–Motzkin elimination and removing the coordinates from them. This is similar to how the exchange property in linear algebra can be thought of as removing the coordinates from Gaussian elimination.

Lemma

Let WW be a vector space over an ordered field kk, let vWv \in W^*, and let BWB \subseteq W be a finite set. Let H+={wWv,w0}H^+ = \{w \in W \, | \, \langle v, w \rangle \geq 0\} be the half space corresponding to vv, let H={wWv,w=0}H = \{w \in W \, | \, \langle v, w \rangle = 0\} be the hyperplane corresponding to vv, and let C=spank0BC = \operatorname{span}_{k_{\geq 0}} B be the pointed cone spanned by BB. Then CH+C \cap H^+ is spanned over k0k_{\geq 0} by the set (BH+)(CH)(B \cap H^+) \cup (C \cap H).

Proof

We use induction on the size of the set BH+B \setminus H^+. In the base case, we have BH+B \subseteq H^+; this implies CH+C \subseteq H^+ and the lemma follows.

For the inductive step, suppose that the lemma holds for a set BWB' \subseteq W. That is, if we define C=spank0BC' = \operatorname{span}_{k_{\geq 0}} B', then CH+C' \cap H^+ is spanned over k0k_{\geq 0} by the set (BH+)(CH)(B' \cap H^+) \cup (C' \cap H). Choose any uWH+u \in W \setminus H^+ (so v,u<0\langle v, u \rangle < 0); we will show that the lemma holds for B=B{u}B = B' \cup \{u\} as well.

Let wCH+w \in C \cap H^+; we will show that ww is in the k0k_{\geq 0}-span of (BH+)(CH)(B \cap H^+) \cup (C \cap H). If wHw \in H, this is obvious, so assume that wH+Hw \in H^+ \setminus H; that is, v,w>0\langle v, w \rangle > 0. Since CC is spanned by C{u}C' \cup \{u\}, we may write w=aw+buw = a w' + b u for some wCw' \in C' and a,b0a, b \geq 0. We have v,w=av,w+bv,u\langle v, w \rangle = a \langle v, w' \rangle + b \langle v, u\rangle. Since v,w>0\langle v, w \rangle > 0 and v,u<0\langle v, u\rangle < 0, we conclude that v,w>0\langle v, w' \rangle > 0. Then

w=aw+bu=v,wv,ww+b(v,uv,ww+u)w = a w' + b u = \frac{\langle v, w \rangle}{\langle v, w'\rangle} w' + b\left(-\frac{\langle v, u \rangle}{\langle v, w'\rangle} w' + u \right)

Consider the vectors ww' and v,uv,ww+u-\frac{\langle v, u \rangle}{\langle v, w'\rangle} w' + u appearing in this nonnegative linear combination. The first vector ww' is in the k0k_{\geq 0}-span of (BH+)(CH)(B' \cap H^+) \cup (C' \cap H) by the inductive hypothesis. The second vector v,uv,ww+u-\frac{\langle v, u \rangle}{\langle v, w'\rangle} w' + u is an element of CHC \cap H: it is in CC because it is a nonnegative linear combination of ww' and uu, and it is in HH by a simple computation. Hence, ww is in the k0k_{\geq 0}-span of (BH+)(CH)(CH)=(BH+)(CH)(B' \cap H^+) \cup (C' \cap H) \cup (C \cap H) = (B \cap H^+) \cup (C \cap H), as desired.

Lemma.

Let WW be a finite dimensional vector space over an ordered field kk. Let v1,,vnWv_1, \ldots, v_n \in W^* and let H1+,,Hn+WH_1^+, \ldots, H_n^+ \subseteq W be the corresponding half spaces (i.e. Hi={wWvi,w0}H_i = \{w \in W \, | \, \langle v_i, w \rangle \geq 0\}.) Then C=H1+Hn+C = H_1^+ \cap \cdots \cap H_n^+ is a finitely generated pointed cone.

Proof

We use induction on nn. If n=0n = 0, then C=WC = W. Since WW is finitely generated over kk and kk is finitely generated over k0k_{\geq 0} (by 11 and 1-1), we conclude that C=WC = W is also finitely generated over k0k_{\geq 0}, as desired.

Suppose n>0n > 0. Let C~=H1+Hn1+\widetilde{C} = H_1^+ \cap \cdots \cap H_{n - 1}^+. By the inductive hypothesis, C~\widetilde{C} is a finitely generated pointed cone; let BWB \subseteq W be a finite generating set of C~\widetilde{C}.

Also, define the hyperplane Hn={wWvn,w=0}H_n = \{w \in W \, | \, \langle v_n, w \rangle = 0\}. Then HnH_n is itself a finite dimensional vector space over kk. By the inductive hypothesis, the set CHn=(H1+Hn)(Hn1+Hn)C \cap H_n = (H_1^+ \cap H_n) \cap \cdots \cap (H_{n - 1}^+ \cap H_n) is an intersection of n1n - 1 half spaces in HnH_n, so it is a finitely generated pointed cone; let BHnB' \subseteq H_n be a finite generating set of CHnC \cap H_n.

We claim that the finite set (BHn+)B(B \cap H_n^+) \cup B' generates the cone CC. Since BB' generates CHnC \cap H_n, it suffices to prove that (BHn+)(CHn)(B \cap H_n^+) \cup (C \cap H_n) generates CC, which is guaranteed by the previous lemma.

Theorem (Minkowski–Weyl).

Let V,WV, W be finite-dimensional vector spaces over an ordered field kk and let , ⁣:V×Wk\langle\cdot , \cdot\rangle \colon V \times W \to k be a perfect pairing. Let CVC \subseteq V be a finitely generated pointed cone. Then

C={wWv,w0 for all vC}WC^* = \{w \in W \, | \, \text{$\langle v, w \rangle \geq 0$ for all $v \in C$}\} \subseteq W

is also a finitely generated pointed cone.

Proof.

Since CC is finitely generated, there exist v1,,vnVv_1, \ldots, v_n \in V such that C=spank0{v1,,vn}C = \operatorname{span}_{k_{\geq 0}}\{v_1, \ldots, v_n\}. Then CC^* is the intersection of the half spaces Hi+={wWvi,w0}H^+_i = \{w \in W \, | \, \langle v_i, w \rangle \geq 0\}, so it is a finitely generated pointed cone by the previous lemma.

Mitchell Lee (Dec 06 2024 at 20:18):

By the way, Wikipedia refers to the construction in mathlib as the "internal dual cone": https://en.m.wikipedia.org/wiki/Dual_cone_and_polar_cone

Mitchell Lee (Dec 06 2024 at 22:45):

@Yaël Dillies Do you have thoughts on this?


Last updated: May 02 2025 at 03:31 UTC