product[T: TYPEFROM int]: THEORY %------------------------------------------------------------------------------ % The products theory introduces and defines properties of the product % function that multiples an arbitrary function F: [T -> int] over a range % from low to high % % high % ---- % product(low, high, F) = | | F(j) % | | % j = low % % AUTHORS: % % Rick Butler NASA Langley Research Center % Paul Miner NASA Langley Research Center % %------------------------------------------------------------------------------
BEGIN
ASSUMING
connected_domain: ASSUMPTION (FORALL (x, y: T), (z: integer):
x <= z AND z <= y IMPLIES T_pred(z))
ENDASSUMING
T_low?: MACRO set[int] = {i:int | EXISTS (j:T): j <= i}
T_low : TYPE = {i:int | T_pred(i) OR T_low?(i)}
T_high?: MACRO set[int] = {i:int | EXISTS (j:T): i <= j}
T_high : TYPE = {i:int | T_pred(i) OR T_high?(i)}
low : VAR T_low
high : VAR T_high
l,h,n,m,i : VAR T
rng, nn : VAR nat
pn : VAR posnat
z : VAR int
a,x : VAR int
nzr : VAR nzint
T_pred_lem : LEMMA low <= z AND z <= high IMPLIES T_pred(z)
product_scal : THEOREM low <= high AND a /= 0 IMPLIES product(low, high, (LAMBDA i: a * F(i)))
= a^(high-low+1) * product(low, high, F)
% B: VAR posint % product_bound : THEOREM low - 1 <= high AND % (FORALL i: i >= low AND i <= high IMPLIES 0 <= F(i) AND F(i) <= B) % IMPLIES product(low, high, F) <= B^(high-low+1)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.