Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Fact 34, p. 23 — Pythagorean theorem: CᵀD = 0 implies ‖C + D‖_F² = ‖C‖_F² + ‖D‖_F²

Proved
InputSparsity.Regress.fact_34

by mikedeng1 · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

frobenius-normleast-squareslinear-algebrap2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let CCC and DDD be real n×mn\times mn×m matrices (the same number of rows and of columns). If C⊤D=0C^\top D=0C⊤D=0, then

∥C+D∥F2=∥C∥F2+∥D∥F2.\|C+D\|_F^2=\|C\|_F^2+\|D\|_F^2 .∥C+D∥F2​=∥C∥F2​+∥D∥F2​.

This is the matrix (Frobenius) form of the Pythagorean theorem. Combined with the normal equations (Fact 35) it splits the regression error into an irreducible part and a part caused by a suboptimal solution, which is the first step of the proof of Theorem 36.

Formalization Note ∥⋅∥F2\|\cdot\|_F^2∥⋅∥F2​ is the explicit sum of squared entries.

Preamble
import Mathlib
import Definitions.Def_InputSparsity_Regress_Basic
Formal statement
namespace InputSparsity.Regress
open Matrix

theorem fact_34 {n m : ℕ} (C D : Matrix (Fin n) (Fin m) ℝ) (h : Cᵀ * D = 0) :
    InputSparsity.Embed.frobSq (C + D) = InputSparsity.Embed.frobSq C + InputSparsity.Embed.frobSq D := by sorry

end InputSparsity.Regress
Source
Clarkson and Woodruff, Low Rank Approximation and Regression in Input Sparsity Time, arXiv:1207.6365v4, p. 23, Fact 34
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me