AngouriMath
AngouriMath.Entity
Classes within the AngouriMath.Entity namespace
Absf
Summary
A node of abs
Alephf
Summary
The aleph numberaleph(k) , the size of an infinite set:aleph(0) is the
size of the whole numbers, andaleph(k + 1) the least size after
aleph(k) .
Remarks
card of an infinite set is one of these, or a power of2 of one:
card(ZZ) isaleph(0) andcard(RR) is2^aleph(0) , which is an
aleph but not a named one -- that it isaleph(1) is the continuum hypothesis,
which ZFC does not decide. A sum or a product of sizes is the larger of them, and the
sizes compare.
https://github.com/asc-community/AngouriMath/issues/1409
Andf
Summary
Is true iff both operands are true
Application
Summary
Application of arguments to the given expression
Arccosecantf
Summary
A node of arccosecant
Arccosf
Summary
A node of arccosine
Arccotanf
Summary
A node of arccotangent
Arcsecantf
Summary
A node of arcsecant
Arcsinf
Summary
A node of arcsine
Arctanf
Summary
A node of arctangent
Argmaxf
Summary
The set of points at which an expression takes its largest value over a set:
argmax(f(t), t in S) . See Maximumf.
Argminf
Summary
The set of points at which an expression takes its smallest value over a set:
argmin(f(t), t in S) . See Maximumf.
Binomialf
Summary
A node of the binomial coefficientbinomial(n, k) , "n choose k".
Remarks
A node rather thann!/(k! (n - k)!) : that quotient is correct and useless as a
spelling -- it loses the integrality, it is undefined for a negativen where
the falling factorialn (n - 1) ... (n - k + 1)/k! is not, and no rule can
recognise Pascal's identity or Vandermonde's in a ratio of three factorials. The
falling factorial is the definition for a wholek , whatevern is; a
wholek below zero gives0 ; and for ak that is not whole the
value isΓ(n + 1)/(Γ(k + 1) Γ(n - k + 1)) , which has no value wheren is a negative whole number. What cannot be settled is left as this node.
https://github.com/asc-community/AngouriMath/issues/1409
https://github.com/asc-community/AngouriMath/issues/809
Boolean
Summary
This node represents all possible values a boolean node might be of
CalculusOperator
Summary
Describes any calculus operator
Remarks
Cardf
Summary
This node represents the cardinality of a set:card(S) is the number of
elements ofS . Counted for a finite set whose elements are numbers, and for
an interval whose ends are; left as written for an infinite set, which has a
cardinality this library has no number for, and for a set whose elements are not
yet known to be distinct.
https://github.com/asc-community/AngouriMath/issues/1212
Ceilf
Summary
A node of ceil: the least integer not below the argument.
Remarks
Chif
Summary
The hyperbolic cosine integral,Chi(z) = gamma + ln z + int_0^z (cosh t - 1)/t dt , with the cut ofln .
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Cif
Summary
The cosine integral,Ci(z) = gamma + ln z + int_0^z (cos t - 1)/t dt , with the cut ofln .
Remarks
https://github.com/asc-community/AngouriMath/issues/1501ComparisonSign
Summary
=, <, >, >=, <=
Nodes Equalsf, Lessf, LessOrEqualf, Greaterf, GreaterOrEqualf are assignable to this type.
Congruentf
Summary
The statement thata andb are congruent modulon : written
a = b (mod n) , ora ≡ b (mod n) , and meaningn divides a - b . A
relation between integers with the modulus written once at the end, as mathematics
writes it — not the remainder operatora mod n , which is a number, and which the
reference this follows refuses to write in this sense at all. The modulus may be any
integer: modulo0 it is equality, and its sign is immaterial, exactly as in
n divides a - b . A statement about integers:NaN elsewhere.
https://github.com/asc-community/AngouriMath/issues/1409
Constant
Summary
A mathematical constant: a number whose spelling happens to be a legal identifier.
Remarks
It is a Variable by inheritance, so everything that reads a leaf by name
keeps working, and a distinct type by record identity, which is the whole point: a
binder that declarespi and the constantpi are no longer one object, so
evaluation can tell them apart without being told where it is.
#984A binder binds occurrences, not values, and that is the whole of the second
distinction here. Every constant a writer types is the one object in
NamedConstants , because the parser and pi hand that
object back; the base ofln and ofexp is
EulerIntrinsic, a separate object, because it is Euler's number standing
in an operator's own definition and not a reference to the namee . A binder
replaces the occurrences it was handed — compared by reference — so
sum(ln(x), e, 1, 2) is2 * ln(x) whilesum(log(e, x), e, 1, 2) ,
where the writer did namee , islog(1, x) + log(2, x) .
The two are equal, and deliberately so: they are the same number, they print
alike, and any rule that matches one matches the other, so nothing about canonical form,
equality or substitution changes. Only the identity of the occurrence differs, and only
while a binder is deciding what it binds — which is at construction, before anything
evaluates.
ContinuousNode
Summary
Any node that might be counted as a number, derived, etc. is continuous
Cosecantf
Summary
A node of secant
Cosf
Summary
A node of cosine
Cotanf
Summary
A node of cotangent
Derivativef
Summary
A node of derivative
Remarks
Negative iterations convert to integrals.
Divf
Summary
A node of division
Dividesf
Summary
This node represents whether the first argument divides the second:a divides b is the statement thatb is a whole multiple ofa , which for integers is
b mod a = 0 , and0 divides b exactly whenb is 0. A statement
about integers: over anything else it isNaN .
https://github.com/asc-community/AngouriMath/issues/1212
Eif
Summary
The exponential integral,Ei(z) = gamma + (ln z - ln(1/z))/2 + sum_(k >= 1) z^k/(k k!) ,
which on the real line is the principal value ofint_-oo^x e^t/t dt .
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Equalsf
Summary
It is true if left and right are equal
Erfcf
Summary
The complementary error function,erfc(z) = 1 - erf(z) .
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Erff
Summary
The error function,erf(z) = 2/sqrt(pi) int_0^z e^(-t^2) dt , entire and odd.
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Erfif
Summary
The imaginary error function,erfi(z) = -i erf(i z) , which on the real line is
2/sqrt(pi) int_0^x e^(t^2) dt .
Remarks
https://github.com/asc-community/AngouriMath/issues/1501EvaledValue
Summary
A value of Evaled, with the node and the precision it was computed for.Existsf
Summary
ExistsUniquef
Summary
exists! x in S : P : exactly one member ofS satisfiesP , which is
exists x in S : P and forall y in S : P(y) implies y = x . See Quantifier.
Factorialf
Summary
A node of factorial
Floorf
Summary
A node of floor: the greatest integer not above the argument.
Remarks
On a complex argument it is taken componentwise, so that
floor(3/2 + 5/2i) is1 + 2i . That is what SymPy and Mathematica
both do, and it is the only reading under whichfloor of a real number
keeps its meaning when the imaginary part happens to be zero.
Forallf
Summary
Function
Summary
Describes any node that is a function (e. g. sin, cos, etc.) or calculus operator (e. g. derivative, integral, limit)
but not an arithmetic operator or leaf
Gcdf
Summary
A node of gcd: the greatest common divisor of its two arguments.
Remarks
Not integers only. SymPy'sgcd is the polynomial gcd with the integer case
as a special case, and this library already computes one — see
PolynomialGcd, which the
PolynomialGcdCancellation rule set uses. What cannot be settled is left as
this node rather than guessed at.
Greaterf
Summary
It is true iff both parts are numeric and real, and left number is greater
than the right one
It is false iff both parts are numeric and real, and left number is less or equal
the right one
It is NaN/unsimplified otherwise.
GreaterOrEqualf
Summary
It is true iff both parts are numeric and real, and left number is greater
than the right one or equal to it
It is false iff both parts are numeric and real, and left number is less
the right one
It is NaN/unsimplified otherwise.
Impliesf
Summary
Is true iff assumption is false or conclusion is true
Integralf
Summary
A node of integral
Iversonf
Summary
The Iverson bracketiverson(P) :1 where the statementP holds and
0 where it does not.
Remarks
It is how a count is written as a sum:sum(iverson(k divides 12), k, 1, 12) is
the number of divisors of12 . A named function rather than a bracket, since every
bracket shape the grammar has already means something: a vector, a matrix, an interval.
A statement that is not decided keeps the node, and so does a number, which is not a
statement, as a connective keeps one.
https://github.com/asc-community/AngouriMath/issues/1478
Lambda
Summary
A lambda with the only parameter and its body
Lcmf
Summary
The least common multiple of two numbers:lcm(a, b) , non-negative by the same
convention as Gcdf, and0 where either is0 . Over
rationalslcm(a/b, c/d) islcm(a, c) / gcd(b, d) , which is what SymPy
gives. Left as this node where it cannot be settled.
https://github.com/asc-community/AngouriMath/issues/1409
Lessf
Summary
It is true iff both parts are numeric and real, and left number is less
than the right one
It is false iff both parts are numeric and real, and left number is greater or equal
the right one
It is NaN/unsimplified otherwise.
LessOrEqualf
Summary
It is true iff both parts are numeric and real, and left number is less
than the right one or equal to it
It is false iff both parts are numeric and real, and left number is greater
the right one
It is NaN/unsimplified otherwise.
Lif
Summary
The logarithmic integral,li(z) = Ei(ln z) , which onx > 0 is the principal
value ofint_0^x dt/ln t .
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Limitf
Summary
A node of limit
Logf
Summary
A node of logarithm
Matrix
Summary
Basic matrix implementation: https://en.wikipedia.org/wiki/Matrix_(mathematics)Maxf
Summary
A node of max: the greater of its two arguments.
Remarks
See Minf for why this is a node.Maximumf
Summary
The largest value of an expression as a variable ranges over a set:
max(f(t), t in S) . A binder, like Summationf: the variable is
bound throughout the expression and the set.
https://github.com/asc-community/AngouriMath/issues/1212
Minf
Summary
A node of min: the lesser of its two arguments.
Remarks
A node rather than sugar over(a + b - abs(a - b)) / 2 . The closed form is
what this simplifies to where that helps; it is not what it should print
as, and the round-trip contract would make that permanent. SymPy keeps
Min as a node for the same reason.
Only ordered arguments compare, so a complex one is left alone rather than
guessed at.
Minimumf
Summary
The smallest value of an expression as a variable ranges over a set:
min(f(t), t in S) . See Maximumf.
Minusf
Summary
A node of difference
Modf
Summary
A node of modulus, that is, the floored remainder after division,
a - b * floor(a / b) , which takes the sign of the divisor:
(-7) mod 3 is2 and7 mod (-3) is-2 , the convention of
SymPy, Mathematica and Maxima and the one under which the residues modulon are0 ton - 1 . Not C#'s% , which truncates; this comment said
the opposite of what the evaluation and the documentation do.
Mulf
Summary
A node of product
Notf
Summary
Whatever its argument is, the result will be inverted
Number
Summary
Orf
Summary
Is true iff at least one operand is true,
Phif
Summary
This node represents the Euler totient function (phi)
Piecewise
Summary
This is a node which defined on different subsets differently. When evaluating, it will turn
into a particular case once all cases' predicates before are false, and this case's predicate is true.
That is, the order counts. An example:
Piecewise(a provided false, b provided true, c provided true)
Will be evaluated into b,
Piecewise(a provided false, b provided c, c provided false)
Will remain as it is (although unreachable cases will be removed)
Powf
Summary
A node of exponential (power)
Primef
Summary
Then -th prime,prime(n) :prime(1) is2 ,prime(25) is97 . An enumeration ofPP in its order, which a set does not carry, so
a function of its own -- SymPy'sprime(n) . Defined on the positive whole numbers.
https://github.com/asc-community/AngouriMath/issues/1450
Productf
Summary
A product over a bound variable:product(f, i, from, to) is
f(from) · … · f(to) . See Summationf, which it mirrors exactly.
Remarks
Providedf
Summary
That is a node which equals Expression if Predicate is true, otherwise NaNQuantifier
Summary
A quantified statement:forall x in S : P ,exists x in S : P and
exists! x in S : P . A binder, like a set builder: the name is bound throughout
the body and the set, and the statement is a function of what else the body mentions.
The quantification set is mandatory, as Sullivan and Mackey's proofs book insists — a
statement is quantified over something, andforall x : x^2 >= 0 is true of
the reals and false of the complex numbers.
https://github.com/asc-community/AngouriMath/issues/1409
https://github.com/asc-community/AngouriMath/issues/225
Roundf
Summary
A node of round: the nearest integer, with a tie going to the even one.
Remarks
Half to even, which is what Python, SymPy, Mathematica and IEEE 754 all do — and
what .NET'sMath.Round does by default, though not what most people expect
of it. Soround(1/2) is0 andround(3/2) is2 , and it
is notfloor(x + 1/2) , which differs at every tie.
Secantf
Summary
A node of secant
Set
Summary
https://en.wikipedia.org/wiki/Set_(mathematics) A set might be a set operator, conditinal set, finite set, or interval
Shif
Summary
The hyperbolic sine integral,Shi(z) = int_0^z sinh(t)/t dt , entire and odd.
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Sif
Summary
The sine integral,Si(z) = int_0^z sin(t)/t dt , entire and odd.
Remarks
https://github.com/asc-community/AngouriMath/issues/1501Signumf
Summary
A node of signum
Sinf
Summary
A node of sine
SortKeyCache
Summary
The keys, behind a struct that is equal to every other, for the reason
LazyPropertyA is: an Entity is a record and compares every
field, so a bare array here made two equal trees unequal the moment one had been
sorted -- and the simplifier, which recognises a repeated candidate by equality,
then never recognised one. Measured: 30 GB and 57 s onSimplifyHard .
Statement
Summary
This class describes every node whose value is boolean, that is, true or false.
Example
Entity t1 = "a and b"; // Statement Entity t2 = "a > b > c"; // Statement Entity t3 = "a or b implies x > 0"; // Statement Entity t4 = "a"; // Not Statement Entity t5 = "a + 3"; // Not Statement Entity t6 = "a provided c and d"; // Not StatementSumf
Summary
A node of sum
Summationf
Summary
A summation over a bound variable:sum(f, i, from, to) is
f(from) + … + f(to) .
Remarks
A CalculusOperator rather than a Sumf of many terms,
because the bounds may be symbolic —sum(i, i, 1, n) has no finite expansion
and is still a well-formed expression. Where they are concrete integers it expands,
which is what makes the common case useful without the general case being wrong.
The index is bound: it is the summation index, not a free variable of
the expression, so substituting it from outside must not reach inside. That is the
propertyConditionalSet already has and the one
#878 was about
getting wrong.
#248 SumOverSetf
Summary
A sum over a set:sum(f(x), x in S) is the sum off(x) over the members
x ofS , each counted once. A binder, like Summationf, whose
range is a set rather than two bounds, and so has no index and no order: the sum over
the roots of a polynomial issum(f(w), w in { w : p(w) = 0 }) , which needs no
first root.
https://github.com/asc-community/AngouriMath/issues/1285
Tanf
Summary
A node of tangent
TrigonometricFunction
Summary
Describes any function that is related to trigonometry
Valuationf
Summary
Thep -adic valuation,valuation(n, p) : the exponent of the prime
p inn , sovaluation(12, 2) is2 andvaluation(12, 5) is0 ;+oo atn = 0 , by the convention every text uses. Sullivan and
Mackey's Ex 5.5.1 writesn = 2^m (2 l + 1) withm the 2-adic valuation, and
n = product(p^valuation(n, p), p in PP) is what a factorisation says.
https://github.com/asc-community/AngouriMath/issues/1450
Variable
Summary
Variable node. It only has a name.
Construct a Variable with an implicit conversion from String.
It has no type, so you can substitute any value under a given variable.
Xorf
Summary
Is true iff one operand is true
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4405 pages online