Struct peano::Pred [] [src]

pub struct Pred<N: NonPos> { /* fields omitted */ }

For any non-positive Peano number N, we define its predecessor, Pred<N>.

This gives us negative Peano numbers.

Trait Implementations

impl<N: Copy + NonPos> Copy for Pred<N>
[src]

impl<N: Clone + NonPos> Clone for Pred<N>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: NonPos> Peano for Pred<N>
[src]

impl<N: NonPos> NonPos for Pred<N>
[src]

impl<N: NonPos> NonZero for Pred<N>
[src]

impl<Lhs, Rhs> Add<Rhs> for Pred<Lhs> where
    Lhs: NonPos + Add<Rhs>,
    Rhs: NonPos,
    <Lhs as Add<Rhs>>::Output: NonPos
[src]

Add non-positive numbers to negative numbers (e.g. -2 + -3, -2 + 0)

The resulting type after applying the + operator

The method for the + operator

impl<Lhs, Rhs> Add<Succ<Rhs>> for Pred<Lhs> where
    Lhs: NonPos + Add<Rhs>,
    Rhs: NonNeg
[src]

Add positive and negative numbers (e.g. -2 + 3)

The resulting type after applying the + operator

The method for the + operator

impl<N> Neg for Pred<N> where
    N: NonPos + Neg,
    <N as Neg>::Output: NonNeg
[src]

Negate negative numbers (e.g. -5 -> 5)

The resulting type after applying the - operator

The method for the unary - operator

impl<Lhs> Sub<Zero> for Pred<Lhs> where
    Lhs: NonPos
[src]

Subtract Zero from negative numbers (e.g. -2 - 0)

The resulting type after applying the - operator

The method for the - operator

impl<Lhs, Rhs> Sub<Pred<Rhs>> for Pred<Lhs> where
    Lhs: NonPos + Sub<Rhs>,
    Rhs: NonPos
[src]

Subtract negative numbers from negative numbers (e.g. -3 - -4)

The resulting type after applying the - operator

The method for the - operator

impl<Lhs, Rhs> Sub<Succ<Rhs>> for Pred<Lhs> where
    Lhs: NonPos + Sub<Rhs>,
    Rhs: NonNeg,
    <Lhs as Sub<Rhs>>::Output: NonPos
[src]

Subtract positive numbers from negative numbers (e.g. -3 - 4)

The resulting type after applying the - operator

The method for the - operator

impl<Lhs, Rhs> Mul<Rhs> for Pred<Lhs> where
    Lhs: NonPos + Mul<Rhs>,
    Rhs: Peano,
    <Lhs as Mul<Rhs>>::Output: Sub<Rhs>, 
[src]

Multiply negative numbers by integers (e.g. -2 * N)

The resulting type after applying the * operator

The method for the * operator

impl<Lhs, Rhs> Div<Rhs> for Pred<Lhs> where
    Lhs: NonPos + Neg,
    Rhs: Neg,
    Succ<<Lhs as Neg>::Output>: DivPrivate<<Rhs as Neg>::Output>,
    <Lhs as Neg>::Output: NonNeg
[src]

Divide a negative number by a non-zero number (e.g. -4 / 2, -4 / -2). Only defined for numbers that are evenly divisible.

The resulting type after applying the / operator

The method for the / operator

impl<N: NonPos + ToInt> ToInt for Pred<N>
[src]