fix: expose helper lemmas in L07/L09 inventories (follow-up to #23)#24
Merged
Conversation
…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>
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
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_nonzeronorm_sq_decompositionscaled_norm_le_originalnorm_pos_of_nonzeronorm_sq_scaled_eqLinearIndependenceSpanWorld Level 9 (Span After Removing Elements) — adds:
union_diff_singleton_eqfx_sum_equalityfw_sum_equalityImplementation notes
NewTheorem, so it's extended in place.NewTheoremprecedes the helper definitions, so a secondNewTheoremis added after the helper block (same approach as fix(Level 8): expose helper lemmas in inventory (refs #21) #23).LinearAlgebraGame.<name>form since both files live undernamespace LinearAlgebraGame.Safety
Game/).Game.lean: No world introducing <name>, but required by <World>build warnings — confirmed.Test plan
lake buildsucceedsNo world introducingwarnings eliminated