Skip to content

fix: expose helper lemmas in L07/L09 inventories (follow-up to #23)#24

Merged
ZRTMRH merged 1 commit into
mainfrom
expose-helper-lemmas
May 15, 2026
Merged

fix: expose helper lemmas in L07/L09 inventories (follow-up to #23)#24
ZRTMRH merged 1 commit into
mainfrom
expose-helper-lemmas

Conversation

@ZRTMRH
Copy link
Copy Markdown
Owner

@ZRTMRH ZRTMRH commented May 15, 2026

Summary

Same pattern as PR #23 (Level 8), applied to two more levels found in a follow-up audit. Helper lemmas were defined and used in player-facing hints, but never registered via TheoremDoc + NewTheorem, so they never appeared in the inventory panel.

InnerProductWorld Level 7 (Cauchy-Schwarz) — adds:

  • norm_nonzero_of_nonzero
  • norm_sq_decomposition
  • scaled_norm_le_original
  • norm_pos_of_nonzero
  • norm_sq_scaled_eq

LinearIndependenceSpanWorld Level 9 (Span After Removing Elements) — adds:

  • union_diff_singleton_eq
  • fx_sum_equality
  • fw_sum_equality

Implementation notes

  • For Level 9 the helpers are defined before the existing NewTheorem, so it's extended in place.
  • For Level 7 the existing NewTheorem precedes the helper definitions, so a second NewTheorem is added after the helper block (same approach as fix(Level 8): expose helper lemmas in inventory (refs #21) #23).
  • TheoremDoc names use the fully-qualified LinearAlgebraGame.<name> form since both files live under namespace LinearAlgebraGame.

Safety

  • Each helper is only referenced inside its own level file (verified with grep across Game/).
  • These changes silence exactly the 8 corresponding Game.lean: No world introducing <name>, but required by <World> build warnings — confirmed.

Test plan

  • lake build succeeds
  • All 8 targeted No world introducing warnings eliminated
  • Visually confirm the new helpers appear in the right-hand inventory panel for Level 7 and Level 9

…enceSpanWorld L09 inventories

Following up on the PR #23 fix for Level 8: an audit found the same
pattern (helper lemmas defined and referenced in player-facing hints,
but never registered with TheoremDoc/NewTheorem) in two more levels.

InnerProductWorld Level 7 (Cauchy-Schwarz):
- norm_nonzero_of_nonzero
- norm_sq_decomposition
- scaled_norm_le_original
- norm_pos_of_nonzero
- norm_sq_scaled_eq

LinearIndependenceSpanWorld Level 9 (Span After Removing Elements):
- union_diff_singleton_eq
- fx_sum_equality
- fw_sum_equality

For Level 9, the helpers are defined above the existing NewTheorem, so
we extend it in place. For Level 7, the existing NewTheorem precedes
the helper definitions, so we add a second NewTheorem after them (same
pattern as the Level 8 fix). All eight "No world introducing ..., but
required by ..." build warnings for these helpers are eliminated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ZRTMRH ZRTMRH merged commit f35b190 into main May 15, 2026
2 checks passed
@ZRTMRH ZRTMRH deleted the expose-helper-lemmas branch May 15, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant