Buckets:
| import Mathlib | |
| import OAI.Analysis.MatrixSigning.Potential.Point | |
| namespace OAI | |
| open Matrix | |
| namespace CurrentKS.Variational | |
| noncomputable section | |
| open CurrentKS.Hermitian Matrix Set | |
| open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.Frobenius | |
| variable {d : ℕ} | |
| def pairCone (d : ℕ) : ConvexCone ℝ (H d × H d) where | |
| carrier := {z | z.1 ∈ psdCone d ∧ z.2 ∈ psdCone d} | |
| smul_mem' _ hr _ hz := ⟨psd_smul hz.1 hr.le, psd_smul hz.2 hr.le⟩ | |
| add_mem' _ hx _ hy := ⟨(psdCone d).add_mem hx.1 hy.1, (psdCone d).add_mem hx.2 hy.2⟩ | |
| @[simp] lemma mem_pairCone (z : H d × H d) : | |
| z ∈ pairCone d ↔ z.1 ∈ psdCone d ∧ z.2 ∈ psdCone d := Iff.rfl | |
| lemma isClosed_pairCone : IsClosed (pairCone d : Set (H d × H d)) := | |
| (isClosed_psdCone (d := d)).prod (isClosed_psdCone (d := d)) | |
| lemma feasible_iff_cone (S : H d) (η : H d →L[ℝ] H d) (z : Point d) : | |
| z ∈ feasible S η ↔ z ∈ domain d ∧ -residual S η z ∈ pairCone d := by | |
| simp only [feasible, mem_ofPred_eq, mem_pairCone, Prod.fst_neg, Prod.snd_neg] | |
| simp only [mem_psd_iff_nonneg, neg_nonneg] | |
| lemma continuousOn_residual (S : H d) (η : H d →L[ℝ] H d) : | |
| ContinuousOn (residual S η) (domain d) := by | |
| intro z hz | |
| have hiX : ContinuousAt (fun z : Point d => invH z.2.1) z := | |
| (continuousAt_invH hz.1).comp (f := fun w : Point d => w.2.1) (x := z) (by fun_prop) | |
| have hiY : ContinuousAt (fun z : Point d => invH z.2.2) z := | |
| (continuousAt_invH hz.2).comp (f := fun w : Point d => w.2.2) (x := z) (by fun_prop) | |
| have heX : ContinuousAt (fun z : Point d => η z.2.1) z := | |
| η.continuous.continuousAt.comp (f := fun w : Point d => w.2.1) (x := z) (by fun_prop) | |
| have heY : ContinuousAt (fun z : Point d => η z.2.2) z := | |
| η.continuous.continuousAt.comp (f := fun w : Point d => w.2.2) (x := z) (by fun_prop) | |
| exact (((hiX.add continuousAt_const).add heY).sub | |
| (continuousAt_fst.smul continuousAt_const)).prodMk | |
| (((hiY.sub continuousAt_const).add heX).sub | |
| (continuousAt_fst.smul continuousAt_const)) |>.continuousWithinAt | |
| theorem exists_minimizer [NeZero d] (S : H d) (η : H d →L[ℝ] H d) | |
| (hη : ∀ A ∈ psdCone d, η A ∈ psdCone d) | |
| {ε K : ℝ} (hε : 0 < ε) (hK : 0 < K) | |
| (hS₁ : -K • (Hermitian.one : H d) ≤ S) (hS₂ : S ≤ K • (Hermitian.one : H d)) | |
| (z₀ : Point d) (hz₀ : z₀ ∈ feasible S η) (hf₀ : objective ε z₀ ≤ K) : | |
| ∃ z ∈ feasible S η, objective ε z ≤ K ∧ | |
| ∀ w ∈ feasible S η, objective ε z ≤ objective ε w := by | |
| let B : Set (Point d) := Icc 0 K ×ˢ | |
| ({A : H d | (2*K)⁻¹ • (Hermitian.one : H d) ≤ A ∧ A ≤ (K/ε) • (Hermitian.one : H d)} ×ˢ | |
| {A : H d | (2*K)⁻¹ • (Hermitian.one : H d) ≤ A ∧ A ≤ (K/ε) • (Hermitian.one : H d)}) | |
| have hBc : IsCompact B := isCompact_Icc.prod | |
| ((isCompact_orderBox _ _).prod (isCompact_orderBox _ _)) | |
| have hBD : B ⊆ domain d := by | |
| intro z hz | |
| exact ⟨pd_of_lower (by positivity) hz.2.1.1, pd_of_lower (by positivity) hz.2.2.1⟩ | |
| let F : Point d → (H d × H d) × ℝ := fun z => (-residual S η z, objective ε z) | |
| have hFc : ContinuousOn F B := ((continuousOn_residual S η).mono hBD).neg.prodMk | |
| (continuous_objective ε).continuousOn | |
| let C : Set (Point d) := B ∩ F ⁻¹' ((pairCone d : Set (H d × H d)) ×ˢ Iic K) | |
| have hCc : IsClosed C := hFc.preimage_isClosed_of_isClosed hBc.isClosed | |
| (isClosed_pairCone.prod isClosed_Iic) | |
| have hCcompact : IsCompact C := hBc.of_isClosed_subset hCc inter_subset_left | |
| have hCm (z : Point d) : z ∈ C ↔ z ∈ B ∧ z ∈ feasible S η ∧ objective ε z ≤ K := by | |
| simp only [C, mem_inter_iff, mem_preimage, mem_prod, mem_Iic, F] | |
| constructor | |
| · rintro ⟨hz, hc, hf⟩ | |
| exact ⟨hz, (feasible_iff_cone S η z).mpr ⟨hBD hz, hc⟩, hf⟩ | |
| · rintro ⟨hz, hc, hf⟩ | |
| exact ⟨hz, ((feasible_iff_cone S η z).mp hc).2, hf⟩ | |
| have hnonempty : C.Nonempty := by | |
| refine ⟨z₀, (hCm z₀).mpr ⟨?_, hz₀, hf₀⟩⟩ | |
| exact sublevel_box S η hη hε hK hS₁ hS₂ hz₀ hf₀ | |
| obtain ⟨z, hz, hmin⟩ := hCcompact.exists_isMinOn hnonempty (continuous_objective ε).continuousOn | |
| have hzm := (hCm z).mp hz | |
| refine ⟨z, hzm.2.1, hzm.2.2, fun w hw => ?_⟩ | |
| by_cases hfw : objective ε w ≤ K | |
| · apply hmin | |
| exact (hCm w).mpr ⟨sublevel_box S η hη hε hK hS₁ hS₂ hw hfw, hw, hfw⟩ | |
| · exact hzm.2.2.trans (le_of_lt (lt_of_not_ge hfw)) | |
| end | |
| end CurrentKS.Variational | |
| end OAI | |
Xet Storage Details
- Size:
- 4.51 kB
- Xet hash:
- daa8cf10b8b8f2cfb8ee34bca94c62ff9c040311f67753dd5da16a005693feb1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.