You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[TEST] Try open LinearAlgebraGame to allow short theorem names
Experiment to test if adding LinearAlgebraGame to open statement allows
players to use inner_self_eq_zero without the full namespace prefix.
Changes:
- Added LinearAlgebraGame to open statement in Level02
- Updated hints and proofs to use short names
This may need to be reverted if it doesn't work on the game server.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@@ -211,6 +211,12 @@ msgid "Now let's prove a fundamental property that every linear map must satisfy
211
211
"**Note:** If you see hints appearing multiple times, this is a known issue with the game framework. Simply continue with your proof - the level will work correctly despite any duplicate hints."
212
212
msgstr""
213
213
214
+
#: Game.Levels.InnerProductWorld.Level01
215
+
msgid"For any vector `v`, `⟪v, v⟫ = 0` if and only if `v` is the zero vector.\n"
216
+
"\n"
217
+
"**Usage:** Use the full name `LinearAlgebraGame.inner_self_eq_zero` when applying this theorem."
218
+
msgstr""
219
+
214
220
#: Game.Levels.LinearMapsWorld.Level07
215
221
msgid"If T is surjective, then every element of W is in the range of T."
216
222
msgstr""
@@ -412,11 +418,6 @@ msgstr ""
412
418
msgid"The `constructor` tactic"
413
419
msgstr""
414
420
415
-
#: Game.Levels.InnerProductWorld.Level01
416
-
msgid"For any vectors `v, w`, and a scalar `a`, ⟪a • v, w⟫ = a * ⟪v, w⟫. This means that scalar multiplication\n"
417
-
"commutes with the inner product."
418
-
msgstr""
419
-
420
421
#: Game.Levels.TutorialWorld.Level05
421
422
msgid"## Summary\n"
422
423
"\n"
@@ -524,6 +525,13 @@ msgstr ""
524
525
msgid"`normSq_eq_norm_sq` is a proof that `normSq z = ‖z‖ ^ 2`. It essentially unfolds the `normSq` definition."
525
526
msgstr""
526
527
528
+
#: Game.Levels.InnerProductWorld.Level01
529
+
msgid"For any vectors `v, w`, and a scalar `a`, ⟪a • v, w⟫ = a * ⟪v, w⟫. This means that scalar multiplication\n"
530
+
"commutes with the inner product.\n"
531
+
"\n"
532
+
"**Usage:** Use `InnerProductSpace_v.inner_smul_left` when applying this theorem."
533
+
msgstr""
534
+
527
535
#: Game.Levels.VectorSpaceWorld.Level01
528
536
msgid"Vector space intro, zero scalar multiplication"
529
537
msgstr""
@@ -616,21 +624,6 @@ msgid "## Summary\n"
616
624
"Click \"Leave World\" to return to the main menu."
617
625
msgstr""
618
626
619
-
#: Game.Levels.InnerProductWorld.Level02
620
-
msgid"## The Goal\n"
621
-
"In this level, we prove that the norm of a vector is zero if and only if it is the zero vector. The\n"
622
-
"idea of the proof is to use the `inner_self_eq_zero` axiom, which requires cancelling out the square\n"
623
-
"roots.\n"
624
-
"\n"
625
-
"## The `apply_fun` tactic\n"
626
-
"The `apply_fun` tactic is used to apply functions to both sides of an equality. This only works in your\n"
627
-
"hypotheses, not in the goal. The syntax is `apply_fun (fun x => f x) at h`. If `h : a = b` is a proof,\n"
628
-
"then this will change `h` to `h : f a = f b`. This tactic can be very helpful, as squaring a square root\n"
629
-
"cancels out the operation.\n"
630
-
"\n"
631
-
"**Note:** If you see hints appearing multiple times, this is a known issue with the game framework. Simply continue with your proof - the level will work correctly despite any duplicate hints."
632
-
msgstr""
633
-
634
627
#: Game.Levels.VectorSpaceWorld.Level03
635
628
msgid"In any vector space V over K, multiplying a vector by -1 gives its additive inverse."
636
629
msgstr""
@@ -999,10 +992,6 @@ msgid "## Summary\n"
999
992
"Essential when working with fractions, division, or expressions with denominators in fields."
1000
993
msgstr""
1001
994
1002
-
#: Game.Levels.InnerProductWorld.Level01
1003
-
msgid"For any vectors `u, v, w`, ⟪(u + v), w⟫ = ⟪u, w⟫ + ⟪v, w⟫. That is, inner products distribute over addition"
1004
-
msgstr""
1005
-
1006
995
#: Game.Levels.LinearMapsWorld.Level05
1007
996
msgid"The range of any linear map is a subspace of the codomain."
1008
997
msgstr""
@@ -1015,6 +1004,13 @@ msgstr ""
1015
1004
msgid"Inner Product World"
1016
1005
msgstr""
1017
1006
1007
+
#: Game.Levels.InnerProductWorld.Level01
1008
+
msgid"For any vectors `v, w`, `⟪v, w⟫ = conj ⟪w, v⟫`. This means that the inner product commutes if you take\n"
1009
+
"the conjugate.\n"
1010
+
"\n"
1011
+
"**Usage:** Use the full name `LinearAlgebraGame.inner_conj_symm` when applying this theorem."
msgid"`ite` stands for `if then else`. If is used when creating functions. You can think of `ite P f1 f2` as\n"
1020
1016
"\"If P then f1 else f2\". This function gives you f1 when P is True, and f2 otherwise. This can help you\n"
@@ -1051,10 +1047,6 @@ msgstr ""
1051
1047
msgid"`Finset.subset_union_left` is a proof that if `a b : Finset S` are sets, then `a ⊆ a ∪ b`."
1052
1048
msgstr""
1053
1049
1054
-
#: Game.Levels.InnerProductWorld.Level01
1055
-
msgid"For any vector `v`, the imaginary part of `⟪v, v⟫` is zero. Equivalently, `⟪v, v⟫` is real."
1056
-
msgstr""
1057
-
1058
1050
#: Game.Levels.InnerProductWorld.Level08
1059
1051
msgid"You have proven the triangle inequality! \n"
1060
1052
"This key result guarantees that norm defines a 'distance' on the vector space."
@@ -1456,10 +1448,6 @@ msgid "In this level, we will learn the `unfold` and `apply` tactics. Our goal i
1456
1448
"**Note:** If you see hints appearing multiple times, this is a known issue with the game framework. Simply continue with your proof - the level will work correctly despite any duplicate hints."
1457
1449
msgstr""
1458
1450
1459
-
#: Game.Levels.InnerProductWorld.Level01
1460
-
msgid"For any vector `v`, `⟪v, v⟫ = 0` if and only if `v` is the zero vector"
1461
-
msgstr""
1462
-
1463
1451
#: Game.Levels.LinearMapsWorld.Level11
1464
1452
msgid"Linear Maps and Isomorphisms"
1465
1453
msgstr""
@@ -1544,6 +1532,50 @@ msgstr ""
1544
1532
msgid"Zero is always in the null space of any linear map."
1545
1533
msgstr""
1546
1534
1535
+
#: Game.Levels.InnerProductWorld.Level01
1536
+
msgid"The first level of this world will introduce two new ideas, the inner product and the norm.\n"
1537
+
"The inner product is a way of taking two vectors, and multiplying them to get a complex number. There\n"
1538
+
"are five main axioms that make such a function a valid inner product. First, any vector's inner product\n"
1539
+
"with itself must be a nonnegative real number. Secondly, a vector's inner product with itself must\n"
1540
+
"equal zero if and only if the vector is itself 0. The third and fourth axioms are that you can distribute\n"
1541
+
"vector addition and commute vector multiplication through the first element of the product. Lastly, the\n"
1542
+
"inner product has conjugate symmetry, that is that `⟪u, v⟫ = conj ⟪v, u⟫. Also, note that in any inner\n"
1543
+
"product space, our field K must be a subfield of ℂ. For convenience we will assume K is equal to ℂ.\n"
1544
+
"This is what allows us to commute multiplication through the inner product.\n"
1545
+
"\n"
1546
+
"```\n"
1547
+
"-- Inner product space definition for complex vector spaces\n"
" inner_self_im_zero : ∀ (v : V), (inner v v).im = 0\n"
1551
+
" inner_self_nonneg : ∀ (v : V), 0 ≤ (inner v v).re\n"
1552
+
" inner_self_eq_zero : ∀ (v : V), inner v v = 0 ↔ v = 0\n"
1553
+
" inner_add_left : ∀ (u v w : V), inner (u + v) w = inner u w + inner v w\n"
1554
+
" inner_smul_left : ∀ (a : ℂ) (v w : V), inner (a • v) w = a * inner v w\n"
1555
+
" inner_conj_symm : ∀ (v w : V), inner v w = conj (inner w v)\n"
1556
+
"```\n"
1557
+
"\n"
1558
+
"Once we have the inner product, vector norms are easy to define. We simply let `‖v‖ = sqrt ⟪v, v⟫.re`,\n"
1559
+
"which means that the norm of `v` is the square root of it's inner product with itself (we take `.re`)\n"
1560
+
"to make sure that `⟪v, v⟫` is a real number, although we already guarantee this with the first axiom).\n"
1561
+
"Note that the norm is called `norm_v`, which is what you should use if you try to `unfold`.\n"
1562
+
"\n"
1563
+
"```\n"
1564
+
"def norm_v (v : V) : ℝ := Real.sqrt ⟪v, v⟫.re\n"
1565
+
"```\n"
1566
+
"\n"
1567
+
"## Important: Namespace Prefix\n"
1568
+
"When using inner product axioms (like `inner_self_eq_zero`, `inner_self_nonneg`, etc.) in your proofs,\n"
1569
+
"you must use the full namespace prefix `LinearAlgebraGame.`. For example, write\n"
1570
+
"`LinearAlgebraGame.inner_self_eq_zero v` instead of just `inner_self_eq_zero v`.\n"
1571
+
"\n"
1572
+
"## The Goal\n"
1573
+
"This first level requires you to prove that `0 ≤ ‖v‖`. Since norm is defined as the square root of a\n"
1574
+
"nonnegative real number, it is inherenetly positive.\n"
1575
+
"\n"
1576
+
"**Note:** If you see hints appearing multiple times, this is a known issue with the game framework. Simply continue with your proof - the level will work correctly despite any duplicate hints."
1577
+
msgstr""
1578
+
1547
1579
#: Game.Levels.InnerProductWorld.Level03
1548
1580
msgid"`sq_eq_sq` is a proof that if `a` and `b` are nonnegative, `a^2 = b^2` if and only if `a = b`. If you\n"
1549
1581
"have hypotheses `h1 : 0 ≤ a`, `h2 : 0 ≤ b`, then `sq_eq_sq h1 h2` is a proof that `a ^ 2 = b ^ 2 ↔ a = b`."
@@ -1562,6 +1594,12 @@ msgstr ""
1562
1594
msgid"level completed with warnings… 🎭"
1563
1595
msgstr""
1564
1596
1597
+
#: Game.Levels.InnerProductWorld.Level01
1598
+
msgid"For any vector `v` the real part of `⟪v, v⟫` is nonnegative.\n"
1599
+
"\n"
1600
+
"**Usage:** Use the full name `LinearAlgebraGame.inner_self_nonneg` when applying this theorem."
msgid"If you have some set s, where you know `h : i ∈ s`, then `sum_eq_sum_diff_singleton_add h` is a proof that\n"
1923
1962
"`(Finset.sum s fun x => f x) = (Finset.sum (s \\ {i}) fun x => f x) + f i`"
@@ -2079,6 +2118,25 @@ msgid "This is the \"boss level\" of the Linear Independence and Span World. Thi
2079
2118
"system. However, in general, try to follow your intuition without blindly following the hints."
2080
2119
msgstr""
2081
2120
2121
+
#: Game.Levels.InnerProductWorld.Level02
2122
+
msgid"## The Goal\n"
2123
+
"In this level, we prove that the norm of a vector is zero if and only if it is the zero vector. The\n"
2124
+
"idea of the proof is to use the `inner_self_eq_zero` axiom, which requires cancelling out the square\n"
2125
+
"roots.\n"
2126
+
"\n"
2127
+
"## Important: Namespace Prefix\n"
2128
+
"When using inner product axioms in this world, you must use the full namespace prefix `LinearAlgebraGame.`.\n"
2129
+
"For example, use `LinearAlgebraGame.inner_self_eq_zero` instead of just `inner_self_eq_zero`.\n"
2130
+
"\n"
2131
+
"## The `apply_fun` tactic\n"
2132
+
"The `apply_fun` tactic is used to apply functions to both sides of an equality. This only works in your\n"
2133
+
"hypotheses, not in the goal. The syntax is `apply_fun (fun x => f x) at h`. If `h : a = b` is a proof,\n"
2134
+
"then this will change `h` to `h : f a = f b`. This tactic can be very helpful, as squaring a square root\n"
2135
+
"cancels out the operation.\n"
2136
+
"\n"
2137
+
"**Note:** If you see hints appearing multiple times, this is a known issue with the game framework. Simply continue with your proof - the level will work correctly despite any duplicate hints."
2138
+
msgstr""
2139
+
2082
2140
#: Game.Levels.VectorSpaceWorld.Level03
2083
2141
msgid"Scaling by -1"
2084
2142
msgstr""
@@ -2141,45 +2199,6 @@ msgid "`sum_eq_sum_diff_singleton_add` is a proof that if you have some set `s`,
2141
2199
"`Finset.sum s (fun x => f x) = Finset.sum (s / {i}) (fun x => f x) + f i. The syntax is `sum_eq_sum_diff_singleton_add h f`."
2142
2200
msgstr""
2143
2201
2144
-
#: Game.Levels.InnerProductWorld.Level01
2145
-
msgid"The first level of this world will introduce two new ideas, the inner product and the norm.\n"
2146
-
"The inner product is a way of taking two vectors, and multiplying them to get a complex number. There\n"
2147
-
"are five main axioms that make such a function a valid inner product. First, any vector's inner product\n"
2148
-
"with itself must be a nonnegative real number. Secondly, a vector's inner product with itself must\n"
2149
-
"equal zero if and only if the vector is itself 0. The third and fourth axioms are that you can distribute\n"
2150
-
"vector addition and commute vector multiplication through the first element of the product. Lastly, the\n"
2151
-
"inner product has conjugate symmetry, that is that `⟪u, v⟫ = conj ⟪v, u⟫. Also, note that in any inner\n"
2152
-
"product space, our field K must be a subfield of ℂ. For convenience we will assume K is equal to ℂ.\n"
2153
-
"This is what allows us to commute multiplication through the inner product.\n"
2154
-
"\n"
2155
-
"```\n"
2156
-
"-- Inner product space definition for complex vector spaces\n"
" inner_self_im_zero : ∀ (v : V), (inner v v).im = 0\n"
2160
-
" inner_self_nonneg : ∀ (v : V), 0 ≤ (inner v v).re\n"
2161
-
" inner_self_eq_zero : ∀ (v : V), inner v v = 0 ↔ v = 0\n"
2162
-
" inner_add_left : ∀ (u v w : V), inner (u + v) w = inner u w + inner v w\n"
2163
-
" inner_smul_left : ∀ (a : ℂ) (v w : V), inner (a • v) w = a * inner v w\n"
2164
-
" inner_conj_symm : ∀ (v w : V), inner v w = conj (inner w v)\n"
2165
-
"```\n"
2166
-
"\n"
2167
-
"Once we have the inner product, vector norms are easy to define. We simply let `‖v‖ = sqrt ⟪v, v⟫.re`,\n"
2168
-
"which means that the norm of `v` is the square root of it's inner product with itself (we take `.re`)\n"
2169
-
"to make sure that `⟪v, v⟫` is a real number, although we already guarantee this with the first axiom).\n"
2170
-
"Note that the norm is called `norm_v`, which is what you should use if you try to `unfold`.\n"
2171
-
"\n"
2172
-
"```\n"
2173
-
"def norm_v (v : V) : ℝ := Real.sqrt ⟪v, v⟫.re\n"
2174
-
"```\n"
2175
-
"\n"
2176
-
"## The Goal\n"
2177
-
"This first level requires you to prove that `0 ≤ ‖v‖`. Since norm is defined as the square root of a\n"
2178
-
"nonnegative real number, it is inherenetly positive.\n"
2179
-
"\n"
2180
-
"**Note:** If you see hints appearing multiple times, this is a known issue with the game framework. Simply continue with your proof - the level will work correctly despite any duplicate hints."
2181
-
msgstr""
2182
-
2183
2202
#: Game.Levels.InnerProductWorld.Level01
2184
2203
msgid"`sq_nonneg` shows that squares are nonnegative."
2185
2204
msgstr""
@@ -2316,10 +2335,6 @@ msgstr ""
2316
2335
msgid"`mul_le_mul_of_nonneg_right` allows multiplying inequalities by nonnegative values on the right."
2317
2336
msgstr""
2318
2337
2319
-
#: Game.Levels.InnerProductWorld.Level01
2320
-
msgid"For any vector `v` the real part of `⟪v, v⟫` is nonnegative."
0 commit comments