Skip to content

fix(Level 8): expose helper lemmas in inventory (refs #21)#23

Merged
ZRTMRH merged 1 commit into
mainfrom
fix-issue-21-inv-mul-cancel-zero
May 15, 2026
Merged

fix(Level 8): expose helper lemmas in inventory (refs #21)#23
ZRTMRH merged 1 commit into
mainfrom
fix-issue-21-inv-mul-cancel-zero

Conversation

@ZRTMRH
Copy link
Copy Markdown
Owner

@ZRTMRH ZRTMRH commented May 15, 2026

Summary

Surfaces helper lemmas zero_coeff_from_not_in_span and subset_diff_singleton_of_union in Level 8's theorem inventory via TheoremDoc + NewTheorem.

Context

Follow-up to #21. After PR #22 fixed the inv_mul_cancelinv_mul_cancel₀ rename, @komugi64 commented that zero_coeff_from_not_in_span "does not appear" in the level — i.e. it's not in the right-hand inventory panel, so players had to reprove it inline.

Notes

  • NewTheorem for the helpers is placed after the lemma definitions because it resolves names at elaboration time (unlike TheoremDoc, which tolerates forward refs).
  • Multi-NewTheorem pattern already exists in this codebase (e.g. InnerProductWorld/Level01.lean).
  • The two helpers are referenced only in Level 8 — no impact on later levels beyond the inventory growing monotonically (standard behavior).

Test plan

  • lake build succeeds
  • Visually confirm both helpers appear in Level 8's right-hand inventory panel

…_union in Level 8 inventory

Follow-up to #21: komugi64 reported that the helper lemma
zero_coeff_from_not_in_span did not appear in the level's theorem
inventory, forcing players to reprove it inline. Add TheoremDoc for
both helpers and a second NewTheorem (placed after the lemma
definitions, since NewTheorem resolves names at elaboration time)
so they show up in the right-hand inventory panel.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ZRTMRH ZRTMRH force-pushed the fix-issue-21-inv-mul-cancel-zero branch from 7e8b7d8 to 021c66e Compare May 15, 2026 16:27
@ZRTMRH ZRTMRH changed the title fix(Level 8): inv_mul_cancel₀ rename + expose helper lemmas (#21) fix(Level 8): expose helper lemmas in inventory (refs #21) May 15, 2026
@ZRTMRH ZRTMRH merged commit 1cc22e0 into main May 15, 2026
2 checks passed
@ZRTMRH ZRTMRH deleted the fix-issue-21-inv-mul-cancel-zero branch May 15, 2026 16:27
ZRTMRH added a commit that referenced this pull request May 15, 2026
…enceSpanWorld L09 inventories (#24)

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>
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