Skip to content

Commit 078b884

Browse files
chore(Geometry/Convex/Cone): weaken assumptions for convex cone duality to CommSemiring (leanprover-community#37323)
The majority of the duality theory for convex cones does not requires `CommRing`, but `CommSemiring` suffices. This PR weakens the assumptions accordingly. The two exceptions are * `dual_univ` * `dual_neg` which have been moved to the end of the file in a separate section `CommRing`. There is also some minor cleanup. Co-authored-by: Martin Winter <martin.winter.math@gmail.com>
1 parent 14ac8c0 commit 078b884

1 file changed

Lines changed: 28 additions & 9 deletions

File tree

Mathlib/Geometry/Convex/Cone/Dual.lean

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@ assert_not_exists TopologicalSpace Real Cardinal
3535
open Function LinearMap Pointwise Set
3636

3737
namespace PointedCone
38-
variable {R M N : Type*} [CommRing R] [PartialOrder R] [IsOrderedRing R] [AddCommGroup M]
39-
[AddCommGroup N] [Module R M] [Module R N] {p : M →ₗ[R] N →ₗ[R] R} {s t : Set M} {y : N}
38+
39+
section CommSemiring
40+
41+
variable {R : Type*} [CommSemiring R] [PartialOrder R] [IsOrderedRing R]
42+
variable {M : Type*} [AddCommMonoid M] [Module R M]
43+
variable {N : Type*} [AddCommMonoid N] [Module R N]
44+
variable {p : M →ₗ[R] N →ₗ[R] R} {s t : Set M} {y : N}
4045

4146
local notation3 "R≥0" => {c : R // 0 ≤ c}
4247

4348
set_option backward.isDefEq.respectTransparency false in
44-
variable (p s) in
49+
variable (p) in
4550
/-- The dual cone of a set `s` with respect to a bilinear pairing `p` is the cone consisting of all
4651
points `y` such that for all points `x ∈ s` we have `0 ≤ p x y`. -/
4752
def dual (s : Set M) : PointedCone R N where
@@ -57,11 +62,6 @@ def dual (s : Set M) : PointedCone R N where
5762
@[simp] lemma dual_singleton_zero : dual p {0} = ⊤ := dual_zero
5863
@[simp] lemma dual_ker : dual p (ker p) = ⊤ := by ext; simp +contextual
5964

60-
lemma dual_univ (hp : Injective p.flip) : dual p univ = 0 := by
61-
refine le_antisymm (fun y hy ↦ (_root_.map_eq_zero_iff p.flip hp).1 ?_) (by simp)
62-
ext x
63-
exact (hy <| mem_univ x).antisymm' <| by simpa using hy <| mem_univ (-x)
64-
6565
@[gcongr] lemma dual_anti (h : t ⊆ s) : dual p s ≤ dual p t := fun _y hy _x hx ↦ hy (h hx)
6666

6767
alias dual_le_dual := dual_anti
@@ -117,7 +117,7 @@ alias dual_span := dual_hull
117117
@[simp] lemma dual_sup (C D : PointedCone R M) : dual p (C ⊔ D : PointedCone R M) = dual p (C ∪ D)
118118
:= by simp [← dual_hull]
119119

120-
variable {M' : Type*} [AddCommGroup M'] [Module R M']
120+
variable {M' : Type*} [AddCommMonoid M'] [Module R M']
121121

122122
@[simp] lemma dual_image (s : Set M') (q : M' →ₗ[R] M) : dual p (q '' s) = dual (p.comp q) s :=
123123
by ext; simp
@@ -136,6 +136,25 @@ lemma dual_eq_comap_dual_eval (s : Set M) :
136136
dual p s = comap p.flip (dual (Module.Dual.eval R M) s) := by
137137
ext; simp
138138

139+
end CommSemiring
140+
141+
section CommRing
142+
143+
variable {R : Type*} [CommRing R] [PartialOrder R] [IsOrderedRing R]
144+
variable {M : Type*} [AddCommGroup M] [Module R M]
145+
variable {N : Type*} [AddCommMonoid N] [Module R N]
146+
variable {p : M →ₗ[R] N →ₗ[R] R}
147+
148+
lemma dual_univ (hp : Injective p.flip) : dual p univ = 0 := by
149+
refine le_antisymm (fun y hy ↦ (map_eq_zero_iff p.flip hp).1 ?_) (by simp)
150+
ext x
151+
exact (hy <| mem_univ x).antisymm' <| by simpa using hy <| mem_univ (-x)
152+
153+
variable {N : Type*} [AddCommGroup N] [Module R N]
154+
variable {p : M →ₗ[R] N →ₗ[R] R}
155+
139156
@[simp] lemma dual_neg {s : Set M} : dual p (-s) = -dual p s := by ext; simp
140157

158+
end CommRing
159+
141160
end PointedCone

0 commit comments

Comments
 (0)