Posts Tagged "math"

See All Tags

An Integer That Only Decreases?

Is it correct to say that a type system needs to implement dependent types if it is to allow the expression of an integer that can only decrease? The goal would be to define a type R Integer such that a function R Integer -> R Integer would only compile if the Integer inside the output value was equal or less to the one inside the input.

Dumb Arithmetic

You can divide 12 into 3rds or 4ths evenly.

But, if you take 1/3rd from 12 (= 4) and add it to 12, you get 16, which can't evenly divide into 3rds (but can into 4ths.) If you take 1/4th of 12 (= 3) and add it to 12, you get 15, which can't evenly divide into 4ths (but can into 3rds.)

Does this point at anything interesting, or am I just a dingus?