zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_13.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) ⦃xx : E₁⦄ (a : xx ∈ univ) ⦃yy : E₁⦄
  (a_1 : yy ∈ univ) ⦃aa bb : ℝ⦄ (a_2 : 0 ≤ aa) (a_3 : 0 ≤ bb) (abh : aa + bb = 1)
  (this :
    (OptProblem.A₁ E₂) (aa • xx + bb • yy) + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂ =
      aa • ((OptProblem.A₁ E₂) xx + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)) +
        bb • ((OptProblem.A₁ E₂) yy + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂))) :
  aa *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) xx + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)⟫_ℝ +
      bb *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) yy + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)⟫_ℝ =
    aa *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) xx + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂⟫_ℝ +
      bb *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) yy + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂⟫_ℝ := sorry

Tactic state before:
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
xx : E₁
a✝³ : xx ∈ univ
yy : E₁
a✝² : yy ∈ univ
aa bb : ℝ
a✝¹ : 0 ≤ aa
a✝ : 0 ≤ bb
abh : aa + bb = 1
this :
  (OptProblem.A₁ E₂) (aa • xx + bb • yy) + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂ =
    aa • ((OptProblem.A₁ E₂) xx + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)) +
      bb • ((OptProblem.A₁ E₂) yy + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂))
⊢ aa *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) xx + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)⟫_ℝ +
      bb *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) yy + ((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)⟫_ℝ =
    aa *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) xx + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂⟫_ℝ +
      bb *
        ⟪ADMM.y E₁ E₂ n.natPred,
          (OptProblem.A₁ E₂) yy + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂⟫_ℝ

Tactic:
rw [add_sub, add_sub]

Tactic state after:
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_18.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := ADMM.y E₁ E₂ n.natPred;
  let a := (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂;
  ((fun x =>
        ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) + (OptProblem.A₂ E₁) x - OptProblem.b E₁ E₂⟫_ℝ) =
      fun x =>
      ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₂ E₁) x + ((OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂)⟫_ℝ) →
    ((fun x => ⟪c, (OptProblem.A₂ E₁) x + a⟫_ℝ) = fun x => ⟪c, (OptProblem.A₂ E₁) x⟫_ℝ + ⟪c, a⟫_ℝ) →
      ∀ (u : ℝ) (v : E₂), ⟪c, u • (OptProblem.A₂ E₁) v⟫_ℝ = u * ⟪c, (OptProblem.A₂ E₁) v⟫_ℝ := sorry

Tactic state before:
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := ADMM.y E₁ E₂ n.natPred
a : F := (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂
this :
  (fun x =>
      ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) + (OptProblem.A₂ E₁) x - OptProblem.b E₁ E₂⟫_ℝ) =
    fun x =>
    ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₂ E₁) x + ((OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂)⟫_ℝ
h : (fun x => ⟪c, (OptProblem.A₂ E₁) x + a⟫_ℝ) = fun x => ⟪c, (OptProblem.A₂ E₁) x⟫_ℝ + ⟪c, a⟫_ℝ
p : ℝ := ⟪c, a⟫_ℝ
u : ℝ
v : E₂
⊢ ⟪c, u • (OptProblem.A₂ E₁) v⟫_ℝ = u * ⟪c, (OptProblem.A₂ E₁) v⟫_ℝ

Tactic:
apply inner_smul_right

Tactic state after:
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_20.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := ADMM.y E₁ E₂ n.natPred;
  let a := (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂;
  ((fun x =>
        ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) + (OptProblem.A₂ E₁) x - OptProblem.b E₁ E₂⟫_ℝ) =
      fun x =>
      ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₂ E₁) x + ((OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂)⟫_ℝ) →
    ((fun x => ⟪c, (OptProblem.A₂ E₁) x + a⟫_ℝ) = fun x => ⟪c, (OptProblem.A₂ E₁) x⟫_ℝ + ⟪c, a⟫_ℝ) →
      Convex ℝ univ := sorry

Tactic state before:
case hs
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := ADMM.y E₁ E₂ n.natPred
a : F := (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂
this :
  (fun x =>
      ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) + (OptProblem.A₂ E₁) x - OptProblem.b E₁ E₂⟫_ℝ) =
    fun x =>
    ⟪ADMM.y E₁ E₂ n.natPred, (OptProblem.A₂ E₁) x + ((OptProblem.A₁ E₂) (ADMM.x₁ E₂ F ↑n) - OptProblem.b E₁ E₂)⟫_ℝ
h : (fun x => ⟪c, (OptProblem.A₂ E₁) x + a⟫_ℝ) = fun x => ⟪c, (OptProblem.A₂ E₁) x⟫_ℝ + ⟪c, a⟫_ℝ
p : ℝ := ⟪c, a⟫_ℝ
f : E₂ →ₗ[ℝ] ℝ := { toFun := fun x => ⟪c, (OptProblem.A₂ E₁) x⟫_ℝ, map_add' := ⋯, map_smul' := ⋯ }
⊢ Convex ℝ univ

Tactic:
apply convex_univ

Tactic state after:
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_21.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂);
  ∀ (x : E₁),
    ADMM.ρ E₁ E₂ F / 2 * ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2 =
        ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2 →
      ADMM.ρ E₁ E₂ F / 2 *
          ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2 =
        ADMM.ρ E₁ E₂ F *
            ‖(OptProblem.A₁ E₂) x - -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)‖ ^ 2 /
          2 := sorry

Tactic state before:
case h
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
x : E₁
⊢ ADMM.ρ E₁ E₂ F / 2 * ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2 =
    ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2

Tactic:
simp only [c]

Tactic state after:
[case h
 E₁ : Type u_1
 E₂ : Type u_2
 F : Type u_3
 inst✝⁹ : NormedAddCommGroup E₁
 inst✝⁸ : InnerProductSpace ℝ E₁
 inst✝⁷ : FiniteDimensional ℝ E₁
 inst✝⁶ : NormedAddCommGroup E₂
 inst✝⁵ : InnerProductSpace ℝ E₂
 inst✝⁴ : FiniteDimensional ℝ E₂
 inst✝³ : NormedAddCommGroup F
 inst✝² : InnerProductSpace ℝ F
 inst✝¹ : FiniteDimensional ℝ F
 admm : ADMM E₁ E₂ F
 admm_kkt : Existance_of_kkt admm
 inst✝ : Setting E₁ E₂ F admm admm_kkt
 n : ℕ+
 c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
 x : E₁
 ⊢ ADMM.ρ E₁ E₂ F / 2 * ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2 =
     ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)‖ ^ 2 /
       2]
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_22.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂);
  ((fun x =>
        ADMM.ρ E₁ E₂ F / 2 *
          ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
      fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) →
    let f := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2;
    ∀ (x : E₁),
      ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2 = ADMM.ρ E₁ E₂ F • f x →
        ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2 =
          ADMM.ρ E₁ E₂ F * (‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) := sorry

Tactic state before:
case h
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
h :
  (fun x =>
      ADMM.ρ E₁ E₂ F / 2 *
        ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
    fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
x : E₁
⊢ ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2 = ADMM.ρ E₁ E₂ F • f x

Tactic:
simp only [f, smul_eq_mul]

Tactic state after:
[case h
 E₁ : Type u_1
 E₂ : Type u_2
 F : Type u_3
 inst✝⁹ : NormedAddCommGroup E₁
 inst✝⁸ : InnerProductSpace ℝ E₁
 inst✝⁷ : FiniteDimensional ℝ E₁
 inst✝⁶ : NormedAddCommGroup E₂
 inst✝⁵ : InnerProductSpace ℝ E₂
 inst✝⁴ : FiniteDimensional ℝ E₂
 inst✝³ : NormedAddCommGroup F
 inst✝² : InnerProductSpace ℝ F
 inst✝¹ : FiniteDimensional ℝ F
 admm : ADMM E₁ E₂ F
 admm_kkt : Existance_of_kkt admm
 inst✝ : Setting E₁ E₂ F admm admm_kkt
 n : ℕ+
 c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
 h :
   (fun x =>
       ADMM.ρ E₁ E₂ F / 2 *
         ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
     fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
 f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
 x : E₁
 ⊢ ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2 = ADMM.ρ E₁ E₂ F * (‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2)]
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_23.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂);
  ((fun x =>
        ADMM.ρ E₁ E₂ F / 2 *
          ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
      fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) →
    let f := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2;
    ((fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x) →
      (ConvexOn ℝ univ fun x => ADMM.ρ E₁ E₂ F • f x) → ConvexOn ℝ univ f := sorry

Tactic state before:
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
h :
  (fun x =>
      ADMM.ρ E₁ E₂ F / 2 *
        ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
    fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
h1 : (fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x
⊢ ConvexOn ℝ univ fun x => ADMM.ρ E₁ E₂ F • f x

Tactic:
apply ConvexOn.smul (le_of_lt admm.hrho)

Tactic state after:
[E₁ : Type u_1
 E₂ : Type u_2
 F : Type u_3
 inst✝⁹ : NormedAddCommGroup E₁
 inst✝⁸ : InnerProductSpace ℝ E₁
 inst✝⁷ : FiniteDimensional ℝ E₁
 inst✝⁶ : NormedAddCommGroup E₂
 inst✝⁵ : InnerProductSpace ℝ E₂
 inst✝⁴ : FiniteDimensional ℝ E₂
 inst✝³ : NormedAddCommGroup F
 inst✝² : InnerProductSpace ℝ F
 inst✝¹ : FiniteDimensional ℝ F
 admm : ADMM E₁ E₂ F
 admm_kkt : Existance_of_kkt admm
 inst✝ : Setting E₁ E₂ F admm admm_kkt
 n : ℕ+
 c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
 h :
   (fun x =>
       ADMM.ρ E₁ E₂ F / 2 *
         ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
     fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
 f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
 h1 : (fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x
 ⊢ ConvexOn ℝ univ f]
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_24.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂);
  ((fun x =>
        ADMM.ρ E₁ E₂ F / 2 *
          ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
      fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) →
    let f := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2;
    ((fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x) →
      ∀ (x : E₁), ((fun x => ‖x - c‖ ^ 2 / 2) ∘ ⇑(OptProblem.A₁ E₂)) x = ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2 := sorry

Tactic state before:
case h
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
h :
  (fun x =>
      ADMM.ρ E₁ E₂ F / 2 *
        ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
    fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
h1 : (fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x
u : F → ℝ := fun x => ‖x - c‖ ^ 2 / 2
g : E₁ →L[ℝ] F := OptProblem.A₁ E₂
x : E₁
⊢ ((fun x => ‖x - c‖ ^ 2 / 2) ∘ ⇑(OptProblem.A₁ E₂)) x = ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2

Tactic:
simp only [Function.comp_apply]

Tactic state after:
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_25.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂);
  ((fun x =>
        ADMM.ρ E₁ E₂ F / 2 *
          ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
      fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) →
    let f := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2;
    ((fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x) →
      let u := fun x => ‖x - c‖ ^ 2 / 2;
      let g := OptProblem.A₁ E₂;
      u ∘ ⇑g = f → ⇑g ⁻¹' univ = univ := sorry

Tactic state before:
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
h :
  (fun x =>
      ADMM.ρ E₁ E₂ F / 2 *
        ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
    fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
h1 : (fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x
u : F → ℝ := fun x => ‖x - c‖ ^ 2 / 2
g : E₁ →L[ℝ] F := OptProblem.A₁ E₂
h2 : u ∘ ⇑g = f
⊢ ⇑g ⁻¹' univ = univ

Tactic:
simp only [preimage_univ]

Tactic state after:
import Mathlib
import Optlib


open Set InnerProductSpace Topology Filter InnerProduct

open scoped Pointwise

theorem extracted_formal_statement_26.{u_3, u_2, u_1} {E₁ : Type u_1} {E₂ : Type u_2} {F : Type u_3}
  [inst : NormedAddCommGroup E₁] [inst_1 : InnerProductSpace ℝ E₁] [inst_2 : FiniteDimensional ℝ E₁]
  [inst_3 : NormedAddCommGroup E₂] [inst_4 : InnerProductSpace ℝ E₂] [inst_5 : FiniteDimensional ℝ E₂]
  [inst_6 : NormedAddCommGroup F] [inst_7 : InnerProductSpace ℝ F] [inst_8 : FiniteDimensional ℝ F]
  {admm : ADMM E₁ E₂ F} {admm_kkt : Existance_of_kkt admm} (n : ℕ+) :
  let c := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂);
  ((fun x =>
        ADMM.ρ E₁ E₂ F / 2 *
          ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
      fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) →
    let f := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2;
    ((fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x) →
      let u := fun x => ‖x - c‖ ^ 2 / 2;
      let g := OptProblem.A₁ E₂;
      u ∘ ⇑g = f → ⇑g ⁻¹' univ = univ → Convex ℝ univ := sorry

Tactic state before:
E₁ : Type u_1
E₂ : Type u_2
F : Type u_3
inst✝⁹ : NormedAddCommGroup E₁
inst✝⁸ : InnerProductSpace ℝ E₁
inst✝⁷ : FiniteDimensional ℝ E₁
inst✝⁶ : NormedAddCommGroup E₂
inst✝⁵ : InnerProductSpace ℝ E₂
inst✝⁴ : FiniteDimensional ℝ E₂
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
inst✝¹ : FiniteDimensional ℝ F
admm : ADMM E₁ E₂ F
admm_kkt : Existance_of_kkt admm
inst✝ : Setting E₁ E₂ F admm admm_kkt
n : ℕ+
c : F := -((OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂)
h :
  (fun x =>
      ADMM.ρ E₁ E₂ F / 2 *
        ‖(OptProblem.A₁ E₂) x + (OptProblem.A₂ E₁) (ADMM.x₂ E₁ F n.natPred) - OptProblem.b E₁ E₂‖ ^ 2) =
    fun x => ADMM.ρ E₁ E₂ F * ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
f : E₁ → ℝ := fun x => ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2
h1 : (fun x => ADMM.ρ E₁ E₂ F • ‖(OptProblem.A₁ E₂) x - c‖ ^ 2 / 2) = fun x => ADMM.ρ E₁ E₂ F • f x
u : F → ℝ := fun x => ‖x - c‖ ^ 2 / 2
g : E₁ →L[ℝ] F := OptProblem.A₁ E₂
h2 : u ∘ ⇑g = f
h3 : ⇑g ⁻¹' univ = univ
⊢ Convex ℝ univ

Tactic:
apply convex_univ

Tactic state after: