analysis.convex.cone.dualMathlib.Analysis.Convex.Cone.InnerDual

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -214,8 +214,8 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
   · -- the rest of the proof is a straightforward calculation
     rintro x hxK
     specialize hinner _ (K.add_mem hxK hzK)
-    rwa [add_sub_cancel, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul, ← real_inner_smul_right,
-      neg_smul, one_smul, neg_sub] at hinner
+    rwa [add_sub_cancel_right, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul, ←
+      real_inner_smul_right, neg_smul, one_smul, neg_sub] at hinner
   · -- as `K` is closed and non-empty, it is pointed
     have hinner₀ := hinner 0 (K.pointed_of_nonempty_of_is_closed Ne hc)
     -- the rest of the proof is a straightforward calculation
Diff
@@ -132,7 +132,7 @@ theorem innerDualCone_iUnion {ι : Sort _} (f : ι → Set H) :
   by
   refine' le_antisymm (le_iInf fun i x hx y hy => hx _ <| mem_Union_of_mem _ hy) _
   intro x hx y hy
-  rw [ConvexCone.mem_iInf] at hx 
+  rw [ConvexCone.mem_iInf] at hx
   obtain ⟨j, hj⟩ := mem_Union.mp hy
   exact hx _ _ hj
 #align inner_dual_cone_Union innerDualCone_iUnion
@@ -215,11 +215,11 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
     rintro x hxK
     specialize hinner _ (K.add_mem hxK hzK)
     rwa [add_sub_cancel, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul, ← real_inner_smul_right,
-      neg_smul, one_smul, neg_sub] at hinner 
+      neg_smul, one_smul, neg_sub] at hinner
   · -- as `K` is closed and non-empty, it is pointed
     have hinner₀ := hinner 0 (K.pointed_of_nonempty_of_is_closed Ne hc)
     -- the rest of the proof is a straightforward calculation
-    rw [zero_sub, inner_neg_right, Right.neg_nonpos_iff] at hinner₀ 
+    rw [zero_sub, inner_neg_right, Right.neg_nonpos_iff] at hinner₀
     have hbz : b - z ≠ 0 := by rw [sub_ne_zero]; contrapose! hzK; rwa [← hzK]
     rw [← neg_zero, lt_neg, ← neg_one_mul, ← real_inner_smul_left, smul_sub, neg_smul, one_smul,
       neg_smul, neg_sub_neg, one_smul]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Alexander Bentkamp. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alexander Bentkamp
 -/
-import Mathbin.Analysis.Convex.Cone.Basic
-import Mathbin.Analysis.InnerProductSpace.Projection
+import Analysis.Convex.Cone.Basic
+import Analysis.InnerProductSpace.Projection
 
 #align_import analysis.convex.cone.dual from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Alexander Bentkamp. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alexander Bentkamp
-
-! This file was ported from Lean 3 source module analysis.convex.cone.dual
-! leanprover-community/mathlib commit f60c6087a7275b72d5db3c5a1d0e19e35a429c0a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.Convex.Cone.Basic
 import Mathbin.Analysis.InnerProductSpace.Projection
 
+#align_import analysis.convex.cone.dual from "leanprover-community/mathlib"@"f60c6087a7275b72d5db3c5a1d0e19e35a429c0a"
+
 /-!
 # Convex cones in inner product spaces
 
Diff
@@ -59,21 +59,27 @@ def Set.innerDualCone (s : Set H) : ConvexCone ℝ H
 #align set.inner_dual_cone Set.innerDualCone
 -/
 
+#print mem_innerDualCone /-
 @[simp]
 theorem mem_innerDualCone (y : H) (s : Set H) : y ∈ s.innerDualCone ↔ ∀ x ∈ s, 0 ≤ ⟪x, y⟫ :=
   Iff.rfl
 #align mem_inner_dual_cone mem_innerDualCone
+-/
 
+#print innerDualCone_empty /-
 @[simp]
 theorem innerDualCone_empty : (∅ : Set H).innerDualCone = ⊤ :=
   eq_top_iff.mpr fun x hy y => False.elim
 #align inner_dual_cone_empty innerDualCone_empty
+-/
 
+#print innerDualCone_zero /-
 /-- Dual cone of the convex cone {0} is the total space. -/
 @[simp]
 theorem innerDualCone_zero : (0 : Set H).innerDualCone = ⊤ :=
   eq_top_iff.mpr fun x hy y (hy : y = 0) => hy.symm ▸ (inner_zero_left _).ge
 #align inner_dual_cone_zero innerDualCone_zero
+-/
 
 #print innerDualCone_univ /-
 /-- Dual cone of the total space is the convex cone {0}. -/
@@ -88,32 +94,40 @@ theorem innerDualCone_univ : (univ : Set H).innerDualCone = 0 :=
 #align inner_dual_cone_univ innerDualCone_univ
 -/
 
+#print innerDualCone_le_innerDualCone /-
 theorem innerDualCone_le_innerDualCone (h : t ⊆ s) : s.innerDualCone ≤ t.innerDualCone :=
   fun y hy x hx => hy x (h hx)
 #align inner_dual_cone_le_inner_dual_cone innerDualCone_le_innerDualCone
+-/
 
 #print pointed_innerDualCone /-
 theorem pointed_innerDualCone : s.innerDualCone.Pointed := fun x hx => by rw [inner_zero_right]
 #align pointed_inner_dual_cone pointed_innerDualCone
 -/
 
+#print innerDualCone_singleton /-
 /-- The inner dual cone of a singleton is given by the preimage of the positive cone under the
 linear map `λ y, ⟪x, y⟫`. -/
 theorem innerDualCone_singleton (x : H) :
     ({x} : Set H).innerDualCone = (ConvexCone.positive ℝ ℝ).comap (innerₛₗ ℝ x) :=
   ConvexCone.ext fun i => forall_eq
 #align inner_dual_cone_singleton innerDualCone_singleton
+-/
 
+#print innerDualCone_union /-
 theorem innerDualCone_union (s t : Set H) :
     (s ∪ t).innerDualCone = s.innerDualCone ⊓ t.innerDualCone :=
   le_antisymm (le_inf (fun x hx y hy => hx _ <| Or.inl hy) fun x hx y hy => hx _ <| Or.inr hy)
     fun x hx y => Or.ndrec (hx.1 _) (hx.2 _)
 #align inner_dual_cone_union innerDualCone_union
+-/
 
+#print innerDualCone_insert /-
 theorem innerDualCone_insert (x : H) (s : Set H) :
     (insert x s).innerDualCone = Set.innerDualCone {x} ⊓ s.innerDualCone := by
   rw [insert_eq, innerDualCone_union]
 #align inner_dual_cone_insert innerDualCone_insert
+-/
 
 #print innerDualCone_iUnion /-
 theorem innerDualCone_iUnion {ι : Sort _} (f : ι → Set H) :
@@ -186,6 +200,7 @@ section CompleteSpace
 
 variable [CompleteSpace H]
 
+#print ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem /-
 /-- This is a stronger version of the Hahn-Banach separation theorem for closed convex cones. This
 is also the geometric interpretation of Farkas' lemma. -/
 theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : ConvexCone ℝ H)
@@ -218,6 +233,7 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
       _ = ⟪b - z, b - z + z⟫_ℝ := (inner_add_right _ _ _).symm
       _ = ⟪b - z, b⟫_ℝ := by rw [sub_add_cancel]
 #align convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem
+-/
 
 #print ConvexCone.innerDualCone_of_innerDualCone_eq_self /-
 /-- The inner dual of inner dual of a non-empty, closed convex cone is itself.  -/
Diff
@@ -217,7 +217,6 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
       _ ≤ ⟪b - z, b - z⟫_ℝ + ⟪b - z, z⟫_ℝ := (add_le_add rfl.ge hinner₀)
       _ = ⟪b - z, b - z + z⟫_ℝ := (inner_add_right _ _ _).symm
       _ = ⟪b - z, b⟫_ℝ := by rw [sub_add_cancel]
-      
 #align convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem
 
 #print ConvexCone.innerDualCone_of_innerDualCone_eq_self /-
Diff
@@ -49,7 +49,7 @@ open scoped RealInnerProductSpace
 all points `x` in a given set `0 ≤ ⟪ x, y ⟫`. -/
 def Set.innerDualCone (s : Set H) : ConvexCone ℝ H
     where
-  carrier := { y | ∀ x ∈ s, 0 ≤ ⟪x, y⟫ }
+  carrier := {y | ∀ x ∈ s, 0 ≤ ⟪x, y⟫}
   smul_mem' c hc y hy x hx := by
     rw [real_inner_smul_right]
     exact mul_nonneg hc.le (hy x hx)
Diff
@@ -121,7 +121,7 @@ theorem innerDualCone_iUnion {ι : Sort _} (f : ι → Set H) :
   by
   refine' le_antisymm (le_iInf fun i x hx y hy => hx _ <| mem_Union_of_mem _ hy) _
   intro x hx y hy
-  rw [ConvexCone.mem_iInf] at hx
+  rw [ConvexCone.mem_iInf] at hx 
   obtain ⟨j, hj⟩ := mem_Union.mp hy
   exact hx _ _ hj
 #align inner_dual_cone_Union innerDualCone_iUnion
@@ -203,11 +203,11 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
     rintro x hxK
     specialize hinner _ (K.add_mem hxK hzK)
     rwa [add_sub_cancel, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul, ← real_inner_smul_right,
-      neg_smul, one_smul, neg_sub] at hinner
+      neg_smul, one_smul, neg_sub] at hinner 
   · -- as `K` is closed and non-empty, it is pointed
     have hinner₀ := hinner 0 (K.pointed_of_nonempty_of_is_closed Ne hc)
     -- the rest of the proof is a straightforward calculation
-    rw [zero_sub, inner_neg_right, Right.neg_nonpos_iff] at hinner₀
+    rw [zero_sub, inner_neg_right, Right.neg_nonpos_iff] at hinner₀ 
     have hbz : b - z ≠ 0 := by rw [sub_ne_zero]; contrapose! hzK; rwa [← hzK]
     rw [← neg_zero, lt_neg, ← neg_one_mul, ← real_inner_smul_left, smul_sub, neg_smul, one_smul,
       neg_smul, neg_sub_neg, one_smul]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alexander Bentkamp
 
 ! This file was ported from Lean 3 source module analysis.convex.cone.dual
-! leanprover-community/mathlib commit 915591b2bb3ea303648db07284a161a7f2a9e3d4
+! leanprover-community/mathlib commit f60c6087a7275b72d5db3c5a1d0e19e35a429c0a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.InnerProductSpace.Projection
 /-!
 # Convex cones in inner product spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define `set.inner_dual_cone` to be the cone consisting of all points `y` such that for
 all points `x` in a given set `0 ≤ ⟪ x, y ⟫`.
 
Diff
@@ -28,7 +28,7 @@ We prove the following theorems:
 
 open Set LinearMap
 
-open Classical Pointwise
+open scoped Classical Pointwise
 
 variable {𝕜 E F G : Type _}
 
@@ -39,7 +39,7 @@ section Dual
 
 variable {H : Type _} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (s t : Set H)
 
-open RealInnerProductSpace
+open scoped RealInnerProductSpace
 
 #print Set.innerDualCone /-
 /-- The dual cone is the cone consisting of all points `y` such that for
Diff
@@ -56,25 +56,16 @@ def Set.innerDualCone (s : Set H) : ConvexCone ℝ H
 #align set.inner_dual_cone Set.innerDualCone
 -/
 
-/- warning: mem_inner_dual_cone -> mem_innerDualCone is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align mem_inner_dual_cone mem_innerDualConeₓ'. -/
 @[simp]
 theorem mem_innerDualCone (y : H) (s : Set H) : y ∈ s.innerDualCone ↔ ∀ x ∈ s, 0 ≤ ⟪x, y⟫ :=
   Iff.rfl
 #align mem_inner_dual_cone mem_innerDualCone
 
-/- warning: inner_dual_cone_empty -> innerDualCone_empty is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_dual_cone_empty innerDualCone_emptyₓ'. -/
 @[simp]
 theorem innerDualCone_empty : (∅ : Set H).innerDualCone = ⊤ :=
   eq_top_iff.mpr fun x hy y => False.elim
 #align inner_dual_cone_empty innerDualCone_empty
 
-/- warning: inner_dual_cone_zero -> innerDualCone_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_dual_cone_zero innerDualCone_zeroₓ'. -/
 /-- Dual cone of the convex cone {0} is the total space. -/
 @[simp]
 theorem innerDualCone_zero : (0 : Set H).innerDualCone = ⊤ :=
@@ -94,9 +85,6 @@ theorem innerDualCone_univ : (univ : Set H).innerDualCone = 0 :=
 #align inner_dual_cone_univ innerDualCone_univ
 -/
 
-/- warning: inner_dual_cone_le_inner_dual_cone -> innerDualCone_le_innerDualCone is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_dual_cone_le_inner_dual_cone innerDualCone_le_innerDualConeₓ'. -/
 theorem innerDualCone_le_innerDualCone (h : t ⊆ s) : s.innerDualCone ≤ t.innerDualCone :=
   fun y hy x hx => hy x (h hx)
 #align inner_dual_cone_le_inner_dual_cone innerDualCone_le_innerDualCone
@@ -106,9 +94,6 @@ theorem pointed_innerDualCone : s.innerDualCone.Pointed := fun x hx => by rw [in
 #align pointed_inner_dual_cone pointed_innerDualCone
 -/
 
-/- warning: inner_dual_cone_singleton -> innerDualCone_singleton is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_dual_cone_singleton innerDualCone_singletonₓ'. -/
 /-- The inner dual cone of a singleton is given by the preimage of the positive cone under the
 linear map `λ y, ⟪x, y⟫`. -/
 theorem innerDualCone_singleton (x : H) :
@@ -116,18 +101,12 @@ theorem innerDualCone_singleton (x : H) :
   ConvexCone.ext fun i => forall_eq
 #align inner_dual_cone_singleton innerDualCone_singleton
 
-/- warning: inner_dual_cone_union -> innerDualCone_union is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_dual_cone_union innerDualCone_unionₓ'. -/
 theorem innerDualCone_union (s t : Set H) :
     (s ∪ t).innerDualCone = s.innerDualCone ⊓ t.innerDualCone :=
   le_antisymm (le_inf (fun x hx y hy => hx _ <| Or.inl hy) fun x hx y hy => hx _ <| Or.inr hy)
     fun x hx y => Or.ndrec (hx.1 _) (hx.2 _)
 #align inner_dual_cone_union innerDualCone_union
 
-/- warning: inner_dual_cone_insert -> innerDualCone_insert is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_dual_cone_insert innerDualCone_insertₓ'. -/
 theorem innerDualCone_insert (x : H) (s : Set H) :
     (insert x s).innerDualCone = Set.innerDualCone {x} ⊓ s.innerDualCone := by
   rw [insert_eq, innerDualCone_union]
@@ -204,9 +183,6 @@ section CompleteSpace
 
 variable [CompleteSpace H]
 
-/- warning: convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem -> ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmemₓ'. -/
 /-- This is a stronger version of the Hahn-Banach separation theorem for closed convex cones. This
 is also the geometric interpretation of Farkas' lemma. -/
 theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : ConvexCone ℝ H)
Diff
@@ -229,10 +229,7 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
     have hinner₀ := hinner 0 (K.pointed_of_nonempty_of_is_closed Ne hc)
     -- the rest of the proof is a straightforward calculation
     rw [zero_sub, inner_neg_right, Right.neg_nonpos_iff] at hinner₀
-    have hbz : b - z ≠ 0 := by
-      rw [sub_ne_zero]
-      contrapose! hzK
-      rwa [← hzK]
+    have hbz : b - z ≠ 0 := by rw [sub_ne_zero]; contrapose! hzK; rwa [← hzK]
     rw [← neg_zero, lt_neg, ← neg_one_mul, ← real_inner_smul_left, smul_sub, neg_smul, one_smul,
       neg_smul, neg_sub_neg, one_smul]
     calc
Diff
@@ -41,6 +41,7 @@ variable {H : Type _} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (s t : Se
 
 open RealInnerProductSpace
 
+#print Set.innerDualCone /-
 /-- The dual cone is the cone consisting of all points `y` such that for
 all points `x` in a given set `0 ≤ ⟪ x, y ⟫`. -/
 def Set.innerDualCone (s : Set H) : ConvexCone ℝ H
@@ -53,23 +54,34 @@ def Set.innerDualCone (s : Set H) : ConvexCone ℝ H
     rw [inner_add_right]
     exact add_nonneg (hu x hx) (hv x hx)
 #align set.inner_dual_cone Set.innerDualCone
+-/
 
+/- warning: mem_inner_dual_cone -> mem_innerDualCone is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align mem_inner_dual_cone mem_innerDualConeₓ'. -/
 @[simp]
 theorem mem_innerDualCone (y : H) (s : Set H) : y ∈ s.innerDualCone ↔ ∀ x ∈ s, 0 ≤ ⟪x, y⟫ :=
   Iff.rfl
 #align mem_inner_dual_cone mem_innerDualCone
 
+/- warning: inner_dual_cone_empty -> innerDualCone_empty is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_dual_cone_empty innerDualCone_emptyₓ'. -/
 @[simp]
 theorem innerDualCone_empty : (∅ : Set H).innerDualCone = ⊤ :=
   eq_top_iff.mpr fun x hy y => False.elim
 #align inner_dual_cone_empty innerDualCone_empty
 
+/- warning: inner_dual_cone_zero -> innerDualCone_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_dual_cone_zero innerDualCone_zeroₓ'. -/
 /-- Dual cone of the convex cone {0} is the total space. -/
 @[simp]
 theorem innerDualCone_zero : (0 : Set H).innerDualCone = ⊤ :=
   eq_top_iff.mpr fun x hy y (hy : y = 0) => hy.symm ▸ (inner_zero_left _).ge
 #align inner_dual_cone_zero innerDualCone_zero
 
+#print innerDualCone_univ /-
 /-- Dual cone of the total space is the convex cone {0}. -/
 @[simp]
 theorem innerDualCone_univ : (univ : Set H).innerDualCone = 0 :=
@@ -80,14 +92,23 @@ theorem innerDualCone_univ : (univ : Set H).innerDualCone = 0 :=
     exact eq_singleton_iff_unique_mem.mpr ⟨fun x hx => (inner_zero_right _).ge, this⟩
   exact fun x hx => by simpa [← real_inner_self_nonpos] using hx (-x) (mem_univ _)
 #align inner_dual_cone_univ innerDualCone_univ
+-/
 
+/- warning: inner_dual_cone_le_inner_dual_cone -> innerDualCone_le_innerDualCone is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_dual_cone_le_inner_dual_cone innerDualCone_le_innerDualConeₓ'. -/
 theorem innerDualCone_le_innerDualCone (h : t ⊆ s) : s.innerDualCone ≤ t.innerDualCone :=
   fun y hy x hx => hy x (h hx)
 #align inner_dual_cone_le_inner_dual_cone innerDualCone_le_innerDualCone
 
+#print pointed_innerDualCone /-
 theorem pointed_innerDualCone : s.innerDualCone.Pointed := fun x hx => by rw [inner_zero_right]
 #align pointed_inner_dual_cone pointed_innerDualCone
+-/
 
+/- warning: inner_dual_cone_singleton -> innerDualCone_singleton is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_dual_cone_singleton innerDualCone_singletonₓ'. -/
 /-- The inner dual cone of a singleton is given by the preimage of the positive cone under the
 linear map `λ y, ⟪x, y⟫`. -/
 theorem innerDualCone_singleton (x : H) :
@@ -95,17 +116,24 @@ theorem innerDualCone_singleton (x : H) :
   ConvexCone.ext fun i => forall_eq
 #align inner_dual_cone_singleton innerDualCone_singleton
 
+/- warning: inner_dual_cone_union -> innerDualCone_union is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_dual_cone_union innerDualCone_unionₓ'. -/
 theorem innerDualCone_union (s t : Set H) :
     (s ∪ t).innerDualCone = s.innerDualCone ⊓ t.innerDualCone :=
   le_antisymm (le_inf (fun x hx y hy => hx _ <| Or.inl hy) fun x hx y hy => hx _ <| Or.inr hy)
     fun x hx y => Or.ndrec (hx.1 _) (hx.2 _)
 #align inner_dual_cone_union innerDualCone_union
 
+/- warning: inner_dual_cone_insert -> innerDualCone_insert is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_dual_cone_insert innerDualCone_insertₓ'. -/
 theorem innerDualCone_insert (x : H) (s : Set H) :
     (insert x s).innerDualCone = Set.innerDualCone {x} ⊓ s.innerDualCone := by
   rw [insert_eq, innerDualCone_union]
 #align inner_dual_cone_insert innerDualCone_insert
 
+#print innerDualCone_iUnion /-
 theorem innerDualCone_iUnion {ι : Sort _} (f : ι → Set H) :
     (⋃ i, f i).innerDualCone = ⨅ i, (f i).innerDualCone :=
   by
@@ -115,18 +143,24 @@ theorem innerDualCone_iUnion {ι : Sort _} (f : ι → Set H) :
   obtain ⟨j, hj⟩ := mem_Union.mp hy
   exact hx _ _ hj
 #align inner_dual_cone_Union innerDualCone_iUnion
+-/
 
+#print innerDualCone_sUnion /-
 theorem innerDualCone_sUnion (S : Set (Set H)) :
     (⋃₀ S).innerDualCone = sInf (Set.innerDualCone '' S) := by
   simp_rw [sInf_image, sUnion_eq_bUnion, innerDualCone_iUnion]
 #align inner_dual_cone_sUnion innerDualCone_sUnion
+-/
 
+#print innerDualCone_eq_iInter_innerDualCone_singleton /-
 /-- The dual cone of `s` equals the intersection of dual cones of the points in `s`. -/
 theorem innerDualCone_eq_iInter_innerDualCone_singleton :
     (s.innerDualCone : Set H) = ⋂ i : s, (({i} : Set H).innerDualCone : Set H) := by
   rw [← ConvexCone.coe_iInf, ← innerDualCone_iUnion, Union_of_singleton_coe]
 #align inner_dual_cone_eq_Inter_inner_dual_cone_singleton innerDualCone_eq_iInter_innerDualCone_singleton
+-/
 
+#print isClosed_innerDualCone /-
 theorem isClosed_innerDualCone : IsClosed (s.innerDualCone : Set H) :=
   by
   -- reduce the problem to showing that dual cone of a singleton `{x}` is closed
@@ -140,7 +174,9 @@ theorem isClosed_innerDualCone : IsClosed (s.innerDualCone : Set H) :=
   rw [h]
   exact is_closed_Ici.preimage (by continuity)
 #align is_closed_inner_dual_cone isClosed_innerDualCone
+-/
 
+#print ConvexCone.pointed_of_nonempty_of_isClosed /-
 theorem ConvexCone.pointed_of_nonempty_of_isClosed (K : ConvexCone ℝ H) (ne : (K : Set H).Nonempty)
     (hc : IsClosed (K : Set H)) : K.Pointed :=
   by
@@ -162,11 +198,15 @@ theorem ConvexCone.pointed_of_nonempty_of_isClosed (K : ConvexCone ℝ H) (ne :
   have f₀ : f 0 = 0 := zero_smul ℝ x
   simpa only [f₀, ConvexCone.Pointed, ← SetLike.mem_coe] using mem_of_subset_of_mem clf mem₀
 #align convex_cone.pointed_of_nonempty_of_is_closed ConvexCone.pointed_of_nonempty_of_isClosed
+-/
 
 section CompleteSpace
 
 variable [CompleteSpace H]
 
+/- warning: convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem -> ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmemₓ'. -/
 /-- This is a stronger version of the Hahn-Banach separation theorem for closed convex cones. This
 is also the geometric interpretation of Farkas' lemma. -/
 theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : ConvexCone ℝ H)
@@ -204,6 +244,7 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
       
 #align convex_cone.hyperplane_separation_of_nonempty_of_is_closed_of_nmem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem
 
+#print ConvexCone.innerDualCone_of_innerDualCone_eq_self /-
 /-- The inner dual of inner dual of a non-empty, closed convex cone is itself.  -/
 theorem ConvexCone.innerDualCone_of_innerDualCone_eq_self (K : ConvexCone ℝ H)
     (ne : (K : Set H).Nonempty) (hc : IsClosed (K : Set H)) :
@@ -218,6 +259,7 @@ theorem ConvexCone.innerDualCone_of_innerDualCone_eq_self (K : ConvexCone ℝ H)
     specialize h x hxK
     rwa [real_inner_comm]
 #align convex_cone.inner_dual_cone_of_inner_dual_cone_eq_self ConvexCone.innerDualCone_of_innerDualCone_eq_self
+-/
 
 end CompleteSpace
 

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -195,7 +195,7 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
     calc
       0 < ⟪b - z, b - z⟫_ℝ := lt_of_not_le ((Iff.not real_inner_self_nonpos).2 hbz)
       _ = ⟪b - z, b - z⟫_ℝ + 0 := (add_zero _).symm
-      _ ≤ ⟪b - z, b - z⟫_ℝ + ⟪b - z, z⟫_ℝ := (add_le_add rfl.ge hinner₀)
+      _ ≤ ⟪b - z, b - z⟫_ℝ + ⟪b - z, z⟫_ℝ := add_le_add rfl.ge hinner₀
       _ = ⟪b - z, b - z + z⟫_ℝ := (inner_add_right _ _ _).symm
       _ = ⟪b - z, b⟫_ℝ := by rw [sub_add_cancel]
 
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -180,8 +180,8 @@ theorem ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem (K : Co
   · -- the rest of the proof is a straightforward calculation
     rintro x hxK
     specialize hinner _ (K.add_mem hxK hzK)
-    rwa [add_sub_cancel, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul, ← real_inner_smul_right,
-      neg_smul, one_smul, neg_sub] at hinner
+    rwa [add_sub_cancel_right, real_inner_comm, ← neg_nonneg, neg_eq_neg_one_mul,
+      ← real_inner_smul_right, neg_smul, one_smul, neg_sub] at hinner
   · -- as `K` is closed and non-empty, it is pointed
     have hinner₀ := hinner 0 (K.pointed_of_nonempty_of_isClosed ne hc)
     -- the rest of the proof is a straightforward calculation
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -31,7 +31,8 @@ We prove the following theorems:
 
 open Set LinearMap
 
-open Classical Pointwise
+open scoped Classical
+open Pointwise
 
 variable {𝕜 E F G : Type*}
 
chore: split Analysis.Convex.Cone.Basic (#8357)

Splits Mathlib.Analysis.Convex.Cone.Basic, to move Riesz extension and Hahn-Banach out of the basic file about definitions.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -19,10 +19,16 @@ all points `x` in a given set `0 ≤ ⟪ x, y ⟫`.
 We prove the following theorems:
 * `ConvexCone.innerDualCone_of_innerDualCone_eq_self`:
   The `innerDualCone` of the `innerDualCone` of a nonempty, closed, convex cone is itself.
-
+* `ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem`:
+  This variant of the
+  [hyperplane separation theorem](https://en.wikipedia.org/wiki/Hyperplane_separation_theorem)
+  states that given a nonempty, closed, convex cone `K` in a complete, real inner product space `H`
+  and a point `b` disjoint from it, there is a vector `y` which separates `b` from `K` in the sense
+  that for all points `x` in `K`, `0 ≤ ⟪x, y⟫_ℝ` and `⟪y, b⟫_ℝ < 0`. This is also a geometric
+  interpretation of the
+  [Farkas lemma](https://en.wikipedia.org/wiki/Farkas%27_lemma#Geometric_interpretation).
 -/
 
-
 open Set LinearMap
 
 open Classical Pointwise
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -27,14 +27,14 @@ open Set LinearMap
 
 open Classical Pointwise
 
-variable {𝕜 E F G : Type _}
+variable {𝕜 E F G : Type*}
 
 /-! ### The dual cone -/
 
 
 section Dual
 
-variable {H : Type _} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (s t : Set H)
+variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (s t : Set H)
 
 open RealInnerProductSpace
 
@@ -100,7 +100,7 @@ theorem innerDualCone_insert (x : H) (s : Set H) :
   rw [insert_eq, innerDualCone_union]
 #align inner_dual_cone_insert innerDualCone_insert
 
-theorem innerDualCone_iUnion {ι : Sort _} (f : ι → Set H) :
+theorem innerDualCone_iUnion {ι : Sort*} (f : ι → Set H) :
     (⋃ i, f i).innerDualCone = ⨅ i, (f i).innerDualCone := by
   refine' le_antisymm (le_iInf fun i x hx y hy => hx _ <| mem_iUnion_of_mem _ hy) _
   intro x hx y hy
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Alexander Bentkamp. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Alexander Bentkamp
-
-! This file was ported from Lean 3 source module analysis.convex.cone.dual
-! leanprover-community/mathlib commit 915591b2bb3ea303648db07284a161a7f2a9e3d4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.Convex.Cone.Basic
 import Mathlib.Analysis.InnerProductSpace.Projection
 
+#align_import analysis.convex.cone.dual from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4"
+
 /-!
 # Convex cones in inner product spaces
 
chore: convert lambda in docs to fun (#5045)

Found with git grep -n "λ [a-zA-Z_ ]*,"

Diff
@@ -86,7 +86,7 @@ theorem pointed_innerDualCone : s.innerDualCone.Pointed := fun x _ => by rw [inn
 #align pointed_inner_dual_cone pointed_innerDualCone
 
 /-- The inner dual cone of a singleton is given by the preimage of the positive cone under the
-linear map `λ y, ⟪x, y⟫`. -/
+linear map `fun y ↦ ⟪x, y⟫`. -/
 theorem innerDualCone_singleton (x : H) :
     ({x} : Set H).innerDualCone = (ConvexCone.positive ℝ ℝ).comap (innerₛₗ ℝ x) :=
   ConvexCone.ext fun _ => forall_eq
feat: port Analysis.Convex.Cone.Dual (#4410)

Dependencies 12 + 869

870 files ported (98.6%)
386950 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file