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/02/22 02:24] nikolaj |
set_of_divisors_function [2016/05/24 19:19] nikolaj |
||
---|---|---|---|
Line 2: | Line 2: | ||
==== Function ==== | ==== Function ==== | ||
- | | @#FFBB00: $ \mathrm{divisors}:\mathbb N^+\to\mathcal{P}(\mathbb N) $ | | + | | @#FFBB00: definiendum | @#FFBB00: $ \mathrm{divisors}:\mathbb N^+\to\mathcal{P}(\mathbb N) $ | |
- | | @#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> |