[Imprint][Data Privacy Statement][E-Mail]
Back to main index.
View the specification.
View theorem base summary,
View theorem base listing,
the used properties by spec,
the dependency list,
the symbol table,
specification
data types
Option[A] = Some(. get : A)
| None
;
variables
a : A;
opt : Option[A];
get : A;
functions
. map ( . ) : Option[A] × (A → B) → Option[B];
. getOrElse ( . ) : Option[A] × A → A;
. o . : (B → Option[C]) × (A → Option[B]) → A → Option[C];
predicates
oinj : (A → Option[B]);
osurj : (A → Option[B]);
variables
opt : Option[A];
f : A → B;
of : A → Option[B];
b : B;
og : B → Option[C];
axioms
map-Some: Some(a).map(f) = Some(f(a));
used for: s, ls;
map-None: None.map(f) = None;
used for: s, ls;
getOrElse-Some: Some(a).getOrElse(a0) = a;
used for: s, ls;
getOrElse-None: None.getOrElse(a0) = a0;
used for: s, ls;
compose-def: (og o of)(a) = (of(a) ≠ None ⊃ og(of(a).get);None);
used for: s, ls;
oinj-def: oinj(of) ↔ (∀ a1, a2. of(a1) ≠ None ∧ of(a1) = of(a2) → a1 = a2);
used for: ls;
osurj-def: osurj(of) ↔ (∀ b. ∃ a. of(a) = Some(b));
used for: ls;
end specification