docs(linalg): formula-doc design and F1 display auto-simplify
Lock the run-implies-correct authoring model, default-simplify ascii/latex/show (with raw= escape), and add linalg-doc-smoke for (AB)^T identity. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
51bb8767e3
commit
b2401b8458
11 files changed
+355
-30
No files matched your search
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: linalg formula-doc smoke (F1)
|
||||
description: Run-implies-correct — (AB)^T ascii without explicit simplify.
|
||||
import la:ext/linalg/linalg.mq.md
|
||||
---
|
||||
|
||||
# Transpose reverses products
|
||||
|
||||
Narration: \((AB)^\top = B^\top A^\top\). The identity is checked by running this file.
|
||||
|
||||
# main
|
||||
|
||||
*`A` = > la.symbol name="A" rows=2 cols=3*
|
||||
*`B` = > la.symbol name="B" rows=3 cols=2*
|
||||
*`P` = `A` * `B`*
|
||||
*`Pt` = > `P`.T*
|
||||
*`t` = > `Pt`.ascii*
|
||||
> print text=`t`
|
||||
1. `t` == "B^T*A^T"
|
||||
> print text=identity-ok
|
||||
2. *
|
||||
> print text=identity-fail
|
||||
|
||||
*`raw` = > la.ascii expr=`Pt` raw=True*
|
||||
1. `raw` == "(A*B)^T"
|
||||
> print text=raw-ok
|
||||
2. *
|
||||
> print text=raw-fail
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: linalg infix and matrix methods
|
||||
description: A+B / A*B dispatch; `A`.T method chain.
|
||||
description: A+B / A*B dispatch; `A`.T method chain; display auto-simplify.
|
||||
import la:ext/linalg/linalg.mq.md
|
||||
---
|
||||
|
||||
@@ -14,8 +14,7 @@ import la:ext/linalg/linalg.mq.md
|
||||
|
||||
*`P` = `A` * `B`*
|
||||
*`Pt` = > `P`.T*
|
||||
*`s` = > `Pt`.simplify*
|
||||
*`st` = > `s`.ascii*
|
||||
*`st` = > `Pt`.ascii*
|
||||
> print text=`st`
|
||||
|
||||
*`ty` = C[^_type]*
|
||||
|
||||
Reference in new issue
Block a user