You will find below a quick reference guide of the mathematical functions and operators available in the (min,+) interpreter that is available on-line as a Playground.

Function constructors


// Defines an affine function of slope 4 and constant 5
f1 := affine(4, 5)
// Defines a step function with step at time 4 with height 5
f2 := step(4, 5)
// Defines a staircase function with first step at time 4, with length 5 and height 6
f3 := stair(4, 5, 6)
// Defines a burst-delay function at time 4 
f4 := delay(4)
// Defines a bucket function of slope 4 and constant 5
f5 := bucket(4, 5)

// Ultimately affine function
// uaf(SEGMENT+) with last segment having slope and right point Infinity
f6:=uaf([(0,0)0(1,0)] ](1,2)0(2,2)] ](2,3)1(+Infinity,+Infinity)[)

// Ultimately pseudo-periodic function
// f7 := upp([SEGMENT*,] period(SEGMENT*) [, incr [,period]])
// Defines a pseudo-periodic function. First segment list is the finite part. The second part is the pseudo-periodic part. The increment is optional. The period is purely informative. 
// SEGMENT is [(x,y)] for a point, [(x1,y1)slope(x2,y2)]
// x and y could be any number, or +inf, +infinity, -inf, -infinity 
f7:=upp([(0,0)0(1,0)[ [(1,1)] ](1,2)0(2,2)], period(](2,3)1(3,4)[ [(3,5)] ](3,6)2(4,8)]))

// Draws the functions - click on run button below to execute the script
plot(f1, f2, f3, f4, f6, f7)

Function operators


f1 /\ f2     // minimum of f1 and f2. 
f1 \/ f2     // maximum of f1 and f2. 
f1 + f2      // sum of f1 and f2. 
f1 - f2      // subtraction of f1 and f2. 
f1 * f2      // min-convolution of f1 and f2. 
f1 / f2      // min-deconvolution of f1 and f2. 
star(f)      // subadditive closure of f. 
hDev(f, g)   // horizontal deviation between f and g 
vDev(f, g)   // vertical deviation between f and g 
hShift(f, n) // f horizontally shifted by n. 
vShift(f, n) // f vertically shifted by n.

f *_ g      // defined as f * g
f /_ g      // defined as f / g

// (max,+) operators:
f *^ g       // defined as zero - (   ( zero - f ) * (zero - g ) )
f /^ g       // defined as zero - (   ( zero - f ) / (zero - g ) )

// In next release
// f comp g     // composition of f and g, ie for all x, (f comp g)(x) = f(g(x))
// left-ext(f)  // defined as the function g such that for all x, g(x) = f(x-)
// right-ext(f) // defined as the function g such that for all x, g(x) = f(x+)
// low_inv(f)   // defined as inv( f )
// up_inv(f)    // defined as left-ext( inv( f ) )

Function


f1 := EXPR // variable assignment
f          // returns the definition of f
f(x)       // value of f at x
f(x+)      // value of f at the right of x
f(x-)      // value of f at the left of x

Value operators


v := EXPR //variable assignment
v1 /\ v2   // minimum of v1 and v2. 
v1 \/ v2   // maximum of v1 and v2. 
v1 + v2    // sum of v1 and v2. 
v1 - v2    // substraction of v1 and v2. 
v1 * v2    // multiplication of v1 and v2. 
v1 ÷ v2    // division of v1 and v2. Type Alt+246 on MS/Windows to get the Obelus sign 
v1 div v2  // division of v1 by v2. 

Statements


help(fct)    // displays some help about fct if available
assert(expr) // checks if the expression evaluates to true
// plot(f1,...,args) 
// plots a graph displaying functions f1,f2,... args are the parameters for the drawing.
// Valid args are:
//  main: the graph title
//  xlim: the range for the x axis
//  Ylim: the range for the y axis
//  xlab: the label for the x axis
//  ylab: the label for the y axis
// examples
plot(f1)
plot(f1, f2)
plot(service2,service1,xlim=[-0.3,15],ylim=[-0.3,15])
plot(f1, main="f1", xlim=[-0.5, 5], xlab="time", ylab="packets")