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 C⊆MC \subseteq M be a pointed cone (i.e. an R≥0R_{\geq 0}-submodule of MM, where R≥0R_{\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∗={f∈M∗ ∣ f(v)≥0 for all v∈C}⊆M∗,C^* = \{f \in M^* \, | \, \text{$f(v) \geq 0$ for all $v \in C$} \} \subseteq M^*,

where M∗=Hom⁡R(M,R)M^* = \operatorname{Hom}_R(M, R) is the dual module. It is not hard to see that C∗⊆M∗C^* \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 M∗M^*, and thus the dual cone of CC can be thought of as a subset of MM rather than as a subset of M∗M^*. 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 C⊆MC \subseteq M is a pointed cone which is finitely generated as an R≥0R_{\geq 0}-module, then so is C∗C^*. 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=C∗∗C = 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 R≥0R_{\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 R≥0R_{\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 W⊆VW \subseteq V over KK, one may form the space

{f∈V∗ ∣ f(v)∈K for all v∈W}⊆V∗\{f \in V^* \, | \, \text{$f(v) \in K$ for all $v \in W$}\} \subseteq V^*

where V∗=Hom⁡L(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 R≥0R_{\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 v∈W∗v \in W^*, and let B⊆WB \subseteq W be a finite set. Let H+={w∈W ∣ ⟨v,w⟩≥0}H^+ = \{w \in W \, | \, \langle v, w \rangle \geq 0\} be the half space corresponding to vv, let H={w∈W ∣ ⟨v,w⟩=0}H = \{w \in W \, | \, \langle v, w \rangle = 0\} be the hyperplane corresponding to vv, and let C=span⁡k≥0BC = \operatorname{span}_{k_{\geq 0}} B be the pointed cone spanned by BB. Then C∩H+C \cap H^+ is spanned over k≥0k_{\geq 0} by the set (B∩H+)∪(C∩H)(B \cap H^+) \cup (C \cap H).

Proof

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

For the inductive step, suppose that the lemma holds for a set B′⊆WB' \subseteq W. That is, if we define C′=span⁡k≥0B′C' = \operatorname{span}_{k_{\geq 0}} B', then C′∩H+C' \cap H^+ is spanned over k≥0k_{\geq 0} by the set (B′∩H+)∪(C′∩H)(B' \cap H^+) \cup (C' \cap H). Choose any u∈W∖H+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 w∈C∩H+w \in C \cap H^+; we will show that ww is in the k≥0k_{\geq 0}-span of (B∩H+)∪(C∩H)(B \cap H^+) \cup (C \cap H). If w∈Hw \in H, this is obvious, so assume that w∈H+∖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 w′∈C′w' \in C' and a,b≥0a, b \geq 0. We have ⟨v,w⟩=a⟨v,w′⟩+b⟨v,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,w⟩⟨v,w′⟩w′+b(−⟨v,u⟩⟨v,w′⟩w′+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 w′w' and −⟨v,u⟩⟨v,w′⟩w′+u-\frac{\langle v, u \rangle}{\langle v, w'\rangle} w' + u appearing in this nonnegative linear combination. The first vector w′w' is in the k≥0k_{\geq 0}-span of (B′∩H+)∪(C′∩H)(B' \cap H^+) \cup (C' \cap H) by the inductive hypothesis. The second vector −⟨v,u⟩⟨v,w′⟩w′+u-\frac{\langle v, u \rangle}{\langle v, w'\rangle} w' + u is an element of C∩HC \cap H: it is in CC because it is a nonnegative linear combination of w′w' and uu, and it is in HH by a simple computation. Hence, ww is in the k≥0k_{\geq 0}-span of (B′∩H+)∪(C′∩H)∪(C∩H)=(B∩H+)∪(C∩H)(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,…,vn∈W∗v_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={w∈W ∣ ⟨vi,w⟩≥0}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 k≥0k_{\geq 0} (by 11 and −1-1), we conclude that C=WC = W is also finitely generated over k≥0k_{\geq 0}, as desired.

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

Also, define the hyperplane Hn={w∈W ∣ ⟨vn,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 C∩Hn=(H1+∩Hn)∩⋯∩(Hn−1+∩Hn)C \cap H_n = (H_1^+ \cap H_n) \cap \cdots \cap (H_{n - 1}^+ \cap H_n) is an intersection of n−1n - 1 half spaces in HnH_n, so it is a finitely generated pointed cone; let B′⊆HnB' \subseteq H_n be a finite generating set of C∩HnC \cap H_n.

We claim that the finite set (B∩Hn+)∪B′(B \cap H_n^+) \cup B' generates the cone CC. Since B′B' generates C∩HnC \cap H_n, it suffices to prove that (B∩Hn+)∪(C∩Hn)(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×W→k\langle\cdot , \cdot\rangle \colon V \times W \to k be a perfect pairing. Let C⊆VC \subseteq V be a finitely generated pointed cone. Then

C∗={w∈W ∣ ⟨v,w⟩≥0 for all v∈C}⊆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,…,vn∈Vv_1, \ldots, v_n \in V such that C=span⁡k≥0{v1,…,vn}C = \operatorname{span}_{k_{\geq 0}}\{v_1, \ldots, v_n\}. Then C∗C^* is the intersection of the half spaces Hi+={w∈W ∣ ⟨vi,w⟩≥0}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: Feb 28 2026 at 14:05 UTC