ModuloSteps - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Student[Basics]

  

ModuloSteps

  

generate steps for evaluating modulos

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ModuloSteps( expr )

ModuloSteps( expr, implicitmultiply = true )

Parameters

expr

-

string or expression

implicitmultiply

-

(optional) truefalse

output = ...

-

(optional) option to control the return value

displaystyle = ...

-

(optional) option to control the layout of the steps

Description

• 

The ModuloSteps command accepts an expression that is expected to contain modulos and displays the steps required to evaluate each modulo given.

• 

If expr is a string, then it is parsed into an expression using InertForm:-Parse so that no automatic simplifications are applied, and thus no steps are missed.  

• 

The implicitmultiply option is only relevant when expr is a string.  This option is passed directly on to the InertForm:-Parse command and will cause things like 2x to be interpreted as 2*x, but also, xyz to be interpreted as x*y*z.

• 

The output and displaystyle options are described in Student:-Basics:-OutputStepsRecord. The return value is controlled by the output option.  

• 

This function is part of the Student:-Basics package.

Examples

> 

with⁡Student:-Basics:

> 

ModuloSteps⁡4 mod 7

4mod7•Evaluate modulo, which is the remainder of4divided by74

(1)
> 

ModuloSteps⁡((3 + 5 + 6) mod 4) + ((5*6*7) mod 3)

3+5+6mod4+5⋅6⋅7mod3•Examine term3+5+6mod4•Apply theadditionmod rule:a+bmodm=amodm+bmodmmodm3+5mod4+6mod4mod4•Examine term5mod4•Evaluate modulo, which is the remainder of5divided by41•This gives:3+1+6mod4mod4•Examine term6mod4•Evaluate modulo, which is the remainder of6divided by42•This gives:3+1+2mod4•Simplify6mod4•Evaluate modulo, which is the remainder of6divided by42•This gives:2+5⋅6⋅7mod3•Examine term5⋅6⋅7mod3•Apply theproductmod rule:a⋅bmodm=amodm⋅bmodmmodm5mod3⋅6mod3⋅7mod3mod3•Examine term5mod3•Evaluate modulo, which is the remainder of5divided by32•This gives:2⋅6mod3⋅7mod3mod3•Examine term6mod3•Evaluate modulo, which is the remainder of6divided by30•This gives:2⋅0⋅7mod3mod3•Examine term7mod3•Evaluate modulo, which is the remainder of7divided by31•This gives:2⋅0⋅1mod3•Simplify0mod3•Evaluate modulo, which is the remainder of0divided by30•This gives:2+0•Simplify2

(2)
> 

ModuloSteps⁡(2^200 mod 24) + (2^201 mod 24)

2200mod24+2201mod24•Examine term2200mod24•Apply exponent rule:an⁢m+c=anm⋅ac2728⋅24mod24•Evaluate inside exponents12828⋅16mod24•Apply theproductmod rule:a⋅bmodm=amodm⋅bmodmmodm12828mod24⋅16mod24•Examine term12828mod24•Apply thepowermod rule:abmodm=amodmbmodm128mod2428mod24•Examine term128mod24•Evaluate modulo, which is the remainder of128divided by248•This gives:828mod24•Apply exponent rule:an⁢m+c=anm⋅ac839⋅8mod24•Evaluate inside exponents5129⋅8mod24•Apply theproductmod rule:a⋅bmodm=amodm⋅bmodmmodm5129mod24⋅8mod24•Examine term5129mod24•Apply thepowermod rule:abmodm=amodmbmodm512mod249mod24•Examine term512mod24•Evaluate modulo, which is the remainder of512divided by248•This gives:89mod24•Apply exponent rule:an⁢m=anm833mod24•Evaluate inside exponents5123mod24•Apply thepowermod rule:abmodm=amodmbmodm512mod243mod24•Examine term512mod24•Evaluate modulo, which is the remainder of512divided by248•This gives:83mod24•Evaluate inside exponents512mod24•Evaluate modulo, which is the remainder of512divided by248•This gives:8⋅8mod24•Simplify64mod24•Evaluate modulo, which is the remainder of64divided by2416•This gives:16⋅16mod24•Simplify256mod24•Evaluate modulo, which is the remainder of256divided by2416•This gives:16+2201mod24•Examine term2201mod24•Apply exponent rule:an⁢m+c=anm⋅ac2728⋅25mod24•Evaluate inside exponents12828⋅32mod24•Apply theproductmod rule:a⋅bmodm=amodm⋅bmodmmodm12828mod24⋅32mod24mod24•Examine term12828mod24•Apply thepowermod rule:abmodm=amodmbmodm128mod2428mod24•Examine term128mod24•Evaluate modulo, which is the remainder of128divided by248•This gives:828mod24•Apply exponent rule:an⁢m+c=anm⋅ac839⋅8mod24•Evaluate inside exponents5129⋅8mod24•Apply theproductmod rule:a⋅bmodm=amodm⋅bmodmmodm5129mod24⋅8mod24•Examine term5129mod24•Apply thepowermod rule:abmodm=amodmbmodm512mod249mod24•Examine term512mod24•Evaluate modulo, which is the remainder of512divided by248•This gives:89mod24•Apply exponent rule:an⁢m=anm833mod24•Evaluate inside exponents5123mod24•Apply thepowermod rule:abmodm=amodmbmodm512mod243mod24•Examine term512mod24•Evaluate modulo, which is the remainder of512divided by248•This gives:83mod24•Evaluate inside exponents512mod24•Evaluate modulo, which is the remainder of512divided by248•This gives:8⋅8mod24•Simplify64mod24•Evaluate modulo, which is the remainder of64divided by2416•This gives:16⋅32mod24mod24•Examine term32mod24•Evaluate modulo, which is the remainder of32divided by248•This gives:16⋅8mod24•Simplify128mod24•Evaluate modulo, which is the remainder of128divided by248•This gives:16+8•Simplify24

(3)

Compatibility

• 

The Student:-Basics:-ModuloSteps command was introduced in Maple 2024.

• 

For more information on Maple 2024 changes, see Updates in Maple 2024.

See Also

Student:-Basics

Student:-Basics:-ExpandSteps

Student:-Basics:-SimplifySteps