Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
set_of_divisors_function [2014/03/21 11:11] 127.0.0.1 external edit |
set_of_divisors_function [2016/05/24 19:19] nikolaj |
||
---|---|---|---|
Line 4: | Line 4: | ||
| @#FFBB00: definiendum | @#FFBB00: $ \mathrm{divisors}:\mathbb N^+\to\mathcal{P}(\mathbb N) $ | | | @#FFBB00: definiendum | @#FFBB00: $ \mathrm{divisors}:\mathbb N^+\to\mathcal{P}(\mathbb N) $ | | ||
| @#FFBB00: definiendum | @#FFBB00: $ \mathrm{divisors}(n):=\{a\ |\ \exists (b\in\mathbb N).\ a\cdot b=n\} $ | | | @#FFBB00: definiendum | @#FFBB00: $ \mathrm{divisors}(n):=\{a\ |\ \exists (b\in\mathbb N).\ a\cdot b=n\} $ | | ||
+ | |||
+ | >make this into a set | ||
==== Discussion ==== | ==== Discussion ==== | ||
Line 9: | Line 11: | ||
A related Boolean function is | A related Boolean function is | ||
<code haskell> | <code haskell> | ||
- | divides :: Integer -> Integer -> Bool | + | divides :: Integral a => a -> a -> Bool |
divides d n = rem n d == 0 | divides d n = rem n d == 0 | ||
</code> | </code> |