Learn R Programming

quhomology (version 1.1.1)

down_action: The down action for a birack or biquandle.

Description

This functions defines the down action for a birack or biquandle. In the case of a quandle or rack, it is the identity. The definition of this functions is $f_b(a)$, that is, b acting on a from below.

Usage

down_action(a, b, k)

Arguments

a

This is the elements that is acted upon. An integer.

b

This is the element that acts. An integer.

k

This is the order of the biquandle. It is not always required, but passed on nevertheless. An integer.

Value

An integer, representing an element in the birack or rack.

Details

This can (and should) be changed by the user if s/he requires a different down action. It could be implemented as a matrix lookup, a function or some other way. Examples for the first two options are below.

References

http://en.wikipedia.org/wiki/Biquandle http://en.wikipedia.org/wiki/Racks_and_quandles

See Also

up_action

Examples

Run this code
# NOT RUN {
## Example for version with function (for a dihedral quandle)
down_action <- function (a, b, k){

    result <- (2 * b - a)%%k
    return(as.integer(result))
}


##Example for matrix lookup (for commutative quandle over S_3, in which case k = 6)
down_action <- function (a, b, k){
    #first define the action matrix
    action_matrix <- rbind(c(0,0,0,0,0,0),c(1,1,5,5,2,2),c(2,5,2,1,5,1),
    c(3,4,4,3,4,4),c(4,3,3,3,4,3),c(5,2,1,2,1,5))
    result <-action_matrix[a + 1, b + 1]
    return(as.integer(result))
}

##example for quandles/racks
down_action <- function (a, b, k){

    return(a)
}

# }

Run the code above in your browser using DataLab