AFTD Auto-Formalizing Theoretical Domains

CodingTheory.Johnson.norm_normalized_orthProj

theoremverifiedimported Lean

Normalizing the projection off a unit vector yields a unit vector. Let $u,v$ be unit vectors in a real inner product space, with $v \neq u$ and $v \neq -u$, and set $w = v - \langle u,v\rangle\, u$, the projection of $v$ onto the orthogonal complement of $\mathrm{span}\{u\}$. Then the rescaled vector $\norm{w}^{-1}\, w$ has norm $1$.

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.norm_normalized_orthProj {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]
    (u v : V) (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (hne1 : v ≠ u) (hne2 : v ≠ -u) :
    ‖‖orthProj u v‖⁻¹ • orthProj u v‖ = 1
Source
TCSlib, `CodingTheory.Johnson.norm_normalized_orthProj`
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
  • CodingTheory.Johnson.orthProjFor $u,v$ in a real inner product space, $\mathrm{orthProj}(u,v) = v - \langle u,v\rangle u$, the projection of $v$ onto the orthogonal…
  • CodingTheory.Johnson.orthProj_ne_zeroNonvanishing of the projection off a unit vector. Let $u$ and $v$ be unit vectors in a real inner product space, and suppose that…
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.norm_normalized_orthProj {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V]    (u v : V) (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (hne1 : v ≠ u) (hne2 : v ≠ -u) :    ‖‖orthProj u v‖⁻¹ • orthProj u v‖ = 1 := by  rw [norm_smul, norm_inv, norm_norm,      inv_mul_cancel₀ (norm_ne_zero_iff.mpr (orthProj_ne_zero u v hu hv hne1 hne2))]
See it in the graphDiscuss this resultChallenge it