Skip to content

Commit cf507cd

Browse files
Rafael-SOWNetclaude
andcommitted
amcli says with respect to and for, where it said over
`amcli diff x` differentiates with respect to x and `amcli solve x` solves for x; "over" names the set a variable ranges over, which neither says. The usage text, the man page, the readme and `amcli info`'s lines (`derivative with respect to x:`, `roots for x:`) now say so. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
1 parent e802567 commit cf507cd

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎Sources/Terminal/AngouriMath.Terminal.Lib/OneShot.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ let usage =
2222
amcli eval EXPR evaluates to a number, a boolean, or a + bi
2323
amcli simp EXPR simplifies
2424
amcli fsimp EXPR simplifies quickly: the normalisation, without the search
25-
amcli diff VAR EXPR differentiates over VAR
26-
amcli solve VAR STATEMENT solves over VAR, one root per line when there are finitely many
25+
amcli diff VAR EXPR differentiates with respect to VAR
26+
amcli solve VAR STATEMENT solves for VAR, one root per line when there are finitely many
2727
amcli sub VAR VALUE EXPR substitutes VALUE for VAR
2828
amcli latex EXPR writes EXPR as LaTeX
2929
amcli info EXPR its variables, derivatives, roots and stationary points
@@ -84,17 +84,17 @@ let private kindOfStationaryPoint (hessian: int -> int -> Entity) (size: int) =
8484
else "a saddle point"
8585

8686
/// <summary>
87-
/// The lines <c>amcli info</c> prints: the variables, the derivative and the roots over each, and
87+
/// The lines <c>amcli info</c> prints: the variables, the derivative and the roots for each, and
8888
/// the stationary points, each classified by the second derivative test.
8989
/// </summary>
9090
let private describe (expression: Entity) =
9191
let variables = expression.Vars |> Seq.toList
9292
let names = String.Join(", ", variables)
9393
[ yield $"variables: {names}"
9494
for v in variables do
95-
yield $"derivative over {v}: {expression.Differentiate(v).Simplify().Stringize()}"
95+
yield $"derivative with respect to {v}: {expression.Differentiate(v).Simplify().Stringize()}"
9696
for v in variables do
97-
yield $"roots over {v}: {expression.Equalizes(Entity.Number.Integer.Zero).Solve(v).Simplify().Stringize()}"
97+
yield $"roots for {v}: {expression.Equalizes(Entity.Number.Integer.Zero).Solve(v).Simplify().Stringize()}"
9898
match variables with
9999
| [] -> ()
100100
| [ v ] ->

‎Sources/Terminal/AngouriMath.Terminal/amcli.1‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ quickly: the normalisation, without the search.
3737
.BI diff " var expr"
3838
Differentiates
3939
.I expr
40-
over
40+
with respect to
4141
.IR var .
4242
.TP
4343
.BI solve " var statement"
4444
Solves
4545
.I statement
46-
over
46+
for
4747
.IR var ,
4848
one root per line when there are finitely many.
4949
.TP
@@ -63,7 +63,7 @@ as LaTeX.
6363
.BI info " expr"
6464
Describes
6565
.IR expr :
66-
its variables, the derivative and the roots over each, and its stationary points, each classified
66+
its variables, the derivative and the roots for each, and its stationary points, each classified
6767
by the second derivative test.
6868
.TP
6969
.B help

‎Sources/Terminal/readme.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ $ echo "1 + x^2" | amcli diff x
4444

4545
The commands are `eval`, `simp`, `fsimp`, `diff`, `solve`, `sub`, `latex` and `info`, and
4646
`amcli help` says what each takes. `info` describes an expression: its variables, the derivative
47-
and the roots over each, and its stationary points, each classified by the second derivative
47+
and the roots for each, and its stationary points, each classified by the second derivative
4848
test. An argument written as `_`, or left out, is read from stdin. The exit code
4949
is 0 for an answer, 1 when the input does not parse or cannot be answered, and 2 for a command
5050
that does not exist or is missing an argument. These are the commands of the earlier standalone

‎Sources/Tests/TerminalUnitTests/OneShotTest.fs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ let ``info classifies each stationary point`` (expression: string) (expected: st
110110
Assert.Contains(expected, printed.Split('\n'))
111111

112112
[<Fact>]
113-
let ``info names the variables and gives the derivative and the roots over each`` () =
113+
let ``info names the variables and gives the derivative and the roots for each`` () =
114114
let code, printed, _ = run [ "info"; "x^2 - 4" ] ""
115115
Assert.Equal(0, code)
116116
let lines = printed.Split('\n')
117117
Assert.Contains("variables: x", lines)
118-
Assert.Contains("derivative over x: 2 * x", lines)
119-
Assert.Contains(lines, fun line -> line.StartsWith("roots over x: ") && line.Contains("-2") && line.Contains("2"))
118+
Assert.Contains("derivative with respect to x: 2 * x", lines)
119+
Assert.Contains(lines, fun line -> line.StartsWith("roots for x: ") && line.Contains("-2") && line.Contains("2"))

0 commit comments

Comments
 (0)