url
stringclasses 147
values | commit
stringclasses 147
values | file_path
stringlengths 7
101
| full_name
stringlengths 1
94
| start
stringlengths 6
10
| end
stringlengths 6
11
| tactic
stringlengths 1
11.2k
| state_before
stringlengths 3
2.09M
| state_after
stringlengths 6
2.09M
|
---|---|---|---|---|---|---|---|---|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
simp [fittingSphereT, fittingSphereConvex, optimal, feasible] at h_opt ⊢
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt : (fittingSphereConvex n m x).optimal (c, t)
⊢ (fittingSphereT n m x).optimal (c, t)
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
⊢ 0 ≤ t + ‖c‖ ^ 2 ∧
∀ (a : Fin n → ℝ) (b : ℝ),
0 ≤ b + ‖a‖ ^ 2 →
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
constructor
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
⊢ 0 ≤ t + ‖c‖ ^ 2 ∧
∀ (a : Fin n → ℝ) (b : ℝ),
0 ≤ b + ‖a‖ ^ 2 →
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
⊢ 0 ≤ t + ‖c‖ ^ 2
case right
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
⊢ ∀ (a : Fin n → ℝ) (b : ℝ),
0 ≤ b + ‖a‖ ^ 2 →
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
let a := Vec.norm x ^ 2 - 2 * mulVec x c
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
⊢ 0 ≤ t + ‖c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
⊢ 0 ≤ t + ‖c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
have h_ls : optimal (leastSquaresVec a) t := by
refine ⟨trivial, ?_⟩
intros y _
simp [objFun, leastSquaresVec]
exact h_opt c y
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
⊢ 0 ≤ t + ‖c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
⊢ 0 ≤ t + ‖c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
have h_t_eq := leastSquaresVec_optimal_eq_mean hm a t h_ls
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
⊢ 0 ≤ t + ‖c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
⊢ 0 ≤ t + ‖c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
have h_c2_eq : ‖c‖ ^ 2 = (1 / m) * ∑ i : Fin m, ‖c‖ ^ 2 := by
simp [sum_const]
field_simp
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
⊢ 0 ≤ t + ‖c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ 0 ≤ t + ‖c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
have h_t_add_c2_eq : t + ‖c‖ ^ 2 = (1 / m) * ∑ i, ‖(x i) - c‖ ^ 2 := by
rw [h_t_eq]; dsimp [mean]
rw [h_c2_eq, mul_sum, mul_sum, mul_sum, ← sum_add_distrib]
congr; funext i; rw [← mul_add]
congr; simp [Vec.norm]
rw [norm_sub_sq (𝕜 := ℝ) (E := Fin n → ℝ)]
simp [a]; congr
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ 0 ≤ t + ‖c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ t + ‖c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
rw [← rpow_two, h_t_add_c2_eq]
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ t + ‖c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
apply mul_nonneg (by norm_num)
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ ∑ i : Fin m, ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
apply sum_nonneg
|
case left
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ ∑ i : Fin m, ‖x i - c‖ ^ 2
|
case left.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ ∀ i ∈ univ, 0 ≤ ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
intros i _
|
case left.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ ∀ i ∈ univ, 0 ≤ ‖x i - c‖ ^ 2
|
case left.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
i : Fin m
a✝ : i ∈ univ
⊢ 0 ≤ ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
exact sq_nonneg _
|
case left.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
i : Fin m
a✝ : i ∈ univ
⊢ 0 ≤ ‖x i - c‖ ^ 2
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
refine ⟨trivial, ?_⟩
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
⊢ (leastSquaresVec a).optimal t
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
⊢ ∀ (y : ℝ), (leastSquaresVec a).feasible y → (leastSquaresVec a).objFun t ≤ (leastSquaresVec a).objFun y
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
intros y _
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
⊢ ∀ (y : ℝ), (leastSquaresVec a).feasible y → (leastSquaresVec a).objFun t ≤ (leastSquaresVec a).objFun y
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
y : ℝ
a✝ : (leastSquaresVec a).feasible y
⊢ (leastSquaresVec a).objFun t ≤ (leastSquaresVec a).objFun y
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
simp [objFun, leastSquaresVec]
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
y : ℝ
a✝ : (leastSquaresVec a).feasible y
⊢ (leastSquaresVec a).objFun t ≤ (leastSquaresVec a).objFun y
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
y : ℝ
a✝ : (leastSquaresVec a).feasible y
⊢ Vec.sum ((a - Vec.const m t) ^ 2) ≤ Vec.sum ((a - Vec.const m y) ^ 2)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
exact h_opt c y
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
y : ℝ
a✝ : (leastSquaresVec a).feasible y
⊢ Vec.sum ((a - Vec.const m t) ^ 2) ≤ Vec.sum ((a - Vec.const m y) ^ 2)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
simp [sum_const]
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
⊢ ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
⊢ ‖c‖ ^ 2 = (↑m)⁻¹ * (↑m * ‖c‖ ^ 2)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
field_simp
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
⊢ ‖c‖ ^ 2 = (↑m)⁻¹ * (↑m * ‖c‖ ^ 2)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
rw [h_t_eq]
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ mean a + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
dsimp [mean]
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ mean a + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ 1 / ↑m * ∑ i : Fin m, a i + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
rw [h_c2_eq, mul_sum, mul_sum, mul_sum, ← sum_add_distrib]
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ 1 / ↑m * ∑ i : Fin m, a i + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ ∑ x : Fin m, (1 / ↑m * a x + 1 / ↑m * ‖c‖ ^ 2) = ∑ i : Fin m, 1 / ↑m * ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
congr
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ ∑ x : Fin m, (1 / ↑m * a x + 1 / ↑m * ‖c‖ ^ 2) = ∑ i : Fin m, 1 / ↑m * ‖x i - c‖ ^ 2
|
case e_f
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ (fun x => 1 / ↑m * a x + 1 / ↑m * ‖c‖ ^ 2) = fun i => 1 / ↑m * ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
funext i
|
case e_f
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
⊢ (fun x => 1 / ↑m * a x + 1 / ↑m * ‖c‖ ^ 2) = fun i => 1 / ↑m * ‖x i - c‖ ^ 2
|
case e_f.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ 1 / ↑m * a i + 1 / ↑m * ‖c‖ ^ 2 = 1 / ↑m * ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
rw [← mul_add]
|
case e_f.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ 1 / ↑m * a i + 1 / ↑m * ‖c‖ ^ 2 = 1 / ↑m * ‖x i - c‖ ^ 2
|
case e_f.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ 1 / ↑m * (a i + ‖c‖ ^ 2) = 1 / ↑m * ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
congr
|
case e_f.h
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ 1 / ↑m * (a i + ‖c‖ ^ 2) = 1 / ↑m * ‖x i - c‖ ^ 2
|
case e_f.h.e_a
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ a i + ‖c‖ ^ 2 = ‖x i - c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
rw [norm_sub_sq (𝕜 := ℝ) (E := Fin n → ℝ)]
|
case e_f.h.e_a
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ a i + ‖c‖ ^ 2 = ‖x i - c‖ ^ 2
|
case e_f.h.e_a
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ a i + ‖c‖ ^ 2 = ‖x i‖ ^ 2 - 2 * RCLike.re ⟪x i, c⟫_ℝ + ‖c‖ ^ 2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
simp [a]
|
case e_f.h.e_a
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ a i + ‖c‖ ^ 2 = ‖x i‖ ^ 2 - 2 * RCLike.re ⟪x i, c⟫_ℝ + ‖c‖ ^ 2
|
case e_f.h.e_a
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ Vec.norm x i ^ 2 - 2 * (x *ᵥ c) i = ‖x i‖ ^ 2 - 2 * ⟪x i, c⟫_ℝ
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
congr
|
case e_f.h.e_a
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
i : Fin m
⊢ Vec.norm x i ^ 2 - 2 * (x *ᵥ c) i = ‖x i‖ ^ 2 - 2 * ⟪x i, c⟫_ℝ
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
norm_num
|
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
a : Fin m → ℝ := Vec.norm x ^ 2 - 2 * x *ᵥ c
h_ls : (leastSquaresVec a).optimal t
h_t_eq : t = mean a
h_c2_eq : ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖c‖ ^ 2
h_t_add_c2_eq : t + ‖c‖ ^ 2 = 1 / ↑m * ∑ i : Fin m, ‖x i - c‖ ^ 2
⊢ 0 ≤ 1 / ↑m
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
intros c' x' _
|
case right
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
⊢ ∀ (a : Fin n → ℝ) (b : ℝ),
0 ≤ b + ‖a‖ ^ 2 →
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
|
case right
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
c' : Fin n → ℝ
x' : ℝ
a✝ : 0 ≤ x' + ‖c'‖ ^ 2
⊢ Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c' - Vec.const m x') ^ 2)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/FittingSphere.lean
|
FittingSphere.optimal_convex_implies_optimal_t
|
[157, 1]
|
[191, 22]
|
exact h_opt c' x'
|
case right
n m : ℕ
x : Fin m → Fin n → ℝ
hm : 0 < m
c : Fin n → ℝ
t : ℝ
h_opt :
∀ (a : Fin n → ℝ) (b : ℝ),
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ a - Vec.const m b) ^ 2)
c' : Fin n → ℝ
x' : ℝ
a✝ : 0 ≤ x' + ‖c'‖ ^ 2
⊢ Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c - Vec.const m t) ^ 2) ≤
Vec.sum ((Vec.norm x ^ 2 - 2 * x *ᵥ c' - Vec.const m x') ^ 2)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.aₚ_nonneg
|
[45, 1]
|
[47, 22]
|
unfold aₚ
|
a b : ℝ
⊢ 0 ≤ aₚ
|
a b : ℝ
⊢ 0 ≤ 5e-2
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.aₚ_nonneg
|
[45, 1]
|
[47, 22]
|
norm_num
|
a b : ℝ
⊢ 0 ≤ 5e-2
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.bₚ_nonneg
|
[52, 1]
|
[53, 22]
|
unfold bₚ
|
a b : ℝ
⊢ 0 ≤ bₚ
|
a b : ℝ
⊢ 0 ≤ 0.65
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.bₚ_nonneg
|
[52, 1]
|
[53, 22]
|
norm_num
|
a b : ℝ
⊢ 0 ≤ 0.65
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.bₚ_lt_one
|
[55, 1]
|
[56, 22]
|
unfold bₚ
|
a b : ℝ
⊢ bₚ < 1
|
a b : ℝ
⊢ 0.65 < 1
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.bₚ_lt_one
|
[55, 1]
|
[56, 22]
|
norm_num
|
a b : ℝ
⊢ 0.65 < 1
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.one_sub_bₚ_nonneg
|
[58, 1]
|
[60, 22]
|
unfold bₚ
|
a b : ℝ
⊢ 0 ≤ 1 - bₚ
|
a b : ℝ
⊢ 0 ≤ 1 - 0.65
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Examples/HypersonicShapeDesign.lean
|
HypersonicShapeDesign.one_sub_bₚ_nonneg
|
[58, 1]
|
[60, 22]
|
norm_num
|
a b : ℝ
⊢ 0 ≤ 1 - 0.65
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
classical
calc 1 + (∏ i, f i)
= (∏ _a : n, 1 : ℝ) * ∏ a : n in univ \ univ, f a
+ (∏ a : n in ∅, 1) * ∏ a : n in univ \ ∅, f a := by
{ simp }
_ = ∑ x in {univ, ∅}, (∏ _a : n in x, 1 : ℝ) * ∏ a : n in univ \ x, f a := by
{ rw [Finset.sum_pair]; simp; exact Finset.univ_nonempty.ne_empty }
_ ≤ ∑ t : Finset n, (∏ _a : n in t, 1 : ℝ) * ∏ a : n in univ \ t, f a := by
{ convert @Finset.sum_le_univ_sum_of_nonneg (Finset n) ℝ _ _ _ _ _
simp [hf, prod_nonneg] }
_ = ∏ i, (1 + f i) := by
{ rw [prod_add, powerset_univ] }
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ 1 + ∏ i : n, f i ≤ ∏ i : n, (1 + f i)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
calc 1 + (∏ i, f i)
= (∏ _a : n, 1 : ℝ) * ∏ a : n in univ \ univ, f a
+ (∏ a : n in ∅, 1) * ∏ a : n in univ \ ∅, f a := by
{ simp }
_ = ∑ x in {univ, ∅}, (∏ _a : n in x, 1 : ℝ) * ∏ a : n in univ \ x, f a := by
{ rw [Finset.sum_pair]; simp; exact Finset.univ_nonempty.ne_empty }
_ ≤ ∑ t : Finset n, (∏ _a : n in t, 1 : ℝ) * ∏ a : n in univ \ t, f a := by
{ convert @Finset.sum_le_univ_sum_of_nonneg (Finset n) ℝ _ _ _ _ _
simp [hf, prod_nonneg] }
_ = ∏ i, (1 + f i) := by
{ rw [prod_add, powerset_univ] }
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ 1 + ∏ i : n, f i ≤ ∏ i : n, (1 + f i)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
simp
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ 1 + ∏ i : n, f i = (∏ _a : n, 1) * ∏ a ∈ univ \ univ, f a + (∏ a ∈ ∅, 1) * ∏ a ∈ univ \ ∅, f a
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
rw [Finset.sum_pair]
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ (∏ _a : n, 1) * ∏ a ∈ univ \ univ, f a + (∏ a ∈ ∅, 1) * ∏ a ∈ univ \ ∅, f a =
∑ x ∈ {univ, ∅}, (∏ _a ∈ x, 1) * ∏ a ∈ univ \ x, f a
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ univ ≠ ∅
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
simp
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ univ ≠ ∅
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ ¬univ = ∅
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
exact Finset.univ_nonempty.ne_empty
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ ¬univ = ∅
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
convert @Finset.sum_le_univ_sum_of_nonneg (Finset n) ℝ _ _ _ _ _
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ ∑ x ∈ {univ, ∅}, (∏ _a ∈ x, 1) * ∏ a ∈ univ \ x, f a ≤ ∑ t : Finset n, (∏ _a ∈ t, 1) * ∏ a ∈ univ \ t, f a
|
case convert_3
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ ∀ (x : Finset n), 0 ≤ (∏ _a ∈ x, 1) * ∏ a ∈ univ \ x, f a
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
simp [hf, prod_nonneg]
|
case convert_3
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ ∀ (x : Finset n), 0 ≤ (∏ _a ∈ x, 1) * ∏ a ∈ univ \ x, f a
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Finset.one_add_prod_le_prod_one_add
|
[19, 1]
|
[32, 37]
|
rw [prod_add, powerset_univ]
|
n : Type u_1
inst✝¹ : Fintype n
inst✝ : Nonempty n
f : n → ℝ
hf : ∀ (i : n), 0 ≤ f i
⊢ ∑ t : Finset n, (∏ _a ∈ t, 1) * ∏ a ∈ univ \ t, f a = ∏ i : n, (1 + f i)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.IsHermitian.eigenvectorMatrix_inv_mul
|
[46, 1]
|
[47, 41]
|
apply Basis.toMatrix_mul_toMatrix_flip
|
n : Type u_1
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq n
inst✝³ : LinearOrder n
inst✝² : LocallyFiniteOrderBot n
𝕜 : Type u_2
inst✝¹ : DecidableEq 𝕜
inst✝ : RCLike 𝕜
A : Matrix n n 𝕜
hA : A.IsHermitian
⊢ hA.eigenvectorMatrixInv * hA.eigenvectorMatrix = 1
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.IsHermitian.spectral_theorem''
|
[50, 1]
|
[54, 67]
|
rw [conjTranspose_eigenvectorMatrix, Matrix.mul_assoc, ← spectral_theorem,
← Matrix.mul_assoc, eigenvectorMatrix_mul_inv, Matrix.one_mul]
|
n : Type u_1
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq n
inst✝³ : LinearOrder n
inst✝² : LocallyFiniteOrderBot n
𝕜 : Type u_2
inst✝¹ : DecidableEq 𝕜
inst✝ : RCLike 𝕜
A : Matrix n n 𝕜
hA : A.IsHermitian
⊢ hA.eigenvectorMatrix * diagonal (RCLike.ofReal ∘ hA.eigenvalues) * hA.eigenvectorMatrix.conjTranspose = A
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.sqrt_mul_sqrt
|
[63, 1]
|
[78, 11]
|
simp [IsHermitian.sqrt, Matrix.mul_assoc]
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
⊢ ⋯.sqrt * ⋯.sqrt =
⋯.eigenvectorMatrix *
((diagonal fun i => (⋯.eigenvalues i).sqrt) * (⋯.eigenvectorMatrix.transpose * ⋯.eigenvectorMatrix) *
diagonal fun i => (⋯.eigenvalues i).sqrt) *
⋯.eigenvectorMatrix.transpose
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.sqrt_mul_sqrt
|
[63, 1]
|
[78, 11]
|
rw [← conjTranspose_eq_transpose, hA.1.conjTranspose_eigenvectorMatrix,
hA.1.eigenvectorMatrix_inv_mul, Matrix.mul_one, diagonal_mul_diagonal,
← hA.1.conjTranspose_eigenvectorMatrix]
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
⊢ ⋯.eigenvectorMatrix *
((diagonal fun i => (⋯.eigenvalues i).sqrt) * (⋯.eigenvectorMatrix.transpose * ⋯.eigenvectorMatrix) *
diagonal fun i => (⋯.eigenvalues i).sqrt) *
⋯.eigenvectorMatrix.transpose =
A
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
⊢ (⋯.eigenvectorMatrix * diagonal fun i => (⋯.eigenvalues i).sqrt * (⋯.eigenvalues i).sqrt) *
⋯.eigenvectorMatrix.conjTranspose =
A
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.sqrt_mul_sqrt
|
[63, 1]
|
[78, 11]
|
convert hA.1.spectral_theorem''
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
⊢ (⋯.eigenvectorMatrix * diagonal fun i => (⋯.eigenvalues i).sqrt * (⋯.eigenvalues i).sqrt) *
⋯.eigenvectorMatrix.conjTranspose =
A
|
case h.e'_2.h.e'_5.h.e'_6.h.e'_5.h
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
x✝ : n
⊢ (⋯.eigenvalues x✝).sqrt * (⋯.eigenvalues x✝).sqrt = (RCLike.ofReal ∘ ⋯.eigenvalues) x✝
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.sqrt_mul_sqrt
|
[63, 1]
|
[78, 11]
|
rw [← Real.sqrt_mul (hA.eigenvalues_nonneg _), Real.sqrt_mul_self (hA.eigenvalues_nonneg _)]
|
case h.e'_2.h.e'_5.h.e'_6.h.e'_5.h
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
x✝ : n
⊢ (⋯.eigenvalues x✝).sqrt * (⋯.eigenvalues x✝).sqrt = (RCLike.ofReal ∘ ⋯.eigenvalues) x✝
|
case h.e'_2.h.e'_5.h.e'_6.h.e'_5.h
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
x✝ : n
⊢ ⋯.eigenvalues x✝ = (RCLike.ofReal ∘ ⋯.eigenvalues) x✝
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.sqrt_mul_sqrt
|
[63, 1]
|
[78, 11]
|
simp
|
case h.e'_2.h.e'_5.h.e'_6.h.e'_5.h
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosSemidef
x✝ : n
⊢ ⋯.eigenvalues x✝ = (RCLike.ofReal ∘ ⋯.eigenvalues) x✝
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.IsHermitian.one_add
|
[85, 1]
|
[86, 55]
|
dsimp [IsHermitian]
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.IsHermitian
⊢ (1 + A).IsHermitian
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.IsHermitian
⊢ (1 + A).conjTranspose = 1 + A
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.IsHermitian.one_add
|
[85, 1]
|
[86, 55]
|
rw [IsHermitian.add _ hA]
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.IsHermitian
⊢ (1 + A).conjTranspose = 1 + A
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.IsHermitian
⊢ IsHermitian 1
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.IsHermitian.one_add
|
[85, 1]
|
[86, 55]
|
simp
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.IsHermitian
⊢ IsHermitian 1
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosDef.PosDef_sqrt
|
[95, 1]
|
[102, 68]
|
unfold IsHermitian.sqrt
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ⋯.sqrt.PosDef
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ((⋯.eigenvectorMatrix * diagonal fun i => (⋯.eigenvalues i).sqrt) * ⋯.eigenvectorMatrix.transpose).PosDef
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosDef.PosDef_sqrt
|
[95, 1]
|
[102, 68]
|
refine'
PosDef.conjTranspose_mul_mul _ (hA.1.eigenvectorMatrixᵀ)
(PosDef_diagonal (fun i => Real.sqrt_pos.2 (hA.eigenvalues_pos i))) _
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ((⋯.eigenvectorMatrix * diagonal fun i => (⋯.eigenvalues i).sqrt) * ⋯.eigenvectorMatrix.transpose).PosDef
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ⋯.eigenvectorMatrix.transpose.det ≠ 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosDef.PosDef_sqrt
|
[95, 1]
|
[102, 68]
|
rw [det_transpose]
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ⋯.eigenvectorMatrix.transpose.det ≠ 0
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ⋯.eigenvectorMatrix.det ≠ 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosDef.PosDef_sqrt
|
[95, 1]
|
[102, 68]
|
apply det_ne_zero_of_right_inverse hA.1.eigenvectorMatrix_mul_inv
|
n : Type u_1
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : LinearOrder n
inst✝ : LocallyFiniteOrderBot n
A : Matrix n n ℝ
hA : A.PosDef
⊢ ⋯.eigenvectorMatrix.det ≠ 0
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
refine' ⟨PosDef.det_ne_zero, _⟩
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
⊢ M.PosDef ↔ M.det ≠ 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
⊢ M.det ≠ 0 → M.PosDef
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
intro hdet
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
⊢ M.det ≠ 0 → M.PosDef
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
⊢ M.PosDef
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
refine' ⟨hM.1, _⟩
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
⊢ M.PosDef
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
⊢ ∀ (x : n → ℝ), x ≠ 0 → 0 < star x ⬝ᵥ M.mulVec x
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
intros x hx
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
⊢ ∀ (x : n → ℝ), x ≠ 0 → 0 < star x ⬝ᵥ M.mulVec x
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ 0 < star x ⬝ᵥ M.mulVec x
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
apply lt_of_le_of_ne' (hM.2 x)
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ 0 < star x ⬝ᵥ M.mulVec x
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ star x ⬝ᵥ M.mulVec x ≠ 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
rw [← hM.sqrt_mul_sqrt, ← mulVec_mulVec, dotProduct_mulVec, ← transpose_transpose hM.1.sqrt,
vecMul_transpose, transpose_transpose, ← conjTranspose_eq_transpose,
hM.PosSemidef_sqrt.1.eq]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ star x ⬝ᵥ M.mulVec x ≠ 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ ⋯.sqrt.mulVec (star x) ⬝ᵥ ⋯.sqrt.mulVec x ≠ 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
simp only [RCLike.re_to_real, star, id]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ ⋯.sqrt.mulVec (star x) ⬝ᵥ ⋯.sqrt.mulVec x ≠ 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ (⋯.sqrt.mulVec fun i => x i) ⬝ᵥ ⋯.sqrt.mulVec x ≠ 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
change @inner ℝ (EuclideanSpace ℝ _) _ (hM.1.sqrt.mulVec x) (hM.1.sqrt.mulVec x) ≠ 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ (⋯.sqrt.mulVec fun i => x i) ⬝ᵥ ⋯.sqrt.mulVec x ≠ 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ ≠ 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
intro hinner
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
⊢ ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ ≠ 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
⊢ False
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
have sqrtMdet0 : hM.1.sqrt.det = 0 := by
refine' exists_mulVec_eq_zero_iff.1 ⟨x, hx, _⟩
rw [inner_self_eq_zero.1 hinner]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
⊢ False
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
sqrtMdet0 : ⋯.sqrt.det = 0
⊢ False
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
rw [← hM.sqrt_mul_sqrt, det_mul, sqrtMdet0, mul_zero] at hdet
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
sqrtMdet0 : ⋯.sqrt.det = 0
⊢ False
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : 0 ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
sqrtMdet0 : ⋯.sqrt.det = 0
⊢ False
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
apply hdet rfl
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : 0 ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
sqrtMdet0 : ⋯.sqrt.det = 0
⊢ False
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
refine' exists_mulVec_eq_zero_iff.1 ⟨x, hx, _⟩
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
⊢ ⋯.sqrt.det = 0
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
⊢ ⋯.sqrt.mulVec x = 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.PosSemidef.PosDef_iff_det_ne_zero
|
[104, 1]
|
[119, 17]
|
rw [inner_self_eq_zero.1 hinner]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : DecidableEq n
M : Matrix n n ℝ
hM : M.PosSemidef
hdet : M.det ≠ 0
x : n → ℝ
hx : x ≠ 0
hinner : ⟪⋯.sqrt.mulVec x, ⋯.sqrt.mulVec x⟫_ℝ = 0
⊢ ⋯.sqrt.mulVec x = 0
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
let sqrtA := hA.1.sqrt
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
⊢ A.det + B.det ≤ (A + B).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
⊢ A.det + B.det ≤ (A + B).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
have isUnit_det_sqrtA :=
isUnit_iff_ne_zero.2 hA.PosDef_sqrt.det_ne_zero
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
⊢ A.det + B.det ≤ (A + B).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
⊢ A.det + B.det ≤ (A + B).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
have : IsUnit sqrtA :=
(isUnit_iff_isUnit_det _).2 isUnit_det_sqrtA
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
⊢ A.det + B.det ≤ (A + B).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
⊢ A.det + B.det ≤ (A + B).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
have IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian := by
{ apply IsHermitian.nonsingular_inv (hA.posSemidef.PosSemidef_sqrt.1)
exact isUnit_det_sqrtA }
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
⊢ A.det + B.det ≤ (A + B).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
⊢ A.det + B.det ≤ (A + B).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
have PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef :=
PosSemidef.mul_mul_of_IsHermitian hB IsHermitian_sqrtA
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
⊢ A.det + B.det ≤ (A + B).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
⊢ A.det + B.det ≤ (A + B).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
let μ := PosSemidef_ABA.1.eigenvalues
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
⊢ A.det + B.det ≤ (A + B).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det + B.det ≤ (A + B).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
calc A.det + B.det
= A.det * (1 + (sqrtA⁻¹ * B * sqrtA⁻¹).det) := by
rw [det_mul, det_mul, mul_comm _ B.det, mul_assoc, ← det_mul, ← Matrix.mul_inv_rev,
hA.posSemidef.sqrt_mul_sqrt, mul_add, mul_one, mul_comm, mul_assoc, ← det_mul,
nonsing_inv_mul _ (isUnit_iff_ne_zero.2 hA.det_ne_zero), det_one, mul_one]
_ = A.det * (1 + ∏ i, μ i) := by
rw [PosSemidef_ABA.1.det_eq_prod_eigenvalues]
rfl
_ ≤ A.det * ∏ i, (1 + μ i) := by
apply (mul_le_mul_left hA.det_pos).2
apply Finset.one_add_prod_le_prod_one_add μ PosSemidef_ABA.eigenvalues_nonneg
_ = A.det * (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det := by
rw [mul_eq_mul_left_iff]; left; symm
rw [det_eq_prod_eigenvalues PosSemidef_ABA.1.eigenvectorBasis
(fun i => 1 + (PosSemidef_ABA.1.eigenvalues i)) _]
{ simp }
intro i
convert PosSemidef_ABA.1.has_eigenvector_one_add i using 1
simp only [map_add, toLin'_one, toLin'_mul, add_left_inj]
rfl
_ = (A + B).det := by
rw [← det_mul, ← det_conj this (A + B)]
apply congr_arg
rw [← hA.posSemidef.sqrt_mul_sqrt]
change sqrtA * sqrtA * (1 + sqrtA⁻¹ * B * sqrtA⁻¹) = sqrtA * (sqrtA * sqrtA + B) * sqrtA⁻¹
rw [Matrix.mul_add, Matrix.mul_one, Matrix.mul_add, Matrix.add_mul,
Matrix.mul_assoc, Matrix.mul_assoc, Matrix.mul_assoc, Matrix.mul_assoc,
← Matrix.mul_assoc _ _ (B * _),
Matrix.mul_nonsing_inv _ isUnit_det_sqrtA, Matrix.one_mul, Matrix.mul_one,
hA.posSemidef.sqrt_mul_sqrt, Matrix.mul_assoc]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det + B.det ≤ (A + B).det
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
apply IsHermitian.nonsingular_inv (hA.posSemidef.PosSemidef_sqrt.1)
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
⊢ sqrtA⁻¹.IsHermitian
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
⊢ IsUnit ⋯.sqrt.det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
exact isUnit_det_sqrtA
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
⊢ IsUnit ⋯.sqrt.det
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
rw [det_mul, det_mul, mul_comm _ B.det, mul_assoc, ← det_mul, ← Matrix.mul_inv_rev,
hA.posSemidef.sqrt_mul_sqrt, mul_add, mul_one, mul_comm, mul_assoc, ← det_mul,
nonsing_inv_mul _ (isUnit_iff_ne_zero.2 hA.det_ne_zero), det_one, mul_one]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det + B.det = A.det * (1 + (sqrtA⁻¹ * B * sqrtA⁻¹).det)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
rw [PosSemidef_ABA.1.det_eq_prod_eigenvalues]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det * (1 + (sqrtA⁻¹ * B * sqrtA⁻¹).det) = A.det * (1 + ∏ i : n, μ i)
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det * (1 + ∏ i : n, ↑(⋯.eigenvalues i)) = A.det * (1 + ∏ i : n, μ i)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
rfl
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det * (1 + ∏ i : n, ↑(⋯.eigenvalues i)) = A.det * (1 + ∏ i : n, μ i)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
apply (mul_le_mul_left hA.det_pos).2
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det * (1 + ∏ i : n, μ i) ≤ A.det * ∏ i : n, (1 + μ i)
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ 1 + ∏ i : n, μ i ≤ ∏ i : n, (1 + μ i)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
apply Finset.one_add_prod_le_prod_one_add μ PosSemidef_ABA.eigenvalues_nonneg
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ 1 + ∏ i : n, μ i ≤ ∏ i : n, (1 + μ i)
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
rw [mul_eq_mul_left_iff]
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ A.det * ∏ i : n, (1 + μ i) = A.det * (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∏ i : n, (1 + μ i) = (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det ∨ A.det = 0
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
left
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∏ i : n, (1 + μ i) = (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det ∨ A.det = 0
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∏ i : n, (1 + μ i) = (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
symm
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∏ i : n, (1 + μ i) = (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det = ∏ i : n, (1 + μ i)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
rw [det_eq_prod_eigenvalues PosSemidef_ABA.1.eigenvectorBasis
(fun i => 1 + (PosSemidef_ABA.1.eigenvalues i)) _]
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ (1 + sqrtA⁻¹ * B * sqrtA⁻¹).det = ∏ i : n, (1 + μ i)
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ↑(∏ i : n, (1 + ⋯.eigenvalues i)) = ∏ i : n, (1 + μ i)
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∀ (j : n),
Module.End.HasEigenvector (toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹)) (↑((fun i => 1 + ⋯.eigenvalues i) j))
(⋯.eigenvectorBasis j)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
{ simp }
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ↑(∏ i : n, (1 + ⋯.eigenvalues i)) = ∏ i : n, (1 + μ i)
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∀ (j : n),
Module.End.HasEigenvector (toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹)) (↑((fun i => 1 + ⋯.eigenvalues i) j))
(⋯.eigenvectorBasis j)
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∀ (j : n),
Module.End.HasEigenvector (toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹)) (↑((fun i => 1 + ⋯.eigenvalues i) j))
(⋯.eigenvectorBasis j)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
intro i
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ∀ (j : n),
Module.End.HasEigenvector (toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹)) (↑((fun i => 1 + ⋯.eigenvalues i) j))
(⋯.eigenvectorBasis j)
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
i : n
⊢ Module.End.HasEigenvector (toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹)) (↑((fun i => 1 + ⋯.eigenvalues i) i))
(⋯.eigenvectorBasis i)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
convert PosSemidef_ABA.1.has_eigenvector_one_add i using 1
|
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
i : n
⊢ Module.End.HasEigenvector (toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹)) (↑((fun i => 1 + ⋯.eigenvalues i) i))
(⋯.eigenvectorBasis i)
|
case h.e'_6.h.h.h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
i : n
e_2✝ : (n → ℝ) = EuclideanSpace ℝ n
e_3✝ : EuclideanDomain.toCommRing = Real.commRing
he✝¹ : Pi.addCommGroup = WithLp.instAddCommGroup 2 ((i : n) → (fun x => ℝ) i)
he✝ : Pi.Function.module n ℝ ℝ = WithLp.instModule 2 ℝ ((i : n) → (fun x => ℝ) i)
⊢ toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹) = 1 + toLin' (sqrtA⁻¹ * B * sqrtA⁻¹)
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
simp only [map_add, toLin'_one, toLin'_mul, add_left_inj]
|
case h.e'_6.h.h.h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
i : n
e_2✝ : (n → ℝ) = EuclideanSpace ℝ n
e_3✝ : EuclideanDomain.toCommRing = Real.commRing
he✝¹ : Pi.addCommGroup = WithLp.instAddCommGroup 2 ((i : n) → (fun x => ℝ) i)
he✝ : Pi.Function.module n ℝ ℝ = WithLp.instModule 2 ℝ ((i : n) → (fun x => ℝ) i)
⊢ toLin' (1 + sqrtA⁻¹ * B * sqrtA⁻¹) = 1 + toLin' (sqrtA⁻¹ * B * sqrtA⁻¹)
|
case h.e'_6.h.h.h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
i : n
e_2✝ : (n → ℝ) = EuclideanSpace ℝ n
e_3✝ : EuclideanDomain.toCommRing = Real.commRing
he✝¹ : Pi.addCommGroup = WithLp.instAddCommGroup 2 ((i : n) → (fun x => ℝ) i)
he✝ : Pi.Function.module n ℝ ℝ = WithLp.instModule 2 ℝ ((i : n) → (fun x => ℝ) i)
⊢ LinearMap.id = 1
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
rfl
|
case h.e'_6.h.h.h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
i : n
e_2✝ : (n → ℝ) = EuclideanSpace ℝ n
e_3✝ : EuclideanDomain.toCommRing = Real.commRing
he✝¹ : Pi.addCommGroup = WithLp.instAddCommGroup 2 ((i : n) → (fun x => ℝ) i)
he✝ : Pi.Function.module n ℝ ℝ = WithLp.instModule 2 ℝ ((i : n) → (fun x => ℝ) i)
⊢ LinearMap.id = 1
|
no goals
|
https://github.com/verified-optimization/CvxLean.git
|
c62c2f292c6420f31a12e738ebebdfed50f6f840
|
CvxLean/Lib/Math/Subadditivity.lean
|
Matrix.det_add_det_le_det_add'
|
[121, 1]
|
[168, 57]
|
simp
|
case h
n : Type u_1
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : LinearOrder n
inst✝¹ : LocallyFiniteOrderBot n
inst✝ : Nonempty n
A B : Matrix n n ℝ
hA : A.PosDef
hB : B.PosSemidef
sqrtA : Matrix n n ℝ := ⋯.sqrt
isUnit_det_sqrtA : IsUnit ⋯.sqrt.det
this : IsUnit sqrtA
IsHermitian_sqrtA : sqrtA⁻¹.IsHermitian
PosSemidef_ABA : (sqrtA⁻¹ * B * sqrtA⁻¹).PosSemidef
μ : n → ℝ := ⋯.eigenvalues
⊢ ↑(∏ i : n, (1 + ⋯.eigenvalues i)) = ∏ i : n, (1 + μ i)
|
no goals
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.