AFTD Auto-Formalizing Theoretical Domains

CodingTheory.Johnson.normalized_orthProj_inner_nonpos

theoremverifiedimported Lean

Non-positive inner product of normalized projections off a unit vector. Let $u,v,w$ be vectors in a real inner product space with $\norm{u}=1$, and suppose the three inner products $\langle v,w\rangle$, $\langle v,u\rangle$, and $\langle w,u\rangle$ are all nonpositive. For a vector $x$, write $x^{\perp}=x-\langle u,x\rangle\,u$ for its component orthogonal to $u$, and assume that both $v^{\perp}$ and $w^{\perp}$ are nonzero. Then their normalizations still have nonpositive inner product: \[ \left\langle \frac{v^{\perp}}{\norm{v^{\perp}}},\ \frac{w^{\perp}}{\norm{w^{\perp}}}\right\rangle \le 0. \]

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open scoped BigOperators RealInnerProductSpace in
open Finset in
open Classical in
open scoped RealInnerProductSpace in
open scoped InnerProductSpace in
open Finset in
open Classical in
attribute [local instance] Classical.dec in
lemma CodingTheory.Johnson.normalized_orthProj_inner_nonpos {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (u v w : V) (hu : ‖u‖ = 1)
    (hvw : inner ℝ v w ≤ 0) (hvu : inner ℝ v u ≤ 0) (hwu : inner ℝ w u ≤ 0)
    (_hv_ne : orthProj u v ≠ 0) (_hw_ne : orthProj u w ≠ 0) :
    inner ℝ (‖orthProj u v‖⁻¹ • orthProj u v)
            (‖orthProj u w‖⁻¹ • orthProj u w) ≤ 0
Source
TCSlib, `CodingTheory.Johnson.normalized_orthProj_inner_nonpos`
Lean proof
By Allan Li, Frederick Dehmel, Hydroxyi (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
Used by 1

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen scoped BigOperators RealInnerProductSpace inopen Finset inopen Classical inopen scoped RealInnerProductSpace inopen scoped InnerProductSpace inopen Finset inopen Classical inattribute [local instance] Classical.dec inlemma CodingTheory.Johnson.normalized_orthProj_inner_nonpos {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]    (u v w : V) (hu : ‖u‖ = 1)    (hvw : inner ℝ v w ≤ 0) (hvu : inner ℝ v u ≤ 0) (hwu : inner ℝ w u ≤ 0)    (_hv_ne : orthProj u v ≠ 0) (_hw_ne : orthProj u w ≠ 0) :    inner ℝ (‖orthProj u v‖⁻¹ • orthProj u v)            (‖orthProj u w‖⁻¹ • orthProj u w) ≤ 0 := by  simp only [inner_smul_left, inner_smul_right]  exact mul_nonpos_of_nonneg_of_nonpos (inv_nonneg.2 (norm_nonneg _))    (mul_nonpos_of_nonneg_of_nonpos (inv_nonneg.2 (norm_nonneg _))      (orthProj_inner_nonpos u v w hu hvw hvu hwu))
See it in the graphDiscuss this resultChallenge it