Skip to content

Commit bae4c3b

Browse files
ZRTMRHclaude
andcommitted
Add TheoremDoc for le_of_sq_le_sq and fix Level09 hint mismatches
- Add TheoremDoc for le_of_sq_le_sq with usage note about LinearAlgebraGame. prefix - Fix Level09 hints for fx_sum_equality and fw_sum_equality to include LinearAlgebraGame. prefix (matching actual proof code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f7bee63 commit bae4c3b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

Game/Levels/InnerProductWorld/Level07.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ TheoremDoc LinearAlgebraGame.Cauchy_Schwarz as "Cauchy_Schwarz" in "Inner Produc
3636
variable {V : Type} [AddCommGroup V] [VectorSpace ℂ V] [InnerProductSpace_v V]
3737
open Function Set VectorSpace Real InnerProductSpace_v Complex
3838

39+
/--
40+
If `a² ≤ b²` and `b ≥ 0`, then `a ≤ b`. This is useful for converting squared inequalities
41+
back to regular inequalities when working with norms.
42+
43+
**Usage:** Use the full name `LinearAlgebraGame.le_of_sq_le_sq` when applying this theorem.
44+
-/
45+
TheoremDoc LinearAlgebraGame.le_of_sq_le_sq as "le_of_sq_le_sq" in "Inner Product"
46+
3947
-- Helper theorem: taking square roots preserves inequalities for non-negative numbers
4048
theorem le_of_sq_le_sq {a : ℝ} {b : ℝ} (h : a^2 ≤ b ^2 ) (hb : 0≤ b) : a ≤ b :=
4149
le_abs_self a |>.trans <| abs_le_of_sq_le_sq h hb

Game/Levels/LinearIndependenceSpanWorld/Level09.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Statement remove_redundant_span
271271
Hint "Now, you can prove that summing `fx'` over our set gives the correct value."
272272
Hint "We use a helper lemma that shows the sum equality."
273273
Hint "This lemma shows that fx' gives us x minus the contribution from w."
274-
Hint (hidden := true) "Try `have fx'_sum : x - (fx w • w) = (sw ∪ (sx \\ \{{w}})).sum (fun v => fx' v • v) := fx_sum_equality K V x w sw sx fx fx' hw hfx hfx' set_eq`"
274+
Hint (hidden := true) "Try `have fx'_sum : x - (fx w • w) = (sw ∪ (sx \\ \{{w}})).sum (fun v => fx' v • v) := LinearAlgebraGame.fx_sum_equality K V x w sw sx fx fx' hw hfx hfx' set_eq`"
275275
have fx'_sum : x - (fx w • w) = (sw ∪ (sx \ {w})).sum (fun v => fx' v • v) :=
276276
LinearAlgebraGame.fx_sum_equality K V x w sw sx fx fx' hw hfx hfx' set_eq
277277

@@ -284,7 +284,7 @@ Statement remove_redundant_span
284284

285285
Hint "Prove the sum equality by expanding definitions."
286286
Hint "This lemma shows that fw' reconstructs exactly the fx w • w term we need."
287-
Hint (hidden := true) "Try `have fw'_sum : fx w • w = (sw ∪ (sx \\ \{{w}})).sum (fun v => fw' v • v) := fw_sum_equality K V w sw sx fx fw fw' hfw hfw'`"
287+
Hint (hidden := true) "Try `have fw'_sum : fx w • w = (sw ∪ (sx \\ \{{w}})).sum (fun v => fw' v • v) := LinearAlgebraGame.fw_sum_equality K V w sw sx fx fw fw' hfw hfw'`"
288288
have fw'_sum : fx w • w = (sw ∪ (sx \ {w})).sum (fun v => fw' v • v) :=
289289
LinearAlgebraGame.fw_sum_equality K V w sw sx fx fw fw' hfw hfw'
290290

0 commit comments

Comments
 (0)