Skip to content

Add ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand.

Sum of two or more values.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaAdditionMathWorldAdditionWikidataQ32043Encyclopedia of MathematicsAdditionBritannicatopic/additionFungrimAddWolfram LanguagePlus✓
Add(value+) -> valueSum of two or more values.
Typed signatures
TypePackageApplies
(value+) -> valueadelesreplaces numeralson Adele, ProfiniteNumber
(value+) -> valueanalyticreplaces compute-engineon Around, CenteredInterval, Interval
(value+) -> valuecompute-enginealways
(value+) -> valuehypercomplexreplaces analyticfor symbols ^(?:i|j|epsilon|e|f|theta|epsilonSymbol|varepsilon|thetaSymbol|vartheta)_\d+$
(value+) -> valuenumeralsreplaces hypercomplexon AdicNumeral
(value+) -> valueresiduesreplaces hypercomplexon IntegerMod

Domain: Compute engine

Examples

Basic #

Lists add element by element

live ↗
In[10,20,30]+[1,2,3]\bigl\lbrack10, 20, 30\bigr\rbrack+\bigl\lbrack1, 2, 3\bigr\rbrackOut[11,22,33]\bigl\lbrack11, 22, 33\bigr\rbrack
live ↗
Inx+[1,2,3]x+\bigl\lbrack1, 2, 3\bigr\rbrackOut[x+1,x+2,x+3]\bigl\lbrack x+1, x+2, x+3\bigr\rbrack
Scope #

Symbolic lists add element-wise too

live ↗
In[a,b]+[c,d]\bigl\lbrack a, b\bigr\rbrack+\bigl\lbrack c, d\bigr\rbrackOut[a+c,b+d]\bigl\lbrack a+c, b+d\bigr\rbrack

A scalar is added to every element

live ↗
Inx+[a,b,c]x+\bigl\lbrack a, b, c\bigr\rbrackOut[a+x,b+x,c+x]\bigl\lbrack a+x, b+x, c+x\bigr\rbrack

The scalar reaches every entry of a nested list

live ↗
Inx+[[a,b],[c,d]]x+\bigl\lbrack\bigl\lbrack a, b\bigr\rbrack, \bigl\lbrack c, d\bigr\rbrack\bigr\rbrackOut[[a+x,b+x],[c+x,d+x]]\bigl\lbrack\bigl\lbrack a+x, b+x\bigr\rbrack, \bigl\lbrack c+x, d+x\bigr\rbrack\bigr\rbrack

Interval endpoints add: [0,1]+[−1,1]=[−1,2][0,1]+[-1,1]=[-1,2]

live ↗
InInterval(0,1)+Interval(−1,1)\mathrm{Interval}(0, 1)+\mathrm{Interval}(-1, 1)OutInterval(−1,2)\mathrm{Interval}(-1, 2)
live ↗
In[[a,b],[c,d]]+[[1,2],[3,4]]\bigl\lbrack\bigl\lbrack a, b\bigr\rbrack, \bigl\lbrack c, d\bigr\rbrack\bigr\rbrack+\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack, \bigl\lbrack3, 4\bigr\rbrack\bigr\rbrackOut[[a+1,b+2],[c+3,d+4]]\bigl\lbrack\bigl\lbrack a+1, b+2\bigr\rbrack, \bigl\lbrack c+3, d+4\bigr\rbrack\bigr\rbrack
Properties #

A sum is flat: four terms, one Add of length 4

live ↗
InLength(a+b+c+d)\mathrm{Length}(a+b+c+d)Out44

Folding Add gives the running partial sums

live ↗
InFoldList(Add,0,[a,b,c])\mathrm{FoldList}(\mathrm{Add}, 0, \bigl\lbrack a, b, c\bigr\rbrack)Out[0,a,a+b,a+b+c]\bigl\lbrack0, a, a+b, a+b+c\bigr\rbrack
live ↗
InReplaceAll(a+b+c+d,Rule(a+d,x))\mathrm{ReplaceAll}(a+b+c+d, \mathrm{Rule}(a+d, x))Outa+b+c+da+b+c+d
live ↗
Inf+g⊲xf+g\lhd xOutf+g⊲xf+g\lhd x
live ↗
InThrough((f+g⊲x))\mathrm{Through}((f+g\lhd x))Outg(x)+f(x)g(x)+f(x)
About
Examples12
Checked againstWolfram Language 12 agreeSageMath 7 agreeSymPy 8 agreeJulia 1 agreeRust 1 error
CrosswalkWikipediaMathWorldWikidataEncyclopedia of MathematicsBritannicaFungrimWolfram Language

Implementation

mappedsympypackages/oracle/src/mappings.ts
mappedmpmathpackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts
mappedoscarpackages/oracle/src/mappings.ts
mappedjuliapackages/oracle/src/mappings.ts
mappedmathlib4packages/oracle/src/mappings.ts
mappedrustpackages/oracle/src/mappings.ts