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
{{ message }}
Repository navigation
Commit e2d74d9
Browse filesBrowse the repository at this point in the historyBrowse files
The binomial coefficient is a node, computed for a whole lower argument by the falling factorial and kept as itself otherwise (#1411)
binomial(n, k) is a function, Entity.Binomialf, spelled binomial(n, k)
and MathS.Binomial(n, k). A node rather than n!/(k! (n - k)!): that
quotient loses the integrality, has no value at a negative n where the
falling factorial n (n - 1) ... (n - k + 1)/k! does, and no rule can
read Pascal's identity or the binomial theorem in a ratio of three
factorials. A whole k is computed for any n -- binomial(5, 2) is 10,
binomial(-1, 3) is -1, binomial(1/2, 2) is -1/8 -- with 0 below k = 0
and above a non-negative whole n, and binomial(n, 0) is 1 for any n; a
symbolic argument keeps the node; a k that is not whole evaluates
numerically through the gamma function and has no value where n is a
negative whole number, which the domain condition states. LaTeX is
\binom{n}{k}, SymPy is sympy.binomial; the parser is regenerated for the
new name, and the public API baseline carries the node.
The first item of #1409 (the proofs book's chapter 8), as #809's survey
specified it: DERIVED_BUT_PRESERVE, next to the factorial.
Part of #1409.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Sources/AngouriMath/Core/Antlr/AngouriMath.g
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -467,6 +467,7 @@ atom returns[Entity value]
467
467
| 'argmax(' args = function_arguments ')' { Assert("argmax", 2, $args.list.Count); $value = $args.list[1] is Entity.Set.Inf { Element: Variable } argmaxRange ? MathS.Argmax($args.list[0], argmaxRange.Element, argmaxRange.SupSet) : throw new InvalidArgumentParseException("argmax expects its second argument to say which variable ranges over which set, as in argmax(f(t), t in S)"); }
468
468
| 'argmin(' args = function_arguments ')' { Assert("argmin", 2, $args.list.Count); $value = $args.list[1] is Entity.Set.Inf { Element: Variable } argminRange ? MathS.Argmin($args.list[0], argminRange.Element, argminRange.SupSet) : throw new InvalidArgumentParseException("argmin expects its second argument to say which variable ranges over which set, as in argmin(f(t), t in S)"); }
0 commit comments