CodingTheory.Johnson.normalized_orthProj_injective
theoremverifiedimported Lean
Distinct normalized projections off a unit vector. Let $u,v,w$ be unit vectors in a real inner product space satisfying $\langle v,u\rangle \le 0$, $\langle w,u\rangle \le 0$, and $\langle v,w\rangle \le 0$, and suppose that neither $v$ nor $w$ equals $u$ or $-u$ and that $v \neq w$. For $x$ in the space write $\pi(x) = x - \langle u,x\rangle\,u$ for the projection of $x$ onto the orthogonal complement of $\mathrm{span}\{u\}$. Then the two normalized projections $\norm{\pi(v)}^{-1}\,\pi(v)$ and $\norm{\pi(w)}^{-1}\,\pi(w)$ cannot be equal.
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_injective {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (u v w : V) (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) (hvu : inner ℝ v u ≤ 0) (hwu : inner ℝ w u ≤ 0) (hvw_ip : inner ℝ v w ≤ 0) (hv1 : v ≠ u) (hv2 : v ≠ -u) (hw1 : w ≠ u) (hw2 : w ≠ -u) (_hvw : v ≠ w) (h_eq : (‖orthProj u v‖⁻¹ • orthProj u v : V) = (‖orthProj u w‖⁻¹ • orthProj u w : V)) : False
- Source
- TCSlib, `CodingTheory.Johnson.normalized_orthProj_injective`
- 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.CodingTheory.Johnson.normalized_orthProj_injective← CodingTheory.Johnson.normalized_orthProj_injective (TCSlib/ErrorCorrectingCodes/JohnsonBound.lean:288): adapted
What was changed in
CodingTheory.Johnson.normalized_orthProj_injective--- TCSlib/ErrorCorrectingCodes/JohnsonBound.lean:288 (CodingTheory.Johnson.normalized_orthProj_injective) +++ as compiled here @@ -1,2 +1,12 @@ -lemma normalized_orthProj_injective {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] +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_injective {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (u v w : V) (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) @@ -22,3 +32,3 @@ rw [ h_inner, inner_add_left, inner_smul_left, inner_sub_left, inner_smul_left ] ; ring_nf; - simp +decide [ mul_comm, mul_left_comm, inner_smul_left ] ; rw [real_inner_self_eq_norm_sq, hw]; ring + simp +decide [ mul_comm, mul_left_comm, inner_smul_left ] ; rw [hw]; ring -- Since $w \neq \pm u$, we have $|⟪u, w⟫| < 1$. - 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
- CodingTheory.Johnson.rankin_bound_generalRankin bound in a finite-dimensional space. Let $V$ be a finite-dimensional real inner product space, and let $S$ be a finite set of…
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
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_injective {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] (u v w : V) (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) (hvu : inner ℝ v u ≤ 0) (hwu : inner ℝ w u ≤ 0) (hvw_ip : inner ℝ v w ≤ 0) (hv1 : v ≠ u) (hv2 : v ≠ -u) (hw1 : w ≠ u) (hw2 : w ≠ -u) (_hvw : v ≠ w) (h_eq : (‖orthProj u v‖⁻¹ • orthProj u v : V) = (‖orthProj u w‖⁻¹ • orthProj u w : V)) : False := by -- From h_eq, we have orthProj u v = c • orthProj u w with c = ‖orthProj u v‖/‖orthProj u w‖ > 0. obtain ⟨c, hc⟩ : ∃ c : ℝ, 0 < c ∧ orthProj u v = c • orthProj u w := by refine' ⟨ ‖orthProj u v‖ / ‖orthProj u w‖, div_pos ( norm_pos_iff.mpr ( orthProj_ne_zero u v hu hv hv1 hv2 ) ) ( norm_pos_iff.mpr ( orthProj_ne_zero u w hu hw hw1 hw2 ) ), _ ⟩; convert congr_arg ( fun x => ‖orthProj u v‖ • x ) h_eq using 1 <;> norm_num [ div_eq_mul_inv, smul_smul ]; rw [ mul_inv_cancel₀ ] <;> norm_num; exact orthProj_ne_zero u v hu hv hv1 hv2; -- Compute ⟪v,w⟫ = c(1 - ⟪u,w⟫²) + ⟪u,v⟫⟪u,w⟫. have h_inner : ⟪v, w⟫_ℝ = c * (1 - ⟪u, w⟫_ℝ ^ 2) + ⟪u, v⟫_ℝ * ⟪u, w⟫_ℝ := by have h_sub : v - ⟪u, v⟫_ℝ • u = c • (w - ⟪u, w⟫_ℝ • u) := hc.2 -- Substitute h_sub into the inner product expression. have h_inner : ⟪v, w⟫_ℝ = ⟪c • (w - ⟪u, w⟫_ℝ • u) + ⟪u, v⟫_ℝ • u, w⟫_ℝ := by rw [ ← h_sub, sub_add_cancel ]; rw [ h_inner, inner_add_left, inner_smul_left, inner_sub_left, inner_smul_left ] ; ring_nf; simp +decide [ mul_comm, mul_left_comm, inner_smul_left ] ; rw [hw]; ring -- Since $w \neq \pm u$, we have $|⟪u, w⟫| < 1$. have h_abs : |⟪u, w⟫_ℝ| < 1 := by have h_abs : ‖w - u‖ > 0 ∧ ‖w + u‖ > 0 := by exact ⟨ norm_pos_iff.mpr ( sub_ne_zero.mpr hw1 ), norm_pos_iff.mpr ( add_eq_zero_iff_eq_neg.not.mpr hw2 ) ⟩; have := norm_add_sq_real w u; have := norm_sub_sq_real w u; simp_all +decide [ real_inner_comm ] ; exact abs_lt.mpr ⟨ by nlinarith [ norm_pos_iff.mpr h_abs.1, norm_pos_iff.mpr h_abs.2 ], by nlinarith [ norm_pos_iff.mpr h_abs.1, norm_pos_iff.mpr h_abs.2 ] ⟩; simp_all +decide [ real_inner_comm ]; nlinarith [ abs_lt.mp h_abs, mul_le_mul_of_nonneg_left hwu hc.1.le ]