Zulip Chat Archive
Stream: mathlib4
Topic: Unifying `Submodule.dual` and `Submodule.orthogonalBilin`
Martin Winter (Feb 01 2026 at 14:34):
In #34007 I propose an implementation of Submodule.dual as an analogue of the existing PointedCone.dual. This PR is a bottleneck for the upcoming cone duality theory and needed for polyhedral cones. @Joël Riou pointed out the similarity to Submodule.orthogonalBilin and asked whether these concepts can be unified. I am open for it, but feel not competent in judging how this should be done in detail.
Both "dual" and "orthogonalBilin" are based on a bi(semi)linear pairing B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M but with complementary generality:
- "orthogonalBilin" assumes that
M₁andM₂are identical. - "dual" currently assumes an
R-bilinear pairing, andMis the base ringR.
Also "dual" takes in a set, whereas "orthogonalBilin" takes in a submodule.
Martin Winter (Feb 01 2026 at 14:34):
Questions:
- First and foremost, is it the right move to unify these concept? They are related, but express slightly different intent. Note that there are also
dualAnnihilatoranddualCoannihilatorthat are further special cases (seedual_dualCoannihilatorin #34007). Should they exist independently? - How to unify? I suppose the unification should be build on the maximally general
B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M. Do we want "orthogonalBilin" to take in a set as opposed to a submodule? - Which terminology should survive? I feel like "orthogonal" is a relation between submodules in the same space. So, should "dual" be the primary terminology? Should "orthogonalBilin" be an optional terminology for when
M₁=M₂? - Given that
Submodule.dualis a bottleneck for polyhedral cones and that the unifaction seems nontrivial, should it be a priority now?
Yaël Dillies (Feb 01 2026 at 14:58):
I assume you meant @Joël Riou
Joël Riou (Feb 01 2026 at 17:50):
I would argue that "dual" is a very confusing terminology, and orthogonal is much better. The word "orthogonal" seems quite standard (in the French speaking undergraduate literature) at least in the case of the pairing between a finite dimensional vector space and its dual. (There are actually two notions of left or right orthogonal, but it may be ok to use only one because the other can be deduced by using the flip.)
Antoine Chambert-Loir (Feb 01 2026 at 19:49):
Submodule.dual is confusing in three ways: 1) there is docs#Module.Dual for the actual dual of a module ; 2) that notion depends on the choice of a pairing ; 3) in the classical case, it would represent the dual of the quotient module.
Violeta Hernández (Feb 02 2026 at 04:12):
(deleted)
Violeta Hernández (Feb 02 2026 at 04:16):
Which terminology should survive? I feel like "orthogonal" is a relation between submodules in the same space. So, should "dual" be the primary terminology?
I agree with this, I've never seen the word "orthogonal" used outside of this context. We already use the word for docs#Module.Dual, and I think we should use the same word here.
Violeta Hernández (Feb 02 2026 at 04:18):
...oh wait, this takes a bilinear map rather than being the true dual. So yeah, I think we should find another name.
Violeta Hernández (Feb 02 2026 at 04:22):
This is for convex polytopes, right? Is there a reason we can't just take a dual polytope to live in the dual space?
Martin Winter (Feb 02 2026 at 20:26):
Antoine Chambert-Loir said:
Submodule.dual is confusing in three ways: 1) there is docs#Module.Dual for the actual dual of a module [...]
I consider this a feature, not a bug: using Dual.eval as a pairing, Submodule.dual would live in Module.Dual. This would be consistent terminology.
If we don't want "dual", I would still hope for a term of comparable length. Statements that contain "orthogonalBilin" more than once (of which there will be plenty) are rather cumbersome to parse. Can we have "ortho"?
Martin Winter (Feb 02 2026 at 20:26):
While we are at it, I have another question:
- why do we have a separate
BilinForm.orthogonal? The only difference toorthogonalBilin(besides the namespace) seems to be that it takes a bilinear form rather than a bilinear map. It even implements a lot of the same lemmas. Can't we just useorthogonalBilinin place oforthogonaleverywhere (and then rename the former to the latter)?
Martin Winter (Feb 02 2026 at 20:26):
Violeta Hernández said:
This is for convex polytopes, right? Is there a reason we can't just take a dual polytope to live in the dual space?
For convex cones at this time, but convex polytopes eventually.
Note that defining the dual with respect to a general pairing is not a feature of my PR but is already the case for PointedCone.dual. I am merely consistent with it.
We had a discussion here where I also opposed the pairing in dual. What convinced me eventually is that the following two common use cases are covered very easily:
- ideally the dual of the dual lives in the same space as the original cone. We can get from the dual cone back using the pairing
B.flip. This is especially important in infinite dimensions where a module is not isomorphic to its double dual. - in Euclidean spaces we can choose a pairing that gives us the dual in the same space again.
Violeta Hernández (Feb 02 2026 at 20:27):
Justus Springer said:
It's true we don't gain any generality in a mathematical sense. After all, for any pair of vector spaces and with a perfect pairing, we have . But we gain flexibility in Lean, as it might happen that is not definitionally equal to . If we only allow the "canonical" dual, we would then have to carry around the isomorphism all the time, as in the example with the double dual Yael mentions.
Well, this convinces me.
Last updated: Feb 28 2026 at 14:05 UTC