constraints-0.14.2: Constraint manipulation

Safe Haskell | Trustworthy
Language | Haskell2010

Data.Constraint.Nat

Description

Utilities for working with `KnownNat` constraints.

This module is only available on GHC 8.0 or later.

Synopsis

- type family Min (m :: Nat) (n :: Nat) :: Nat where ...
- type family Max (m :: Nat) (n :: Nat) :: Nat where ...
- type family Lcm (m :: Nat) (n :: Nat) :: Nat where ...
- type family Gcd (m :: Nat) (n :: Nat) :: Nat where ...
- type Divides (n :: Nat) (m :: Nat) = n ~ Gcd n m
- type family Div (a :: Natural) (b :: Natural) :: Natural where ...
- type family Mod (a :: Natural) (b :: Natural) :: Natural where ...
- type family Log2 (a :: Natural) :: Natural where ...
- plusNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (n + m)
- minusNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m, m <= n) :- KnownNat (n - m)
- timesNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (n * m)
- powNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (n ^ m)
- minNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Min n m)
- maxNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Max n m)
- gcdNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Gcd n m)
- lcmNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Lcm n m)
- divNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m, 1 <= m) :- KnownNat (Div n m)
- modNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m, 1 <= m) :- KnownNat (Mod n m)
- log2Nat :: forall (n :: Nat). (KnownNat n, 1 <= n) :- KnownNat (Log2 n)
- plusZero :: forall (n :: Natural). Dict ((n + 0) ~ n)
- minusZero :: forall (n :: Natural). Dict ((n - 0) ~ n)
- timesZero :: forall (n :: Natural). Dict ((n * 0) ~ 0)
- timesOne :: forall (n :: Natural). Dict ((n * 1) ~ n)
- powZero :: forall (n :: Natural). Dict ((n ^ 0) ~ 1)
- powOne :: forall (n :: Natural). Dict ((n ^ 1) ~ n)
- maxZero :: forall (n :: Nat). Dict (Max n 0 ~ n)
- minZero :: forall (n :: Nat). Dict (Min n 0 ~ 0)
- gcdZero :: forall (a :: Nat). Dict (Gcd 0 a ~ a)
- gcdOne :: forall (a :: Nat). Dict (Gcd 1 a ~ 1)
- lcmZero :: forall (a :: Nat). Dict (Lcm 0 a ~ 0)
- lcmOne :: forall (a :: Nat). Dict (Lcm 1 a ~ a)
- plusAssociates :: forall (m :: Natural) (n :: Natural) (o :: Natural). Dict (((m + n) + o) ~ (m + (n + o)))
- timesAssociates :: forall (m :: Natural) (n :: Natural) (o :: Natural). Dict (((m * n) * o) ~ (m * (n * o)))
- minAssociates :: forall (m :: Nat) (n :: Nat) (o :: Nat). Dict (Min (Min m n) o ~ Min m (Min n o))
- maxAssociates :: forall (m :: Nat) (n :: Nat) (o :: Nat). Dict (Max (Max m n) o ~ Max m (Max n o))
- gcdAssociates :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Gcd (Gcd a b) c ~ Gcd a (Gcd b c))
- lcmAssociates :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Lcm (Lcm a b) c ~ Lcm a (Lcm b c))
- plusCommutes :: forall (n :: Natural) (m :: Natural). Dict ((m + n) ~ (n + m))
- timesCommutes :: forall (n :: Natural) (m :: Natural). Dict ((m * n) ~ (n * m))
- minCommutes :: forall (n :: Nat) (m :: Nat). Dict (Min m n ~ Min n m)
- maxCommutes :: forall (n :: Nat) (m :: Nat). Dict (Max m n ~ Max n m)
- gcdCommutes :: forall (a :: Nat) (b :: Nat). Dict (Gcd a b ~ Gcd b a)
- lcmCommutes :: forall (a :: Nat) (b :: Nat). Dict (Lcm a b ~ Lcm b a)
- plusDistributesOverTimes :: forall (n :: Natural) (m :: Natural) (o :: Natural). Dict ((n * (m + o)) ~ ((n * m) + (n * o)))
- timesDistributesOverPow :: forall (n :: Natural) (m :: Natural) (o :: Natural). Dict ((n ^ (m + o)) ~ ((n ^ m) * (n ^ o)))
- timesDistributesOverGcd :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Gcd m o) ~ Gcd (n * m) (n * o))
- timesDistributesOverLcm :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Lcm m o) ~ Lcm (n * m) (n * o))
- minDistributesOverPlus :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n + Min m o) ~ Min (n + m) (n + o))
- minDistributesOverTimes :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Min m o) ~ Min (n * m) (n * o))
- minDistributesOverPow1 :: forall (n :: Nat) (m :: Nat) (o :: Natural). Dict ((Min n m ^ o) ~ Min (n ^ o) (m ^ o))
- minDistributesOverPow2 :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n ^ Min m o) ~ Min (n ^ m) (n ^ o))
- minDistributesOverMax :: forall (n :: Nat) (m :: Nat) (o :: Nat). Dict (Max n (Min m o) ~ Min (Max n m) (Max n o))
- maxDistributesOverPlus :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n + Max m o) ~ Max (n + m) (n + o))
- maxDistributesOverTimes :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Max m o) ~ Max (n * m) (n * o))
- maxDistributesOverPow1 :: forall (n :: Nat) (m :: Nat) (o :: Natural). Dict ((Max n m ^ o) ~ Max (n ^ o) (m ^ o))
- maxDistributesOverPow2 :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n ^ Max m o) ~ Max (n ^ m) (n ^ o))
- maxDistributesOverMin :: forall (n :: Nat) (m :: Nat) (o :: Nat). Dict (Min n (Max m o) ~ Max (Min n m) (Min n o))
- gcdDistributesOverLcm :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Gcd (Lcm a b) c ~ Lcm (Gcd a c) (Gcd b c))
- lcmDistributesOverGcd :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Lcm (Gcd a b) c ~ Gcd (Lcm a c) (Lcm b c))
- minIsIdempotent :: forall (n :: Nat). Dict (Min n n ~ n)
- maxIsIdempotent :: forall (n :: Nat). Dict (Max n n ~ n)
- lcmIsIdempotent :: forall (n :: Nat). Dict (Lcm n n ~ n)
- gcdIsIdempotent :: forall (n :: Nat). Dict (Gcd n n ~ n)
- plusIsCancellative :: forall (n :: Natural) (m :: Natural) (o :: Natural). ((n + m) ~ (n + o)) :- (m ~ o)
- timesIsCancellative :: forall (n :: Natural) (m :: Natural) (o :: Natural). (1 <= n, (n * m) ~ (n * o)) :- (m ~ o)
- dividesPlus :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (b + c)
- dividesTimes :: forall (a :: Nat) (b :: Nat) (c :: Natural). Divides a b :- Divides a (b * c)
- dividesMin :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (Min b c)
- dividesMax :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (Max b c)
- dividesPow :: forall (n :: Natural) (a :: Nat) (b :: Nat). (1 <= n, Divides a b) :- Divides a (b ^ n)
- dividesGcd :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (Gcd b c)
- dividesLcm :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a c, Divides b c) :- Divides (Lcm a b) c
- plusMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- ((a + c) <= (b + c))
- plusMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- ((a + b) <= (a + c))
- timesMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- ((a * c) <= (b * c))
- timesMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- ((a * b) <= (a * c))
- powMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- ((a ^ c) <= (b ^ c))
- powMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- ((a ^ b) <= (a ^ c))
- minMonotone1 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (a <= b) :- (Min a c <= Min b c)
- minMonotone2 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (b <= c) :- (Min a b <= Min a c)
- maxMonotone1 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (a <= b) :- (Max a c <= Max b c)
- maxMonotone2 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (b <= c) :- (Max a b <= Max a c)
- divMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- (Div a c <= Div b c)
- divMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- (Div a c <= Div a b)
- euclideanNat :: forall (c :: Natural) (a :: Natural). (1 <= c) :- (a ~ ((c * Div a c) + Mod a c))
- plusMod :: forall (a :: Natural) (b :: Natural) (c :: Natural). (1 <= c) :- (Mod (a + b) c ~ Mod (Mod a c + Mod b c) c)
- timesMod :: forall (a :: Natural) (b :: Natural) (c :: Natural). (1 <= c) :- (Mod (a * b) c ~ Mod (Mod a c * Mod b c) c)
- modBound :: forall (m :: Natural) (n :: Natural). (1 <= n) :- (Mod m n <= n)
- log2Pow :: forall (n :: Natural). Dict (Log2 (2 ^ n) ~ n)
- dividesDef :: forall (a :: Nat) (b :: Nat). Divides a b :- (Mod b a ~ 0)
- timesDiv :: forall (a :: Natural) (b :: Natural). Dict ((a * Div b a) <= b)
- eqLe :: forall (a :: Nat) (b :: Nat). (a ~ b) :- (a <= b)
- leEq :: forall (a :: Nat) (b :: Nat). (a <= b, b <= a) :- (a ~ b)
- leId :: forall (a :: Nat). Dict (a <= a)
- leTrans :: forall (a :: Nat) (b :: Nat) (c :: Nat). (b <= c, a <= b) :- (a <= c)
- leZero :: forall (a :: Natural). (a <= 0) :- (a ~ 0)
- zeroLe :: forall (a :: Nat). Dict (0 <= a)
- plusMinusInverse1 :: forall (n :: Natural) (m :: Natural). Dict (((m + n) - n) ~ m)
- plusMinusInverse2 :: forall (n :: Natural) (m :: Natural). (m <= n) :- (((m + n) - m) ~ n)
- plusMinusInverse3 :: forall (n :: Natural) (m :: Natural). (n <= m) :- (((m - n) + n) ~ m)

# Documentation

type family Min (m :: Nat) (n :: Nat) :: Nat where ... #

Equations

Min m n = If (n <=? m) n m |

type family Max (m :: Nat) (n :: Nat) :: Nat where ... #

Equations

Max m n = If (n <=? m) m n |

type family Lcm (m :: Nat) (n :: Nat) :: Nat where ... #

Equations

Lcm m m = m |

type family Gcd (m :: Nat) (n :: Nat) :: Nat where ... #

Equations

Gcd m m = m |

type Divides (n :: Nat) (m :: Nat) = n ~ Gcd n m #

type family Div (a :: Natural) (b :: Natural) :: Natural where ... infixl 7 #

Division (round down) of natural numbers. `Div x 0` is undefined (i.e., it cannot be reduced).

@since base-4.11.0.0

type family Mod (a :: Natural) (b :: Natural) :: Natural where ... infixl 7 #

Modulus of natural numbers. `Mod x 0` is undefined (i.e., it cannot be reduced).

@since base-4.11.0.0

type family Log2 (a :: Natural) :: Natural where ... #

Log base 2 (round down) of natural numbers. `Log 0` is undefined (i.e., it cannot be reduced).

@since base-4.11.0.0

plusNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (n + m) #

minusNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m, m <= n) :- KnownNat (n - m) #

timesNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (n * m) #

powNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (n ^ m) #

minNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Min n m) #

maxNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Max n m) #

gcdNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Gcd n m) #

lcmNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m) :- KnownNat (Lcm n m) #

divNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m, 1 <= m) :- KnownNat (Div n m) #

modNat :: forall (n :: Nat) (m :: Nat). (KnownNat n, KnownNat m, 1 <= m) :- KnownNat (Mod n m) #

log2Nat :: forall (n :: Nat). (KnownNat n, 1 <= n) :- KnownNat (Log2 n) #

plusZero :: forall (n :: Natural). Dict ((n + 0) ~ n) #

minusZero :: forall (n :: Natural). Dict ((n - 0) ~ n) #

timesZero :: forall (n :: Natural). Dict ((n * 0) ~ 0) #

timesOne :: forall (n :: Natural). Dict ((n * 1) ~ n) #

powZero :: forall (n :: Natural). Dict ((n ^ 0) ~ 1) #

powOne :: forall (n :: Natural). Dict ((n ^ 1) ~ n) #

maxZero :: forall (n :: Nat). Dict (Max n 0 ~ n) #

minZero :: forall (n :: Nat). Dict (Min n 0 ~ 0) #

gcdZero :: forall (a :: Nat). Dict (Gcd 0 a ~ a) #

gcdOne :: forall (a :: Nat). Dict (Gcd 1 a ~ 1) #

lcmZero :: forall (a :: Nat). Dict (Lcm 0 a ~ 0) #

lcmOne :: forall (a :: Nat). Dict (Lcm 1 a ~ a) #

plusAssociates :: forall (m :: Natural) (n :: Natural) (o :: Natural). Dict (((m + n) + o) ~ (m + (n + o))) #

timesAssociates :: forall (m :: Natural) (n :: Natural) (o :: Natural). Dict (((m * n) * o) ~ (m * (n * o))) #

minAssociates :: forall (m :: Nat) (n :: Nat) (o :: Nat). Dict (Min (Min m n) o ~ Min m (Min n o)) #

maxAssociates :: forall (m :: Nat) (n :: Nat) (o :: Nat). Dict (Max (Max m n) o ~ Max m (Max n o)) #

gcdAssociates :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Gcd (Gcd a b) c ~ Gcd a (Gcd b c)) #

lcmAssociates :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Lcm (Lcm a b) c ~ Lcm a (Lcm b c)) #

plusCommutes :: forall (n :: Natural) (m :: Natural). Dict ((m + n) ~ (n + m)) #

timesCommutes :: forall (n :: Natural) (m :: Natural). Dict ((m * n) ~ (n * m)) #

minCommutes :: forall (n :: Nat) (m :: Nat). Dict (Min m n ~ Min n m) #

maxCommutes :: forall (n :: Nat) (m :: Nat). Dict (Max m n ~ Max n m) #

gcdCommutes :: forall (a :: Nat) (b :: Nat). Dict (Gcd a b ~ Gcd b a) #

lcmCommutes :: forall (a :: Nat) (b :: Nat). Dict (Lcm a b ~ Lcm b a) #

plusDistributesOverTimes :: forall (n :: Natural) (m :: Natural) (o :: Natural). Dict ((n * (m + o)) ~ ((n * m) + (n * o))) #

timesDistributesOverPow :: forall (n :: Natural) (m :: Natural) (o :: Natural). Dict ((n ^ (m + o)) ~ ((n ^ m) * (n ^ o))) #

timesDistributesOverGcd :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Gcd m o) ~ Gcd (n * m) (n * o)) #

timesDistributesOverLcm :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Lcm m o) ~ Lcm (n * m) (n * o)) #

minDistributesOverPlus :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n + Min m o) ~ Min (n + m) (n + o)) #

minDistributesOverTimes :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Min m o) ~ Min (n * m) (n * o)) #

minDistributesOverPow1 :: forall (n :: Nat) (m :: Nat) (o :: Natural). Dict ((Min n m ^ o) ~ Min (n ^ o) (m ^ o)) #

minDistributesOverPow2 :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n ^ Min m o) ~ Min (n ^ m) (n ^ o)) #

minDistributesOverMax :: forall (n :: Nat) (m :: Nat) (o :: Nat). Dict (Max n (Min m o) ~ Min (Max n m) (Max n o)) #

maxDistributesOverPlus :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n + Max m o) ~ Max (n + m) (n + o)) #

maxDistributesOverTimes :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n * Max m o) ~ Max (n * m) (n * o)) #

maxDistributesOverPow1 :: forall (n :: Nat) (m :: Nat) (o :: Natural). Dict ((Max n m ^ o) ~ Max (n ^ o) (m ^ o)) #

maxDistributesOverPow2 :: forall (n :: Natural) (m :: Nat) (o :: Nat). Dict ((n ^ Max m o) ~ Max (n ^ m) (n ^ o)) #

maxDistributesOverMin :: forall (n :: Nat) (m :: Nat) (o :: Nat). Dict (Min n (Max m o) ~ Max (Min n m) (Min n o)) #

gcdDistributesOverLcm :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Gcd (Lcm a b) c ~ Lcm (Gcd a c) (Gcd b c)) #

lcmDistributesOverGcd :: forall (a :: Nat) (b :: Nat) (c :: Nat). Dict (Lcm (Gcd a b) c ~ Gcd (Lcm a c) (Lcm b c)) #

minIsIdempotent :: forall (n :: Nat). Dict (Min n n ~ n) #

maxIsIdempotent :: forall (n :: Nat). Dict (Max n n ~ n) #

lcmIsIdempotent :: forall (n :: Nat). Dict (Lcm n n ~ n) #

gcdIsIdempotent :: forall (n :: Nat). Dict (Gcd n n ~ n) #

plusIsCancellative :: forall (n :: Natural) (m :: Natural) (o :: Natural). ((n + m) ~ (n + o)) :- (m ~ o) #

timesIsCancellative :: forall (n :: Natural) (m :: Natural) (o :: Natural). (1 <= n, (n * m) ~ (n * o)) :- (m ~ o) #

dividesPlus :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (b + c) #

dividesTimes :: forall (a :: Nat) (b :: Nat) (c :: Natural). Divides a b :- Divides a (b * c) #

dividesMin :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (Min b c) #

dividesMax :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (Max b c) #

dividesPow :: forall (n :: Natural) (a :: Nat) (b :: Nat). (1 <= n, Divides a b) :- Divides a (b ^ n) #

dividesGcd :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a b, Divides a c) :- Divides a (Gcd b c) #

dividesLcm :: forall (a :: Nat) (b :: Nat) (c :: Nat). (Divides a c, Divides b c) :- Divides (Lcm a b) c #

plusMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- ((a + c) <= (b + c)) #

plusMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- ((a + b) <= (a + c)) #

timesMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- ((a * c) <= (b * c)) #

timesMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- ((a * b) <= (a * c)) #

powMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- ((a ^ c) <= (b ^ c)) #

powMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- ((a ^ b) <= (a ^ c)) #

minMonotone1 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (a <= b) :- (Min a c <= Min b c) #

minMonotone2 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (b <= c) :- (Min a b <= Min a c) #

maxMonotone1 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (a <= b) :- (Max a c <= Max b c) #

maxMonotone2 :: forall (a :: Nat) (b :: Nat) (c :: Nat). (b <= c) :- (Max a b <= Max a c) #

divMonotone1 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (a <= b) :- (Div a c <= Div b c) #

divMonotone2 :: forall (a :: Natural) (b :: Natural) (c :: Natural). (b <= c) :- (Div a c <= Div a b) #

euclideanNat :: forall (c :: Natural) (a :: Natural). (1 <= c) :- (a ~ ((c * Div a c) + Mod a c)) #

plusMod :: forall (a :: Natural) (b :: Natural) (c :: Natural). (1 <= c) :- (Mod (a + b) c ~ Mod (Mod a c + Mod b c) c) #

timesMod :: forall (a :: Natural) (b :: Natural) (c :: Natural). (1 <= c) :- (Mod (a * b) c ~ Mod (Mod a c * Mod b c) c) #

modBound :: forall (m :: Natural) (n :: Natural). (1 <= n) :- (Mod m n <= n) #

log2Pow :: forall (n :: Natural). Dict (Log2 (2 ^ n) ~ n) #

dividesDef :: forall (a :: Nat) (b :: Nat). Divides a b :- (Mod b a ~ 0) #

timesDiv :: forall (a :: Natural) (b :: Natural). Dict ((a * Div b a) <= b) #

eqLe :: forall (a :: Nat) (b :: Nat). (a ~ b) :- (a <= b) #

leEq :: forall (a :: Nat) (b :: Nat). (a <= b, b <= a) :- (a ~ b) #

leId :: forall (a :: Nat). Dict (a <= a) #

leTrans :: forall (a :: Nat) (b :: Nat) (c :: Nat). (b <= c, a <= b) :- (a <= c) #

leZero :: forall (a :: Natural). (a <= 0) :- (a ~ 0) #

zeroLe :: forall (a :: Nat). Dict (0 <= a) #

plusMinusInverse1 :: forall (n :: Natural) (m :: Natural). Dict (((m + n) - n) ~ m) #

plusMinusInverse2 :: forall (n :: Natural) (m :: Natural). (m <= n) :- (((m + n) - m) ~ n) #

plusMinusInverse3 :: forall (n :: Natural) (m :: Natural). (n <= m) :- (((m - n) + n) ~ m) #