File size: 6,102 Bytes
92416a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import Mathlib
import OAI.Computability.VertexCover.Reduction.PrivatePairProjectionRight

namespace OAI

section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
namespace VertexCover.LabelCover
open VertexCover.Restriction
open EnergyForm.Projection
open scoped BigOperators

noncomputable def otherWeightProjection (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) : (Φ.restrictionForm d).Projection :=
  product Φ.weightProjection Φ.weightProjection_commute (J.erase j).toList

theorem privateSeed_weight_commute (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j k : Fin d) (f : Φ.RestrictionSpace d) :
    Φ.privateSeedProjection J j (Φ.weightProjection k f) =
      Φ.weightProjection k (Φ.privateSeedProjection J j f) :=
  Φ.condition_weightProjection_commute (Φ.privateSeedKey J j) k f

theorem privateSeed_otherWeight_commute (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) (f : Φ.RestrictionSpace d) :
    Φ.privateSeedProjection J j (Φ.otherWeightProjection J j f) =
      Φ.otherWeightProjection J j (Φ.privateSeedProjection J j f) :=
  (productMap_commute Φ.weightProjection (Φ.privateSeedProjection J j)
    (fun k x => (Φ.privateSeed_weight_commute J j k x).symm) (J.erase j).toList f).symm

noncomputable def privateAverageProjection (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) : (Φ.restrictionForm d).Projection :=
  (Φ.privateSeedProjection J j).comp (Φ.otherWeightProjection J j)
    (Φ.privateSeed_otherWeight_commute J j)

theorem privateAverage_weight_commute (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j k : Fin d) (f : Φ.RestrictionSpace d) :
    Φ.privateAverageProjection J j (Φ.weightProjection k f) =
      Φ.weightProjection k (Φ.privateAverageProjection J j f) := by
  change Φ.privateSeedProjection J j
      (productMap Φ.weightProjection (J.erase j).toList (Φ.weightProjection k f)) = _
  rw [productMap_commute Φ.weightProjection (Φ.weightProjection k)
    (fun l => Φ.weightProjection_commute l k), Φ.privateSeed_weight_commute]
  rfl

noncomputable def privateProjection (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) : (Φ.restrictionForm d).Projection :=
  (Φ.weightProjection j).residual.comp (Φ.privateAverageProjection J j)
    (residual_commute _ _ (fun f => (Φ.privateAverage_weight_commute J j j f).symm))

theorem privateProjection_weight_commute (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j k : Fin d) (f : Φ.RestrictionSpace d) :
    Φ.privateProjection J j (Φ.weightProjection k f) =
      Φ.weightProjection k (Φ.privateProjection J j f) := by
  change (Φ.weightProjection j).residual
    (Φ.privateAverageProjection J j (Φ.weightProjection k f)) = _
  rw [Φ.privateAverage_weight_commute, residual_commute _ _ (Φ.weightProjection_commute j k)]
  rfl

theorem privateProjection_group_le (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) (f : Φ.RestrictionSpace d) :
    (Φ.restrictionForm d).energy (Φ.privateProjection J j (Φ.weightGroup j f)) ≤
      (Φ.restrictionForm d).energy (Φ.privateProjection J j f) :=
  finDifference_retained_le Φ.weightProjection Φ.weightProjection_commute
    (Φ.privateProjection J j) (fun k x => (Φ.privateProjection_weight_commute J j k x).symm) j f

theorem privateProjection_group_eq (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) (f : Φ.RestrictionSpace d) :
    Φ.privateProjection J j (Φ.weightGroup j f) =
      Φ.privateAverageProjection J j (Φ.weightGroup j f) := by
  change (Φ.weightProjection j).residual
    (Φ.privateAverageProjection J j (Φ.weightGroup j f)) = _
  rw [residual_commute _ _ (fun x => (Φ.privateAverage_weight_commute J j j x).symm),
    Φ.weightGroup_centered]

theorem privateAverage_loss_le (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) (f : Φ.RestrictionSpace d) :
    (Φ.restrictionForm d).energy ((Φ.privateAverageProjection J j).residual f) ≤
      (∑ k ∈ J.erase j, (Φ.restrictionForm d).energy ((Φ.weightProjection k).residual f)) +
      ∑ e : PositionPair d, (Φ.restrictionForm d).energy ((Φ.privatePairProjection J j e).residual f) := by
  have hc := comp_loss_le (Φ.privateSeedProjection J j) (Φ.otherWeightProjection J j)
    (Φ.privateSeed_otherWeight_commute J j) f
  have hw := product_loss_finset Φ.weightProjection Φ.weightProjection_commute (J.erase j) f
  have hs := residual_le_of_nested (Φ.privateSeedProjection J j)
    (product (Φ.privatePairProjection J j) (Φ.privatePairProjection_commute J j) Finset.univ.toList)
    (Φ.privateSeedProjection_product J j) f
  have hsp := product_loss_finset (Φ.privatePairProjection J j)
    (Φ.privatePairProjection_commute J j) Finset.univ f
  change (Φ.restrictionForm d).energy ((Φ.privateAverageProjection J j).residual f) ≤ _ at hc
  change (Φ.restrictionForm d).energy ((Φ.otherWeightProjection J j).residual f) ≤ _ at hw
  linarith

theorem privateProjection_group_lower (Φ : LabelCover) {d : ℕ}
    (J : Finset (Fin d)) (j : Fin d) (f : Φ.RestrictionSpace d) :
    (Φ.restrictionForm d).energy (Φ.weightGroup j f) ≤
      (Φ.restrictionForm d).energy (Φ.privateProjection J j f) +
      (∑ k ∈ J.erase j, (Φ.restrictionForm d).energy
        ((Φ.weightProjection k).residual (Φ.weightGroup j f))) +
      ∑ e : PositionPair d, (Φ.restrictionForm d).energy
        ((Φ.privatePairProjection J j e).residual (Φ.weightGroup j f)) := by
  have he := (Φ.privateAverageProjection J j).pythagoras (Φ.weightGroup j f)
  have hl := Φ.privateAverage_loss_le J j (Φ.weightGroup j f)
  have hr := Φ.privateProjection_group_le J j f
  rw [Φ.privateProjection_group_eq] at hr
  linarith

end VertexCover.LabelCover


end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end

end OAI