fix(Level 8): expose helper lemmas in inventory (refs #21)#23
Merged
Conversation
…_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>
7e8b7d8 to
021c66e
Compare
3 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces helper lemmas
zero_coeff_from_not_in_spanandsubset_diff_singleton_of_unionin Level 8's theorem inventory viaTheoremDoc+NewTheorem.Context
Follow-up to #21. After PR #22 fixed the
inv_mul_cancel→inv_mul_cancel₀rename, @komugi64 commented thatzero_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
NewTheoremfor the helpers is placed after the lemma definitions because it resolves names at elaboration time (unlikeTheoremDoc, which tolerates forward refs).NewTheorempattern already exists in this codebase (e.g.InnerProductWorld/Level01.lean).Test plan
lake buildsucceeds