Skip to content

Divides ​

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

Divides(a, b) returns True if a divides b (i.e. b is an integer multiple of a), corresponding to the notation a ∣ b. Both operands are integers; a symbolic operand keeps the relation unevaluated.

✓ checked against that system · ! checked, with disagreements (hover a chip)FungrimDividesFungrim entry4ec333805c7aed65c8Wolfram LanguageDivisible!
Divides(integer, integer) -> booleanas compute-engine declares it
Juliaiszero(mod(ZZ(integer), ZZ(integer)))Rustdivides(integer, integer)
Typed signatures
TypePackageApplies
(integer, integer) -> booleancompute-enginealways

Domain: Compute engine

Examples

Basic #

2 divides 10

live ↗
In2∣102\mid10OutTrue\mathrm{True}

2 does not divide 5

live ↗
In2∣52\mid5OutFalse\mathrm{False}
Scope #

Exact multiples divide

live ↗
In3∣63\mid6OutTrue\mathrm{True}

Decided exactly even for a 3000-digit number

live ↗
In16 001∣1+103 00016\,001\mid1+10^{3\,000}OutTrue\mathrm{True}
Applications #

Digit sum of 2895 is 24, a multiple of 3

live ↗
In3∣2 8953\mid2\,895OutTrue\mathrm{True}

Alternating digit sum is a multiple of 11

live ↗
In11∣918 08211\mid918\,082OutTrue\mathrm{True}
Properties #

Predicates evaluate inside a list

live ↗
In[IsInteger(5),2∣10]\bigl\lbrack\mathrm{IsInteger}(5), 2\mid10\bigr\rbrackOut[True,True]\bigl\lbrack\mathrm{True}, \mathrm{True}\bigr\rbrack

48=8⋅648 = 8\cdot 6

live ↗
In8∣488\mid48OutTrue\mathrm{True}

12 does not divide 25

live ↗
In12∣2512\mid25OutFalse\mathrm{False}
live ↗
InSimplify(a∣ba,[a,b]∈Z)\mathrm{Simplify}(a\mid ba, \bigl\lbrack a, b\bigr\rbrack∈ℤ)Outa∣aba\mid ab
About
Examples10
Checked againstWolfram Language 9 agree1 differmathlib4 8 agreeJulia 8 agreeRust 8 agree
CrosswalkFungrimFungrim entry ×3Wolfram LanguageJuliaRust

Implementation

mappedmathlib4packages/oracle/src/mappings.ts

Divisibility over the integers, zero included (0 divides only 0); a rational operand fails to elaborate.

mappedjuliapackages/oracle/src/mappings.ts
mappedrustpackages/oracle/src/mappings.ts