- class Ring a ⇒ NormedRing a where
- norm ∷ a → NonnegativeRational → Bool
- normUpperBound ∷ a → NonnegativeRational
- props_normUpperBound ∷ (NormedRing a, Arbitrary a, Show a) ⇒ Proxy a → [Property]
- check_NormedRing ∷ IO ()
Documentation
class Ring a ⇒ NormedRing a where
Klasse fuer Ringe mit Norm, wie beispielsweise Rational
und
ComplexRational
.
norm ∷ a → NonnegativeRational → Bool
Gewoehnlich erwartet man ja von einer Norm, dass sie jedem Element ihre Laenge als reelle Zahl zuordnet. Diese Definition ist fuer unsere Zwecke aber nicht geeignet, da wir die reellen Zahlen erst durch einen geeigneten Vervollstaendigungsprozess aus den rationalen Zahlen erhalten wollen.
Die Anschauung hinter unserer Definition ist folgende: norm x q soll genau dann wahr sein, wenn die Laenge von x kleinergleich q ist.
normUpperBound ∷ a → NonnegativeRational
Liefert eine obere Schranke fuer die Norm einer Zahl, es soll also folgende Spezifikation erfuellt sein:
norm x (normUpperBound x) == True.
NormedRing ComplexRational | |
NormedRing (Ratio Integer) | |
NormedRing a ⇒ NormedRing (F a) |
props_normUpperBound ∷ (NormedRing a, Arbitrary a, Show a) ⇒ Proxy a → [Property]
check_NormedRing ∷ IO ()